Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Agent Introspection Debugging Skill

ASecurity

Debug why agents or skills aren't working as expected with systematic diagnosis, configuration validation, and fix recommendations

6 stars
0 votes
0 copies
0 views
Added 9/20/2026
code-qualitygoshelldebugging

Works with

mcp

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add darellchua2/opencode-config-template --skill agent-introspection-debugging-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Introspection Debugging Skill?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Agent Introspection Debugging Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/darellchua2-agent-introspection-debugging-skill/badge)](https://www.skillsdirectory.com/skills/darellchua2-agent-introspection-debugging-skill)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: agent-introspection-debugging-skill
description: Debug why agents or skills aren't working as expected with systematic diagnosis, configuration validation, and fix recommendations
license: Apache-2.0
compatibility: opencode
category: Agent Optimization
---

## What I do

Systematically diagnose why agents, skills, or subagents misbehave: configuration validation → permission audit → context/behavior analysis → specific fix recommendations.

**Trigger phrases**: "debug agent", "why is the agent not working", "agent introspection", "skill not triggering", "agent ignoring instructions", "fix agent behavior", "diagnose subagent".

## Step 1: Symptom → Likely Cause

| Symptom | Category | Likely Cause |
|---------|----------|-------------|
| Agent doesn't spawn | Config | Missing .md file, wrong name, permission issue |
| Spawns but does nothing | Permissions | Tools denied, no skill access, step limit too low |
| Wrong output | Behavior | Missing context, conflicting instructions, model limits |
| Ignores AGENTS.md | Routing | AGENTS.md not loaded, routing rules override |
| Skill doesn't trigger | Discovery | Name mismatch, trigger phrases missing, not installed |
| Can't use tools | Permissions | Tool not in `permissions` allowlist |
| Loops or repeats | Behavior | Missing termination condition, unclear success criteria |
| MCP tools not called | Discovery | Server not configured, tool unknown to agent |

## Step 2: Configuration Checklist

**Agent (`agents/<name>.md`)**: file exists · `description` present and <50 words (always in Task context) · `mode` set · `model` valid · `steps` set (10-25) · `permissions` rules array present (v2 shape) · YAML parses · body is valid markdown.

**Skill (`skills/<name>/SKILL.md`)**: directory name == frontmatter `name` exactly · `description` present · `license` + `compatibility` present · required sections present ("What I do", "When to use me", workflow) · YAML parses.

## Step 3: Permission Audit

For each needed tool: allowed in `permissions`? Any `deny` overriding it? `task` delegation targets allowed? For each loaded skill: allowed via `action: skill` rule? Directory exists with valid SKILL.md? Name case-exact?

| Issue | Symptom | Fix |
|-------|---------|-----|
| Missing `read` allow | Can't read files | Add `{action: read, effect: allow}` |
| Missing `glob` allow | Can't find files | Add glob allow rule |
| Missing `subagent` targets | Can't spawn subagents | Allow the subagent names (action: subagent) |
| `edit: deny` but must edit | Reads, never modifies | Allow edit (scoped to task paths) |
| `shell: deny` on build agent | Can't run commands | Allow shell with caution |
| Skill name mismatch | Skill won't load | Match exact directory name |

## Step 4: Behavior Analysis

- **Context loading**: is AGENTS.md loaded? Right routing table entries? Agent .md used as system prompt?
- **Skill discovery**: do trigger phrases match how the user asks? Is the description selective enough?
- **Task prompt quality**: specific? Enough context (paths, requirements)? Return format stated? CodeGraph guidance included when `.codegraph/` exists?
- **Model selection**: model appropriate for complexity? Available in current config?

## Step 5: Diagnosis Report (output contract)

```markdown
**Agent/Skill**: <name> · **Symptom**: <what's wrong> · **Root Cause**: <cause> · **Confidence**: h/m/l

### Evidence
1. <finding, e.g. "permissions denies edit but the task requires writes">

### Recommended Fix
<specific, actionable>

### Verification
<how to confirm the fix works>
```

## Common Patterns (cause → fix)

- **Generic output** → Task prompt too vague: add file paths, stack, specific requirements
- **Can't find files** → read/glob denied: add allow rules
- **Ignores skills** → skill missing from `permissions` skill rules, or name mismatch (case-sensitive, `-skill` suffix)
- **Loops forever** → no return contract: add explicit completion criteria to the agent .md
- **Never uses CodeGraph** → no `.codegraph/` or prompt doesn't mention it: `codegraph init -i` + prompt guidance
- **Skill never triggers** → trigger phrases absent from description/When-to-use: add them
- **Irrelevant subagent output** → constrain the Task prompt: specific paths, function names, output format
- **MCP tools not called** → server not in `opencode.json` or tool unknown: check config; follow the MCP Availability Guard

## Debugging Efficiency

Config first (most common), permissions second (quick win), behavior last. One change at a time, re-test after each. Compare against a working agent/skill as reference. Persist fixes as learnings.

## Integration

- `context-budget-skill` — context bloat is a diagnosis outcome
- `opencode-skills-maintainer-skill` — post-fix format validation
- `opencode-agent-creation-skill` / `opencode-skill-creation-skill` — authoring rules referenced when fixing
- `continuous-learning-skill` — store diagnosed anti-patterns

## References

- `opencode-agent-creation-skill` — agent authoring best practices
- `opencode-skill-creation-skill` — skill authoring best practices
- `opencode-skills-maintainer-skill` — skill format validation
- `continuous-learning-skill` — debugging-pattern storage

> **Removal note (2026-09-19, #409 trim per LEARNINGS #383 recipe):** dropped the three worked debugging examples, Best Practices prose (compressed into "Debugging Efficiency"), verbose checklist markdown, and the `metadata.audience`/`metadata.workflow` checklist item (deliberate — the v2 frontmatter contract reserves metadata sub-keys `protocol`/`pattern` only). Also corrected legacy v1 `permission`-block references to the v2 `permissions` rules array (post-#380 shape). Kept verbatim: frontmatter, symptom table, permission-issue table, output contract, pattern list.

Attribution

darellchua2darellchua2
View sourceMore from darellchua2 →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman Review

Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", "/review", or invokes /caveman-review. Auto-triggers when reviewing pull requests.

1023331 votes

Caveman Commit

Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.

1023331 votes

Verification Loop

一个全面的 Claude Code 会话验证系统。

2456590 votes

Springboot Verification

Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.

2456590 votes

Django Verification

Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.

2456590 votes
View all in code-quality →