agent-introspection-debugging

Capture failure state, diagnose root causes, and output an introspection report.

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/llmh333/employee_management_spring --skill agent-introspection-debugging-llmh333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-introspection-debugging
Source: https://github.com/llmh333/employee_management_spring/tree/main/.gemini/skills/agent-introspection-debugging
Command: npx skills add https://github.com/llmh333/employee_management_spring --skill agent-introspection-debugging-llmh333

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps an AI agent stop wasting tokens on repeated failures by capturing the exact failure state, diagnosing the most likely agent-specific pattern, applying a small contained recovery, and producing a structured self-debugging report for the next run or a human reviewer.

Core Features & Use Cases

  • Failure capture: records the error, last meaningful tool sequence, context pressure, and environment assumptions before attempting any recovery.
  • Root-cause diagnosis: classifies common failure patterns such as tool loops, context overflow, service connectivity issues, quota exhaustion, and filesystem/cwd drift.
  • Contained recovery + reporting: performs the smallest reversible action, then emits a clear introspection report including what changed and what evidence indicates improvement.
  • Use case example: when an agent repeatedly calls the same tools, loops on a command, or drifts due to prompt/context growth, this workflow produces a human-readable diagnosis and next-step plan rather than continuing retries.

Quick Start

Use the agent-introspection-debugging workflow when your agent is failing repeatedly or looping, and ask it to produce a full self-debug report using the four phases: failure capture, root-cause diagnosis, contained recovery, and an introspection 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 stop an AI agent from looping on repeated tool call failures?

To stop an AI agent from looping on repeated tool call failures, use a structured self-debugging workflow that captures the exact failure state, diagnoses likely root causes like tool loop limits or context overflow, and applies a contained recovery action.

What is agent introspection debugging and when should I use it?

Agent introspection debugging is a structured self-debugging workflow that captures failure state, diagnoses root causes, and applies contained recovery. Use it when agents hit tool call limits, prompt drift, context overflow, or filesystem mismatches.

How do I diagnose the root cause of an AI agent workflow failure?

Diagnose the root cause of an AI agent workflow failure by capturing the error, last tool sequence, and context pressure, then classifying the pattern into issues like tool loops, context overflow, or filesystem drift.

Can I generate a debug report for a failed AI agent run without manual analysis?

Yes, you can generate a debug report for a failed AI agent run automatically by enforcing a four-phase loop that outputs a structured introspection report including the failure pattern, root-cause hypothesis, and recovery action.

What is the best way to recover from AI agent context overflow or prompt drift?

The best way to recover from AI agent context overflow or prompt drift is to apply the smallest reversible recovery action, verify evidence of improvement, and emit an introspection report for the next run or human review.