Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mrgoonie/claudekit-skills --skill context-engineering -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/context-engineering/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/context-engineering/

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.

context-engineering addyosmani Helps you set up agent context: which rules, specs and files to feed the agent, and when. Use it at the start of a session, when output quality drops, or when switching tasks. CX Codex +1 61,600installs context-engineering mvschwarz A skill about how an agent's context window gets filled, pruned and shared. Useful when an agent drifts or forgets constraints mid-task. CX Codex +1 ★ 8,172repo stars context-engineering-collection muratcankoylan Patterns for production agent design: context management, multi-agent systems, long-running loops. Use when building autonomous systems that need to operate reliably. CX Codex +1 4,200installs context-compression muratcankoylan Gives an agent a written procedure for folding a long session into a structured summary: intent, files touched, decisions, next steps. CX Codex +1 459installs multi-agent-patterns NeoLabHQ A skill that lays out three ways to split work across subagents: supervisor, peer-to-peer and hierarchical. Useful once one agent runs out of context. CX Codex +1 1,300installs ai-agents-architect sickn33 A skill that breaks an agent into parts: ReAct loop, planning, memory layers, multi-agent orchestration. Useful once your agent exists and you need to decide how it fails. CX Codex +1 1,500installs prompt-engineering NeoLabHQ Guides prompt design for agents, subagents, and LLM integrations. Helpful when building production templates, chain-of-thought prompts, or agent hooks. CX Codex +1 1,400installs context-window-management sickn33 A skill for managing LLM context windows through token counting, history summarization, trimming, and context routing. CX Codex +1 1,600installs

From the same set21

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor