# context-engineering

> Claude/Codex skill by [@addyosmani](https://omgskills.com/library/addyosmani/index.md) · 81k stars · Updated 2026-07-26

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.

Tags: agent-skills, antigravity, antigravity-ide, claude-code, cursor, skills

## Install

```sh
git clone https://github.com/addyosmani/agent-skills /tmp/agent-skills && ln -s /tmp/agent-skills/skills/context-engineering ~/.claude/skills/context-engineering
```

## From README

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: Level 1: Rules Files Create a rules file that persists across sessions. This is the highest-leverage context you can provide.

## Links

- HTML page: https://omgskills.com/skills/addyosmani/agent-skills/context-engineering/
- GitHub: https://github.com/addyosmani/agent-skills
- Author: [@addyosmani](https://omgskills.com/library/addyosmani/index.md)

## More from this repo

- [api-and-interface-design](https://omgskills.com/skills/addyosmani/agent-skills/skills/api-and-interface-design/index.md) — Guides stable API and interface design.
   - [@addyosmani](https://omgskills.com/library/addyosmani/index.md) · 93k stars
- [constraint-driven-development](https://omgskills.com/skills/addyosmani/agent-skills/skills/constraint-driven-development/index.md) — Establishes a project's quality bar as a written contract and stops agents quietly lowering it.
   - [@addyosmani](https://omgskills.com/library/addyosmani/index.md) · 91k stars
- [doubt-driven-development](https://omgskills.com/skills/addyosmani/agent-skills/skills/doubt-driven-development/index.md) — Subjects every non-trivial decision to a fresh-context adversarial review before it stands.
   - [@addyosmani](https://omgskills.com/library/addyosmani/index.md) · 87k stars
