Genshijin Compress logo

Genshijin Compress

Organization
InterfaceX-co-jp
genshijin-compress

自然言語メモリファイル(CLAUDE.md, todos, 設定)を原始人形式に圧縮し入力トークン削減。 技術内容・コード・URL・構造は完全保持。圧縮版が原ファイルを上書き、人間可読版は FILE.original.md として保存。「/genshijin-compress <filepath>」「メモリファイル圧縮」で起動。

Overview

PublisherInterfaceX-co-jp
Repositorygenshijin
Skill namegenshijin-compress
Stars
333
Forks
14
Bundled files
6
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by InterfaceX-co-jp on GitHub. Read the source before you install it.

Installation

Install the Genshijin Compress AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/InterfaceX-co-jp/genshijin/tree/main/skills/genshijin-compress
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/InterfaceX-co-jp/genshijin.git /tmp/genshijin
mkdir -p .claude/skills
cp -r /tmp/genshijin/skills/genshijin-compress .claude/skills/genshijin-compress
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Genshijin Compress in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Genshijin Compress on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Genshijin Compress is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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 含むもの

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Genshijin Compress AI skill do?

自然言語メモリファイル(CLAUDE.md, todos, 設定)を原始人形式に圧縮し入力トークン削減。 技術内容・コード・URL・構造は完全保持。圧縮版が原ファイルを上書き、人間可読版は FILE.original.md として保存。「/genshijin-compress <filepath>」「メモリファイル圧縮」で起動。

Why use Genshijin Compress on TypingMind?

Because you install it once and use it with any model. Genshijin Compress is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Genshijin Compress in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/InterfaceX-co-jp/genshijin/tree/main/skills/genshijin-compress. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Genshijin Compress?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Genshijin Compress?

As many as you like. As long as a model supports skills, you can use Genshijin Compress with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Genshijin Compress AI skill free?

Yes. It is published on GitHub by InterfaceX-co-jp under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇