token-conservation

token-conservation is a skill for Claude Code, Codex from shihchengwei-lab/separation-and-audit-claude-code. It costs 96 tokens per session (1,179 once invoked), scanned A, original, MIT.

A set of rules for Claude Code agents that limits unnecessary use of the model’s context, the text an agent can keep in working memory. It includes formats for delegating tasks, reporting progress, and loading skills only when needed.

In plain words
What is it for?
Use it in projects with multiple Claude Code agents, large codebases, or tight context limits to define short task handoffs, concise status reports, and selective skill loading.
Why use it?
It helps prevent long instructions, repeated code, and unnecessary files from consuming the agent’s limited context. Clear task and report formats also reduce back-and-forth questions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

Good fit Use it in projects with multiple Claude Code agents, large codebases, or tight context limits to define short task handoffs, concise status reports, and selective skill loading.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shihchengwei-lab/separation-and-audit-claude-code/token-conservation
Install

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.

Any agent
npx skills add shihchengwei-lab/separation-and-audit-claude-code --skill token-conservation
Clone the repo
git clone --depth 1 https://github.com/shihchengwei-lab/separation-and-audit-claude-code

Made for: Claude Code, Codex.

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 token-conservation

README.md
[![agentmods](https://agentmods.dev/badge/skills/shihchengwei-lab/separation-and-audit-claude-code/token-conservation/github.svg)](https://agentmods.dev/skills/shihchengwei-lab/separation-and-audit-claude-code/token-conservation)
Your own site
<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.

agentmods 80×15 button for token-conservation

Your own site · 80×15
<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>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,179 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.00096 $0.01179
Opus 5 $0.00048 $0.00589
Sonnet 5 $0.00019 $0.00236
Haiku 4.5 $0.00010 $0.00118

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

Security

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.

examples/creative-writing/token-conservation/skills/token-conservation/SKILL.md · 135 lines

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 爆炸。

規則:

  1. Agent 啟動時只讀 SKILL.md 的 frontmatter(~100 tokens)
  2. 只在任務涉及該 skill 領域時才載入完整 SKILL.md
  3. 載入前先讀 frontmatter 確認相關性
  4. 一個任務最多同時載入 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(被動)雙管齊下
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. 9d ago First seen · 135 lines · 96 tokens per session scan A 1f26fe7479e0

Subscribe to this mod's changes

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.