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.
npx skills add InterfaceX-co-jp/genshijin --skill genshijin-compressgit clone --depth 1 https://github.com/InterfaceX-co-jp/genshijinWrote 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.
[](https://agentmods.dev/skills/interfacex-co-jp/genshijin/genshijin-compress)<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.
<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>- Socket pass
- Snyk fail
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.
| Model | Per session | Once 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 |
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.
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` What it actually says
genshijin-compress
目的
自然言語ファイル(CLAUDE.md, todos, 設定)を原始人モード化して入力トークン削減。圧縮版が原ファイル上書き、人間可読版は <filename>.original.md で保存。
トリガー
/genshijin-compress <filepath> または「メモリファイル圧縮」等の依頼。
処理フロー
-
この SKILL.md と同ディレクトリの
scripts/を検出 -
実行:
cd <SKILL.md を含むディレクトリ> && python3 -m scripts <絶対ファイルパス> -
CLI 処理内容:
- ファイル種別検出(トークン消費なし)
- Claude API/CLI で圧縮
- 出力検証(トークン消費なし)
- エラー時: Claude で該当箇所のみピンポイント修正(再圧縮せず)
- 最大2回リトライ
- 失敗時: ユーザーにエラー報告、原ファイルは無変更
-
結果をユーザーに返却
圧縮ルール
削除
- 敬語・丁寧語(です/ます/ございます)
- クッション言葉(えーと/まあ/ちなみに/一応/とりあえず/基本的に/ざっくり言うと)
- 前置き(ご質問ありがとうございます/お力になれれば幸いです)
- ぼかし(〜かもしれません/〜と思われます/おそらく)
- 冗長表現(〜することができる→〜できる、〜というものは→〜は)
- 冗長接続(〜ということになりますので→だから、〜させていただく→する)
- 自明な助詞(が/の/を/に/で/は/と/も)
- 形容動詞活用語尾(な/に/で/だ)→ 語幹止め
- 形式名詞(こと/もの/ため)→ 名詞化 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,.netrccredentials.*,secrets.*,passwords.*- SSH鍵(
id_rsa,id_ed25519等) - 証明書(
.pem,.key,.p12,.crt等) - ディレクトリ
.ssh,.aws,.gnupg,.kube,.docker配下 - ファイル名に
secret/credential/password/apikey/token/privatekey含むもの
ヒューリスティック誤検知時は、ファイル名変更で回避可能。
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.
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.
- 12d ago First seen · 140 lines · 104 tokens per session scan C bf949bbd4fa7
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.
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.
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.
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.
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.
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).…
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…