Workflow for context packets, context audits, compaction, handoffs, session memory, and deciding what AI-agent context to load, retrieve, trim, summarize, refresh, or omit. Use for context rot, context flooding, stale or missing context, task switching, and long-running agent sessions. Do not use when prompt wording, repo file discovery for a story card, or AGENTS.md authoring is the main artifact.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Context Engineering
Treat context as a finite working set. Load the smallest high-signal set of
information that can produce the desired behavior, then refresh it as the task
evolves.
## When To Use
- prepare a focused context packet before an agent starts work
- audit why an agent is hallucinating APIs, ignoring conventions, repeating
mistakes, or losing the thread
- decide what repo files, docs, examples, tool outputs, conversation history, or
external references should be loaded now versus retrieved later
- compact or hand off a long-running task without losing decisions, constraints,
failures, or next actions
- switch between major tasks and remove stale or irrelevant context
## Not For
- rewriting a system prompt, developer prompt, few-shot examples, or structured
output contract as the main artifact; use `prompt-engineering`
- finding likely implementation files for a story card; use `story-repo-scout`
- creating or revising repo-wide agent instructions; use `agents-md-generator`
- broad approach comparison or product framing where context quality is not the
main problem; use `thinking`
…
The line at the top of this page pins the label git:20261101.cb769e1, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_taopq5ics72yku73
GET https://markdownregistry.com/api/v1/resolve?ref=n-n-code/n-n-code-skills/context-engineering
GET https://markdownregistry.com/api/v1/blob/4a7052f13cc4fa8d7adb8af4a81bbf967510d183507bdf02a9099206eac43729
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
n-n-code/n-n-code-skills · .agents/skills/agents-md-generator/SKILL.md · Create, draft, audit, revise, or migrate root and nested repository AGENTS.md files from repo evidence. Use when the…
n-n-code/n-n-code-skills · .agents/skills/bounded-delegation/SKILL.md · Delegate bounded factual file analysis or reference-based code and test generation through available workers, with…
n-n-code/n-n-code-skills · .agents/skills/chrome-devtools-axi/SKILL.md · Use the chrome-devtools-axi CLI to operate Chrome or investigate live page behavior. Default for ad hoc browsing…
n-n-code/n-n-code-skills · .agents/skills/coding-guidance-bash/SKILL.md · Bash implementation and review guidance for automation and repository scripts; not for one-off command execution, POSIX…
n-n-code/n-n-code-skills · .agents/skills/coding-guidance-cpp/SKILL.md · C++ implementation and review guidance for modern ownership, type safety, API design, and tests; use…
n-n-code/n-n-code-skills · .agents/skills/coding-guidance-go-tui/SKILL.md · Go terminal UI implementation and review guidance for interactive Bubble Tea state machines. Includes Huh only when…
n-n-code/n-n-code-skills · .agents/skills/coding-guidance-go/SKILL.md · Go implementation and review guidance for non-interactive CLIs, libraries, workers, and services; use…
addyosmani/agent-skills · skills/context-engineering/SKILL.md · Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching…
mvschwarz/openrig · packages/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.md · Use when designing, reviewing, or debugging how an agent's context window gets filled, pruned, or shared — choosing…
mvschwarz/openrig · skills/_canonical/process/context-engineering/SKILL.md · Use when designing, reviewing, or debugging how an agent's context window gets filled, pruned, or shared — choosing…
a5c-ai/babysitter · library/methodologies/gsd/skills/context-engineering/SKILL.md · Context window monitoring and budget management. Keeps orchestrator at 15-30% context usage while subagents get full…
shashankswe2020-ux/whoop-mcp · .github/skills/context-engineering/SKILL.md · Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching…