
Context engineering
Curates what an AI coding agent sees, when, and how, to keep its output on track
Context engineering is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 123K
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Context engineering
This skill guides an agent through setting up and managing its working context. It covers writing a persistent rules file such as CLAUDE.md, AGENTS.md or Cursor and Windsurf rule files, with sections for stack, commands, conventions and boundaries. It also explains how to load specs, source files and error output in layers, from always-on project rules down to the current iteration.
The material gives the agent concrete routines: reading target files and a similar existing pattern before editing, packing only task-relevant files into a session, keeping a project map for large codebases, and compressing or dropping stale exploration during long runs. It includes a restartable session handoff, recording scope, task status, changed files, verification results and open questions so a fresh session can resume safely. It also tells the agent to surface conflicts and missing requirements rather than guessing.
The skill is plain instructional markdown with no scripts. It references a shared agent-first CLI guide for search commands, and it expects the agent to work with files in the repository and, optionally, MCP servers such as Context7, GitHub or PostgreSQL.
When your agent uses it
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.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (20 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the agent-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add chrisalehman/bionic
/plugin install agent-skills@bionicOr copy only this skill to ~/.claude/skills/context-engineering:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/context-engineering &&
cp -R "$tmp/skills/context-engineering" ~/.claude/skills/context-engineering &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/context-engineering inside it instead.
Copy the skill folder to ~/.agents/skills/context-engineering to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/context-engineering &&
cp -R "$tmp/skills/context-engineering" ~/.agents/skills/context-engineering &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/context-engineering inside it instead.
Copy the skill folder to ~/.cursor/skills/context-engineering to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/context-engineering &&
cp -R "$tmp/skills/context-engineering" ~/.cursor/skills/context-engineering &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/context-engineering inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/addyosmani/agent-skills.git --path skills/context-engineeringOr copy the folder to ~/.gemini/skills/context-engineering yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/context-engineering:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/context-engineering &&
cp -R "$tmp/skills/context-engineering" ~/.copilot/skills/context-engineering &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/context-engineering inside it instead.
Get the folder:
git clone --depth 1 https://github.com/addyosmani/agent-skills.gitThen copy agent-skills/skills/context-engineering into your agent's skills folder as context-engineering. Agents that support SKILL.md read one folder per skill.
What it does
- Rules file setup
- Guidance for writing a persistent project rules file covering stack, commands, conventions and boundaries.
- Layered context loading
- A hierarchy that orders context from always-loaded rules down to per-iteration error output.
- Context budget management
- Advice on what to cut first, what to protect, and how to summarize exploration before dropping it.
- Session handoff checklist
- Steps to persist scope, task status and verification results so a fresh session can resume.
- Confusion surfacing
- Patterns for presenting spec conflicts and missing requirements as explicit options instead of guessing.
- Context packing templates
- Reusable briefing and selective-include formats for giving the agent focused task context.
Good for
- Set up a CLAUDE.md or AGENTS.md rules file for a new project
- Figure out which files to load before changing an endpoint
- Reset a session when the agent starts ignoring project conventions
- Summarize a long debugging session before continuing
- Prepare a handoff so a new session can pick up the next task
Context engineering FAQ
When does Context engineering apply?
It is meant for starting a new session, when output quality degrades, when switching between tasks, or when configuring rules files and context for a project.
Does Context engineering run any scripts or need extra tools?
No scripts are included. It is instructional guidance, and it can reference MCP servers such as Context7, GitHub or PostgreSQL for richer context.
Which rules files does Context engineering mention?
It names CLAUDE.md for Claude Code, .cursorrules or .cursor/rules for Cursor, .windsurfrules for Windsurf, .github/copilot-instructions.md for GitHub Copilot and AGENTS.md for OpenAI Codex.
How do I install Context engineering in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/context-engineering to use it in all your projects, or to .claude/skills/context-engineering in one project. Or install the agent-skills plugin, which includes it: /plugin marketplace add chrisalehman/bionic, then /plugin install agent-skills@bionic.
Does Context engineering run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Context engineering?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Context engineering?
The closest alternatives to Context engineering are Agents md authoring, Writing rules, Intent layer, Agentic os and Writing agents.
Where this comes from
- Description: from the skill's own SKILL.md.
More from addyosmani/agent-skills

Lets your coding agent inspect and test live browser pages through Chrome DevTools
- Open source
- 123K GitHub stars
- Browser automation

Guides an agent through red-green-refactor test-first development and bug reproduction
- Open source
- 123K GitHub stars
- Developer tools

Audits interfaces against WCAG 2.2 AA and guides fixing the violations found
- Open source
- 123K GitHub stars
- Developer tools

Guides designing stable, hard-to-misuse APIs, REST endpoints and module contracts
- Open source
- 123K GitHub stars
- Design and media

Sets up CI/CD quality gates, deployment strategies and rollback plans for agents
- Open source
- 123K GitHub stars
- Developer tools

Guides an agent through multi-axis code review before changes are merged
- Open source
- 123K GitHub stars
- Developer tools





