# Diagnose Context Degradation in AI Systems

Long conversations and overloaded prompts can reduce model accuracy in ways that are difficult to diagnose. This skill identifies degradation patterns and recommends practical context management strategies.

## Install

```bash
npx skillstore add sickn33/context-degradation
```

## Metadata

- Status: approved
- Slug: sickn33-context-degradation
- Skillstore revision: r2
- Version status: missing
- Tree hash: 2c5f17afdcd52b77e839933e9a29e172b69f8cdb693cf083ce5e79e3264c8581
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/context-degradation
- Ref: f9e2c34b4f19c7f3e6b0a1e93227b5f77cc12526
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-context-degradation
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-context-degradation/manifest

## Capabilities

- Explains lost-in-middle, context poisoning, distraction, confusion, and clash.
- Maps common agent symptoms to likely context degradation patterns.
- Recommends write, select, compress, and isolate strategies.
- Suggests context placement, filtering, segmentation, and compaction techniques.
- Provides guidance for testing performance across increasing context lengths.

## Use Cases

- Debug a Long Agent Session: Identify why an agent forgets requirements, repeats errors, or selects irrelevant tools after many turns.
- Design Context Evaluations: Create tests that vary context length, information placement, distractors, and conflicting sources.
- Improve Prompt Architecture: Choose filtering, compaction, retrieval, or task isolation based on the observed failure pattern.

## Prompt Templates

### Identify the Failure Pattern

```
Review this agent behavior: [behavior]. Classify the likely context degradation pattern and explain the evidence.
```

### Improve Context Placement

```
Review this prompt structure: [structure]. Reorder critical information to reduce lost-in-middle risk while preserving all requirements.
```

### Choose a Mitigation Strategy

```
Analyze this workflow: [workflow]. Compare write, select, compress, and isolate strategies, then recommend an implementation with tradeoffs.
```

### Design a Degradation Evaluation

```
Create an evaluation plan for [system]. Test context length, placement, distractors, poisoning, and conflicting sources. Define metrics, thresholds, and recovery checks.
```

## Limitations

- Does not measure context length or model performance automatically.
- Model thresholds are illustrative and may change as models evolve.
- Research claims do not include direct source links.
- Reliable diagnosis still requires application logs, evaluations, and environment-specific testing.

## Best Practices

- Measure task quality as context grows instead of relying on advertised window size.
- Keep verified goals and critical constraints near attention-favored positions.
- Filter, version, and label retrieved information before adding it to context.

## Anti Patterns

- Do not load every available document without relevance filtering.
- Do not preserve incorrect summaries after evidence changes.
- Do not mix unrelated tasks, tool definitions, and policies in one context.

## Security Audit

- Audited at: 2026-07-23T21:03:46.706\+00:00
- Summary: All four static findings are false positives caused by Markdown examples or ordinary prose. The skill provides conceptual guidance and does not execute commands, access systems, or transmit data.

## Stats

- Views: 148
- Downloads: 16
- Favorites: 0
- Popularity score: 0
