What problem does it solve? AI agents often fail silently by looping on the same tool calls, burning tokens without progress, or drifting away from the original task. This Skill provides a structured self-debugging workflow so the agent captures the failure, diagnoses the root cause, applies a contained recovery, and reports the outcome instead of blindly retrying. ## Core Features & Use Cases - Four-Phase Debug Loop: Failure capture, root-cause diagnosis, contained recovery, and a structured introspection report. - Failure Pattern Library: Maps common symptoms like max tool-call loops, context overflow, ECONNREFUSED, 429 quota exhaustion, and stale file state to likely causes and checks. - Recovery Heuristics: Prioritizes restating the objective, verifying world state, shrinking scope, and running one discriminating check before retrying. - Use Case: An agent hits its tool-call limit while repeatedly running the same failing test command. The skill captures the error and environment assumptions, classifies it as a loop pattern, narrows the task to one failing test, and produces a self-debug report for the next agent or human. ## Quick Start Ask the agent to use agent-introspection-debugging to diagnose why its current task is stuck in a retry loop and produce a recovery report.