context-engineering · mrgoonie — Claude Code skill: what it does, how to install
Guides LLM agent context design, token compaction, and memory isolation to prevent attention degradation during long runs.
npx skills add mrgoonie/claudekit-skills --skill context-engineering -a claude-codeWhat context-engineering does
This skill structures context handling for autonomous agents. Model attention is finite. Because critical information gets lost in middle positions, the skill applies a four-bucket approach: write externally, select relevant tokens, compress state, and isolate workloads. It includes reference documents covering memory architectures, tool design frameworks, and LLM-as-Judge evaluation, alongside Python utilities context_analyzer.py and compression_evaluator.py.
Multi-agent setups consume roughly 15 times more tokens than a single agent baseline. Without strict boundaries, token growth spirals quickly. Compaction should trigger at 70% to 80% utilization, targeting a 50% to 70% size reduction with less than 5% loss in task quality.
What it helps with
- trigger token compaction before hitting context capacity limits
- isolate context across sub-agents to limit multi-agent token growth
- debug lost-in-middle attention failures in extended agent sessions
- evaluate compression quality using
compression_evaluator.py
Example prompts for the agent
- Analyze our agent's token usage and set up a context compaction strategy
- Help me partition context boundaries across our sub-agents
- Audit our tool definitions using the four-question framework
How to install context-engineering
1Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill context-engineering -a claude-code2Manually: put the files in place
~/.claude/skills/context-engineering/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/context-engineering/
1Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill context-engineering -a codex2Manually: put the files in place
.agents/skills/context-engineering/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill context-engineering -a cursor2Manually: put the files in place
.cursor/skills/context-engineering/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mrgoonie/claudekit-skills context-engineering2Manually: put the files in place
.github/skills/context-engineering/SKILL.md1Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill context-engineering -a gemini-cli2Platform CLI
gemini skills install https://github.com/mrgoonie/claudekit-skills --path .claude/skills/context-engineeringManually: put the files in place
.devin/skills/context-engineering/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill context-engineering -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about context-engineering
How do I install context-engineering in Claude Code?
Run npx skills add mrgoonie/claudekit-skills --skill context-engineering -a claude-code. This installs the skill and configures it in your environment.
What does context-engineering do?
It gives guidelines and helper scripts to control token consumption, build persistent memory, and isolate context across coordinating agents.
When should compaction be triggered?
The skill flags a warning at 70% token capacity and triggers optimization at 80%, aiming for a 50% to 70% reduction with minimal quality loss.
Similar skills
All skills for Agent setup: memory, context, orchestration →context-engineering by other authors comes first.