Context Engineering
A strategy guide for managing Claude Code context and token budgets through four operations: Write, Select, Compress, Isolate.
What it does
Gives you a systematic model for controlling how context flows through an AI coding session:
- Write — persist state to CLAUDE.md, NOTES.md, or
.claude/memory/so it survives compaction and session resets. - Select — retrieve with precision:
@file→grep/Glob→ partial reads. "Focused 300 tokens beat unfocused 113K tokens." - Compress —
/compact focus:, inline microcompaction, head+tail reads, and a PostCompact hook that re-injects critical rules. - Isolate — split heavy work into subagents, worktrees (
claude -w),/btwoverlays, or fresh sessions.
It also includes a phase-by-phase token budget table (planning, implementation, testing, review), a decision table for /clear vs /compact vs subagent, and a list of common anti-patterns.
Who it's for
- Anyone whose long sessions degrade, loop, or forget earlier decisions
- Teams trying to cut token cost and latency
- Developers working in large codebases with heavy search/read work
- Users who haven't yet made real use of subagents or worktrees
Example uses
- Before a large refactor: write goals and constraints to NOTES.md,
/compact focus: auth module changesonce context passes 50%, then re-read NOTES.md to restore full state. - Bug hunting: instead of reading a whole module, chain Glob → Grep → Read with offset/limit to pull exactly one function and save tokens.
- Parallel work: keep the main session for coordination and commits while subagents run the test suite and generate a migration script.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/rohitg00/pro-workflow/HEAD/skills/context-engineering/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the skills/context-engineering folder from the GitHub repo rohitg00/pro-workflow into my ~/.claude/skills/rohitg00-context-engineering/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/rohitg00/pro-workflow.git /tmp/pro-workflow && mkdir -p ~/.claude/skills && cp -r /tmp/pro-workflow/skills/context-engineering ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/rohitg00/pro-workflow.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r pro-workflow/skills/context-engineering ~/.claude/skills/ - Verify that
~/.claude/skills/context-engineering/SKILL.mdexists. - Restart Claude Code, run
/contextto see your current usage, then try: "Apply context engineering and clean up this session." - (Optional) Paste the
## Context Engineeringblock from the end of the doc into your project CLAUDE.md so the rules always apply.