
Context Engineering
Most agent problems trace back to context. This skill gives you a framework for feeding Claude the right information at the right time: rules files for project conventions, selective spec loading instead of dumping everything, relevant source files before editing, and clean error messages when things break. The hierarchy diagram alone (rules → specs → source → errors → history) is worth internalizing. Best part is the confusion management section, which teaches the agent to surface conflicts instead of guessing. Use this when starting a project, when output quality drops, or when the agent starts hallucinating APIs that don't exist.
- skills.sh installs
- 71.1K
- GitHub stars
- 114.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add addyosmani/agent-skills --skill context-engineering --agent claude-codeInstalls into .claude/skills of the current project.
Files
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:
Sponsors
Details
- Repository
- github.com/addyosmani/agent-skills
- Categories
- Code Review & Quality, AI & Agent Building
- First seen
- Apr 16, 2026
More from addyosmani/agent-skills
All 25- Incremental Implementation71K
- Git Workflow And Versioning68.8K
- Idea Refine68.3K
- Using Agent Skills68K
- Browser Testing With Devtools67.7K
- Shipping And Launch67.4K
- Source Driven Development67.4K
- Ci Cd And Automation67.3K
- Interview Me66.4K
- Deprecation And Migration66.4K
- Doubt Driven Development65.8K
- Observability And Instrumentation63.8K
- Constraint Driven Development42.4K
- Code Review And Quality84.1K
- Security And Hardening81.4K
- Frontend Ui Engineering77.8K
- Performance Optimization75.2K
- Spec Driven Development74.7K
- Planning And Task Breakdown73.5K
- Documentation And Adrs73.5K
- Code Simplification72.6K
- Api And Interface Design72.4K
- Debugging And Error Recovery72.4K
- Test Driven Development71.3K