Context Slimmer
/install context-slimmer
Context Slimmer
Audit workspace files that load into every message and reduce their token footprint.
Quick Start
# Measure current context cost
bash scripts/measure.sh
# Full audit (outputs recommendations)
bash scripts/measure.sh --audit
Audit Process
For each always-loaded file, evaluate:
- Move to skill — Content only needed for specific tasks (betting config, group chat rules, detailed protocols). Move to a skill or reference file that loads on demand.
- Remove — Outdated info, dead features, completed one-time setup, duplicated content across files.
- Compress — Verbose explanations that could be 1 sentence. If the agent already knows it, cut it.
Rules of Thumb
- If a cron job handles it, remove it from HEARTBEAT.md
- If it's in SOUL.md, don't repeat it in MEMORY.md or AGENTS.md
- If it's in USER.md, don't repeat it in MEMORY.md
- If the agent does it daily, it doesn't need instructions — just a trigger word
- Prefer 1 sentence over 5 bullets saying the same thing
- Target: each file should justify every line's token cost
Expected File Sizes (lean targets)
| File | Target |
|---|---|
| AGENTS.md | \x3C 500 tokens |
| TOOLS.md | \x3C 500 tokens |
| USER.md | \x3C 700 tokens |
| MEMORY.md | \x3C 400 tokens |
| HEARTBEAT.md | \x3C 400 tokens |
| SOUL.md | \x3C 250 tokens |
| IDENTITY.md | \x3C 50 tokens |
| Total | \x3C 2,800 tokens |
Output Format
Report: current size, projected size, savings per file. Include specific recommendations grouped by move/remove/compress.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install context-slimmer - 安装完成后,直接呼叫该 Skill 的名称或使用
/context-slimmer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Context Slimmer 是什么?
Audit and slim down always-loaded context files (AGENTS.md, TOOLS.md, USER.md, MEMORY.md, HEARTBEAT.md, SOUL.md, IDENTITY.md). Use when asked to reduce token usage, audit context files, optimize context window, or slim down workspace files. Measures current token cost and identifies what to move, remove, or compress. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1429 次。
如何安装 Context Slimmer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install context-slimmer」即可一键安装,无需额外配置。
Context Slimmer 是免费的吗?
是的,Context Slimmer 完全免费(开源免费),可自由下载、安装和使用。
Context Slimmer 支持哪些平台?
Context Slimmer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Context Slimmer?
由 SunDevilATB(@sundevilatb)开发并维护,当前版本 v1.0.0。