context-engineering
O que ela faz
Esta skill explica como organizar as informações que um agente de IA vê enquanto trabalha. Ela serve para quem monta ou conserta configurações de agentes que esquecem detalhes ou se repetem. É um retrato antigo, então confira seus conselhos com os modelos atuais.
Quando usar
- ✓Quando um agente se desvia, se repete ou esquece limites importantes no meio de uma tarefa.
- ✓Quando você decide quais instruções devem ser carregadas no início e quais só quando necessário.
- ✓Quando você planeja como um agente deve passar trabalho para outro agente.
Link da skill
https://github.com/mvschwarz/openrig/blob/main/packages/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Meu agente de IA esquece minhas regras no meio de uma tarefa longa. Como devo configurar o contexto dele?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill descreve como as informações na janela de um agente são escolhidas, reduzidas e compartilhadas. É um retrato das práticas de 2024 e 2025, então o agente deve verificar os conselhos antes de confiar neles.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Traditional Context Engineering — 2024–2025 Snapshot
Status: provisional historical research snapshot
This skill is a provisional historical research snapshot of context-engineering practice as published in 2024–2025. It is NOT normative. Do not apply it prescriptively to current frontier models without re-verification. On any conflict, OpenRig current skills, explicit user rulings, and directly measured OpenRig practice PREVAIL over this document. Treat these areas as particularly suspect pending re-verification: compaction/summarization guidance, minimal-upfront versus broad orientation, just-in-time lookup assumptions, fixed context ceilings, and single-agent versus multi-agent advice.
Curated distillation of the best publicly available expertise on context engineering for coding agents, drawn from primary sources at Anthropic, OpenAI, and leading practitioners (Manus, Cognition, Chroma, LangChain, Drew Breunig, and others). Load on the moments the description names; it is deliberately not part of any base walk.
1. The mental model: what context engineering is
Definition. Context engineering is "the set of strategies for curating and maintaining the optimal set of tokens (information) during LLM inference" — everything that lands in the window: system instructions, tool definitions, retrieved data, message history, and tool outputs, not just the prompt text (Anthropic, Effective context engineering for AI agents). Andrej Karpathy's framing, popularized via LangChain: "the delicate art and science of filling the context window with just the right information for the next step" — the LLM is a CPU and the context window is its RAM, and your job is deciding what gets loaded into RAM at each step (LangChain, Context Engineering for Agents).
Why it superseded prompt engineering. A chatbot answers one question with whatever fits in one turn. An agent runs in a loop, accumulating tool results, file contents, and history across dozens or hundreds of steps. The improvements stop coming from rewording instructions and start coming from rewiring — what the agent retrieves, in what order, and what gets evicted when the window fills (Anthropic, ibid.). Philipp Schmid's formulation of the practical consequence: "Agent failures aren't only model failures; they are context failures." Most of the time when a capable model does something dumb, the context it was given made the dumb thing likely (Schmid, The New Skill in AI is Context Engineering).
The physical constraint: attention is a budget, not a bucket. Three mechanisms make context a scarce resource rather than free storage:
- Quadratic attention. In a transformer, every token attends to every other token — n² pairwise relationships. Longer sequences stretch the model's ability to capture them, and models are trained on distributions where short sequences dominate, so they have fewer specialized parameters for context-wide dependencies. The result is "a performance gradient rather than a hard cliff" (Anthropic, Effective context engineering).
- Context rot. Chroma's study of 18 frontier models showed reliability degrades as input length grows even on trivially simple tasks like retrieval and text replication — and degradation starts well before the window is full. What matters is not just length: distractor presence, needle–question similarity, and haystack structure all change how fast performance collapses (Chroma, Context Rot).
- Position effects. Models exhibit a U-shaped attention curve: information at the beginning or end of a long context is used far better than information in the middle (Liu et al., Lost in the Middle).
The one-sentence discipline. From Anthropic: "Find the smallest set of high-signal tokens that maximize the likelihood of some desired outcome." Everything else in this pack is a technique in service of that sentence.
The components you are engineering. Schmid's inventory is a useful checklist of what actually occupies the window: (1) system instructions, (2) the user's immediate request, (3) state/history of the current session, (4) long-term memory, (5) retrieved external information, (6) tool definitions, (7) output-format specifications (Schmid, ibid.). Each is a separate dial. When an agent misbehaves, walk this list asking "which of these is missing, stale, bloated, or contradictory?"
2. Core principles (and the why behind each)
**
Perguntas frequentes
Este conselho ainda está atual?
É um retrato das práticas de 2024 e 2025, e a skill diz para verificá-lo antes de confiar nele.
Vale apenas para agentes isolados?
Não. Ela também cobre quando usar subagentes e como passar trabalho entre agentes.
O que conta como contexto?
Tudo o que o agente vê, como instruções, definições de ferramentas, dados recuperados e mensagens anteriores.
Detalhes
Descrição original do autor
Use when designing, reviewing, or debugging how an agent's context window gets filled, pruned, or shared — choosing what loads at boot versus on demand, sizing an install or an always-loaded file, fixing an agent that drifts, repeats itself, or forgets constraints mid-task, planning compaction or summarization, deciding single-agent versus subagents, engineering handoffs between agents, or picking a tool loadout. NOT for rewording a prompt's tone, choosing which model to pin, or debugging business logic — those are adjacent moments this skill does not serve. Historical 2024–2025 snapshot; not
repo: mvschwarz/openrig
Popularidade
- Estrelas no GitHub
- 8,6 mil
- Posição no ranking
- #12423
- Licença
- Apache-2.0
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
agent-operated-software
8,6 milAjuda seu agente a projetar, construir ou depurar um app contínuo cujo backend em execução inclui agentes de IA, como um painel de controle de agentes em Markdown ou JSON.
agent-operated-workflows
8,6 milAjuda seu agente a decidir se um procedimento limitado deve ser executado por um agente de IA ou por código comum, e como retomá-lo a partir de evidências verificadas.
applying-a-permission-policy
8,6 milAjuda seu agente a configurar as permissões de comando que um agente de programação usa durante a montagem de uma equipe, para que comandos rotineiros peçam menos aprovações.
claude-compaction-restore
8,6 milAjuda um agente do Claude Code a reconstruir sua visão de trabalho depois que o contexto é compactado, usando um mapa de restauração salvo, a transcrição e os arquivos tocados.
Skills parecidas
writing-skills
311 milEnsina seu agente a escrever novas skills e testar cada uma antes, conferindo se a skill realmente muda o comportamento do agente.
writing-for-agents
310 milExplica como escrever instruções claras para agentes de IA, incluindo skills, arquivos AGENTS.md e CLAUDE.md, para que o agente se comporte de forma previsível.
bengali-nlp
280 milFaz seu agente processar textos em bengali. Ajuda a entender e trabalhar com a língua, normalizando o texto e lidando com suas características únicas.