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 shihchengwei-lab/separation-and-audit-claude-code --skill token-conservationgit clone --depth 1 https://github.com/shihchengwei-lab/separation-and-audit-claude-codeWrote 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/shihchengwei-lab/separation-and-audit-claude-code/token-conservation)<a href="https://agentmods.dev/skills/shihchengwei-lab/separation-and-audit-claude-code/token-conservation"><img src="https://agentmods.dev/badge/skills/shihchengwei-lab/separation-and-audit-claude-code/token-conservation/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/shihchengwei-lab/separation-and-audit-claude-code/token-conservation"><img src="https://agentmods.dev/badge/skills/shihchengwei-lab/separation-and-audit-claude-code/token-conservation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00096 | $0.01179 |
| Opus 5 | $0.00048 | $0.00589 |
| Sonnet 5 | $0.00019 | $0.00236 |
| Haiku 4.5 | $0.00010 | $0.00118 |
Grade A, and why
token-conservation 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 9d 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.
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.
What it actually says
Token Conservation
給 token 敏感的 Claude Code 專案用的行為約束集合。不是 compaction hook(被動),是行為規則(主動)。
CLAUDE.md 可直接複製的片段
## Token 節省規則
- 不重複貼已存在的程式碼,只貼 diff
- 回報用一句話,不寫報告
- subagent 指令要精準,附上檔案路徑與預期輸出格式
- 不解釋為什麼這樣做,做就對了
- 讀檔前先確認是否已在 context 中
- 不要問 user「可以嗎」「要不要」,看決策權限表
Agent 派工格式
PM 派工給 subagent 時,用這個四行格式。多一行都是浪費。
任務:[一句話描述]
輸入:[檔案路徑或資料]
輸出:[預期產物與路徑]
驗收:[通過條件]
為什麼四行
- 「任務」讓 agent 知道做什麼
- 「輸入」省去 agent 自己找檔案的搜索 token
- 「輸出」讓 agent 不用猜你要什麼格式
- 「驗收」讓 agent 自行判斷完成沒,不需要回來問
回報格式
Agent 回報 PM 時,限定格式:
完成:✅ [模組名] → [產物路徑]
阻塞:🚫 [問題一句話] — 需要:[你要什麼]
進度:📍 Phase X — [完成數]/[總數]
禁止寫超過兩行的回報。如果需要詳細說明,寫進檔案讓 PM 自己讀。
Skill 載入策略
問題:agent 啟動時把所有 skill 讀進來 → context 爆炸。
規則:
- Agent 啟動時只讀 SKILL.md 的 frontmatter(~100 tokens)
- 只在任務涉及該 skill 領域時才載入完整 SKILL.md
- 載入前先讀 frontmatter 確認相關性
- 一個任務最多同時載入 2 個 skill,超過代表任務該拆分
寫進你的 agent 定義:
## Skills
- **skill-a** — `skills/skill-a/SKILL.md`(任務涉及 X 時載入)
- **skill-b** — `skills/skill-b/SKILL.md`(任務涉及 Y 時載入)
注意:只在任務涉及該領域時才載入,不要預載。
決策權限表
減少 user 來回 = 減少 token。把這張表放進 CLAUDE.md,agent 一看就知道該不該問。
| 事項 | 自行決定 | 需 user 確認 |
|------|---------|-------------|
| 技術架構 | ✅ | |
| 命名規範 | ✅ | |
| 免費套件選擇 | ✅ | |
| Bug 修復 | ✅ | |
| 重構 | ✅ | |
| UI 風格 | | ✅ |
| 新增 feature | | ✅ |
| 付費服務 | | ✅ |
| 刪除已確認 feature | | ✅ |
根據你的專案調整內容,格式保留。
讀檔節省
- 讀檔前先問:這個檔案的內容是否已經在 context 中?
- 如果在,不重複讀
- 如果只需要檔案的一部分,用 Grep 定位後只讀該段
- 長檔案(>200 行)先讀目錄/結構,再決定讀哪段
Session 邊界節省
每次 session 結束前,PM 自動寫一份狀態摘要:
# Session State — [日期]
## 已完成
- [清單]
## 進行中
- [清單 + 卡在哪]
## 下次啟動要做
- [清單]
## 重要決策記錄
- [清單]
存到 docs/session-state.md。下次啟動時 PM 先讀這份,不需要重讀整個專案歷史。
適用建議
- 個人開發者 / 小團隊 → 全部採用
- 大團隊有充足 API credit → 挑「派工格式」和「回報格式」用就好
- 搭配 ECC 的 strategic-compact → 行為約束(主動)+ compaction hook(被動)雙管齊下
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.
- 9d ago First seen · 135 lines · 96 tokens per session scan A 1f26fe7479e0
token-conservation is a skill published in the GitHub repository shihchengwei-lab/separation-and-audit-claude-code (2 stars, last pushed 4mo ago), licensed MIT. It adds 96 tokens to every session and 1,179 once invoked, about $0.0005 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.
Other skills, from other repositories
ai-instruction-detox
A review and cleanup method for instructions stored in files such as CLAUDE.md, AGENTS.md, skills, context, and memory.
sparc-methodology
SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) development methodology with multi-agent orchestration. Use when running a structured spec-to-code workflow or decomposing a feature through the SPARC phases.
stream-chain
Stream-JSON chaining for multi-agent pipelines, data transformation, and sequential workflows. Use when piping output between agents/tools as streaming JSON or building a sequential transform pipeline.
hive-mind-advanced
Queen-led collective-intelligence coordination with consensus mechanisms and persistent shared memory. Use when orchestrating a large swarm of agents under a lead coordinator, building consensus across agents, or maintaining durable cross-agent memory.
screen-detox
A habit-change framework for reducing non-work screen use such as social media, short videos, games, and endless scrolling.
happiness-skill
A Chinese-language guide to happiness based on reducing unmet wants, focusing on the present, and treating happiness as a trainable skill.