协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
skill-debugger【开发与工程】Debugs why Codex skills are not triggering when expected, analyzing descriptions, trigger conditions, installation paths, discovery, and skill conflicts
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Systematic debugging tool for Codex skills that are not triggering as expected. Identifies root causes like poor descriptions, missing trigger words, naming issues, installation-path mistakes, or skill discovery problems.
To debug effectively, follow this Hybrid Workflow:
Glob and Read tools to verify the target skill's implementation.
SKILL.md exist?Symptom: Skill exists but Codex never uses it Root Cause: Description doesn't mention specific use cases or keywords Example:
description: Helps with various tasks ❌ Too vague
description: Analyzes financial ratios from statement data for investment decisions ✅ Specific
Symptom: Need to explicitly mention skill name to invoke it Root Cause: Description lacks keywords that match user queries Fix: Add trigger keywords like "financial analysis", "investment", "ratios"
Symptom: Codex says skill doesn't exist
Root Cause: Wrong installation location or invalid SKILL.md
Check: ~/.codex/skills/[name]/SKILL.md, <repo>/.agent/skills/local/[name]/SKILL.md, <repo>/.agent/skills/upstream/<source>/[name]/SKILL.md, or <repo>/.codex/skills/[name]/SKILL.md
Symptom: Skill found but not loaded
Root Cause: YAML name doesn't match folder name
Fix: Ensure name: skill-name matches folder skill-name/
Symptom: Wrong skill triggers instead Root Cause: Multiple skills with similar descriptions Fix: Make each description unique and specific
Basic Debugging:
Deep Analysis:
Quick Diagnosis:
Skill: code-review
Status: ❌ Not triggering
Root Cause: Description too generic
Fix: Add specific keywords like "review", "code quality", "pull request"
Detailed Report:
=== Skill Debugging Report ===
Skill: financial-analyzer
Path: ~/.codex/skills/financial-analyzer/
Status: ⚠️ Rarely triggers
Issues Found:
1. [CRITICAL] Description missing use case keywords
- Current: "Analyzes financial data"
- Should mention: financial ratios, investment analysis, DCF, valuation
2. [HIGH] No "When to Use" section in SKILL.md
- Codex can't determine clear triggering conditions
3. [MEDIUM] Overlaps with "data-analyzer" skill
- Both mention "analyzes data"
- Make this one specific to finance
Recommendations:
1. Update description to: "Calculates financial ratios and performs DCF valuation analysis for investment decisions"
2. Add "When to Use" section with examples: "when analyzing company financials", "for investment analysis"
3. Differentiate from data-analyzer by focusing on financial metrics
Expected Improvement: 90% better triggering with these fixes
Conflict Matrix:
Skills with Overlapping Triggers:
code-review ←→ quality-analyzer (both mention "code quality")
Fix: code-review for PRs, quality-analyzer for metrics
data-analyzer ←→ financial-analyzer (both mention "analysis")
Fix: Make financial-analyzer specific to finance keywords
"Check if my code-review skill is installed correctly"
"Is the financial-analyzer skill discoverable?"
Codex will:
"Why isn't my code-review skill triggering?"
"Debug the financial-analyzer skill - I asked about ratios but it didn't trigger"
Codex will:
"What should I ask to trigger the code-review skill?"
"Give me 5 phrases that should invoke financial-analyzer"
Codex will:
"Do any of my skills conflict with code-review?"
"Why does data-analyzer trigger instead of financial-analyzer?"
Codex will:
When a skill isn't triggering, Codex will ask:
Installation Check
~/.codex/skills/[name]/SKILL.md, <repo>/.agent/skills/local/[name]/SKILL.md, or <repo>/.codex/skills/[name]/SKILL.md?"ls ~/.codex/skills/ show your skill folder?"YAML Validation
--- delimiters?"name: field match the folder name?"description: field?"Description Quality
Content Analysis
Conflict Check
Quick Fix:
"My code-review skill isn't working"
"Why doesn't Codex use my financial-analyzer?"
"Debug skill triggering for aws-solution-architect"
Detailed Analysis:
"I asked 'analyze this company's financials' but financial-analyzer didn't trigger. Debug it."
"Compare my code-review and quality-analyzer skills - which should trigger when?"
Preventive Check:
"Before I install this skill, check if it will trigger correctly"
"Will my new skill conflict with existing ones?"
Before: description: Helps with code analysis
After: description: Performs static code quality analysis with metrics calculation and refactoring suggestions
Add words users would naturally say:
## When to Use
Use this skill when you need to:
- Analyze company financial statements
- Calculate financial ratios (P/E, ROE, ROA, etc.)
- Perform DCF valuation
- Make investment decisions based on financial data
If you have data-analyzer and financial-analyzer:
Ensure folder name matches YAML name:
Folder: ~/.codex/skills/code-review/
YAML: name: code-review ✅
Folder: ~/.codex/skills/code-review/
YAML: name: code_review ❌ Mismatch!
When debugging, Codex will check:
name in YAML matches folder namedescription is 50-150 charactersWorks with skill-quality-analyzer:
"Run quality analysis on financial-analyzer then debug why it's not triggering"
Works with skill-tester:
"Test if code-review skill triggers for 'review this PR'"
Workflow:
After applying fixes, skill should trigger when:
Expected Trigger Rate: 80-90% when query clearly matches intended use case