context-degradation
An agent skill by muratcankoylan, from muratcankoylan/Agent-Skills-for-Context-Engineering. Tags: automation, debugging, developer-tools, performance, strategy.
What it does
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.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill context-degradation
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering
cp -r Agent-Skills-for-Context-Engineering/skills/context-degradation ~/.claude/skills/context-degradation
Safety box score
Grade A, minimal risk: 9 of 100 risk points, rated 2026-10-19. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is mainly a read-only diagnostic toolkit for context quality, plus one runnable Python demo script that prints synthetic analyses. It does not appear to reach the network or modify the filesystem, but it does process whatever context text you give it and includes prompt-sensitive guidance about preserving system prompts and tool definitions during recovery.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 1 (low) | `scripts/degradation_detector.py` is executable and includes an `if __name__ == "__main__":` demo, but it only runs local analysis and prints results. |
| Network access | 0 (none) | No HTTP clients, downloads, or outbound host calls appear in the shipped files; the docs only cite external reading materials. |
| Filesystem reach | 0 (none) | The code analyzes strings in memory and prints to stdout; it does not read, write, or delete files outside the repo. |
| Secrets & credentials | 0 (none) | There is no code to access keychains, env files, browser sessions, or CLI credentials, and it does not ask for secrets. |
| Privilege & persistence | 0 (none) | No sudo, service registration, shell startup edits, or other privilege changes are present. |
| Instruction hijack surface | 1 (low) | `references/patterns.md` tells the agent to `Preserve system prompt and tool definitions`, which is prompt-sensitive context handling but not a bypass or hidden instruction. |
| Irreversible actions | 0 (none) | The skill diagnoses context issues; it does not send messages, deploy, publish, purchase, or delete anything on its own. |
| Transparency | 0 (none) | All shipped content is plain text or readable Python; there are no binaries, packed blobs, or unpinned remote installers. |
Before installing
- Read `scripts/degradation_detector.py` and confirm the `__main__` demo is stdout-only.
- Search the shipped files for any network or shell usage if you want a stricter audit (`requests`, `urllib`, `subprocess`, `os.system`).
- Decide whether you are comfortable with a skill that may analyze sensitive conversation text, since its inputs are full context strings.
Rated 2026-10-19 by an automated review of 3 files from the skill's repository.
Source
- Repository
- muratcankoylan/Agent-Skills-for-Context-Engineering (all skills from this repository)
- Path
- skills/context-degradation/SKILL.md
- Branch
- main
- Updated
- 2026-09-19
Related skills
- reasoning-trace-optimizer — Debug and optimize AI agents by analyzing reasoning traces, context degradation, tool confusion, instruction drift, repeated task failures.
- self-improvement-loops — This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops.
- context-compression — This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization.
- context-optimization — This skill should be used for improving context efficiency: context budgeting, observation masking, prefix or KV-cache strategy, partitioning.
- harness-engineering — This skill should be used when designing autonomous agent harnesses: research loops, evaluation scaffolds, locked and editable surfaces, durable logs.
- latent-briefing — This skill should be used when the user asks to "share memory between agents", "KV cache compaction for multi-agent", "orchestrator worker context".