context-degradation

Revoir · 64
Indexé dans Registry

Recognize, diagnose, and mitigate patterns of context degradation in agent systems. Use when context grows large, agent performance degrades unexpectedly, or debugging agent failures.

Verified installs0
Stars33
Version1.0.0
Qualité57/100 · Prometteur
Confiance64/100 · Sandbox uniquement
Audit74/100 · Revue nécessaire

Profil de l’actif

Agents de code et de développement

Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.

Voir la catégorie

Scénario

GitHub automation

I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.

Adéquation Agent

Claude Code + CLI + Codex

Compatible avec Codex, Claude Code, Cursor, CLI ou des Agents personnalisés.

Installer

Prêt

npx skills add shipshitdev/skills --skill context-degradation

Maintenance

À jour

2 jours depuis le dernier push

Risque

Revue nécessaire

La licence est ambiguë

Qualité GitHub

33

57/100 Qualité · 72/100 Confiance

Tags de couverture

CodingGitHub automationAgents de codeagent-skill

Notes de revue

La licence est ambiguë · Permission surface may require sandboxing

Carte d’adoption Agent

Confiance, audit et préparation à l’installation en un coup d’œil

Ces scores combinent les métadonnées publiques du dépôt, les signaux de revue OpenAgentSkill, la fraîcheur de maintenance et la préparation à l’installation. Ils servent à présélectionner et ne remplacent pas la revue humaine.

Qualité

Prometteur
57

Useful candidate, but compare it with alternatives before adopting.

Confiance

Sandbox uniquement
64

Candidate utile avec des signaux de confiance incomplets ou mixtes. Gardez-la dans un espace isolé jusqu’à ce que la boucle de résultats confirme son adéquation.

Audit

Revue nécessaire
74

Revue lisible par machine de la préparation à l’installation, des métadonnées de sécurité, de la maintenance et du risque d’adoption.

Trust Score OpenAgentSkill v5

Revue humaine avant installation

Exécutez uniquement dans un sandbox et comparez les alternatives proches avant usage réel.

CodexClaude CodeCursorOpenAgentSkill CLI

Stars

33 stars GitHub

Activité du dépôt

33 stars et 3 forks

Maintenance

2 jours depuis le dernier push

Licence

Inconnu

Installer

npx skills add shipshitdev/skills --skill context-degradation

Sécurité d’installation

Chemin d’installation standard de package ou runtime

Surface de permissions

secrets or environment access, filesystem or document access

Résultats Agent

Pas encore de données de résultats Agent

Documentation

Contexte README/SKILL.md solide

Résumé des risques

Revoir avant production

  • La licence est ambiguë
  • Low GitHub adoption signal
  • Quality score needs review
  • Permission surface needs review: secrets or environment access, filesystem or document access

Préparation à l’installation

Chemin d’installation disponible

  • Le chemin d’installation est disponible
  • La preuve du dépôt est disponible
  • La licence est ambiguë
  • Pas encore de preuve de résultat Agent-Proven

Métadonnées lisibles par Agent

Données de décision lisibles par machine pour ce skill.

Utilisez ce bloc ou le JSON intégré pour décider si un Agent doit installer ce skill, choisir une alternative ou demander d’abord une revue humaine.

Ouvrir JSON

Tâches adaptées

  • workflows RAG and knowledge
  • Équipes Claude Code
  • builders willing to evaluate younger projects
  • Chunk documents

Agents adaptés

CodexClaude CodeCursorOpenAgentSkill CLICLI

Décision d’installation

Commande
npx skills add shipshitdev/skills --skill context-degradation
Politique
Revoir
Revue humaine
Oui

Confiance et risque

Confiance
64/100
Audit
74/100
Niveau de risque
Revue nécessaire

Boucle de résultat

Endpoint
/api/agent/outcome
ID d’événement
resolve
Résultats
5

Commande d’installation

npx skills add shipshitdev/skills --skill context-degradation

Ne pas utiliser quand

  • Équipes qui nécessitent un SLA soutenu par le fournisseur
  • production agents without a repository review
  • Low GitHub adoption signal
  • No OpenAgentSkill engagement data yet
  • Indices de permissions à haut risque : Secrets or environment access

Sécurité Agent v2

42/100 · Éviter l’installation automatique

ExpérimentalRevoir

Sparse or mixed signals. Useful for discovery, but not for autonomous installation.

Test manually in an isolated workspace and compare against safer alternatives.

Résoudre via API

Moyen

Accès réseau

La skill récupère probablement des pages distantes, API, dépôts ou services externes.

Moyen

Accès au système de fichiers

La skill peut lire ou écrire des fichiers de projet, documents, artefacts générés ou l’état local de l’espace de travail.

Élevé

Secrets or environment access

Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.

Moyen

Accès à la base de données

La skill peut inspecter des schémas, interroger des bases de données ou travailler avec des stockages persistants.

  • Indices de permissions à haut risque : Secrets or environment access
  • La licence est ambiguë

Cibles d’installation

Installer ce skill dans votre workflow Agent

Utilisez le point de terminaison public pour récupérer la commande, la checklist, les prompts et les liens canoniques.

skill install

OpenAgentSkill CLI

Resolve policy, run the source installer safely, and report a verified install receipt.

$ npx --yes https://github.com/Leon-Drq/openagentskill/releases/download/cli-v0.2.1/openagentskill-0.2.1.tgz install shipshitdev-context-degradation

Plan de résolution Agent

Laissez un Agent vérifier la pertinence avant l’installation.

L’API Resolve renvoie la skill sélectionnée, des alternatives, la politique de sécurité, les notes d’audit, la cible d’installation et un prompt prêt à l’emploi.

Ouvrir le plan texte

L’Agent doit vérifier

  • Task fit and alternatives from Resolve API.
  • Audit score, trust score, and safety policy warnings.
  • Install target compatibility for Codex, Claude Code, Cursor, or CLI.

Copier le prompt

Task: Use context-degradation in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20context-degradation%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/shipshitdev-context-degradation/install
Install command: npx skills add shipshitdev/skills --skill context-degradation
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.

Relais Agent

Donnez à l’Agent le chemin d’installation, pas un autre annuaire.

Utilisez le point de terminaison public pour récupérer la commande, la checklist, les prompts et les liens canoniques.

Ouvrir l’API d’installation

Prompt Agent

Use context-degradation for this task. Review https://www.openagentskill.com/api/skills/shipshitdev-context-degradation/install, then install with: npx skills add shipshitdev/skills --skill context-degradation

Métadonnées Registry

Profil lisible par Agent pour la sélection automatique de skills.

L’API Registry fournit les signaux de décision, confiance, audit, cas d’usage et installation sans analyser l’interface.

Ouvrir Manifest

Adéquation Agent

56/100

RAG and knowledge

Plateformes

Claude Code

Rapport d’audit

Revue nécessaire · 74/100

Revue lisible par machine de la préparation à l’installation, des métadonnées de sécurité, de la maintenance et du risque d’adoption.

Voir le rapport d’auditVoir le rapport d’évaluation

Panneau de décision Agent

Needs validation for RAG and knowledge

Do a manual repository review before adding this to an agent workflow.

56
Préparation
Revoir
Étape

Rôle dans la pile

Validation nécessaire

Pertinence principale

RAG and knowledge

Libellé de confiance

Revue manuelle nécessaire

Chemin d’installation

Commande prête

À utiliser lorsque

  • workflows RAG and knowledge
  • Équipes Claude Code
  • builders willing to evaluate younger projects

Preuves

  • recent repository activity
  • install command or GitHub repo available
  • profil qualité 57/100

revoir d’abord

  • Low GitHub adoption signal
  • No OpenAgentSkill engagement data yet

Chemin d’implémentation

  1. 1Installez-le dans un Agent en sandbox et exécutez une tâche de RAG and knowledge de bout en bout.
  2. 2Compare output quality, latency, and failure behavior against at least one alternative.
  3. 3Promote it into production only after reviewing repository permissions, license, and maintenance signals.

Profil de confiance

Sandbox uniquement

Candidate utile avec des signaux de confiance incomplets ou mixtes. Gardez-la dans un espace isolé jusqu’à ce que la boucle de résultats confirme son adéquation.

64
Trust Score OpenAgentSkill

Adoption GitHub

Vérifier

33 stars GitHub

Activité stars/forks

Vérifier

33 stars et 3 forks; l’activité des issues n’est pas disponible dans les métadonnées actuelles

Maintenance récente

Validé

2 jours depuis le dernier push

Clarté de licence

Vérifier

Inconnu

Signaux positifs

  • Revue IA approuvée
  • Le chemin d’installation est disponible
  • La preuve du dépôt est disponible
  • Dépôt maintenu récemment
  • La commande d’installation ne présente aucun motif de haut risque évident
  • La boucle de résultats est prête mais nécessite la première exécution réelle de l’Agent

Réviser avant installation

  • La licence est ambiguë
  • Low GitHub adoption signal
  • Quality score needs review
  • Permission surface needs review: secrets or environment access, filesystem or document access
  • GitHub adoption: 33 GitHub stars
  • Stars/forks activity: 33 stars, 3 forks; issue activity unavailable in current metadata
  • License clarity: Unknown
  • Permission surface: secrets or environment access, filesystem or document access
  • Pas encore de rapports de résultats Agent réels
  • Une revue humaine est requise avant une installation sans surveillance

Action recommandée

Exécutez uniquement dans un sandbox et comparez les alternatives proches avant usage réel.

Profil qualité

Prometteur candidat pour les workflows Agent

Useful candidate, but compare it with alternatives before adopting.

57
Stars GitHub
33
Actualité
il y a 2 jours
Prêt à installer
Oui
Licence
Inconnu
Réviser avant installation: Low GitHub adoption signal

Adéquation au workflow

Utilisez cette skill dans ces scénarios

Adéquation au workflow

Ajouter à un workflow complet

Liste d’alternatives

Comparer avant installation

Similar skills that may fit this task.

Tout comparer

Vue d’ensemble

--- name: context-degradation description: Recognize, diagnose, and mitigate patterns of context degradation in agent systems. Use when context grows large, agent performance degrades unexpectedly, or debugging agent failures. metadata: version: "2.1.0" source: https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/context-degradation/SKILL.md upstream_repo: muratcankoylan/Agent-Skills-for-Context-Engineering upstream_ref: main upstream_commit: 25e1fa79a33f last_synced: "2026-06-13" license: MIT tags: "context, agents, reliability" --- # 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

- 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`.

## 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 through these signals: degraded output quality on previously-successful tasks, tool misalignment (wrong tools or parameters), and hallucinations that persist despite explicit correction. When these cluster, suspect poisoning rather than model capability issues.

Recover by removing poisoned content, not by adding corrections on top. Truncate to before the poisoning point, restart with clean context preserving only verified information, or explicitly mark the poisoned section and request re-evaluation from scratch. Layering corrections over poisoned context rarely works — the original errors retain attention weight.

### Context Distraction: Curation Over Accumulation

Curate what enters context rather than relying on models to ignore irrelevant content. Research shows even a single distractor document triggers measurable performance degradation — the effect follows a step function, not a linear curve. Multiple distractors compound the problem.

Apply relevance filtering before loading retrieved documents. Use namespacing and structural organization to make section boundaries clear. Prefer tool-call-based access over pre-loading: store reference material behind retrieval tools so it enters context only when directly relevant to the current reasoning step.

### Context Confusion: Task Isolation

Segment different tasks into separate context windows. Context confusion is distinct from distraction — it concerns the model applying wrong-context constraints to the current task, not just attention dilution. Signs include responses addressing the wrong aspect of a query, tool calls appropriate for a different task, and outputs mixing requirements from multiple sources.

Implement clear transitions between task contexts. Use state management that isolates objectives, constraints, and tool definitions per task. When task-switching within a single session is unavoidable, use explicit "context reset" markers that signal which constraints apply to the current segment.

### Context Clash: Conflict Resolution Protocols

Establish source priority rules before conflicts arise. Context clash differs from poisoning — multiple pieces of information are individually correct but mutually contradictory (version conflicts, perspective differences, multi-source retrieval with divergent facts).

Implement version filtering to exclude outdated information before it enters context. When contradictions are unavoidable, mark them explicitly with structured conflict annotations: state what conflicts, which source each claim comes from, and which source takes precedence. Without explicit priority rules, models resolve contradictions unpredictably.

### Empirical Benchmarks and Thresholds

Use these benchmarks to set design constraints — not as universal truths. RULER-style evidence shows advertised long-context support does not guarantee satisfactory task performance at that length (claim-context-degradation-lost-middle-ruler). Near-perfect needle-in-haystack scores do not predict real-world long-context performance.

**Model-Specific Degradation Thresholds**

Degradation onset varies significantly by model family and task type. As a general rule, expect degradation to begin at 60-70% of the advertised context window for complex retrieval tasks (RULER benchmark found only 50% of models claiming 32K+ context maintain satisfactory performance at that length). Key patterns:

- **Models with extended thinking** reduce hallucination through step-by-step verification but at higher latency and token cost - **Models optimized for agents/coding** tend to have better attention management for tool-output-heavy contexts - **Models with very large context windows (1M+)** handle more raw context but still follow U-shaped degradation curves — bigger windows do not eliminate the problem, they delay it

Always benchmark degradation thresholds with your specific workload rather than relying on published benchmarks. Model-specific thresholds go stale with each model update (see Gotcha 2).

### Counterintuitive Findings

Account for these research-backed surprises when designing context strategies:

**Shuffled context can outperform coherent context.** Studies found incoherent (shuffled) haystacks can outperform logically ordered ones for some retrieval tasks (claim-context-degradation-distractor-shuffled). Coherent context may create false associations that confuse retrieval; incoherent context can force exact matching. Do not assume that better-organized context always yields better results — test both arrangements.

**Single distractors have outsized impact.** The performance hit from one irrelevant document is disproportionately large compared to adding more distractors after the first. Treat distractor prevention as binary: either keep context clean or accept significant degradation.

**Low needle-question similarity accelerates degradation.** Tasks requiring inference across dissimilar content degrade faster with context length than tasks with high surface-level similarity. Design retrieval to maximize semantic overlap between queries and retrieved content.

### When Larger Contexts Hurt

Do not assume larger context windows improve performance. Performance remains stable up to a model-specific threshold, then degrades rapidly — the curve is non-linear with a cliff edge, not a gentle slope. For many models, meaningful degradation begins at 8K-16K tokens even when windows support much larger sizes.

Factor in cost: processing a 400K token context costs exponentially more than 200K in both time and compute, not linearly more. For many applications, this makes large-context processing economically impractical.

Recognize the cognitive bottleneck: even with infinite context, asking a single model to maintain quality across dozens of independent tasks creates degradation that more context cannot solve. Split tasks across sub-agents instead of expanding context.

## Practical Guidance

### The Four-Bucket Mitigation Framework

Apply these four strategies based on which degradation pattern is active:

**Write** — Save context outside the window using scratchpads, file systems, or external storage. Use when context utilization exceeds 70% of the window. This keeps active context lean while preserving information access through tool calls.

**Select** — Pull only relevant context into the window through retrieval, filtering, and prioritization. Use when distraction or confusion symptoms appear. Apply relevance scoring before loading; exclude anything below threshold rather than including everything available.

**Compress** — Reduce tokens while preserving information through summarization, abstraction, and observation masking. Use when context is growing but all content is relevant. Replace verbose tool outputs with compact structured summaries; abstract repeated patterns into single references.

**Isolate** — Split context across sub-agents or sessions to prevent any single context from growing past its degradation threshold. Use when confusion or clash symptoms appear, or when tasks are independent. This is the most aggressive

Détails techniques

Version
1.0.0
Licence
Unknown
Dernière mise à jour
23 août 2026
Publié
23 août 2026

Instantané de décision

Validation nécessaire

56
Prêt
Revoir
Étape

recent repository activity

Audit

Revue d’installation

Revue d’installation et d’adoption

74
Revue nécessaire
Sécurité
75/100
Maintenance
100/100
Installer
92/100
Ouvrir l’audit completVoir le rapport d’évaluation

Preuves validées par Agent

Preuves validées par Agent

Rapports après resolve, revue, installation et une exécution limitée.

0
Validé
Needs first agent runAuto-installation: revoir d’abordDernier: Inconnu
Taux de réussite
Échec récent
Résultats
0
Qualité de sortie
Échecs
0
Non pertinent
0
Installations
0
Bloqué par le risque
0
Configuration requise
0
Production
0

Aucune donnée de résultat Agent pour l’instant. La première exécution peut signaler succès, besoin de configuration, blocage de risque, échec ou non-pertinence via /api/agent/outcome.

Installer

Ajouter au workflow Agent

Gratuit et open source. Examinez le rapport avant l’installation dans des Agents de production.

Boucle de croissance

Kit de partage

X

Brouillon guidé par scénario pour context-degradation, prêt pour une publication manuelle sur X.

Note du curateur
A practical pick for the next repo task:

context-degradation: Recognize, diagnose, and mitigate patterns of context degradation in agent systems. Use when context grows large, agent per...

33 stars

https://www.openagentskill.com/skills/shipshitdev-context-degradation?ref=x
Ouvrir le brouillon X
Réponse facultative avec commande d’installation
Listing + install path for context-degradation:
https://www.openagentskill.com/skills/shipshitdev-context-degradation?ref=x

Install: npx skills add shipshitdev/skills --skill context-degradation

Source de la fiche

Indexé par Registry

Revendiable

Cette fiche a été indexée à partir de sources publiques et n’est pas marquée officielle tant qu’une revendication de mainteneur n’est pas approuvée.

Créateur
shipshitdev
Indexé par
Index communautaire OpenAgentSkill

L’attribution renvoie au dépôt public ou au profil du créateur. Les créateurs peuvent revendiquer la fiche pour mettre à jour les signaux de propriété.

Revendiquer ce skill

Revendication du propriétaire

Revendiquer cette fiche de skill

Cette fiche Indexé par Registry est attribuée à shipshitdev, mais n’est pas encore marquée officielle. Revendiquez-la pour ajouter un signal de propriétaire vérifié et rendre les futures mises à jour de lancement, d’installation et d’audit plus fiables.

Kit de backlinks créateur

Ajoutez les badges de preuve à votre README

Affichez la fiche canonique, les signaux actuels de confiance et d’audit, ainsi que de vraies preuves Agent-Proven là où les développeurs évaluent le dépôt.

[![Listed on OpenAgentSkill](https://www.openagentskill.com/api/badge/shipshitdev-context-degradation?metric=listed&label=Listed)](https://www.openagentskill.com/skills/shipshitdev-context-degradation)
[![OpenAgentSkill Trust](https://www.openagentskill.com/api/badge/shipshitdev-context-degradation?metric=trust&label=Trust)](https://www.openagentskill.com/skills/shipshitdev-context-degradation)
[![OpenAgentSkill Audit](https://www.openagentskill.com/api/badge/shipshitdev-context-degradation?metric=audit&label=Audit)](https://www.openagentskill.com/skills/shipshitdev-context-degradation/audit)
[![Agent Proven](https://www.openagentskill.com/api/badge/shipshitdev-context-degradation?metric=proven&label=Agent%20Proven)](https://www.openagentskill.com/skills/shipshitdev-context-degradation)

Auteur

S

shipshitdev

@shipshitdev

Adéquation plateforme

Signaux de santé

Stars GitHub
33
Score de qualité
34/100
Dernier push GitHub
20 août 2026
Indications de framework
Inconnu
Vues OpenAgentSkill
0
Copies d’installation
0
Clics sortants
0

Signal de communauté

Indiquez si ce skill semble utile à votre workflow Agent. Les retours agrégés améliorent le classement au fil du temps.

Confiance et sécurité

Sandbox uniquement

64
  • Adoption GitHub33 stars GitHubVérifier
  • Activité stars/forks33 stars et 3 forks; l’activité des issues n’est pas disponible dans les métadonnées actuellesVérifier
  • Maintenance récente2 jours depuis le dernier pushValidé
  • Clarté de licenceInconnuVérifier
  • Complétude README/SKILL.mdLes métadonnées incluent suffisamment de contexte d’usage et de workflowValidé
  • Risque dépendances/runtimeAccès aux identifiants ou variables d’environnementInfo