persona-compress

persona-compress is a skill for Claude Code from atman-33/workhub. It costs 73 tokens per session (1,143 once invoked), scanned A, original, MIT.

A text-compression tool for natural-language memory files such as CLAUDE.md, task lists, and configuration notes. It keeps code, URLs, paths, technical names, numbers, headings, and document structure unchanged while saving the original as a backup.

In plain words
What is it for?
Use it to check a file, back it up, compress its prose, replace the original with the compressed version, and verify the result.
Why use it?
It reduces the amount of project guidance loaded into each session, which can lower input token use while preserving the details the files contain.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions CLAUDE.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the persona plugin — 8 skills, 8 commands, 3 agents shipped together

Good fit Use it to check a file, back it up, compress its prose, replace the original with the compressed version, and verify the result.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add atman-33/workhub
Claude Code
/plugin install persona

Made for: Claude Code.

Or install persona, the plugin that ships this one along with the rest of its 8 skills, 8 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 persona-compress

README.md
[![agentmods](https://agentmods.dev/badge/skills/atman-33/workhub/persona-compress/github.svg)](https://agentmods.dev/skills/atman-33/workhub/persona-compress)
Your own site
<a href="https://agentmods.dev/skills/atman-33/workhub/persona-compress"><img src="https://agentmods.dev/badge/skills/atman-33/workhub/persona-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 persona-compress

Your own site · 80×15
<a href="https://agentmods.dev/skills/atman-33/workhub/persona-compress"><img src="https://agentmods.dev/badge/skills/atman-33/workhub/persona-compress.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,143 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00073 $0.01143
Opus 5 $0.00036 $0.00571
Sonnet 5 $0.00015 $0.00229
Haiku 4.5 $0.00007 $0.00114

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

Security

Grade A, and why

persona-compress scanned grade A with 0 findings 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 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/detect.mjs, scripts/validate.mjs), 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/persona/skills/persona-compress/SKILL.md · 92 lines

What it actually says

Derived from genshijin (MIT, InterfaceX-co-jp) — https://github.com/InterfaceX-co-jp/genshijin

自然言語ファイルを圧縮して、毎セッション読み込まれる入力トークンを減らす。 圧縮版が元ファイルを置き換え、人間可読な原文は <name>.original.md に残す。

このスキルはキャラクター非依存。 圧縮結果は口調ではなく、core/compression.md の 圧縮ルールに従う。どのキャラクターが有効でも出力は同じになる。

手順

1. 事前チェック(必須)

node "${CLAUDE_PLUGIN_ROOT}/skills/persona-compress/scripts/detect.mjs" <絶対パス>

REFUSE: が返ったら、その理由をユーザーに伝えて中止する。機密ファイルの判定は このスクリプトが唯一の判断者で、会話でこれを覆さない。ファイルの内容を読むのは このチェックを通過してから。

2. バックアップ

detect.mjs が返した backup パスに原文をコピーする。 backupExiststrue の場合は、上書きしてよいかユーザーに確認する。

3. 圧縮

ファイルを読み、以下に従って書き換える。

削除する

  • 敬語・丁寧語、クッション言葉、前置き、ぼかし
  • 冗長表現(〜することができる→〜できる)
  • 自明な助詞、形容動詞の活用語尾(な/に/で/だ)→ 語幹止め
  • 形式名詞(こと/もの/ため)、補助動詞(ている/ておく/てしまう)
  • 「〜してください」「〜を忘れずに」→ 動作のみ記述
  • 重複した箇条書きの統合、同パターンの複数例は1例に

絶対に変更しない

  • コードブロック(``` 囲みとインデント)。完全にコピーする。 コメント削除・スペース削除・行順変更・コマンド短縮・簡略化すべて禁止
  • インラインコード(バッククォート内)
  • URL・Markdown リンク
  • ファイルパス、コマンド、環境変数
  • 技術用語、ライブラリ名、API 名、固有名詞
  • 日付、バージョン番号、数値
  • エラーメッセージの原文

構造を保つ

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

4. 検証(必須)

node "${CLAUDE_PLUGIN_ROOT}/skills/persona-compress/scripts/validate.mjs" <backup> <圧縮後>
  • OK: — 完了。削減率をユーザーに報告する
  • WARN: — 圧縮できていない。原因を確認する
  • FAIL: — 保護対象が失われている。指摘された箇所だけを原文から復元して再検証する。 全体を再圧縮しない。2回試して直らなければバックアップから復元し、失敗を報告する

原文:

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

圧縮後:

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

境界

  • 対象は .md / .txt / 拡張子なしのみ。detect.mjs が判定する
  • 散文とコードが混在するファイルは散文部分のみ圧縮する
  • コードか散文か判断がつかない箇所は変更しない
  • *.original.md は圧縮しない
Files

What ships with it

2 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. 10d ago First seen · 92 lines · 73 tokens per session scan A 5445da2acf6a

Subscribe to this mod's changes

persona-compress is a skill published in the GitHub repository atman-33/workhub (2 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 1,143 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

gonavi-cli

Operate databases through the GoNavi headless CLI — the gonavi executable shipped in verified GitHub Release archives. Covers listing/adding/importing saved connections, running SQL queries against saved connections or ad-hoc connection files, exporting result sets to csv/json/md/html/xlsx, batch-executing SQL files…

Syngnat/GoNavi · 144 tokens

ucai-patterns

Use when the user asks about Claude Code best practices, how to write agents, how to use hooks, how to manage context, or how to work effectively with Claude Code's native systems.

Joncik91/ucai · 42 tokens

memory

Use this skill when Pioneer should proactively use durable memory or recalled context: decide whether memory can improve a turn, answer from remembered user/project facts, request memory tools, search/list/get stored memories, save durable preferences or project decisions, forget memories, audit or clean up memory, or…

pioneerdotai/pioneer · 64 tokens

memory-curator

Use at session-close when a session captured several new memories, or on-demand, to consolidate, deduplicate, prune, and structure the beads memory store. Triggers on "curate memories", "clean up memories", "memory sweep".

DollarDill/beads-superpowers · 52 tokens

orient

Use when user invokes /orient with a topic keyword, entity type, project name, time qualifier, or combination. Also triggers on "what do we know about X", "remind me about X", "where did we leave off on X". Provides targeted context loading — searches the MCP Memory Server graph, knowledge files, journal entries, and…

harnessprotocol/harness-kit · 80 tokens

capture

Use when user invokes /capture to capture information from the current conversation into a staging file for later reflection and knowledge graph processing. Accepts no arguments (auto-extract), specific facts as text, or filter keywords like "decisions" or "technical". Do NOT use when the user wants to write directly…

harnessprotocol/harness-kit · 73 tokens