← 返回
未分类
Token Efficiency
Avoid unnecessary context burn. Surgical file reads, batched commands, less narration. Every token read is a token taxed.
避免不必要的上下文消耗。精准读取文件,批量执行指令,减少冗余叙述。每个读取的 token 都计费。
nubzparmesan
未分类
clawhub
v1.0.0 1 版本 100000 Key: 无需
#latest
概述
Token Efficiency - Avoiding Unnecessary Context Burn
Every token read is a token taxed. Be surgical.
Core Rules
- grep/tail over full reads — need one section?
grep -A 20 "## Section". Need the end? tail -50. Don't read 500 lines to find 5. - batch API calls — one curl with multiple params > three separate curls. Combine endpoint checks into single scripts.
- sub-agents for heavy research — scraping a thread, summarizing 50 posts, reading a full repo? Spawn a sub-agent. Don't burn main context on bulk work.
- don't re-read context — if a file was already read this session, use what you have. Never read it again "just to be sure."
- summarize before storing — tool output going to a file? Strip it down first. Store the insight, not the raw dump.
Anti-Patterns (Observed)
| Bad | Good |
|---|
| ----- | ------ |
| Read full 3000-line comment thread | grep -c "" for count, tail for recent, grep for keywords |
| 4 separate curl calls to 4 endpoints | One script, four curls, one python parse pass |
| Narrate every grep and read step | Just do it, report the finding |
| Re-read SKILL.md to "refresh" mid-session | Trust what's already in context |
| Store raw JSON API response | Extract the 3 fields you care about, store those |
When to Use Sub-Agents
- Research tasks > ~10 tool calls
- Bulk reading (threads, repos, feeds)
- Tasks that can run in parallel with main work
- Anything that would dominate your context window
Quick Heuristics
- If you're about to read a file you've already read → stop
- If you're about to make the same API call twice → cache the result
- If narrating a step takes longer than doing it → just do it
- If a task feels heavy → sub-agent it
版本历史
共 1 个版本
-
v1.0.0
当前
2026-05-12 06:10 安全 安全
安全检测
腾讯云安全 (Sanbu)
安全,无风险
查看报告
🔗 相关推荐
ai-intelligence
oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712
📥 243,850
security-compliance
spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215
📥 266,557
developer-tools
steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668
📥 324,188