
Agent introspection debugging
Gives agents a structured workflow to capture, diagnose and recover from their own
Agent introspection debugging is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 71
- Last commit
- License
- Apache-2.0
- Listing updated
Similar skills
About Agent introspection debugging
This skill guides an AI coding agent through a repeatable process when a run stalls, loops on the same tool calls, burns tokens without progress, or drifts from the task. Instead of retrying blindly, the agent first records the failure state, including the error, the last successful and failed steps, and the environment assumptions it relies on.
The workflow then matches the symptom to a known failure pattern, such as repeated tool calls, service connection errors, rate-limit retries, or stale files after a write, and suggests a single discriminating check before any change. Recovery stays deliberately small: restating the goal, verifying the real filesystem or branch state, narrowing the scope to one command or test, and escalating to a human when the risk is high. The skill ends with a standard debug report so the next agent or person can see what went wrong and what was done.
The skill is written as Markdown instructions with no bundled scripts. It expects the agent to have access to its own shell, files and git state, and it points to other EGC skills for follow-up verification, learning from repeated failures and repository drift.
When your agent uses it
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (6 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the egc plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add Fmarzochi/EGC
/plugin install egc@egcOr copy only this skill to ~/.claude/skills/agent-introspection-debugging:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/agent-introspection-debugging &&
cp -R "$tmp/.agents/skills/agent-introspection-debugging" ~/.claude/skills/agent-introspection-debugging &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/agent-introspection-debugging inside it instead.
Copy the skill folder to ~/.agents/skills/agent-introspection-debugging to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/agent-introspection-debugging &&
cp -R "$tmp/.agents/skills/agent-introspection-debugging" ~/.agents/skills/agent-introspection-debugging &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/agent-introspection-debugging inside it instead.
Copy the skill folder to ~/.cursor/skills/agent-introspection-debugging to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/agent-introspection-debugging &&
cp -R "$tmp/.agents/skills/agent-introspection-debugging" ~/.cursor/skills/agent-introspection-debugging &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/agent-introspection-debugging inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/Fmarzochi/EGC.git --path .agents/skills/agent-introspection-debuggingOr copy the folder to ~/.gemini/skills/agent-introspection-debugging yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/agent-introspection-debugging:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/agent-introspection-debugging &&
cp -R "$tmp/.agents/skills/agent-introspection-debugging" ~/.copilot/skills/agent-introspection-debugging &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/agent-introspection-debugging inside it instead.
Get the folder:
git clone --depth 1 https://github.com/Fmarzochi/EGC.gitThen copy EGC/.agents/skills/agent-introspection-debugging into your agent's skills folder as agent-introspection-debugging. Agents that support SKILL.md read one folder per skill.
What it does
- Failure capture template
- A fixed checklist for recording the error, last steps, goal in progress and environment assumptions before retrying.
- Pattern-based diagnosis
- A table that maps common symptoms like loops, timeouts, rate limits and stale files to likely causes and checks.
- Contained recovery actions
- Guidance to shrink the failing scope and run one direct check rather than repeating the same action.
- Self-debug report
- A structured report template covering root cause, recovery action, result and follow-up needs.
- Links to related skills
- Pointers to verification, learning and repository audit skills for work that follows a recovery.
Good for
- Break out of a loop when the agent keeps calling the same tool
- Diagnose why a service call fails with connection refused or timeout errors
- Recover from repeated 429 rate-limit errors without retry storms
- Find out why a file is missing after a write or why the diff looks stale
- Produce a debug report summarising a stalled agent run for a teammate
Agent introspection debugging FAQ
When does Agent introspection debugging activate?
It is meant for runs that fail repeatedly, consume tokens without progress, loop on the same tools, drift from the task, or hit environment mismatches that diagnosis may fix.
Does Agent introspection debugging run scripts or change the harness?
No scripts are included. It is a workflow the agent follows, and it explicitly avoids claiming automatic healing such as resetting agent state unless real tools do that.
Which skills should follow Agent introspection debugging?
The skill suggests verification-loop after code changes, continuous-learning-v2 for recurring failure patterns, council for decision ambiguity and workspace-surface-audit for conflicting local state.
Is Agent introspection debugging a replacement for feature verification?
No. The skill states that feature verification after code changes belongs to verification-loop.
How do I install Agent introspection debugging in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/agent-introspection-debugging to use it in all your projects, or to .claude/skills/agent-introspection-debugging in one project. Or install the egc plugin, which includes it: /plugin marketplace add Fmarzochi/EGC, then /plugin install egc@egc.
Does Agent introspection debugging run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Agent introspection debugging?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Agent introspection debugging?
The closest alternatives to Agent introspection debugging are Agent introspection debugging, Debugging and error recovery, Agent architecture audit, Ci and Agent harness construction.
Where this comes from
- Description: from the skill's own SKILL.md.
More from Fmarzochi/EGC

Builds a repo-specific EGC install plan that sorts components into daily and library sets
- Open source
- 71 GitHub stars
- Developer tools

Guides an agent through consistent REST API design: naming, status codes, pagination
- Open source
- 71 GitHub stars
- Developer tools

Drafts long-form articles, guides and newsletters in a consistent, specific voice
- Open source
- 71 GitHub stars
- Writing style

Guides an agent through Node.js and Express backend design, data access and error handling
- Open source
- 71 GitHub stars
- Developer tools

Builds a reusable writing style profile from your own samples for consistent copy
- Open source
- 71 GitHub stars
- Writing style

Guides your agent through using Bun for installs, scripts, bundling, tests and Vercel
- Open source
- 71 GitHub stars
- Developer tools




