{"id":"4aba5ec3-f4c2-4584-bfd3-8a1fb07c799e","shortId":"ka9gz8","kind":"skill","title":"context-engineer","tagline":"Context window optimizer — analyze, audit, and optimize your agent's context utilization. Know exactly where your tokens go before they're sent.","description":"## When to use this skill\n\nUse this skill when the user wants to:\n- Understand where their context window tokens are going\n- Analyze workspace files (SKILL.md, SOUL.md, MEMORY.md, etc.) for bloat\n- Audit tool definitions for redundancy and overhead\n- Get a comprehensive context efficiency report\n- Compare before/after snapshots to measure optimization progress\n- Optimize system prompts for token efficiency\n\n## Commands\n\n```bash\n# Analyze workspace context files — token counts, efficiency scores, recommendations\npython3 skills/context-engineer/context.py analyze --workspace ~/.openclaw/workspace\n\n# Analyze with a custom budget and save a snapshot for later comparison\npython3 skills/context-engineer/context.py analyze --workspace ~/.openclaw/workspace --budget 128000 --snapshot before.json\n\n# Audit tool definitions for overhead and overlap\npython3 skills/context-engineer/context.py audit-tools --config ~/.openclaw/openclaw.json\n\n# Generate a comprehensive context engineering report\npython3 skills/context-engineer/context.py report --workspace ~/.openclaw/workspace --format terminal\n\n# Compare two snapshots to see projected token savings\npython3 skills/context-engineer/context.py compare --before before.json --after after.json\n```\n\n## What It Analyzes\n\n- **System prompt efficiency** — Length, redundancy detection, compression potential\n- **Tool definition overhead** — Count tools, per-tool token cost, identify unused/overlapping\n- **Memory file bloat** — MEMORY.md size, stale entries, optimization suggestions\n- **Skill overhead** — Installed skills contributing to context, per-skill token cost\n- **Context budget** — What % of model context window is consumed by static content vs available for conversation\n\n## Options\n\n- `--workspace PATH` — Path to workspace directory (default: `~/.openclaw/workspace`)\n- `--config PATH` — Path to OpenClaw config file (default: `~/.openclaw/openclaw.json`)\n- `--budget N` — Context window token budget (default: 200000)\n- `--snapshot FILE` — Save analysis snapshot to FILE for later comparison\n- `--format terminal` — Output format (currently: terminal)\n\n## Notes\n\n- Token estimates are approximate (~4 characters per token). For precise counts, use a model-specific tokenizer.\n- No external dependencies required — runs with Python 3 stdlib only.\n- Built by Anvil AI — context engineering experts. https://labs.anvil-ai.io","tags":["context","engineer","cacheforge","skills","cacheforge-ai","agent-skills","ai-agents","clawhub","devops","discord-v2","kubernetes","openclaw"],"capabilities":["skill","source-cacheforge-ai","skill-context-engineer","topic-agent-skills","topic-ai-agents","topic-cacheforge","topic-clawhub","topic-devops","topic-discord-v2","topic-kubernetes","topic-openclaw","topic-prometheus"],"categories":["cacheforge-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/cacheforge-ai/cacheforge-skills/context-engineer","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add cacheforge-ai/cacheforge-skills","source_repo":"https://github.com/cacheforge-ai/cacheforge-skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (2,385 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:09:03.927Z","embedding":null,"createdAt":"2026-05-18T13:14:37.320Z","updatedAt":"2026-05-18T19:09:03.927Z","lastSeenAt":"2026-05-18T19:09:03.927Z","tsv":"'/.openclaw/openclaw.json':132,238 '/.openclaw/workspace':97,114,143,229 '128000':116 '200000':246 '3':288 '4':268 'after.json':160 'agent':12 'ai':294 'analysi':250 'analyz':7,47,84,95,98,112,163 'anvil':293 'approxim':267 'audit':8,56,119,129 'audit-tool':128 'avail':218 'bash':83 'before.json':118,158 'before/after':70 'bloat':55,186 'budget':102,115,206,239,244 'built':291 'charact':269 'command':82 'compar':69,146,156 'comparison':109,256 'comprehens':65,135 'compress':170 'config':131,230,235 'consum':213 'content':216 'context':2,4,14,42,66,86,136,199,205,210,241,295 'context-engin':1 'contribut':197 'convers':220 'cost':181,204 'count':89,175,274 'current':261 'custom':101 'default':228,237,245 'definit':58,121,173 'depend':283 'detect':169 'directori':227 'effici':67,81,90,166 'engin':3,137,296 'entri':190 'estim':265 'etc':53 'exact':17 'expert':297 'extern':282 'file':49,87,185,236,248,253 'format':144,257,260 'generat':133 'get':63 'go':21,46 'identifi':182 'instal':195 'know':16 'labs.anvil-ai.io':298 'later':108,255 'length':167 'measur':73 'memori':184 'memory.md':52,187 'model':209,278 'model-specif':277 'n':240 'note':263 'openclaw':234 'optim':6,10,74,76,191 'option':221 'output':259 'overhead':62,123,174,194 'overlap':125 'path':223,224,231,232 'per':178,201,270 'per-skil':200 'per-tool':177 'potenti':171 'precis':273 'progress':75 'project':151 'prompt':78,165 'python':287 'python3':93,110,126,139,154 're':24 'recommend':92 'redund':60,168 'report':68,138,141 'requir':284 'run':285 'save':104,153,249 'score':91 'see':150 'sent':25 'size':188 'skill':30,33,193,196,202 'skill-context-engineer' 'skill.md':50 'skills/context-engineer/context.py':94,111,127,140,155 'snapshot':71,106,117,148,247,251 'soul.md':51 'source-cacheforge-ai' 'specif':279 'stale':189 'static':215 'stdlib':289 'suggest':192 'system':77,164 'termin':145,258,262 'token':20,44,80,88,152,180,203,243,264,271,280 'tool':57,120,130,172,176,179 'topic-agent-skills' 'topic-ai-agents' 'topic-cacheforge' 'topic-clawhub' 'topic-devops' 'topic-discord-v2' 'topic-kubernetes' 'topic-openclaw' 'topic-prometheus' 'two':147 'understand':39 'unused/overlapping':183 'use':28,31,275 'user':36 'util':15 'vs':217 'want':37 'window':5,43,211,242 'workspac':48,85,96,113,142,222,226","prices":[{"id":"c8d2d5a4-48b2-4c69-be96-93b4bb00176c","listingId":"4aba5ec3-f4c2-4584-bfd3-8a1fb07c799e","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"cacheforge-ai","category":"cacheforge-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:14:37.320Z"}],"sources":[{"listingId":"4aba5ec3-f4c2-4584-bfd3-8a1fb07c799e","source":"github","sourceId":"cacheforge-ai/cacheforge-skills/context-engineer","sourceUrl":"https://github.com/cacheforge-ai/cacheforge-skills/tree/main/skills/context-engineer","isPrimary":false,"firstSeenAt":"2026-05-18T13:14:37.320Z","lastSeenAt":"2026-05-18T19:09:03.927Z"}],"details":{"listingId":"4aba5ec3-f4c2-4584-bfd3-8a1fb07c799e","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"cacheforge-ai","slug":"context-engineer","github":{"repo":"cacheforge-ai/cacheforge-skills","stars":8,"topics":["agent-skills","ai-agents","cacheforge","clawhub","devops","discord-v2","kubernetes","openclaw","prometheus"],"license":"mit","html_url":"https://github.com/cacheforge-ai/cacheforge-skills","pushed_at":"2026-02-22T20:49:48Z","description":"⚡ SOTA agent skills for OpenClaw — observability, security, code quality, incident response, and more. Built by Anvil AI.","skill_md_sha":"1faa70ac1ebf050464aa78485303db813b045ff3","skill_md_path":"skills/context-engineer/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/cacheforge-ai/cacheforge-skills/tree/main/skills/context-engineer"},"layout":"multi","source":"github","category":"cacheforge-skills","frontmatter":{"name":"context-engineer","license":"MIT","description":"Context window optimizer — analyze, audit, and optimize your agent's context utilization. Know exactly where your tokens go before they're sent."},"skills_sh_url":"https://skills.sh/cacheforge-ai/cacheforge-skills/context-engineer"},"updatedAt":"2026-05-18T19:09:03.927Z"}}