What problem does it solve? AI agents often fail silently by looping on the same tool calls, burning tokens without progress, or drifting 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 retrying blindly. ## Core Features & Use Cases - Four-Phase Loop: Failure Capture, Root-Cause Diagnosis, Contained Recovery, and Introspection Report, each with ready-to-use Markdown templates. - Failure Pattern Table: Maps common symptoms (max tool calls, context overflow, ECONNREFUSED, 429 quota exhaustion, stale file state) to likely causes and verification checks. - Recovery Heuristics: Ordered interventions from restating the objective to running one discriminating check before any retry. - Use Case: An agent hits its tool-call limit while repeatedly running the same failing test command. The skill guides it to capture the error, classify it as a loop pattern, verify actual filesystem state, narrow scope to one failing test, and produce a structured debug report for the human. ## Quick Start Use the agent-introspection-debugging skill to diagnose why the current agent run is stuck in a loop and produce a structured recovery report.