| name | Context Engineering For Agent Work |
| catalog_line | Design an AI agent's context: what to load, markdown data layers, prompt-bloat audits, harness debugging. |
| description | Root skill for designing the context an AI agent works with — selecting what files, docs, memories, and tool outputs to load, structuring project context as markdown with frontmatter, stage-gating workflows, auditing prompt bloat, and right-sizing evals. Use when the user wants to set up or structure context for an agent, convert messy notes into an AI-readable project data layer, reduce a bloated system prompt, build or debug an agent harness, or figure out why an agent seems confused, ignores rules, or behaves unreliably. |
| skill_type | strategy |
| altitude | meta |
| activation | progressive |
| preserve_markdown | true |
| legacy_paths | ["context-engineering-for-agent-work","docs/research/youtube-library/skill-drafts/context-engineering-for-agent-work/SKILL.md"] |
| path | apps/web/src/lib/services/agentic-chat/tools/skills/definitions/context_engineering_for_agent_work/SKILL.md |
Context Engineering For Agent Work
Identity
Use this skill when an agent needs to decide what context to load, how to structure it, and how to keep an AI workflow reliable. Context engineering is not "more tokens." It is higher information density, deterministic selection, and explicit workflow control. When an agent seems confused, debug the context and the harness before blaming the model.
This is a strategy skill at meta altitude. What it owns is the decision spine for context selection — density heuristics, deterministic pre-gathering, and prompt-bloat and eval judgment — plus the workflow patterns that operationalize them. The dominant verb is decide what context an agent works with; the procedural patterns below serve that decision, they don't replace it.
Activation
- Build or debug an agent harness
- Decide what files, docs, memories, rules, or tool outputs to load
- Reduce a bloated system prompt
- Convert messy notes into AI-readable structured context
- Create stage-gated workflows instead of one giant prompt
- Design markdown and frontmatter as an agent data layer
- Decide whether to use sub-agents, deterministic pre-gathering, or one smart call
Do not use this skill when the problem is deterministic code behavior unrelated to LLM context.
Judgment
Core Principles
- Density beats volume. Prefer small, specific, high-signal context over large dumps.
- Do not rely on prompts for control flow. If the steps are known, make stages explicit.
- Pre-gather deterministically when possible. Use code, search, metadata, or indexes to select context before the expensive model call.
- Keep data sliceable. Store structured metadata where tools can filter without reading full bodies.
- One model deeply understood beats constant model hopping. Prompt behavior is model-specific.
- Rules should be retrieved, not all stuffed. Long universal rule lists dilute attention.
- Build first, then evaluate. For emergent AI behavior, create a baseline, observe it, then turn important behaviors into evals.
Prompt Bloat Audit
Audit long prompts when:
- a model upgrade happened
- the agent starts ignoring rules
- every rule says "always" or "never"
- the system prompt has accumulated old fixes
- the workflow feels slower or less reliable
For each instruction, ask: