context-engineering

context-engineering is a skill for Claude Code, Codex from aaronnat23/disp8ch. It costs 0 tokens per session (445 once invoked), scanned A, original, MIT.

A set of methods for controlling which instructions, files, memories, and tool results an AI agent sees, and when it sees them.

In plain words
What is it for?
Use it when building or debugging agent runtimes, memory, retrieval, tool loops, session summaries, or workflows involving multiple agents.
Why use it?
It helps prevent the agent from being overwhelmed by irrelevant or outdated information, or from losing important task details during long sessions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aaronnat23/disp8ch/context-engineering
Any agent
npx skills add aaronnat23/disp8ch --skill context-engineering
Clone the repo
git clone --depth 1 https://github.com/aaronnat23/disp8ch

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/aaronnat23/disp8ch/context-engineering.svg)](https://agentmods.dev/skills/aaronnat23/disp8ch/context-engineering)
Your own site
<a href="https://agentmods.dev/skills/aaronnat23/disp8ch/context-engineering"><img src="https://agentmods.dev/badge/skills/aaronnat23/disp8ch/context-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 445 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00445
Opus 5 $0.00000 $0.00222
Sonnet 5 $0.00000 $0.00089
Haiku 4.5 $0.00000 $0.00044

Measured 3d ago against content hash 3ce374c9b8e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

context-engineering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

optional-skills/context-engineering/SKILL.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  • Building or debugging agentic runtimes, memory systems, tool loops, retrieval, compaction, or multi-agent workflows.
  • A model forgets changed files, loses goals after compaction, overuses stale memory, or drowns in tool output.
  • Designing skills, prompt indexes, evidence dossiers, scratch files, or session summaries.

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

  • Filesystem scratchpad for large evidence and work logs.
  • Evidence dossier for tool results and source maps.
  • Skill catalog plus lazy skill loading.
  • Anchored summaries with stable sections for goal, decisions, changed files, tests, blockers, and next steps.
  • Multi-agent handoff packets that include only role-relevant context.

Guardrails

  • Do not hide important safety constraints during compression.
  • Do not save transient failures as durable context.
  • Do not enable this by default for all agents; use it for agent-runtime, architecture, memory, and long-horizon work.

Read the full file on GitHub · 41 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 41 lines · 0 tokens per session scan A 3ce374c9b8e9

Subscribe to this mod's changes

context-engineering is a skill published in the GitHub repository aaronnat23/disp8ch (98 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 445 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

add-dashboard-orpc-procedure

Verify permission guards when creating, modifying, or reviewing any oRPC procedure file in packages/xinity-ai-dashboard/src/lib/server/orpc/procedures/.

xinity-ai/xinity-ai · 39 tokens

run-tests

End-to-end verification that every test suite in the workspace runs green locally. Use when validating dependency changes, refactors, or anything else that could plausibly affect runtime behavior across packages.

xinity-ai/xinity-ai · 40 tokens

add-env-variable

Add a new environment variable to any service package following the env-schema / parseEnv pattern with Zod schema, describe(), and meta(secret()) annotations.

xinity-ai/xinity-ai · 34 tokens

code-quality-control

Apply repo quality standards (comments, naming, simplicity, structure) when reviewing or writing code. Use as a checklist before completing work on any file.

xinity-ai/xinity-ai · 34 tokens

integrate-model

Integrate a new inference model into Xinity from a loose request like "install/integrate/add model X". Researches the model, assembles validated model data (the xinity-infoserver model entry), and verifies it actually runs via the daemon's run-model script, iterating on failures. Use whenever someone wants to make a…

xinity-ai/xinity-ai · 89 tokens

modularity-review

Review codebase or design for modularity problems and produce actionable improvement recommendations. Also guides design of new modular boundaries from functional requirements. Inspired by Vlad Khononov's balanced-coupling model and golden-age-of-modularity principles. NOTE: Full upstream plugin at…

strikersam/autonomous-ai-agency · 91 tokens