# Create Skill Command Goal: Create production-ready skills w/ validation, testing & optimization. ## 1. Required Skills Use these skills during creation: | Skill | Path | Purpose | |-------|------|---------| | `skill-creator` | `.claude/skills/skill-creator/` | Core creation workflow | | `token-formatter` | `.claude/skills/token-formatter/` | Compress SKILL.md content | | `md` | `.claude/skills/document-skills/md/` | Clean markdown w/o errors | ## 2. Creation Flow ### Step 1: Understand Requirements Ask user: 1. "What should this skill do?" 2. "Example usage scenarios?" 3. "Any scripts/assets needed?" ### Step 2: Init Skill ```bash python scripts/init_skill.py --path .claude/skills/ ``` Creates: ``` skill-name/ ├── SKILL.md ├── scripts/ ├── references/ └── assets/ ``` ### Step 3: Plan Resources Analyze examples → identify: | Resource | When | |----------|------| | `scripts/` | Repeated code, deterministic tasks | | `references/` | Docs, schemas, API specs | | `assets/` | Templates, images, fonts | ### Step 4: Write Content **SKILL.md rules:** - YAML frontmatter: `name` & `description` (req) - Imperative form ("To do X" not "You should") - Keep lean → move details to `references/` - Apply `token-formatter` compression **Writing style:** ```markdown # Skill Name Brief purpose (1-2 sentences). ## When to Use Invoke when: - Condition 1 - Condition 2 ## Process 1. Step one 2. Step two ``` ### Step 5: Optimize Apply `token-formatter`: - Abbreviations: fn, str, num, config, auth, db, etc. - Remove filler words - Compress tables & lists - Use symbols: `→`, `|`, `&`, `w/`, `w/o` Apply `md` skill: - Proper fence nesting (use ```` for outer) - Match opening/closing fences - Escape `|` in tables - Consistent list indentation - Blank lines around code blocks ## 3. Testing (REQUIRED) ### Test Location ``` tests// ├── test_*.py # Python tests ├── test_*.sh # Bash tests ├── fixtures/ # Test data └── expected/ # Expected outputs ``` ### Script Testing For EVERY script in `scripts/`: 1. **Syntax check:** ```bash # Python python -m py_compile scripts/