Skip to content
Back to skills

Debug Lost In Middle

ASecurity

My agent consistently ignores instructions I place in the middle of long system prompts. It follows the beginning and end perfectly but misses middle sections. How do I diagnose and fix this? - [ ] Identifies "lost-in-middle" degradation pattern - [ ] Explains U-shaped attention curve (beginning/end favored) - [ ] Recommends restructuring critical info to beginning/end positions - [ ] Suggests context partitioning or chunking - [ ] May reference context-degradation.md for detailed patterns

  • 8 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 20, 2026
ai-agents

Security analysis

A100/100

Scanned September 20, 2026

npx -y skills add tstapler/dotfiles --skill debug-lost-in-middle --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Debug Lost In Middle?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Debug Lost In Middle
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tstapler-debug-lost-in-middle/badge)](https://www.skillsdirectory.com/skills/tstapler-debug-lost-in-middle)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: debug-lost-in-middle
description: ''
---

# Prompt
My agent consistently ignores instructions I place in the middle of long system prompts. It follows the beginning and end perfectly but misses middle sections. How do I diagnose and fix this?

# Expected
- [ ] Identifies "lost-in-middle" degradation pattern
- [ ] Explains U-shaped attention curve (beginning/end favored)
- [ ] Recommends restructuring critical info to beginning/end positions
- [ ] Suggests context partitioning or chunking
- [ ] May reference context-degradation.md for detailed patterns

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…