Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
mrgoonie avatar

Context Engineering

  • 458 installs
  • 2.2k repo stars
  • Updated April 3, 2026
  • mrgoonie/claudekit-skills

context-engineering is an agent skill that designs prompts, context windows, retrieval chunks, and tool schemas so coding agents stay accurate, bounded, and reliable on large repositories.

About

context-engineering is a mrgoonie/claudekit-skills discipline for structuring what coding agents see and how they invoke tools. It covers prompt templates, context window budgeting, retrieval chunk boundaries, and tool schema design so agents remain accurate and bounded when working across large monorepos. Developers reach for context-engineering when agent sessions hallucinate, lose thread on long tasks, or mis-invoke tools because context is noisy or schemas are ambiguous. The skill applies during agent skill authoring, MCP tool design, and repo-specific instruction files where precision and token limits matter.

  • Prompt and context design
  • Token budget tradeoffs
  • RAG chunking strategy
  • Tool-use boundaries

Context Engineering by the numbers

  • 458 all-time installs (skills.sh)
  • +9 installs in the week ending Jul 26, 2026 (Skillselion tracking)
  • Ranked #1,841 of 16,556 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mrgoonie/claudekit-skills --skill context-engineering

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs458
repo stars2.2k
Last updatedApril 3, 2026
Repositorymrgoonie/claudekit-skills

How do you engineer agent context for large repos?

Design prompts, context windows, retrieval chunks, and tool schemas so coding agents stay accurate, bounded, and reliable on large repos.

Who is it for?

Developers building or tuning coding agents, MCP tools, or repo-specific skills that must stay reliable on large codebases.

Skip if: Simple one-file scripts or teams with no LLM agent integration in their development workflow.

When should I use this skill?

Agent sessions lose accuracy, exceed context limits, or mis-call tools due to poor prompt or schema design.

What you get

Prompt templates, chunked retrieval plans, bounded context windows, and precise tool schemas for coding agents.

  • Prompt templates
  • Retrieval chunk plans
  • Tool schema definitions

Files

SKILL.mdMarkdownGitHub ↗

Context Engineering

Context engineering curates the smallest high-signal token set for LLM tasks. The goal: maximize reasoning quality while minimizing token usage.

When to Activate

  • Designing/debugging agent systems
  • Context limits constrain performance
  • Optimizing cost/latency
  • Building multi-agent coordination
  • Implementing memory systems
  • Evaluating agent performance
  • Developing LLM-powered pipelines

Core Principles

1. Context quality > quantity - High-signal tokens beat exhaustive content 2. Attention is finite - U-shaped curve favors beginning/end positions 3. Progressive disclosure - Load information just-in-time 4. Isolation prevents degradation - Partition work across sub-agents 5. Measure before optimizing - Know your baseline

Quick Reference

TopicWhen to UseReference
FundamentalsUnderstanding context anatomy, attention mechanicscontext-fundamentals.md
DegradationDebugging failures, lost-in-middle, poisoningcontext-degradation.md
OptimizationCompaction, masking, caching, partitioningcontext-optimization.md
CompressionLong sessions, summarization strategiescontext-compression.md
MemoryCross-session persistence, knowledge graphsmemory-systems.md
Multi-AgentCoordination patterns, context isolationmulti-agent-patterns.md
EvaluationTesting agents, LLM-as-Judge, metricsevaluation.md
Tool DesignTool consolidation, description engineeringtool-design.md
PipelinesProject development, batch processingproject-development.md

Key Metrics

  • Token utilization: Warning at 70%, trigger optimization at 80%
  • Token variance: Explains 80% of agent performance variance
  • Multi-agent cost: ~15x single agent baseline
  • Compaction target: 50-70% reduction, <5% quality loss
  • Cache hit target: 70%+ for stable workloads

Four-Bucket Strategy

1. Write: Save context externally (scratchpads, files) 2. Select: Pull only relevant context (retrieval, filtering) 3. Compress: Reduce tokens while preserving info (summarization) 4. Isolate: Split across sub-agents (partitioning)

Anti-Patterns

  • Exhaustive context over curated context
  • Critical info in middle positions
  • No compaction triggers before limits
  • Single agent for parallelizable tasks
  • Tools without clear descriptions

Guidelines

1. Place critical info at beginning/end of context 2. Implement compaction at 70-80% utilization 3. Use sub-agents for context isolation, not role-play 4. Design tools with 4-question framework (what, when, inputs, returns) 5. Optimize for tokens-per-task, not tokens-per-request 6. Validate with probe-based evaluation 7. Monitor KV-cache hit rates in production 8. Start minimal, add complexity only when proven necessary

Scripts

  • context_analyzer.py - Context health analysis, degradation detection
  • compression_evaluator.py - Compression quality evaluation

Related skills

FAQ

What does context-engineering optimize for coding agents?

context-engineering optimizes prompts, context windows, retrieval chunks, and tool schemas so coding agents stay accurate, bounded, and reliable when working across large repositories.

When should teams apply context-engineering?

Teams should apply context-engineering when agent sessions hallucinate, lose task thread, or mis-invoke tools because context is noisy or schemas lack clear boundaries.

AI & Agent Buildingllmagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.