context-degradation
Was er macht
Dieser Skill erklärt die üblichen Arten, wie der Kontext einer KI schiefgeht, etwa wenn Informationen in der Mitte ignoriert werden oder falsche Details sich ausbreiten. Er ist für Menschen gedacht, die Agenten debuggen, die über lange Sitzungen schlechter werden.
Wann du ihn nutzt
- ✓Wenn die Antworten eines Agenten schlechter werden, je länger ein Gespräch dauert.
- ✓Wenn ein Agent Details ignoriert, die in der Mitte einer langen Eingabe stehen.
- ✓Wenn widersprüchliche oder falsche Informationen im Kontext zu schlechten Ausgaben führen.
Link zum Skill
https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/context-degradation/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Mein KI-Agent wird nach einer langen Sitzung verwirrt und vergisst, was ich ihm vorher gesagt habe. Hilf mir herauszufinden, warum.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill nennt fünf Muster, etwa Verlust in der Mitte, Vergiftung und Widerspruch, und beschreibt für jedes Anzeichen und Lösungen, damit du das Problem dem passenden Gegenmittel zuordnen kannst.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Context Degradation Patterns
Diagnose and fix context failures before they cascade. Context degradation is not binary — it is a continuum that manifests through five distinct, predictable patterns: lost-in-middle, poisoning, distraction, confusion, and clash. Each pattern has specific detection signals and mitigation strategies. Treat degradation as an engineering problem with measurable thresholds, not an unpredictable failure mode.
When to Activate
Activate this skill when:
- Agent performance degrades unexpectedly during long conversations
- Debugging cases where agents produce incorrect or irrelevant outputs
- Designing systems that must handle large contexts reliably
- Evaluating context engineering choices for production systems
- Investigating "lost in middle" phenomena in agent outputs
- Analyzing context-related failures in agent behavior
Do not activate this skill for adjacent work owned by other skills:
- Explaining foundational context mechanics without an active failure:
context-fundamentals. - Applying token-efficiency tactics after the failure pattern is known:
context-optimization. - Designing a compression or handoff summary strategy:
context-compression. - Persisting large outputs, logs, or scratch state outside the prompt:
filesystem-context.
Core Concepts
Structure context placement around the attention U-curve: beginning and end positions receive reliable attention, while middle positions suffer materially reduced recall accuracy in long-context experiments (claim-context-degradation-lost-middle-ruler). This is not a model bug but a consequence of attention mechanics — the first token (often BOS) acts as an "attention sink" that absorbs disproportionate attention budget, leaving middle tokens under-attended as context grows.
Treat context poisoning as a circuit breaker problem. Once a hallucination, tool error, or incorrect retrieved fact enters context, it compounds through repeated self-reference. A poisoned goals section causes every downstream decision to reinforce incorrect assumptions. Detection requires tracking claim provenance; recovery requires truncating to before the poisoning point or restarting with verified-only context.
Filter aggressively before loading context — even a single irrelevant document measurably degrades performance on relevant tasks. Models cannot "skip" irrelevant context; they must attend to everything provided, creating attention competition between relevant and irrelevant content. Move information that might be needed but is not immediately relevant behind tool calls instead of pre-loading it.
Isolate task contexts to prevent confusion. When context contains multiple task types or switches between objectives, models incorporate constraints from the wrong task, call tools appropriate for a different context, or blend requirements from multiple sources. Explicit task segmentation with separate context windows eliminates cross-contamination.
Resolve context clash through priority rules, not accumulation. When multiple correct-but-contradictory sources appear in context (version conflicts, perspective conflicts, multi-source retrieval), models cannot determine which applies. Mark contradictions explicitly, establish source precedence, and filter outdated versions before they enter context.
Detailed Topics
Lost-in-Middle: Detection and Placement Strategy
Place critical information at the beginning and end of context, never in the middle. The U-shaped attention curve means middle-positioned information suffers 10-40% reduced recall accuracy. For contexts over 4K tokens, this effect becomes significant.
Use summary structures that surface key findings at attention-favored positions. Add explicit section headers and structural markers — these help models navigate long contexts by creating attention anchors. When a document must be included in full, prepend a summary of its key points and append the critical conclusions.
Monitor for lost-in-middle symptoms: correct information exists in context but the model ignores it, responses contradict provided data, or the model "forgets" instructions given earlier in a long prompt.
Context Poisoning: Prevention and Recovery
Validate all external inputs before they enter context. Tool outputs, retrieved documents, and model-generated summaries are the three primary poisoning vectors. Each introduces unverified claims that subsequent reasoning treats as ground truth.
Detect poisoning throu
Häufige Fragen
Was bedeutet Verlust in der Mitte?
Das Modell achtet weniger auf Informationen, die in der Mitte einer langen Eingabe stehen.
Worin unterscheidet sich Kontextvergiftung?
Sie entsteht, wenn ein Fehler in den Kontext gelangt und immer wieder verwendet wird, wodurch spätere Antworten schlechter werden.
Wo sollten wichtige Anweisungen stehen?
Der Skill rät, wichtige Informationen nahe am Anfang oder am Ende zu platzieren, wo die Aufmerksamkeit am stärksten ist.
Details
Originalbeschreibung des Autors
This skill should be used for diagnosing and mitigating context degradation: lost-in-middle failures, context poisoning, context clash, context confusion, attention-pattern issues, and agent performance degradation caused by accumulated or conflicting context.
Beliebtheit
- GitHub-Sterne
- 18k
- Platz im Ranking
- #10638
- Lizenz
- MIT
- Aktualisiert
- 11.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
context-engineering-collection
18kHilft deinem Agenten, zu verwalten, was in das Kontextfenster eines KI-Modells kommt, von Gedächtnis und Werkzeugen bis zu Multi-Agenten-Setups und Evaluation.
advanced-evaluation
18kBringt deinem Agenten bei, KI-Antworten mithilfe einer anderen KI zu beurteilen, mit Bewertung, direktem Vergleich und Prüfungen auf Verzerrungen.
bdi-mental-states
18kBringt deinem Agenten bei, Überzeugungen, Ziele und Pläne nach dem BDI-Ansatz zu modellieren, damit seine Entscheidungen nachvollziehbar und erklärbar sind.
context-compression
18kHilft deinem Agenten, lange KI-Sitzungen in Zusammenfassungen zu kürzen, die Entscheidungen, Dateien, Risiken und nächste Schritte erhalten.
Ähnliche Skills
add-model-provider
394kLässt deinen Agenten einen neuen KI-Modellanbieter mit sicheren Befehlen an OpenClaw anbinden, API-Schlüssel nicht im Klartext speichern und einen Live-Test starten.
acp-router
394kHilft deinem Agenten, eine Aufgabe über OpenClaw an einen Coding-Assistenten wie Claude Code oder Cursor zu senden, damit die Arbeit in diesem Tool läuft.
browser-automation
394kBringt deinem Agenten bei, Webseiten Schritt für Schritt zu steuern, einschließlich Anmeldungen, Tabs und Wiederherstellung, wenn eine Seite nicht mehr reagiert.