Agent Introspection Debugging

0•

Implements a structured four-phase workflow to help AI agents diagnose and recover from execution loops, token waste, and task drift.

This skill provides a systematic framework for AI agents to self-correct when they encounter repetitive failures, environment mismatches, or context bloat. By guiding the agent through Capture, Diagnosis, Containment Recovery, and Introspection phases, it ensures that Claude can resolve issues like tool-call loops, credential errors, or drifting prompts before escalating to a human. This approach significantly improves task success rates and reduces token consumption by preventing blind retries.

Key Features

01Human-readable introspection reports for auditing agent decision-making
02Standardized failure capture templates for environment state and stack trace analysis
03Detection of common AI failure patterns including tool-call loops and context overflow
04Four-phase structured self-debugging loop: Capture, Diagnose, Recover, and Report
050 GitHub stars
06Safe containment recovery actions to minimize side effects during automated fixes

Use Cases

01Fixing environment mismatches such as incorrect working directories or missing file dependencies
02Managing context bloat by pruning low-signal logs and restating active goals
03Resolving 'Maximum tool calls reached' errors or infinite command loops