Context engineering

From aaronnat23/disp8ch · View interactive version

Context engineering is an AI agent skill from the GitHub repository aaronnat23/disp8ch. Design agent context so the model receives the right information at the right time without stuffing every instruction, file, and tool result into the prompt.

How to use this skill

Skill file

Context Engineering

Design agent context so the model receives the right information at the right time without stuffing every instruction, file, and tool result into the prompt.

Use When

Playbook

  1. Separate static context from dynamic context. Static context should contain stable rules and compact catalogs; dynamic context should be retrieved on demand.
  2. Put critical instructions, current task, decisions, and final constraints near the beginning or end of context.
  3. Store large tool outputs, logs, research notes, and intermediate plans as files or structured records, then cite or retrieve them selectively.
  4. Prefer skill names and descriptions in static context; load full skill bodies only when relevant.
  5. Preserve task state during compaction: objective, changed files, commands run, failures, open questions, and next action.
  6. Track context failure modes: missing context, too much irrelevant context, stale context, poisoned context, and lost-in-the-middle.
  7. Evaluate context changes by task success and total tokens per completed task, not by prompt size alone.

Patterns

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.