Skill Debugger
Systematic debugging tool for OpenCode skills that are not being selected correctly or are behaving incorrectly once invoked. Focus on the current OpenCode skill model: name and description drive discovery, while optional metadata controls invocation and execution behavior.
Workflow
- Verify the package exists and the frontmatter parses.
- Inspect the discovery surface.
- Is the
namedistinct? - Does the
descriptionclearly say when to use the skill?
- Is the
- Inspect behavioral flags.
disable-model-invocationuser-invocableallowed-toolsmodel,context,agent,hooks
- Compare the skill against neighboring skills.
- Run a prompt matrix: obvious positive, borderline positive, obvious negative.
- Recommend the smallest change that explains the behavior.
Capabilities
- Under-trigger analysis
- Over-trigger analysis
- Discovery debugging
- Configuration debugging
- Conflict detection
- YAML/frontmatter validation
- Prompt-matrix diagnosis
- Fix suggestions with smallest-change bias
Common Failure Modes
1. Vague description
Symptom: skill exists but OpenCode almost never uses it.
Bad: description: Helps with various tasks
Good: description: Review code for bugs, regressions, and missing tests.
2. Description too broad
Symptom: wrong skill triggers instead.
Fix: narrow the promise and make the boundary explicit.
3. Skill not discovered
Symptom: OpenCode says the skill does not exist.
Check:
~/.config/opencode/skills/<name>/SKILL.md- project-local
.opencode/skills/<name>/SKILL.md
4. Name mismatch
Symptom: package exists but does not load correctly.
Fix: folder name and name: must match.
5. Metadata mismatch
Symptom: behavior is wrong after the skill loads.
Audit:
disable-model-invocationuser-invocableallowed-tools
Output Formats
Quick Diagnosis
Skill: code-review
Status: not triggering
Root cause: description overlaps with broader review skill
Fix: tighten the description around review findings and regressions
Detailed Report
=== Skill Debugging Report ===
Skill: financial-analyzer
Path: ~/.config/opencode/skills/financial-analyzer/
Status: rarely triggers
Issues Found:
1. [CRITICAL] Description is too broad
2. [HIGH] disable-model-invocation is blocking auto-selection
3. [MEDIUM] No negative boundary for generic analytics requests
Recommendations:
1. Rewrite description around investing workflows
2. Set disable-model-invocation: false if auto-selection is intended
3. Add a When NOT to Use section
Prompt Matrix
Test three classes of prompts:
- Obvious positive
- "Why is my review skill not being picked for PR reviews?"
- Borderline positive
- "Check whether this skill package is ready to ship"
- Obvious negative
- "Implement the caching layer in src/api.ts"
Systematic Questions
- Installation
- Does the skill package exist at the expected path?
- Does
SKILL.mdparse correctly?
- Discovery surface
- Is the
namedistinct? - Does the
descriptionsay when to use the skill? - Is the description specific enough to avoid overlap?
- Is the
- Behavior flags
- Is
disable-model-invocationsuppressing auto-selection? - Is
user-invocableblocking direct use? - Are
allowed-toolstoo restrictive or too loose?
- Is
- Content
- Is there a
When to Useor equivalent section? - Is there a
When NOT to Useboundary? - Are positive and negative examples present?
- Is there a
- Conflict
- Which neighboring skills promise similar work?
- Which skill actually won the routing decision?
- Upstream drift
- If the skill is based on a vendored upstream file, did local edits accidentally replace baseline guidance instead of adding explicit local adaptations?
Common Fixes
Fix 1: Rewrite the description
Before: description: Helps with code analysis
After: description: Review code for bugs, regressions, maintainability issues, and missing tests.
Fix 2: Narrow the promise
Do not stuff many adjacent use cases into one description.
Fix 3: Add a boundary
## When NOT to Use
- For generic implementation work, use `executor`
- For scorecard-style audits, use `skill-quality-analyzer`
Fix 4: Correct metadata
If the skill should auto-trigger, do not leave disable-model-invocation: true.
If the skill should be callable directly, do not leave user-invocable: false.
Fix 5: Fix name mismatch
Folder: ~/.config/opencode/skills/code-review/
YAML: name: code-review
Fix 6: Re-isolate local adaptations
If the skill is derived from a vendored upstream baseline, keep baseline guidance intact and move project-specific behavior into clearly labeled local sections.
Diagnostic Checklist
- skill file exists at the correct location
-
SKILL.mdhas valid frontmatter - folder name matches
name -
descriptionclearly states when to use the skill - description distinguishes this skill from adjacent ones
- invocation flags match intended behavior
- positive and negative prompt checks behave as expected
Integration
Recommended order:
skill-creatorfor authoring or structural revisionsskill-quality-analyzerfor static issuesskill-debuggerfor routing/configuration issuesskill-testerfor prompt-level verification
Limitations
- Cannot inspect OpenCode's private internal routing logic
- Uses evidence and prompt-based inference
- Cannot auto-fix every issue
Success Criteria
After fixes, the skill should:
- trigger for clear in-scope prompts
- stay quiet for clear out-of-scope prompts
- avoid being blocked by incorrect metadata