context-engineering
Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.
npx skills add addyosmani/agent-skills --skill context-engineering --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Context Engineering ## Overview Feed agents the right information at the right time. Context is the single biggest lever for agent output quality — too little and the agent hallucinates, too much and it loses focus. Context engineering is the practice of deliberately curating what the agent sees, when it sees it, and how it's structured. ## When to Use - Starting a new coding session - Agent output quality is declining (wrong patterns, hallucinated APIs, ignoring conventions) - Switching between different parts of a codebase - Setting up a new project for AI-assisted development - The agent is not following project conventions ## The Context Hierarchy Structure context from most persistent to most transient: ``` ┌─────────────────────────────────────┐ │ 1. Rules Files (CLAUDE.md, etc.) │ ← Always loaded, project-wide ├─────────────────────────────────────┤ │ 2. Spec / Architecture Docs │ ← Loaded per feature/session ├─────────────────────────────────────┤ │ 3. Relevant Source Files │ ← Loaded per task ├─────────────────────────────────────┤ │ 4. Error Output / Test Results │ ← Loaded per iteration ├─────────────────────────────────────┤ │ 5. Conversation History │ ← Accumulates,
- Overview
- When to Use
- The Context Hierarchy
- Level 1: Rules Files
- Level 2: Specs and Architecture
- Level 3: Relevant Source Files
- Level 4: Error Output
- Level 5: Conversation Management
- Context Packing Strategies
- The Brain Dump
- The Selective Include
- The Hierarchical Summary
- MCP Integrations
- Confusion Management
What does the context-engineering skill do?
Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.
How do I install it?
Run `npx skills add addyosmani/agent-skills --skill context-engineering --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From addyosmani/agent-skills, a repository with 81,574 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
