optimize-agent-context

Installation
SKILL.md

Optimize Agent Context

Enforce the Band-Aid Philosophy: an agent context file should only contain rules that fix mistakes the agent is actively making. Everything else is bloat that degrades performance and increases cost.

Core Rules (Non-Negotiable)

  1. NO BLOAT — Never include directory structures, file trees, dependency lists, or package inventories. The agent has tools to discover these.
  2. NO SUMMARIES — Never include vague app descriptions ("This is a video sharing app"). This distracts the model and triggers hallucinations.
  3. ONLY FIX KNOWN FAILURES — Every line must correct a specific, observed agent mistake or enforce an architectural constraint the agent cannot guess.
  4. USE NEGATIVE CONSTRAINTS — When the agent uses the wrong tool/library, explicitly state what NOT to use, then what TO use.
  5. BE MINIMAL — Target under 20 lines. Bullet points preferred. If a rule can be removed without the agent breaking, remove it.

Why This Matters

Studies show bloated, AI-generated context files:

  • Degrade agent performance by ~3%
  • Increase token costs by 20%+
  • Trigger hallucinations by surfacing legacy code the agent then tries to use ("pink elephants" effect)
Related skills
Installs
12
GitHub Stars
18
First Seen
Mar 4, 2026