Agent skill · Code Review & Quality

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.

addyosmanigithub.com/addyosmaniGitHub ↗
claude-codecodexcursorMIT
Install
npx skills add addyosmani/agent-skills --skill context-engineering --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 10 KB
Bundled scripts: none
Path: skills/context-engineering/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 81,574
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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,

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. The Context Hierarchy
  4. Level 1: Rules Files
  5. Level 2: Specs and Architecture
  6. Level 3: Relevant Source Files
  7. Level 4: Error Output
  8. Level 5: Conversation Management
  9. Context Packing Strategies
  10. The Brain Dump
  11. The Selective Include
  12. The Hierarchical Summary
  13. MCP Integrations
  14. Confusion Management
More from agent-skills
All skills →
About this skill
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.

Keep going