agent-introspection-debugging

Diagnoses and recovers from AI agent failures through a four-phase introspection workflow.

Updated May 7, 2026
One-click install
npx skills add https://github.com/mirzadham/trainingroombookingsystem2 --skill agent-introspection-debugging-mirzadham
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-introspection-debugging
Source: https://github.com/mirzadham/trainingroombookingsystem2/tree/main/.agent/.agents/skills/agent-introspection-debugging
Command: npx skills add https://github.com/mirzadham/trainingroombookingsystem2 --skill agent-introspection-debugging-mirzadham

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about agent-introspection-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug an AI agent stuck in a tool-call loop?▼

Capture the failure first: record the error, the last tool calls, and the repeated pattern. Then classify it against known patterns like loop or no-exit observer paths, run one discriminating check on actual state, and only retry after the check supports a changed plan.

What causes AI agents to burn tokens without making progress?▼

Common causes include retrying the same action with reworded prompts, unbounded context growth from duplicated plans and oversized logs, and losing the real objective while optimizing the wrong subtask. Diagnosis starts by inspecting recent context for repetition and low-signal bulk.

When should I use agent self-debugging instead of framework-specific debugging?▼

Use it for agent-level failures like loop limits, context overflow, and state mismatches. Defer to narrower framework-specific skills when one exists, and use a verification-loop skill after recovery if code was changed.

Can this skill automatically reset agent state or fix harness configuration?▼

No. It is a workflow skill, not a hidden runtime, and it explicitly forbids claiming unsupported auto-healing actions. Recovery is limited to contained, reversible actions performed through real tools available in the current environment.

What should an agent self-debug report contain?▼

The report includes the session and task, the failure, the root cause, the recovery action taken, the result status (success, partial, or blocked), token and time burn risk, follow-up needed, and a preventive change to encode later.