context-slimmer
错误 500(服务器错误)! ! 1500。这是一个错误。出现错误。请稍后重试。我们只知道这些。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~sundevilatb-context-slimmercURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~sundevilatb-context-slimmer/file -o sundevilatb-context-slimmer.md# Context Slimmer Audit workspace files that load into every message and reduce their token footprint. ## Quick Start ```bash # 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: 1. **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. 2. **Remove** — Outdated info, dead features, completed one-time setup, duplicated content across files. 3. **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 | < 500 tokens | | TOOLS.md | < 500 tokens | | USER.md | < 700 tokens | | MEMORY.md | < 400 tokens | | HEARTBEAT.md | < 400 tokens | | SOUL.md | < 250 tokens | | IDENTITY.md | < 50 tokens | | **Total** | **< 2,800 tokens** | ## Output Format Report: current size, projected size, savings per file. Include specific recommendations grouped by move/remove/compress. --- ## 中文说明 # Context Slimmer 审计那些会加载到每条消息中的工作区文件,并减少它们的 token 占用。 ## 快速开始 ```bash # Measure current context cost bash scripts/measure.sh # Full audit (outputs recommendations) bash scripts/measure.sh --audit ``` ## 审计流程 对于每个始终加载的文件,评估: 1. **移到技能中** —— 仅特定任务需要的内容(投注配置、群聊规则、详细协议)。将其移到按需加载的技能或参考文件中。 2. **删除** —— 过时的信息、废弃的功能、已完成的一次性设置、跨文件重复的内容。 3. **压缩** —— 那些本可以用一句话说清的冗长解释。如果代理已经知道了,就删掉。 ## 经验法则 - 如果某事由定时任务处理,就从 HEARTBEAT.md 中删除它 - 如果某内容在 SOUL.md 中,就不要在 MEMORY.md 或 AGENTS.md 中重复 - 如果某内容在 USER.md 中,就不要在 MEMORY.md 中重复 - 如果代理每天都做某事,它就不需要说明——只需一个触发词 - 用一句话胜过用 5 个表达同一意思的要点 - 目标:每个文件都应让每一行都对得起它的 token 成本 ## 预期文件大小(精简目标) | 文件 | 目标 | |------|------| | AGENTS.md | < 500 tokens | | TOOLS.md | < 500 tokens | | USER.md | < 700 tokens | | MEMORY.md | < 400 tokens | | HEARTBEAT.md | < 400 tokens | | SOUL.md | < 250 tokens | | IDENTITY.md | < 50 tokens | | **合计** | **< 2,800 tokens** | ## 输出格式 报告:每个文件的当前大小、预计大小、节省量。包含按 移动/删除/压缩 分组的具体建议。