Skip to content
affaan-m avatar

Agent Introspection Debugging

Structured self-debugging workflow that captures, diagnoses, and recovers from agent failures before retrying.

CCM score
67 of 100
skills.sh installs
11K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers a four-phase loop: failure capture, root-cause diagnosis, contained recovery, and an introspection report
  • Includes a failure-pattern table mapping loops, context overflow, ECONNREFUSED, 429 quota errors, and stale file state to checks
  • Enforces a rule against blind retries, requiring a stated hypothesis and one discriminating check before any change
  • Designed for agent runs that loop, drift, or burn tokens without progress, with handoff to verification-loop after code changes

Install

$ npx -y skills add affaan-m/ecc --skill agent-introspection-debugging -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Agent Introspection Debugging

Use this skill when an agent run is failing repeatedly, consuming tokens without progress, looping on the same tools, or drifting away from the intended task.

This is a workflow skill, not a hidden runtime. It teaches the agent to debug itself systematically before escalating to a human.

When to Activate

  • Maximum tool call / loop-limit failures
  • Repeated retries with no forward progress
  • Context growth or prompt drift that starts degrading output quality
  • File-system or environment state mismatch between expectation and reality
  • Tool failures that are likely recoverable with diagnosis and a smaller corrective action

Scope Boundaries

Activate this skill for:

  • capturing failure state before retrying blindly
  • diagnosing common agent-specific failure patterns
  • applying contained recovery actions
  • producing a structured human-readable debug report

Do not use this skill as the primary source for:

  • feature verification after code changes; use verification-loop
  • framework-specific debugging when a narrower ECC skill already exists
  • runtime promises the current harness cannot enforce automatically

Four-Phase Loop

Details

Repository
github.com/affaan-m/ecc
Categories
Debugging, Agent Workflow & Planning
First seen
Jul 14, 2026

Questions

What does the agent-introspection-debugging skill do?

The agent-introspection-debugging skill gives an AI agent a structured self-debugging workflow for failed runs. It captures the failure, diagnoses the pattern, applies a contained recovery action, and writes an introspection report instead of blindly retrying.

When should I use the agent-introspection-debugging skill?

Use it when an agent run keeps failing, loops on the same tools, consumes tokens without progress, or drifts from the task. It also fits file or environment mismatches and tool failures that a smaller corrective action might fix.

How do I install the agent-introspection-debugging skill?

Run npx -y skills add affaan-m/ecc --skill agent-introspection-debugging -y in your project. After that, the agent can follow the capture, diagnosis, recovery, and report phases when a run fails.

Where does agent-introspection-debugging rank among debugging skills?

It ranks in the top 50 of the Debugging category on Claude Marketplaces. It sits alongside skills like diagnosing-bugs, safe-debug, and systematic-debugging, but it focuses on debugging the agent's own failed runs rather than application code.

More from affaan-m/ecc

All 257

Similar to Agent Introspection Debugging

More Debugging