genshijin-compress

genshijin-compress is a skill for Claude Code from InterfaceX-co-jp/genshijin. It costs 104 tokens per session (1,789 once invoked), scanned C, original, MIT.

A file-compression tool for natural-language notes, settings, and agent memory files such as CLAUDE.md. It shortens the wording while keeping code, links, technical terms, file paths, commands, numbers, and document structure unchanged.

In plain words
What is it for?
Compress CLAUDE.md, todo lists, and configuration notes from a file path or command. It also checks the result and leaves the original unchanged if compression fails.
Why use it?
Long instruction files use input space that could instead hold the user's request and code context. This reduces that repeated text while preserving the original in a separate .original.md file.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the genshijin plugin — 7 skills, 6 commands, 3 agents shipped together

Good fit Compress CLAUDE.md, todo lists, and configuration notes from a file path or command. It also checks the result and leaves the original unchanged if compression fails.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/interfacex-co-jp/genshijin/genshijin-compress
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add InterfaceX-co-jp/genshijin --skill genshijin-compress
Clone the repo
git clone --depth 1 https://github.com/InterfaceX-co-jp/genshijin

Made for: Claude Code.

Or install genshijin, the plugin that ships this one along with the rest of its 7 skills, 6 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for genshijin-compress

README.md
[![agentmods](https://agentmods.dev/badge/skills/interfacex-co-jp/genshijin/genshijin-compress/github.svg)](https://agentmods.dev/skills/interfacex-co-jp/genshijin/genshijin-compress)
Your own site
<a href="https://agentmods.dev/skills/interfacex-co-jp/genshijin/genshijin-compress"><img src="https://agentmods.dev/badge/skills/interfacex-co-jp/genshijin/genshijin-compress/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for genshijin-compress

Your own site · 80×15
<a href="https://agentmods.dev/skills/interfacex-co-jp/genshijin/genshijin-compress"><img src="https://agentmods.dev/badge/skills/interfacex-co-jp/genshijin/genshijin-compress.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,789 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 11 May 2026
  • Snyk fail 11 May 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00104 $0.01789
Opus 5 $0.00052 $0.00894
Sonnet 5 $0.00021 $0.00358
Haiku 4.5 $0.00010 $0.00179

Measured 12d ago against content hash bf949bbd4fa7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade C, and why

genshijin-compress scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/__init__.py, scripts/__main__.py, scripts/cli.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

- `.env`, `.netrc`
skills/genshijin-compress/SKILL.md · 140 lines

What it actually says

genshijin-compress

目的

自然言語ファイル(CLAUDE.md, todos, 設定)を原始人モード化して入力トークン削減。圧縮版が原ファイル上書き、人間可読版は <filename>.original.md で保存。

トリガー

/genshijin-compress <filepath> または「メモリファイル圧縮」等の依頼。

処理フロー

  1. この SKILL.md と同ディレクトリの scripts/ を検出

  2. 実行:

    cd <SKILL.md を含むディレクトリ> && python3 -m scripts <絶対ファイルパス>
    
  3. CLI 処理内容:

    • ファイル種別検出(トークン消費なし)
    • Claude API/CLI で圧縮
    • 出力検証(トークン消費なし)
    • エラー時: Claude で該当箇所のみピンポイント修正(再圧縮せず)
    • 最大2回リトライ
    • 失敗時: ユーザーにエラー報告、原ファイルは無変更
  4. 結果をユーザーに返却

圧縮ルール

削除

  • 敬語・丁寧語(です/ます/ございます)
  • クッション言葉(えーと/まあ/ちなみに/一応/とりあえず/基本的に/ざっくり言うと)
  • 前置き(ご質問ありがとうございます/お力になれれば幸いです)
  • ぼかし(〜かもしれません/〜と思われます/おそらく)
  • 冗長表現(〜することができる→〜できる、〜というものは→〜は)
  • 冗長接続(〜ということになりますので→だから、〜させていただく→する)
  • 自明な助詞(が/の/を/に/で/は/と/も)
  • 形容動詞活用語尾(な/に/で/だ)→ 語幹止め
  • 形式名詞(こと/もの/ため)→ 名詞化 or 省略
  • 補助動詞(ている/ておく/てしまう)→ 状態表現

完全保持(絶対変更しない)

  • コードブロック(fenced ``` and indented)
  • インラインコード(backtick
  • URL・リンク(完全URL、Markdownリンク)
  • ファイルパス(/src/components/..., ./config.yaml
  • コマンド(npm install, git commit, docker build
  • 技術用語(ライブラリ名、API名、プロトコル、アルゴリズム)
  • 固有名詞(プロジェクト名、人名、企業名)
  • 日付、バージョン番号、数値
  • 環境変数($HOME, NODE_ENV
  • エラーメッセージ原文

構造保持

  • Markdown見出し全て(見出しテキストは完全保持、下の本文のみ圧縮)
  • 箇条書き階層(ネストレベル維持)
  • 番号付きリスト(番号維持)
  • テーブル(構造維持、セル内テキストのみ圧縮)
  • Frontmatter/YAMLヘッダ

圧縮

  • 体言止め・用言止め
  • 漢字連結で助詞吸収(「高負荷時に高速」→「高負荷時高速」)
  • 和語→漢語化(「速く動作」→「高速動作」)
  • 断片OK: 「コミット前テスト実行」不可「コミット前に必ずテストを実行してください」
  • 「〜してください」「〜することを忘れずに」削除 → 動作のみ記述
  • 重複箇条書きを統合
  • 同パターン複数例は1例のみ残す

重要ルール: ... 内は 完全コピー。 禁止:

  • コメント削除
  • スペース削除
  • 行順変更
  • コマンド短縮
  • 簡略化一切

インラインコード(...)は完全保持。バッククォート内は一切変更しない。

コードブロック含むファイル:

  • コードブロックは読取専用領域として扱う
  • 外側のテキストのみ圧縮
  • コード周辺セクションの結合禁止

パターン例

例1

原文:

main ブランチにプッシュする前には必ずテストスイートを実行するようにしてください。これはバグを早期に発見し、壊れたビルドが本番環境にデプロイされるのを防ぐために重要です。

圧縮:

main push前テスト実行。バグ早期発見、壊れビルド本番デプロイ防止。

例2

原文:

このアプリケーションは以下のコンポーネントを持つマイクロサービスアーキテクチャを採用しています。APIゲートウェイが全ての受信リクエストを処理し、適切なサービスにルーティングします。認証サービスはユーザーセッションとJWTトークンの管理を担当します。

圧縮:

マイクロサービスアーキテクチャ。APIゲートウェイ 全受信リクエストをサービスにルーティング。認証サービス ユーザーセッション + JWTトークン管理。

境界

  • 自然言語ファイルのみ圧縮(.md, .txt, 拡張子なし)
  • 絶対変更しない: .py, .js, .ts, .json, .yaml, .yml, .toml, .env, .lock, .css, .html, .xml, .sql, .sh
  • 混在ファイル(散文 + コード)は散文部分のみ圧縮
  • コードか散文か判断つかない場合は変更しない
  • 原ファイルは FILE.original.md にバックアップしてから上書き
  • FILE.original.md は絶対圧縮しない(スキップ)
  • 機密ファイル(.env, credentials, id_rsa 等)は絶対に送信しない → 拒否

セキュリティ

圧縮は Anthropic API に生データ送信。以下は拒否:

  • .env, .netrc
  • credentials.*, secrets.*, passwords.*
  • SSH鍵(id_rsa, id_ed25519 等)
  • 証明書(.pem, .key, .p12, .crt 等)
  • ディレクトリ .ssh, .aws, .gnupg, .kube, .docker 配下
  • ファイル名に secret/credential/password/apikey/token/privatekey 含むもの

ヒューリスティック誤検知時は、ファイル名変更で回避可能。

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 140 lines · 104 tokens per session scan C bf949bbd4fa7

Subscribe to this mod's changes

genshijin-compress is a skill published in the GitHub repository InterfaceX-co-jp/genshijin (326 stars, last pushed 27d ago), licensed MIT. It adds 104 tokens to every session and 1,789 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

learn-from-fix

Capture Elixir/Ecto/LiveView lessons and Hex API rules. Use after corrections or when asked to document learning, record a lesson, prevent a fixed mistake, or remember package guidance with --library.

oliver-kriska/claude-elixir-phoenix · 46 tokens

recall

Recall prior work from past sessions — how a bug was fixed, what was decided, where a pattern lives. Use when asked 'have we done this before' or 'how did I fix X' in Elixir/Phoenix work. ccrider MCP when available, else git + solution docs.

oliver-kriska/claude-elixir-phoenix · 64 tokens

assigns-audit

Inspect LiveView socket assigns for memory bloat — missing temporaryassigns, unused assigns, unbounded lists needing streams, memory estimates. Use when LiveView memory grows or you need to add temporaryassigns.

oliver-kriska/claude-elixir-phoenix · 47 tokens

compound-docs

Searchable Elixir/Phoenix/Ecto solution documentation system with YAML frontmatter. Builds institutional knowledge from solved problems. Use when consulting past solutions before investigating new issues.

oliver-kriska/claude-elixir-phoenix · 38 tokens

context-anchoring

Manage per-feature living documents that capture decisions, constraints, and reasoning across AI sessions during active development. Scoped to feature-level work — design, implementation, bugfix, refactor — not for codebase-wide assessments or product-wide specifications (those define their own document lifecycles).…

techygarg/lattice · 147 tokens

learning-harvest

Manage the operational learnings lifecycle — load prior learnings to inform current work, harvest new patterns worth preserving, and keep the document tight over time. Provides a protocol for accumulating actionable patterns from practice that complement standards and defaults. Use when a workflow session completes…

techygarg/lattice · 114 tokens