agent-introspection-debugging

Capture, diagnose, and recover from AI agent run failures with introspection reports.

2|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/nextc/nextc-claude --skill agent-introspection-debugging-nextc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-introspection-debugging
Source: https://github.com/nextc/nextc-claude/tree/main/nextc-ecc/skills/agent-introspection-debugging
Command: npx skills add https://github.com/nextc/nextc-claude --skill agent-introspection-debugging-nextc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.

Core Features & Use Cases

  • Failure Capture: record error state, last successful step, and environment details to prevent blind retries.
  • Root-Cause Diagnosis: match failures to known patterns and propose minimal, safe fixes.
  • Contained Recovery: apply smallest safe actions to re-run with improved context and reduced risk.
  • Introspection Report: generate a human- and machine-readable report summarizing cause, action, and outcome for handoff.

Quick Start

Run the introspection cycle on the current agent run to generate a structured failure 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 AI agent failures when repeated tool usage stops working?

To debug AI agent failures from repeated tool usage, capture the error state and last successful step, match the failure to known patterns, and apply minimal safe fixes to re-run with improved context.

What is agent introspection and how does it help with failure analysis?

Agent introspection is a structured self-diagnosis process that generates human- and machine-readable reports summarizing failure causes, recovery actions, and outcomes for effective failure analysis and handoff.

How do I recover from prompt drift during an AI agent run?

Recover from prompt drift using contained recovery, which applies the smallest safe actions to re-run the agent with improved context, preventing blind retries and reducing risk.

What's the best way to prevent blind retries when an AI agent encounters environment mismatches?

Prevent blind retries from environment mismatches by executing failure capture to record error states, last successful steps, and environment details before attempting a contained recovery.

Can I generate a standardized debug report for AI agent run failures?

Yes, you can generate a standardized introspection report that summarizes the root cause, applied recovery action, and outcome, providing an actionable debug artifact for human and machine consumption.

When should I not use a structured self-debugging workflow for agents?

Structured self-debugging workflows are not suited for non-deterministic environments where safe recovery steps cannot be applied or where standardized introspection reporting is unsupported by the agent runtime.