Model or dataset
InterfaceX-co-jp/genshijin avatar
InterfaceX-co-jp/genshijin

genshijin: a Japanese compression skill for Claude Code and Codex

genshijin 原始人 🗿| Claude Code / Codex等AIエージェント 向け超圧縮コミュニケーションスキル。caveman の日本語版をベースに、日本語特有の冗長表現に最適化。

328 stars12 forksJavaScriptMIT

At a glance

What is it?
genshijin rewrites the assistant's own replies into terse Japanese, and it ships sub-skills that compress commit messages, PR reviews, memory files and MCP tool descriptions. The README claims about 75% token reduction; the interesting part is how the skill is injected and what it refuses to touch.
Who is it for?
Adopt genshijin if your Claude Code sessions run in Japanese and you are paying for the polite padding in every reply: the SessionStart hook plus the per-turn reminder are what keep the style from drifting back after twenty turns. Skip it if your prompts and code comments are English, because the reduction targets are Japanese-specific (keigo, cushion words, doubled honorifics) and the English caveman skill already covers the article-and-filler case.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 32 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What genshijin actually removes from a Japanese reply

The project is a communication skill, not a code tool. It sits between the model and the user and rewrites the model's own output into short Japanese. The README frames the pitch as a question: why spend many tokens when few will do. It states a reduction of roughly 75% in token usage while keeping technical accuracy at 100%, which is a claim from the project, not something verified here.

The mechanism is a substitution table aimed at Japanese habits rather than English ones. Where the English caveman skill deletes articles and fillers like just or basically, genshijin targets keigo (です, ます, ございます), cushion phrases (えーと, まあ, 基本的に, 一応), opening courtesies (ご質問ありがとうございます), hedging (〜かもしれません, おそらく), and doubled honorifics or long particle chains. The README's own before-and-after pairs show the shape of it: a sentence about connection pooling becomes プール = DB接続再利用。ハンドシェイク省略 → 高負荷時に高速。

Three intensity levels exist. 丁寧 keeps honorifics and drops only cushion words and hedges, which the README positions for business mail. 通常 drops keigo and uses 体言止め. 極限 goes to abbreviations, arrow notation and one-word answers. The audience is developers running Claude Code or Codex in Japanese who care about input and output token cost more than about tone.

Hooks, the active flag, and why the style does not drift back

A style instruction given once decays. Genshijin addresses that with Claude Code's hook system, and this is the part of the design worth reading closely.

On SessionStart the hook reads SKILL.md, filters it down to the lines for the currently active level, and injects only those into hidden context. On every UserPromptSubmit it detects mode switches, either from the slash command or from natural language such as 原始人モード or 原始人やめて, and injects a short reinforcing reminder. The README explains the reason: other plugins may inject competing style instructions on every turn, and the per-turn reminder is there to hold the line.

State lives in a flag file at ~/.claude/.genshijin-active. The README states it is protected by symlink rejection, a 64-byte size cap and a mode whitelist. The threat described is concrete: replacing the flag with a symlink to ~/.ssh/id_rsa so that secret bytes leak into the statusline or the model context. That is a small attack surface, but it is a real one for a file the model reads.

Default mode resolves in the order environment variable, then config file, then normal. Setting off makes the hook skip injection and removes the flag, so the plugin can stay installed but paused.

Installing genshijin and running the first compression

The README lists four install paths. The recommended one is the official Claude Code plugin directory, which needs no marketplace add:

bash
/plugin install genshijin

Methods 1b and 2 cover the development branch and a third-party npx route. The manual route writes the skill file directly, project-scoped or global:

bash
mkdir -p .claude/skills/genshijin
curl -o .claude/skills/genshijin/SKILL.md \
  https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/skills/genshijin/SKILL.md

After install, the slash command takes an optional level. The README gives these three forms, and 原始人やめて or 通常モード turns it off mid-conversation:

bash
/genshijin          # 通常モード(デフォルト)で起動
/genshijin 丁寧     # ビジネス向け簡潔体
/genshijin 極限     # 最大圧縮

The first genuinely useful thing to try is genshijin-compress on your own memory file. It needs Python 3.10 or newer plus either an Anthropic API key or an already logged-in claude CLI. The README's example target is the user-level memory file, which is read at the start of every session, so compression there pays back repeatedly:

bash
pip install anthropic
export ANTHROPIC_API_KEY=sk-ant-...
/genshijin-compress ~/.claude/CLAUDE.md

The result overwrites the file, keeps a human-readable copy at CLAUDE.original.md, and leaves the original untouched if the run fails. Expect the compressed version to look strange to a human reader. That is the point, and it is also the reason to read the backup before committing the change.

Sub-skills, and where the token accounting comes from

Six sub-skills ship alongside the main one. genshijin-commit writes Conventional Commits messages with a subject of 50 characters or fewer and an emphasis on why. genshijin-review emits one-line review comments in the form L42: バグ: user null。ガード追加。 genshijin-compress rewrites memory files. genshijin-help is a reference card.

The two added in v1.4.0 are the ones that touch measurement and multi-agent work. genshijin-stats reports real token usage for the current session, an estimated reduction, and a USD conversion, with flags --share, --all and --since 7d. The README describes the numbers as coming from a hook that displays them immediately, and describes the reduction as an estimate. Treat the USD figure as an estimate too, not an invoice line.

genshijin-crew runs three subagent presets named investigator, builder and reviewer, and compresses tool results in caveman style. The README states this cuts the main context by about 60%. Again, that is the project's figure. The design idea is separate from the number: subagent tool output is bulky and mostly disposable, so compressing it before it reaches the main context is a different lever from compressing the final reply.

The README also notes that v1.4.0 ported the remaining caveman upstream features, including stats receipts, the smart installer, a cavecrew equivalent, a cavepack equivalent and MCP-shrink.

The refusal rules are the real safety story

Compression that mangles a file path or a version number is worse than no compression. The README states genshijin-compress keeps code blocks, URLs, file paths, numbers, headings and technical terms intact, and that genshijin-shrink protects code, URLs, paths and identifiers byte-for-byte when it compresses MCP tool descriptions.

On the refusal side, the compress skill automatically rejects .env, credentials.*, id_rsa and anything under .ssh/. The README notes that a false positive can be worked around by renaming the file, which is honest but also means the guard is name-based. A secrets file with an unusual name is not covered by that list as written.

Two limits are worth stating plainly. First, genshijin-compress overwrites in place; the CLAUDE.original.md backup is the only recovery path the README documents, and there is no documented rollback command. Second, genshijin-shrink rewrites the description field of tools/list for any MCP server you wrap. If a downstream agent depends on the exact wording of a tool description, that is a behaviour change you introduced, and the README does not describe a per-tool opt-out.

Where genshijin is the wrong tool

The clearest mismatch is language. Every reduction category in the table is a Japanese one: keigo, cushion words, doubled honorifics. If your sessions run in English, the original caveman skill already covers articles, fillers and preambles, and genshijin adds a Japanese-specific layer you will not exercise.

The second mismatch is audience. 極限 mode produces output that a client, a non-engineer or a future reader of the ticket will find hostile. The README itself scopes 丁寧 to business mail, which is an admission that the compressed registers are not universally appropriate. Turning the skill on for customer-facing text is a decision about who reads the output, not about tokens.

Third, the whole thing depends on Claude Code's hook mechanism. The README describes the smart installer as detecting Claude Code, Cursor, Windsurf, Cline and Copilot, and genshijin-init as dropping rule files for Cursor, Windsurf, Cline, Copilot and AGENTS.md. But the SessionStart injection, the per-turn reinforcement, the statusline badge and the flag file are described as Claude Code features. Outside Claude Code you are getting static rule files, which is a weaker guarantee against drift. The README does not document an equivalent enforcement path for the other agents.

Alternatives and the honest comparison

The direct alternative is caveman, the English project genshijin is based on. The difference is not quality but target language: caveman removes articles and English fillers, genshijin removes keigo and Japanese padding. If you work bilingually, running both is coherent, since they operate on different surface patterns. If you work only in English, caveman is the shorter path.

A different kind of alternative is not installing a skill at all and instead putting a style rule in your CLAUDE.md or AGENTS.md. That is cheaper and has no hooks, no flag file and no symlink attack surface. It also drifts, which is exactly the problem the SessionStart and UserPromptSubmit hooks exist to solve. The README states the reason for the per-turn reminder: competing plugins inject style instructions every turn. If you run no other style plugins, a static rule may hold well enough, and you avoid the whole install.

A third option is to leave the model alone and reduce cost elsewhere, by trimming what you paste into the prompt or by moving bulky tool output into subagents. genshijin-crew is partly that idea, but you can do it without the compression layer.

Maintenance, licence and the upgrade path

The repository is not archived. Its last push was on 2026-08-15, which is recent relative to the releases listed: v1.5.0 on 2026-08-04, v1.4.0 on 2026-05-07 and v1.3.0 on 2026-04-18. That is a steady cadence across 2026, and v1.4.0 was a large port of upstream caveman features, so the project tracks its source rather than diverging from it.

The licence is MIT, which permits commercial use and modification. It does not grant rights to the Anthropic API or to any MCP server you wrap, and genshijin-compress calls the Anthropic API under your own key, so your usage terms with Anthropic govern that traffic. Nothing here is legal advice.

Upgrade cost looks low for the plugin path, since /plugin install pulls from the directory. The manual curl route pins nothing, so a re-run silently fetches whatever is on main. The Makefile shows how the maintainers release: a version is read from .claude-plugin/plugin.json, scripts/bump_version.py bumps it, and make release-commit then make release-push create and push the tag. That is useful context if you vendor the skill, because it tells you the version of record is the plugin manifest, not package.json, which is marked private and carries no version field.

Editorial conclusion

Adopt genshijin if your Claude Code sessions run in Japanese and you are paying for the polite padding in every reply: the SessionStart hook plus the per-turn reminder are what keep the style from drifting back after twenty turns. Skip it if your prompts and code comments are English, because the reduction targets are Japanese-specific (keigo, cushion words, doubled honorifics) and the English caveman skill already covers the article-and-filler case. Before trusting it, run /genshijin-compress on a copy of one CLAUDE.md and diff the result against the CLAUDE.original.md backup, and check whether ~/.claude/.genshijin-active exists and whether any other plugin is injecting its own style rules each turn.

Frequently asked questions

Does genshijin work with Codex and GitHub Copilot, or only Claude Code?

The README describes the smart installer as detecting Claude Code, Cursor, Windsurf, Cline and Copilot, and genshijin-init as generating rule files for Cursor, Windsurf, Cline, Copilot and AGENTS.md. The SessionStart injection, per-turn reminder, statusline badge and flag file are described as Claude Code hook features, so other agents get static rule files rather than that enforcement.

What happens to my CLAUDE.md if genshijin-compress produces a bad result?

The README states the compressed version overwrites the original file and a human-readable copy is kept at CLAUDE.original.md, and that a failed run leaves the original unchanged. No rollback command is documented, so the backup file is the recovery path.

How do I turn genshijin off without uninstalling the plugin?

During a conversation, 原始人やめて or 通常モード releases it. Setting the default mode to off makes the hook skip rule injection and removes the flag file, so the plugin stays installed but paused.

Official sources

  1. InterfaceX-co-jp/genshijin on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Community notes

Community notes