compress
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman:compress <filepath> or "compress memory file"
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o compress.zip https://jpskill.com/download/19407.zip && unzip -o compress.zip && rm compress.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19407.zip -OutFile "$d\compress.zip"; Expand-Archive "$d\compress.zip" -DestinationPath $d -Force; ri "$d\compress.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
compress.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
compressフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 8
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
ケイブマン圧縮
目的
自然言語ファイル(CLAUDE.md、todos、preferences)をケイブマン語に圧縮し、入力トークンを削減します。圧縮版は元のファイルを上書きします。人間が読めるバックアップは <filename>.original.md として保存されます。
トリガー
/caveman:compress <filepath> またはユーザーがメモリファイルの圧縮を要求したとき。
プロセス
-
この SKILL.md は
scripts/と同じディレクトリにあります。そのディレクトリを見つけます。 -
実行します:
cd <directory_containing_this_SKILL.md> && python3 -m scripts <absolute_filepath>
- CLI は次の処理を行います:
- ファイルタイプを検出します(トークンなし)
- Claude を呼び出して圧縮します
- 出力を検証します(トークンなし)
- エラーが発生した場合: Claude で修正を厳選します(ターゲットを絞った修正のみ、再圧縮はしません)
- 最大2回リトライします
- 2回リトライしても失敗する場合: ユーザーにエラーを報告し、元のファイルはそのままにします
- 結果をユーザーに返します
圧縮ルール
削除
- 冠詞: a, an, the
- 埋め草: just, really, basically, actually, simply, essentially, generally
- 丁寧語: "sure", "certainly", "of course", "happy to", "I'd recommend"
- 曖昧な表現: "it might be worth", "you could consider", "it would be good to"
- 冗長な言い回し: "in order to" → "to", "make sure to" → "ensure", "the reason is because" → "because"
- 接続詞の無駄: "however", "furthermore", "additionally", "in addition"
正確に保持(決して変更しない)
- コードブロック(フェンス ``` とインデントされたもの)
- インラインコード(
バッククォートの内容) - URLとリンク(完全なURL、Markdownリンク)
- ファイルパス(
/src/components/...,./config.yaml) - コマンド(
npm install,git commit,docker build) - 技術用語(ライブラリ名、API名、プロトコル、アルゴリズム)
- 固有名詞(プロジェクト名、人名、会社名)
- 日付、バージョン番号、数値
- 環境変数(
$HOME,NODE_ENV)
構造を保持
- すべてのMarkdown見出し(正確な見出しテキストを保持し、その下の本文を圧縮します)
- 箇条書きの階層(ネストレベルを保持します)
- 番号付きリスト(番号付けを保持します)
- テーブル(セルテキストを圧縮し、構造を保持します)
- Markdownファイルのフロントマター/YAMLヘッダー
圧縮
- 短い同義語を使用します: "extensive" ではなく "big"、"implement a solution for" ではなく "fix"、"utilize" ではなく "use"
- 断片化OK: "You should always run tests before committing" ではなく "Run tests before commit"
- "you should", "make sure to", "remember to" を削除し、アクションのみを記述します
- 同じことを異なる言い方で述べている冗長な箇条書きをマージします
- 複数の例が同じパターンを示している場合、1つの例のみを保持します
CRITICAL RULE:
... の中のものはすべて正確にコピーする必要があります。
次のことは行わないでください:
- コメントを削除する
- スペースを削除する
- 行を並べ替える
- コマンドを短縮する
- 何かを簡素化する
インラインコード(...)は正確に保持する必要があります。
バッククォートの中のものは何も変更しないでください。
ファイルにコードブロックが含まれている場合:
- コードブロックを読み取り専用領域として扱います
- コードブロックの外側のテキストのみを圧縮します
- コードの周りのセクションをマージしないでください
パターン
オリジナル:
You should always make sure to run the test suite before pushing any changes to the main branch. This is important because it helps catch bugs early and prevents broken builds from being deployed to production.
圧縮:
Run tests before push to main. Catch bugs early, prevent broken prod deploys.
オリジナル:
The application uses a microservices architecture with the following components. The API gateway handles all incoming requests and routes them to the appropriate service. The authentication service is responsible for managing user sessions and JWT tokens.
圧縮:
Microservices architecture. API gateway route all requests to services. Auth service manage user sessions + JWT tokens.
境界
- 自然言語ファイル(.md, .txt, 拡張子なし)のみを圧縮します
- 決して変更しないファイル: .py, .js, .ts, .json, .yaml, .yml, .toml, .env, .lock, .css, .html, .xml, .sql, .sh
- ファイルに混合コンテンツ(散文 + コード)がある場合、散文セクションのみを圧縮します
- 何がコードで何が散文か不明な場合は、変更せずに残します
- 元のファイルは上書きする前に FILE.original.md としてバックアップされます
- FILE.original.md は決して圧縮しません(スキップします)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Caveman Compress
Purpose
Compress natural language files (CLAUDE.md, todos, preferences) into caveman-speak to reduce input tokens. Compressed version overwrites original. Human-readable backup saved as <filename>.original.md.
Trigger
/caveman:compress <filepath> or when user asks to compress a memory file.
Process
-
This SKILL.md lives alongside
scripts/in the same directory. Find that directory. -
Run:
cd <directory_containing_this_SKILL.md> && python3 -m scripts <absolute_filepath>
- The CLI will:
- detect file type (no tokens)
- call Claude to compress
- validate output (no tokens)
- if errors: cherry-pick fix with Claude (targeted fixes only, no recompression)
- retry up to 2 times
- if still failing after 2 retries: report error to user, leave original file untouched
- Return result to user
Compression Rules
Remove
- Articles: a, an, the
- Filler: just, really, basically, actually, simply, essentially, generally
- Pleasantries: "sure", "certainly", "of course", "happy to", "I'd recommend"
- Hedging: "it might be worth", "you could consider", "it would be good to"
- Redundant phrasing: "in order to" → "to", "make sure to" → "ensure", "the reason is because" → "because"
- Connective fluff: "however", "furthermore", "additionally", "in addition"
Preserve EXACTLY (never modify)
- Code blocks (fenced ``` and indented)
- Inline code (
backtick content) - URLs and links (full URLs, markdown links)
- File paths (
/src/components/...,./config.yaml) - Commands (
npm install,git commit,docker build) - Technical terms (library names, API names, protocols, algorithms)
- Proper nouns (project names, people, companies)
- Dates, version numbers, numeric values
- Environment variables (
$HOME,NODE_ENV)
Preserve Structure
- All markdown headings (keep exact heading text, compress body below)
- Bullet point hierarchy (keep nesting level)
- Numbered lists (keep numbering)
- Tables (compress cell text, keep structure)
- Frontmatter/YAML headers in markdown files
Compress
- Use short synonyms: "big" not "extensive", "fix" not "implement a solution for", "use" not "utilize"
- Fragments OK: "Run tests before commit" not "You should always run tests before committing"
- Drop "you should", "make sure to", "remember to" — just state the action
- Merge redundant bullets that say the same thing differently
- Keep one example where multiple examples show the same pattern
CRITICAL RULE:
Anything inside ... must be copied EXACTLY.
Do not:
- remove comments
- remove spacing
- reorder lines
- shorten commands
- simplify anything
Inline code (...) must be preserved EXACTLY.
Do not modify anything inside backticks.
If file contains code blocks:
- Treat code blocks as read-only regions
- Only compress text outside them
- Do not merge sections around code
Pattern
Original:
You should always make sure to run the test suite before pushing any changes to the main branch. This is important because it helps catch bugs early and prevents broken builds from being deployed to production.
Compressed:
Run tests before push to main. Catch bugs early, prevent broken prod deploys.
Original:
The application uses a microservices architecture with the following components. The API gateway handles all incoming requests and routes them to the appropriate service. The authentication service is responsible for managing user sessions and JWT tokens.
Compressed:
Microservices architecture. API gateway route all requests to services. Auth service manage user sessions + JWT tokens.
Boundaries
- ONLY compress natural language files (.md, .txt, extensionless)
- NEVER modify: .py, .js, .ts, .json, .yaml, .yml, .toml, .env, .lock, .css, .html, .xml, .sql, .sh
- If file has mixed content (prose + code), compress ONLY the prose sections
- If unsure whether something is code or prose, leave it unchanged
- Original file is backed up as FILE.original.md before overwriting
- Never compress FILE.original.md (skip it)
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (4,422 bytes)
- 📎 scripts/__init__.py (224 bytes)
- 📎 scripts/__main__.py (30 bytes)
- 📎 scripts/benchmark.py (2,264 bytes)
- 📎 scripts/cli.py (1,591 bytes)
- 📎 scripts/compress.py (7,532 bytes)
- 📎 scripts/detect.py (4,038 bytes)
- 📎 scripts/validate.py (4,821 bytes)