agent-introspection-debugging-skill

agent-introspection-debugging-skill is a skill for Claude Code, Codex from darellchua2/opencode-config-template. It costs 27 tokens per session (2,629 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for agents, skills, and subagents that are not behaving as expected. It checks configuration, permissions, available context, and observed behavior.

In plain words
What is it for?
Diagnosing why an agent, skill, or MCP server did not trigger or produce the expected result, then recommending specific fixes.
Why use it?
It helps identify whether a failure comes from invalid files, missing access, insufficient context, or instructions not being followed.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/darellchua2/opencode-config-template/agent-introspection-debugging-skill
Any agent
npx skills add darellchua2/opencode-config-template --skill agent-introspection-debugging-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-introspection-debugging-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/agent-introspection-debugging-skill.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/agent-introspection-debugging-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/agent-introspection-debugging-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/agent-introspection-debugging-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,629 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.02629
Opus 5 $0.00014 $0.01314
Sonnet 5 $0.00005 $0.00526
Haiku 4.5 $0.00003 $0.00263

Measured 3d ago against content hash ae288dc6cefe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-introspection-debugging-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

opencode_app/.opencode/skills/agent-introspection-debugging-skill/SKILL.md · 295 lines

How it starts

The opening of the file, as written. The whole thing — 295 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What I do

I systematically diagnose why agents, skills, or subagents aren't producing expected output:

  1. Configuration Validation: Verify agent/skill files are correctly formatted and loadable
  2. Permission Auditing: Check tool access permissions match the agent's needs
  3. Context Analysis: Identify context-related issues (too much, too little, missing references)
  4. Behavioral Diagnosis: Trace why an agent makes unexpected decisions
  5. Fix Recommendations: Provide specific, actionable fixes for diagnosed issues

When to use me

Use this skill when:

  • An agent or subagent produces unexpected or wrong output
  • A skill doesn't trigger when it should
  • A subagent fails to use tools you expected it to use
  • An agent ignores instructions from AGENTS.md or its own .md file
  • An MCP tool isn't being called when it should be
  • You want to understand why an agent chose a particular approach
  • A skill loads but its workflow isn't being followed

Trigger phrases:

  • "debug agent"
  • "why is the agent not working"
  • "agent introspection"
  • "skill not triggering"
  • "agent ignoring instructions"
  • "fix agent behavior"
  • "diagnose subagent"

Core Workflow

Step 1: Identify the Problem

Clarify what's wrong:

Symptom Category Likely Cause
Agent doesn't spawn Config Missing .md file, wrong name, permission issue
Agent spawns but does nothing Permissions Tools denied, no skill access, step limit too low
Agent produces wrong output Behavior Missing context, conflicting instructions, model limitations
Agent ignores AGENTS.md Routing AGENTS.md not loaded, routing rules override
Skill doesn't trigger Discovery Skill name mismatch, trigger not matched, skill not installed
Agent can't use tools Permissions Tool not in permission allowlist
Agent loops or repeats Behavior Missing termination condition, unclear task prompt
MCP tools not called Discovery MCP server not configured, tool name unknown to agent

Read the full file on GitHub · 295 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 295 lines · 27 tokens per session scan A ae288dc6cefe

Subscribe to this mod's changes

agent-introspection-debugging-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 27 tokens to every session and 2,629 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.