Context Engineering

Engineer an agent's context window as a finite attention budget: prompt at the right altitude, give judgment instead of rigid rules, use expressive tools and progressive disclosure over piled-up instructions, delete redundancy, and manage long-horizon runs with compaction, notes, and sub-agents. Trigger whenever you write or audit a system prompt, CLAUDE.md, skill, or tool set for an agent; when an agent ignores instructions or degrades on long runs; or when migrating prompts to Claude 5-generation models.

10 stars 2 forksAI, LLMs & Agents

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add Archive228/lab-skills --skill context-engineering
Manual install
git clone --depth 1 https://github.com/Archive228/lab-skills.git /tmp/lab-skills
mkdir -p ~/.claude/skills
cp -r /tmp/lab-skills/skills/context-engineering ~/.claude/skills/context-engineering

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Context Engineering: The Finite Attention Budget

This skill is an operating procedure for deciding what goes into an agent's context window — system prompt, tools, examples, memory, retrieved data, message history — and what stays out. It distills Anthropic's context-engineering guidance (2025) and its Claude 5-generation update (2026): treat every token as spending a finite attention budget, and prefer the smallest set of high-signal tokens over exhaustive instructions.

## When to use

Use this skill when you are:
- Writing or auditing a system prompt, CLAUDE.md, agent skill, or tool set.
- Designing tools or an agent harness, especially with many tools or MCP servers.
- Debugging an agent that ignores instructions mid-run, loses recall on long contexts, or declares work done prematurely.
- Running long-horizon tasks (tens of minutes to hours: codebase migrations, research projects) where token count will exceed the context window.
- Migrating prompts written for older models to Claude 5-generation models (Claude Opus 5, Claude Fable 5).

Do NOT use for single-turn prompt tweaks where a short prompt already works — the standing guidance is "do the simplest thing that works." Do not apply the loosen-the-rules 2026 guidance blindly to older, less capable models; it was validated on Claude 5-generation models.

## Rules
Read the full skill on GitHub

Details

Skill name
context-engineering
Path
skills/context-engineering/SKILL.md
License
MIT
Repo updated
12 August 2026

FAQ

What does the Context Engineering skill do?

Engineer an agent's context window as a finite attention budget: prompt at the right altitude, give judgment instead of rigid rules, use expressive tools and progressive disclosure over piled-up instructions, delete redundancy, and manage long-horizon runs with compaction, notes, and sub-agents. Trigger whenever you write or audit a system prompt, CLAUDE.md, skill, or tool set for an agent; when an agent ignores instructions or degrades on long runs; or when migrating prompts to Claude 5-generation models.

How do I install the Context Engineering skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add Archive228/lab-skills --skill context-engineering. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Context Engineering popular?

It lives in Archive228/lab-skills, which has 10 GitHub stars and 2 forks.

Related skills

Agent Design Fundamentals

10

Archive228/lab-skills

Decision rules for whether to build an LLM agent and how to architect it, distilled from OpenAI's "A Practical Guide to Building Agents": build/no-build criteria, model selection, tool design, single-agent vs multi-agent orchestration (manager pattern vs decentralized handoffs), layered guardrails, and human-in-the-loop triggers. Use when designing, reviewing, or refactoring an agent system — before choosing an architecture, adding more agents, defining tools, or shipping an agent to production without guardrails.

AI, LLMs & Agents

Agent Evals

10

Archive228/lab-skills

Build and maintain evaluation suites for AI agents: bootstrap 20-50 tasks from real failures, pick code-based vs model-based vs human graders by agent architecture (coding, conversational, research, computer-use), write unambiguous tasks with reference solutions, and keep suites alive via ownership and transcript reading. Use when creating evals from zero, adding graders or eval cases, debugging suspicious eval scores, or deciding pass@k vs pass^k metrics for an agent product.

AI, LLMs & Agents

Agent Failure Preflight

10

Archive228/lab-skills

Pre-deployment failure-mode gate for agentic AI systems, distilled from Microsoft AI Red Team's Taxonomy of Failure Modes in Agentic AI Systems v2.0 (grounded in 12 months of red-team engagements). Run it before shipping or materially changing an agent — adding tools/MCP servers/plugins, enabling persistent memory, adding sub-agents or orchestration, enabling computer use, or expanding permissions — to verify concrete controls against memory poisoning, HitL bypass, goal hijacking, supply-chain compromise, session context contamination, capability disclosure, and multi-agent cascade failures.

AI, LLMs & Agents

Gauntlet Loop

9

sidneyswift/skills

Run iterative build-critique loops that push AI output past "good enough" toward a concrete quality bar. Give a lead agent a goal and a real reference to compare against. The agent decomposes the goal into the smallest independently-improvable pieces, assigns each piece a builder and a separate critic with fresh context, and loops until the output matches or exceeds the bar. Use when the first draft is never good enough — games, websites, product design, writing, marketing campaigns, code, research, or anything where output can be inspected and improved.

AI, LLMs & Agents

Context Compression

10

Archive228/lab-skills

Compress an agent's context — long environment observations and accumulated interaction history — on long-horizon tasks using Microsoft's ACON method: threshold-triggered LLM compression with guidelines optimized from contrastive failure analysis. Trigger when an agent loop's context grows across many tool-call steps and blows token budgets or degrades decisions, when designing what a summarizer/compressor must preserve, or when distilling a compressor into a smaller model.

AI, LLMs & Agents

Gpt 56 Prompting

10

Archive228/lab-skills

Operating procedure for prompting the GPT-5.6 model family (gpt-5.6-sol/terra/luna) in agentic work: outcome-first prompts with explicit stopping conditions, autonomy and approval boundaries, tool routing, Programmatic Tool Calling, multi-agent (beta), reasoning effort and verbosity settings, and safe migration from GPT-5.5/5.4. Use whenever writing or revising system/developer prompts for GPT-5.6, wiring its tools, tuning reasoning.effort or text.verbosity, or debugging over-asking, over-stopping, or tool-loop behavior on these models.

AI, LLMs & Agents

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.