JavaScript is disabled. Some features may not work.
agent-introspection-debugging — ★ 220.5K GitHub Stars — Install Guide | SkillsNav
🇺🇸 English🇨🇳 中文
SkillsNav
Home

agent-introspection-debugging

★ 220K repomlN/AIntermediateClaude
🤖 AI Summary

This skill provides a self-debugging workflow for agents that detects failure patterns (loops, token waste, drift) and systematically diagnoses root causes before retrying or escalating.

How to Install

Claude Code:
git clone --depth 1 https://github.com/affaan-m/ECC.git && cp ECC/skills/agent-introspection-debugging ~/.claude/skills/agent-introspection-debugging -r
# 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 ### Phase 1: Failure Capture Before trying to recover, record the failure precisely. Capture: - error type, message, and stack trace when available - last meaningful tool call sequence - what the agent was trying to do - current context pressure: repeated prompts, oversized pasted logs, duplicated plans, or runaway notes - current environment assumptions: cwd, branch, relevant service state, expected files Minimum capture template: ```markdown ## Failure Capture - Session / task: - Goal in progress: - Error: - Last successful step: - Last failed tool / command: - Repeated pattern seen: - Environment assumptions to verify: ``` ### Phase 2: Root-Cause Diagnosis Match the failure to a known pattern before changing anything. | Pattern | Likely Cause | Check | | --- | --- | --- | | Maximum tool calls / repeated same command | loop or no-exit observer path | inspect the last N tool calls for repetition | | Context overflow / degraded reasoning | unbounded notes, repeated plans, oversized logs | inspect recent context for duplication and low-signal bulk | | `ECONNREFUSED` / timeout | service unavailable or wrong port | verify service health, URL, and port assumptions | | `429` / quota exhaustion | retry storm or missing backoff | count repeated calls and inspect retry spacing | | file missing after write / stale diff | race, wrong cwd, or branch drift | re-check path, cwd, git status, and actual file existence | | tests still failing after “fix” | wrong hypothesis | isolate the exact failing test and re-derive the bug | Diagnosis questions: - is this a logic failure, state failure, environment failure, or policy failure? - did the agent lose the real objective and start optimizing the wrong subtask? - is the failure deterministic or transient? - what is the smallest reversible actio

Details

Category AI/ML → ml
Sourceaffaan-m/ECC
SKILL.mdView on GitHub →
Repo Stars★ 220.5K
Est. per SkillN/A (shared across 121 skills from this repo)
DifficultyIntermediate
Risk LevelN/A

Related Skills

Works Well With

Skills from the same repository — often designed to work together