Matt Pocock's reference for writing documents agents read, such as skills, AGENTS.md and CLAUDE.md: context pointers, the two loads, information hierarchy, completion criteria, leading words and pruning.
Context Engineering Skill
Addy Osmani's skill for curating what a coding agent sees: rules files, specs, source files, error output and conversation history, with packing strategies and a context budget.
Install
Other ways to install
About
- Five-level context hierarchy from rules files to conversation history
- Template CLAUDE.md and equivalents for Cursor, Windsurf, Copilot and Codex
- Packing strategies: brain dump, selective include, hierarchical summary
- Context budget rules for what to cut and what to protect
- Handling conflicting or incomplete requirements
- Anti-patterns, red flags and a verification checklist
Context Engineering is part of Addy Osmani's addyosmani/agent-skills, a collection of engineering-practice skills for coding agents. It treats context as the biggest lever on agent output quality: too little and the agent invents APIs, too much and it loses focus. Use it when starting a session, when output quality drops, when switching between parts of a codebase or when setting up a project for AI-assisted work.
The core is a five-level hierarchy from most persistent to most transient: rules files (CLAUDE.md, .cursor/rules, .windsurfrules, .github/copilot-instructions.md, AGENTS.md), spec and architecture documents loaded per feature, the source files relevant to the task, error output and test results per iteration, and the conversation history that accumulates and gets compacted. Each level comes with guidance and examples, including a template CLAUDE.md covering stack, commands, conventions and boundaries, and advice on restartable session boundaries.
It also describes packing strategies (brain dump, selective include, hierarchical summary with a project map), budget management (what to cut first, what to protect until the end, compressing before dropping, ordering for recency), MCP integrations, how to handle conflicting or incomplete requirements, anti-patterns, red flags and a verification checklist.
For developers using Claude Code, Cursor, Windsurf, Copilot or Codex who want consistent results across sessions. MIT licensed.
SKILL.md
The instructions your agent loads, as published by Addy Osmani.
Related Skills
See all Context Engineering alternativesThe Caveman family's skill for rewriting memory files such as CLAUDE.md or a todo list into terse caveman-speak to cut input tokens, with code, URLs and commands preserved exactly and a readable backup kept.
Skill: Self-Learning
by kulaxyz
A meta-skill that spots the moment your agent has just earned a hard-won golden path and writes it down as a reusable skill, so the next session starts already knowing the route.
Matt Pocock's /ask-matt router: maps the skills in his collection into one idea-to-ship flow with on-ramps and phase-boundary rules, and tells you which skill fits your situation.