Aller au contenu
Skillpedia
Prompts et LLM8.6k · #12423

context-engineering

Ce qu’il fait

Ce skill explique comment organiser les informations qu'un agent IA voit pendant son travail. Il s'adresse aux personnes qui conçoivent ou réparent des configurations d'agents qui oublient des détails ou se répètent. Il s'agit d'un instantané ancien, à vérifier au regard des modèles actuels.

Quand l’utiliser

  • ✓Quand un agent s'écarte de sa trajectoire, se répète ou oublie des limites importantes en pleine tâche.
  • ✓Lorsque vous décidez quelles consignes doivent être chargées au départ et lesquelles seulement au besoin.
  • ✓Quand vous planifiez la manière dont un agent transmettra le travail à un autre agent.

Lien du skill

https://github.com/mvschwarz/openrig/blob/main/packages/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/mvschwarz/openrig/blob/main/packages/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Mon agent IA oublie mes règles au milieu d'une longue tâche. Comment dois-je configurer son contexte ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Le skill décrit comment les informations de la fenêtre d'un agent sont choisies, réduites et partagées. Il s'agit d'un instantané des pratiques de 2024 et 2025, que l'agent doit vérifier avant de s'y fier.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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:

  1. 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).
  2. 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).
  3. 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)

**

Questions fréquentes

Ces conseils sont-ils toujours d'actualité ?

Il s'agit d'un instantané des pratiques de 2024 et 2025, et le skill demande de les vérifier avant de s'y fier.

Ne concerne-t-il que les agents isolés ?

Non. Il couvre aussi les moments où utiliser des sous-agents et la façon de passer le travail entre agents.

Qu'est-ce qui compte comme contexte ?

Tout ce que l'agent voit, comme les consignes, les définitions d'outils, les données récupérées et les messages passés.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
8.6k
Position au classement
#12423
Licence
Apache-2.0
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires