Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

Context Engineering

A practical playbook for managing token budgets and context quality in Claude sessions through four operations: Write, Select, Compress, Isolate.

UtilitiesIntermediate2,867286AI score 9/10Last updated: Aug 31, 2026

What it does

Tackles the root cause of degrading AI output in long sessions — diluted context — with four concrete operations:

  • Write: persist state to CLAUDE.md, NOTES.md, and .claude/memory/ so it survives compaction and session boundaries.
  • Select: retrieve by precision rank — @file → Grep/Glob → subagent exploration → RAG. Core rule: "focused 300 tokens beats unfocused 113K tokens".
  • Compress: /compact focus:, microcompaction, head+tail reads, tool-result clearing, plus explicit compaction triggers.
  • Isolate: push heavy work to subagents, worktrees (claude -w), /btw, or a fresh session.

It also ships a phase-based budget table (planning <20%, implementation <50%, testing <70%, review <85%), a /clear vs /compact vs subagent decision table, an anti-pattern list, and a ready-to-paste CLAUDE.md rules snippet.

Who it's for

  • Anyone running long Claude Code sessions on large codebases and hitting context limits
  • Developers tired of re-explaining state after every auto-compaction
  • Teams already using subagents or worktrees but lacking clear criteria for when to use them
  • Cost-conscious users who want better prompt-cache hit rates

Example uses

  1. Before a large refactor: write goals and constraints to NOTES.md, and add a PostCompact hook that re-injects .claude/critical-context.md after every compaction.
  2. Debugging test failures: instead of dumping full logs, apply the head+tail 20-line strategy, or delegate the whole test run to a subagent to keep the main context clean.
  3. Switching task domains: after finishing a feature, run /compact focus: auth module changes to keep learnings and drop noise; use /clear when the next task is unrelated.

· · · 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude 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 && mkdir -p ~/.claude/skills && cp -r pro-workflow/skills/context-engineering ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal and clone the repo: git clone https://github.com/rohitg00/pro-workflow.git
  2. Create the skills folder if needed: mkdir -p ~/.claude/skills
  3. Copy just this skill: cp -r pro-workflow/skills/context-engineering ~/.claude/skills/
  4. Restart Claude Code or start a new session.
  5. Run /context to see your model's real context window, then recalibrate the budget tables in the doc to your setup.
  6. Optionally add export CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50 to your shell profile and paste the rules snippet at the end of the doc into your project's CLAUDE.md.