From specialist-agent
Guides creation, editing, and verification of Claude Code skills using TDD workflow, standardized templates, naming rules, and CSO for auto-activation.
npx claudepluginhub herbertjulio/specialist-agent --plugin specialist-agentThis skill is limited to using the following tools:
Writing skills IS Test-Driven Development applied to process documentation.
Guides TDD process for creating, modifying, or improving Claude Code skills: baseline failure tests, skill writing, validation, refactoring. Use for 'create a skill' or reusable patterns.
Applies TDD principles to writing effective Claude Code skills using RED-GREEN-REFACTOR: identify failure scenarios, minimal SKILL.md content, aggressive trimming. For new skills, edits, reviews.
Guides TDD for creating, editing, and verifying Claude skills using subagent pressure scenarios to baseline failures and ensure compliance.
Share bugs, ideas, or general feedback.
Writing skills IS Test-Driven Development applied to process documentation.
Target: $ARGUMENTS
NO SKILL WITHOUT A FAILING TEST FIRST
If you didn't verify an agent fails without the skill, you don't know if the skill teaches the right thing.
Violating the letter of this rule is violating the spirit of this rule.
skills/
my-skill/
SKILL.md # Main skill file (required)
supporting-file.* # Only if needed (heavy reference, tools)
---
name: my-skill
description: "Use when [specific triggering conditions and symptoms]"
user-invocable: true
argument-hint: "[arguments]"
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
---
# /my-skill - Title
[Core principle in 1-2 sentences.]
**Target:** $ARGUMENTS
## When to Use
- [Symptom or situation 1]
- [Symptom or situation 2]
- NOT for: [when not to use]
## Workflow
### Step 1: [Action]
[Instructions]
### Step 2: [Action]
[Instructions]
## Verification Protocol
**Before claiming skill execution is complete:**
[What commands to run as proof]
## Anti-Rationalization
| Excuse | Reality |
|--------|---------|
| "[common excuse]" | [why it's wrong] |
## Rules
1. [Rule 1]
2. [Rule 2]
## Output
[Expected output format]
Critical for discovery. Future Claude reads the description to decide if it should load the skill.
# BAD: Summarizes workflow - Claude may follow this instead of reading skill
description: "Debug issues using 4-phase methodology: gather, analyze, hypothesize, fix"
# GOOD: Just triggering conditions
description: "Use when encountering any bug, test failure, or unexpected behavior - before proposing fixes"
write-skill not skill-writingcondition-based-waiting not async-helpersBefore writing the skill, test what happens WITHOUT it:
1. Create a scenario that the skill should handle
2. Ask an agent to handle it WITHOUT the skill loaded
3. Document EXACTLY what the agent does wrong:
- What choices did it make?
- What rationalizations did it use?
- Where did it deviate from best practice?
4. This is your "failing test" - the baseline behavior
Write a skill that addresses the specific failures from RED:
1. Check for duplicate skills BEFORE creating:
- Search existing skills by name: find skills/ -name "SKILL.md" | head -30
- Search by keywords in descriptions: grep -l "[keyword]" skills/*/SKILL.md
- If a similar skill exists, EXTEND it instead of creating a new one
2. Create skills/[name]/SKILL.md
3. Address ONLY the failures observed in baseline
4. Don't add hypothetical cases
5. Test again WITH the skill loaded
6. Verify the agent now behaves correctly
1. Look for NEW rationalizations the agent uses
2. Add explicit counters for each rationalization
3. Build the Anti-Rationalization table
4. Add Red Flags list
5. Re-test until the skill is bulletproof
Before deploying the skill:
### Structure
- [ ] YAML frontmatter with name and description
- [ ] Description starts with "Use when..."
- [ ] Description does NOT summarize workflow
- [ ] Name uses only lowercase, numbers, hyphens
- [ ] No duplicate skill exists with same name or overlapping purpose
### Content
- [ ] Clear overview with core principle
- [ ] Workflow with numbered steps
- [ ] Verification Protocol section
- [ ] Anti-Rationalization table (5+ entries)
- [ ] Rules section
- [ ] Output format section
### Quality
- [ ] One excellent example (not multi-language)
- [ ] No narrative storytelling
- [ ] Concise (< 500 words for frequently-loaded skills)
- [ ] Keywords for search throughout
### Pack Awareness (if writing for a framework pack)
- [ ] Skill placed in packs/[framework]/skills/[name]/SKILL.md
- [ ] Examples use framework-specific patterns (not generic)
- [ ] Test commands match framework tooling (Vitest for Vue/React, Jest for Angular, etc.)
- [ ] References pack's ARCHITECTURE.md for conventions
### Testing
- [ ] Baseline tested WITHOUT skill (RED)
- [ ] Agent complies WITH skill (GREEN)
- [ ] Rationalizations addressed (REFACTOR)
- [ ] Passes validation: node tests/validate-agents.mjs --strict
| Excuse | Reality |
|---|---|
| "Skill is obviously clear" | Clear to you is not clear to other agents. Test it. |
| "It's just a reference" | References can have gaps. Test retrieval. |
| "Testing is overkill" | Untested skills always have issues. 15 min testing saves hours. |
| "I'll test if problems emerge" | Test BEFORE deploying, not after. |
| "Too tedious to test" | Testing is less tedious than debugging a bad skill in production. |
| "No time to test" | Deploying untested skill wastes more time fixing it later. |
──── /write-skill ────
Skill: [name]
Status: [created | updated]
Structure: ✓ Valid
CSO: ✓ Description starts with "Use when..."
Testing: [RED ✓ | GREEN ✓ | REFACTOR ✓]
File: skills/[name]/SKILL.md