affaan-m avatar

Agent Introspection Debugging

When your agent burns through tokens in a loop or drifts off task, this gives it a structured way to debug itself before you step in. It walks through four phases: capture the failure state, diagnose the pattern (like repeated tool calls or context bloat), apply a minimal recovery action, and write a legible report. The key discipline is "verify the world state instead of trusting memory" and shrinking scope before retrying blindly. Think of it as teaching the agent to stop, look at what's actually happening, and either fix it with evidence or escalate cleanly. Most useful when you're watching an agent spin its wheels on the same command or slowly lose track of what it was supposed to be doing.

skills.sh installs
3.7K
GitHub stars
229.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add affaan-m/everything-claude-code --skill agent-introspection-debugging --agent claude-code

Installs into .claude/skills of the current project.

Files

Agent Introspection Debugging

Use this skill when an agent run is failing repeatedly, consuming tokens without progress, looping on the same tools, or drifting away from the intended task.

This is a workflow skill, not a hidden runtime. It teaches the agent to debug itself systematically before escalating to a human.

When to Activate

  • Maximum tool call / loop-limit failures
  • Repeated retries with no forward progress
  • Context growth or prompt drift that starts degrading output quality
  • File-system or environment state mismatch between expectation and reality
  • Tool failures that are likely recoverable with diagnosis and a smaller corrective action

Scope Boundaries

Activate this skill for:

  • capturing failure state before retrying blindly
  • diagnosing common agent-specific failure patterns
  • applying contained recovery actions
  • producing a structured human-readable debug report

Do not use this skill as the primary source for:

  • feature verification after code changes; use verification-loop
  • framework-specific debugging when a narrower ECC skill already exists
  • runtime promises the current harness cannot enforce automatically

Four-Phase Loop

Sponsors

Details

Repository
github.com/affaan-m/everything-claude-code
Categories
AI & Agent Building, Debugging
First seen
Apr 16, 2026

More from affaan-m/everything-claude-code

All 256
1skillsh avatarai-image-generationskillsh/skills3.7Kskills.sh installs
2affaan-m avataragent-sortaffaan-m/everything-claude-codeagent sort3.6Kskills.sh installs
3qodex-ai avatarword-document-processorqodex-ai/ai-agent-skillsComprehensive word document processing with full format support. Handles creation, editing, formatting preservation, tracked changes, and metadata management.3.6Kskills.sh installs
4giuseppe-trisciuoglio avatarcopilot-cligiuseppe-trisciuoglio/developer-kitProvides GitHub Copilot CLI task delegation in non-interactive mode with multi-model support (Claude, GPT, Gemini), permission controls, output sharing, and ses3.6Kskills.sh installs
5tradermonty avataredge-candidate-agenttradermonty/claude-trading-skillsGenerate and prioritize US equity long-side edge research tickets from EOD observations, then export pipeline-ready candidate specs for trade-strategy-pipeline 3.5Kskills.sh installs
6cloudflare avatarbuilding-mcp-server-on-cloudflarecloudflare/skillsBuilds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment. Generates server code, con3.4Kskills.sh installs