genshijin-compress Skill for Claude: Compress CLAUDE.md and Memory Files
Rewrites CLAUDE.md, todo and other memory files in a terse Japanese style to cut input tokens, and keeps a backup.
- Installs
- 12K
- on skills.sh
- Stars
- 331
- on GitHub
- Files
- 6
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
genshijin-compress rewrites a prose file such as CLAUDE.md into genshijin style: fewer polite phrases, hedges and filler words. It keeps code blocks, inline code, URLs, file paths, commands, version numbers and headings exactly. The compressed text replaces the original, and a readable copy is saved as FILE.original.md.
You call it with /genshijin-compress <filepath>. It runs a bundled Python script, which sends the file text to Claude through the Anthropic API or the claude command, checks the result, and retries up to twice. If it still fails, the original is restored. It needs Python 3.10 or newer and either ANTHROPIC_API_KEY or a logged-in claude CLI.
Good for
- Claude Code users with a long CLAUDE.md or MEMORY.md that loads every session
- Japanese-speaking teams whose notes are in Japanese
- People who want a verified rewrite that keeps code blocks, URLs and headings
Install genshijin-compress
Claude Code
- 1
Copy this prompt.
Install the genshijin-compress skill in Claude Code. Run this command: /plugin install genshijin Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
The plugin installs all 7 skills in the repo, 3 subagents and two hooks (SessionStart and UserPromptSubmit) that make Claude reply tersely by default. Its manifest registers no MCP server. The README says the Claude Code plugin is published in the official plugin directory. The last method installs only genshijin-compress, with none of the hooks. It also needs Python 3.10+. Run it from the skill folder with python3 -m scripts. Add pip install anthropic if you use an API key.
From the project README. Source.
What's in the skill
When it loads
自然言語メモリファイル(CLAUDE.md, todos, 設定)を原始人形式に圧縮し入力トークン削減。 技術内容・コード・URL・構造は完全保持。圧縮版が原ファイルを上書き、人間可読版は FILE.original.md として保存。「/genshijin-compress <filepath>」「メモリファイル圧縮」で起動。
Sections in SKILL.md
- 目的
- トリガー
- 処理フロー
- 圧縮ルール
- 削除
- 完全保持(絶対変更しない)
- 構造保持
- 圧縮
- パターン例
- 例1
- 例2
- 境界
- セキュリティ
Key facts
- License
- MIT (plugin manifest)
- Installs on skills.sh
- 11,974 (Nov 2, 2026)
- GitHub stars
- 331 (repo, Nov 2, 2026)
- Language
- SKILL.md is written in Japanese
- Last commit
- Oct 11, 2026 (repo)
What it includes
Runs python3 -m scripts on the file you name.
Compresses only prose files: .md, .txt or no extension. It leaves .py, .js, .json, .yaml, .env and similar files alone.
Try: “/genshijin-compress ./CLAUDE.md”
Runs code ·
/genshijin-compress <filepath>detect.py decides whether the file is prose or code before compressing.
If it cannot tell, the file is left unchanged.
Read ·
Detect file typecompress.py sends the body to Claude and writes the result in place of the original.
Frontmatter is kept untouched. It uses the Anthropic API with ANTHROPIC_API_KEY, or the claude CLI if there is no key.
Write ·
Compress with ClaudeSaves the readable text as FILE.original.md before overwriting.
FILE.original.md is never compressed itself.
Write ·
Back up the originalvalidate.py checks the result; up to 2 retries, then it restores the original.
Checks cover headings, code blocks, URLs, paths, bullets and inline code. Failures are fixed on the spot instead of recompressing everything.
Write ·
Validate and retryRefuses .env, keys, credentials, and .ssh, .aws or .kube folders.
It also refuses file names containing secret, credential, password, apikey or token.
Sensitive file refusal
From the official docs
Permissions
Medium risk
It runs a Python script that sends your file text to Claude and overwrites the file with a compressed version. Back the file up yourself, and do not point it at anything private.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It sends your file text to Claude
SKILL.md says compression sends the raw file to the Anthropic API. It refuses .env, key, credential and similar files, but the rule can miss a file, so rename or avoid private ones. github.com
It overwrites the file you name
The compressed text replaces the original, with the readable copy saved as FILE.original.md. The script restores the original if validation fails after retries. github.com
The plugin changes every session
The plugin route registers a SessionStart and a UserPromptSubmit hook that run node scripts. They switch Claude into terse genshijin replies by default, write a flag file under ~/.claude and, if you have no statusLine, tell Claude to suggest adding one to settings.json. Set GENSHIJIN_DEFAULT_MODE=off to stop the auto start. github.com
It uses your API key and model
compress.py reads ANTHROPIC_API_KEY and GENSHIJIN_MODEL (default claude-sonnet-4-5). Each run spends tokens from that account or from your claude CLI login. github.com
Technical details
| Talks to | Anthropic API (via the anthropic Python package) when ANTHROPIC_API_KEY is set; otherwise the claude CLI |
|---|---|
| Scopes |
|
Questions
What does genshijin-compress do?
It rewrites a prose file like CLAUDE.md in a terse style to cut input tokens. Code, URLs, paths, commands and headings stay exact, and a readable copy is saved as FILE.original.md.
How do I install genshijin-compress?
Use the install box above. The README route is the genshijin plugin, which adds 6 other skills, 3 subagents and hooks. The skills CLI command with --skill installs only this skill. You also need Python 3.10 or newer.
Does it need an API key?
Either an ANTHROPIC_API_KEY (with pip install anthropic) or a logged-in claude command. The script uses the key if it is set and the claude CLI otherwise.
Does it send my file anywhere?
Yes. SKILL.md says compression sends the raw text to the Anthropic API. It refuses .env files, keys, credentials and files with names like secret or token.
Can I get the original back?
Yes. The readable version is saved as FILE.original.md before the file is overwritten. If validation fails after retries, the script restores the original.
Is it safe to run?
It overwrites the file you point it at and sends the text to Claude, so use it on prose notes you are happy to share with your model provider. The plugin route also adds hooks that run at session start and on every prompt.
Information
updated Nov 2, 2026
- Repository
- interfacex-co-jp/genshijin
- Folder
skills/genshijin-compress
Sources
Docs, issue trackers and discussions this page is built from.
Show all 7Hide
- genshijin README · github.com
- plugin.json · github.com
- genshijin-activate.js · github.com
- genshijin-compress SKILL.md · github.com
- compress.py · github.com
- genshijin-compress on skills.sh · skills.sh
- InterfaceX-co-jp/genshijin · github.com