agent-introspection-debugging
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
Skill by mturac
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mturac-agent-introspection-debugging
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
agent-introspection-debugging- Description
- Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
- License
- MIT
- Instructions
- 149 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- openai.yaml · agents/
SKILL.md (first lines)
# 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 action that would validate the diagnosis? ### Phase 3: Contained Recovery Recover with the smallest action that changes the diagnosis surface. Safe recovery actions: - stop repeated retries and restate the hypothesis - trim low-signal context and keep only the active goal, blockers, and evidence - re-check the actual filesystem / branch / process state - narrow the task to one failing command, one file, or one test - switch from speculative reasoning to direct observation - escalate to a human when the failure is high-risk or externally blocked Do not claim unsupported auto-healing actions like “reset agent state” or “update harness config” unless you are actually doing them through real tools in the current environment. Contained recovery checklist: ```markdown ## Recovery Action - Diagnosis chosen: - Smallest action taken: - Why this is safe: - What evidence would prove the fix worked: ``` ### Phase 4: Introspection Report End with a report that makes the recovery legible to the next agent or human. ```markdown ## Agent Self-Debug Report - Session / task: - Failure: - Root cause: - Recovery action: - Result: success | partial | blocked - Token / time burn risk: - Follow-up needed: - Preventive change to encode later: ``` ## Recovery Heuristics Prefer these interventions in order: 1. Restate the real objective in one sentence. 2. Verify the world state instead of trusting memory. 3. Shrink the failing scope.
From mturac/everything-openai-codex, MIT.
More from mturac/everything-openai-codex
- 0.581score
x-api
mturac
X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
exa-search
mturac
Neural search via Exa MCP for web, code, and company research.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
fal-ai-media
mturac
Unified media generation via fal.ai MCP — image, video, and audio.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
video-editing
mturac
AI-assisted video editing workflows for cutting, structuring, and augmenting real footage.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
dmux-workflows
mturac
Multi-agent orchestration using dmux (tmux pane manager for AI agents).
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
investor-materials
mturac
Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
investor-outreach
mturac
Draft cold emails, warm intro blurbs, follow-ups, update emails, and investor communications for fundraising.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
market-research
mturac
Conduct market research, competitive analysis, investor due diligence, and industry intelligence with source attribution and decision-oriented summaries.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
mle-workflow
mturac
Production machine-learning engineering workflow for data contracts, reproducible training, model evaluation, deployment, monitoring, and rollback.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
documentation-lookup
mturac
Use up-to-date library and framework docs via Context7 MCP instead of training data.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
product-capability
mturac
Translate PRD intent, roadmap asks, or product discussions into an implementation-ready capability plan that exposes constraints, invariants, interfaces, and…
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
database-migrations
mturac
Database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs…
SkillCFreshness: C★ 83Claude Code +9
Signals
- Stars
- 83
- Forks
- 2
- Open issues
- 1
- Last commit (this folder)
- May 18, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.555score
agent-introspection-debugging
Jamkris
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillCFreshness: C★ 91Claude Code +9 - 0.360score
agent-introspection-debugging
Fmarzochi
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillBFreshness: B★ 67Claude Code +9 - 0.329score
agent-introspection-debugging
ysyecust
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillCFreshness: C★ 59Claude Code +9 - 0.322score
agent-introspection-debugging
nicolas2601
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillBFreshness: B★ 3Claude Code +9 - 0.321score
agent-introspection-debugging
sakuradairong
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillCFreshness: C★ 48Claude Code +9 - 0.313score
agent-introspection-debugging
onfire7777
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillCFreshness: C★ 16Claude Code +9 - 0.310score
agent-introspection-debugging
S3YED
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillCFreshness: C★ 12Claude Code +9 - 0.306score
agent-introspection-debugging
JantonioFC
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillCFreshness: C★ 9Claude Code +9 - 0.298score
agent-introspection-debugging
KUNDURUHIMANEESHREDDY
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillBFreshness: BClaude Code +9 - 0.292score
agent-introspection-debugging
krataia
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillBFreshness: BClaude Code +9 - 0.292score
agent-introspection-debugging
agisota
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillCFreshness: C★ 3Claude Code +9 - 0.288score
agent-introspection-debugging
Adaptive-Liquidity
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
SkillCFreshness: C★ 2Claude Code +9
More from mturac
- 0.581score
investor-materials
mturac
Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
exa-search
mturac
Neural search via Exa MCP for web, code, and company research.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
fal-ai-media
mturac
Unified media generation via fal.ai MCP — image, video, and audio.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
documentation-lookup
mturac
Use up-to-date library and framework docs via Context7 MCP instead of training data.
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
dmux-workflows
mturac
Multi-agent orchestration using dmux (tmux pane manager for AI agents).
SkillCFreshness: C★ 83Claude Code +9 - 0.581score
investor-outreach
mturac
Draft cold emails, warm intro blurbs, follow-ups, update emails, and investor communications for fundraising.
SkillCFreshness: C★ 83Claude Code +9
Cite this page
agent-introspection-debugging skill. Agent Mart. https://agentmart.dev/skills/mturac-agent-introspection-debugging (last updated 2026-10-24)