
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-codeInstalls 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- Connections Optimizer3.7K
- Dotnet Patterns3.7K
- Finance Billing Ops3.7K
- Gan Style Harness3.7K
- Google Workspace Ops3.7K
- Knowledge Ops3.7K
- Lead Intelligence3.7K
- Openclaw Persona Forge3.7K
- Opensource Pipeline3.7K
- Security Bounty Hunter3.7K
- Workspace Surface Audit3.7K
- Accessibility3.6K
- Agent Sort3.6K
- Api Connector Builder3.6K
- Automation Audit Ops3.6K
- Code Tour3.6K
- Csharp Testing3.6K
- Github Ops3.6K
- Hipaa Compliance3.6K
- Llm Trading Agent Security3.6K
- Project Flow Ops3.6K
- Social Graph Ranker3.6K
- Terminal Ops3.6K
- Defi Amm Security3.5K