[IMPORTANT] Use TaskCreate to break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI may ask user whether to skip.
Quick Summary
Goal: Create new Claude Code skills with proper structure or scan/fix invalid skill headers across the catalog.
Workflow:
- Clarify — Gather purpose, trigger keywords, tools needed via AskUserQuestion
- Check Existing — Glob for similar skills, avoid duplication
- Scaffold — Create directory + SKILL.md with frontmatter + Quick Summary
- Validate — Run frontmatter + header validation
Key Rules:
- Every SKILL.md MUST include
## Quick Summary (Goal/Workflow/Key Rules) within first 30 lines
- Single-line
description with [Category] prefix and trigger keywords
- SKILL.md under 500 lines; use
references/ for detail
- Always break work into small todo tasks; always add final self-review task
Modes
| Mode |
Trigger |
Action |
| Create |
$ARGUMENTS describes a new skill |
Create skill following workflow below |
| Scan & Fix |
$ARGUMENTS mentions scan, fix, validate, invalid |
Run validation across all skills |
Prerequisites
- MUST READ
references/claude-skill-schema.md — Official Claude Code SKILL.md schema
Mode 1: Create Skill
Workflow
- Clarify — If requirements unclear, use
AskUserQuestion for: purpose, auto vs user-invoked, trigger keywords, tools needed
- Check Existing — Glob
.claude/skills/*/SKILL.md for similar skills. Avoid duplication.
- Create Directory —
.claude/skills/{skill-name}/SKILL.md
- Write Frontmatter — Follow schema from
references/claude-skill-schema.md
- Write Instructions — Concise, actionable, progressive disclosure
- Add References — Move detailed docs to
references/ directory if content >200 lines
- Add Scripts — Create
scripts/ for executable helpers if needed
- Validate — Run frontmatter validation (see Mode 2 single-file check)
Frontmatter Template
---
name: {kebab-case-name}
description: '[Category] What it does. Triggers on: keyword1, keyword2.'
---
Official fields: name, description, argument-hint, disable-model-invocation, user-invocable, allowed-tools, model, context, agent, hooks
Project conventions (non-official but used here): activation: user-invoked, version: X.Y.Z
Rules
- SKILL.md is instructions, not documentation. Teach Claude HOW to do the task.
- Single-line
description (multi-line YAML breaks catalog parsing)
- Description must include trigger keywords for auto-activation
- Use
[Category] prefix in description (e.g., [Frontend], [Planning], [AI & Tools])
- Keep SKILL.md under 500 lines; use
references/ for detail
- Progressive disclosure: frontmatter → SKILL.md summary → reference files
- Token efficiency: every line must earn its place
- No URLs without context — explain what the link provides
- Use
researcher subagent if topic needs research
- Use
Explore subagent for URLs/repos (parallel for multiple sources)
- Use
repomix for GitHub repos
Mode 2: Scan & Fix Invalid Skills
What It Validates
| Check |
Rule |
Severity |
| Frontmatter exists |
Must have --- delimiters |
Error |
| Description single-line |
No literal newlines in description value |
Error |
| Description not empty |
Must have description for discoverability |
Warning |
| Name format |
Lowercase, hyphens, max 64 chars |
Error |
| No unknown official fields |
Flag fields not in official schema |
Info |
| Description has category |
Should start with [Category] |
Warning |
| File size |
SKILL.md should be <500 lines |
Warning |
| Quick Summary exists |
Must have ## Quick Summary in first 30 lines |
Warning |
Scan Workflow
- Discover — Glob
.claude/skills/*/SKILL.md for all skills
- Parse — Read first 20 lines of each file, extract frontmatter
- Validate — Check each rule above
- Report — List issues grouped by severity (Error > Warning > Info)
- Fix — If user confirms, fix Error-level issues automatically:
- Missing frontmatter → add minimal
---\nname: {dir-name}\ndescription: ''\n---
- Multi-line description → collapse to single line
- Invalid name → suggest kebab-case fix
Validate Script
# Report only
node .claude/skills/skill-create/scripts/validate-skills.cjs
# Report + auto-fix (removes invalid fields, renames typos)
node .claude/skills/skill-create/scripts/validate-skills.cjs --fix
# Scan specific directory
node .claude/skills/skill-create/scripts/validate-skills.cjs --path .claude/skills/my-skill
Requirements
$ARGUMENTS
IMPORTANT Task Planning Notes (MUST FOLLOW)
- Always plan and break work into many small todo tasks
- Always add a final review todo task to verify work quality and identify fixes/enhancements
1---2name: skill-create-53description: [Skill Management] Create new Claude Code skills or scan/fix invalid skill headers. Triggers on: create skill, new skill, skill schema, scan skills, fix skills, invalid skill, validate skills, skill header.4---5
6> **[IMPORTANT]** Use `TaskCreate` to break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI may ask user whether to skip.
7
8## Quick Summary
9
10**Goal:** Create new Claude Code skills with proper structure or scan/fix invalid skill headers across the catalog.
11
12**Workflow:**
13
141. **Clarify** — Gather purpose, trigger keywords, tools needed via AskUserQuestion
152. **Check Existing** — Glob for similar skills, avoid duplication
163. **Scaffold** — Create directory + SKILL.md with frontmatter + Quick Summary
174. **Validate** — Run frontmatter + header validation
18
19**Key Rules:**
20
21- Every SKILL.md MUST include `## Quick Summary` (Goal/Workflow/Key Rules) within first 30 lines
22- Single-line `description` with `[Category]` prefix and trigger keywords
23- SKILL.md under 500 lines; use `references/` for detail
24- Always break work into small todo tasks; always add final self-review task
25
26## Modes
27
28| Mode | Trigger | Action |
29|------|---------|--------|
30| **Create** | `$ARGUMENTS` describes a new skill | Create skill following workflow below |
31| **Scan & Fix** | `$ARGUMENTS` mentions scan, fix, validate, invalid | Run validation across all skills |
32
33## Prerequisites
34
35- **MUST READ** `references/claude-skill-schema.md` — Official Claude Code SKILL.md schema
36
37## Mode 1: Create Skill
38
39### Workflow
40
411. **Clarify** — If requirements unclear, use `AskUserQuestion` for: purpose, auto vs user-invoked, trigger keywords, tools needed
422. **Check Existing** — Glob `.claude/skills/*/SKILL.md` for similar skills. Avoid duplication.
433. **Create Directory** — `.claude/skills/{skill-name}/SKILL.md`
444. **Write Frontmatter** — Follow schema from `references/claude-skill-schema.md`
455. **Write Instructions** — Concise, actionable, progressive disclosure
466. **Add References** — Move detailed docs to `references/` directory if content >200 lines
477. **Add Scripts** — Create `scripts/` for executable helpers if needed
488. **Validate** — Run frontmatter validation (see Mode 2 single-file check)
49
50### Frontmatter Template
51
52```yaml
53---
54name: {kebab-case-name}
55description: '[Category] What it does. Triggers on: keyword1, keyword2.'
56---
57```
58
59**Official fields:** `name`, `description`, `argument-hint`, `disable-model-invocation`, `user-invocable`, `allowed-tools`, `model`, `context`, `agent`, `hooks`
60
61**Project conventions (non-official but used here):** `activation: user-invoked`, `version: X.Y.Z`
62
63### Rules
64
65- SKILL.md is instructions, not documentation. Teach Claude HOW to do the task.
66- Single-line `description` (multi-line YAML breaks catalog parsing)
67- Description must include trigger keywords for auto-activation
68- Use `[Category]` prefix in description (e.g., `[Frontend]`, `[Planning]`, `[AI & Tools]`)
69- Keep SKILL.md under 500 lines; use `references/` for detail
70- Progressive disclosure: frontmatter → SKILL.md summary → reference files
71- Token efficiency: every line must earn its place
72- No URLs without context — explain what the link provides
73- Use `researcher` subagent if topic needs research
74- Use `Explore` subagent for URLs/repos (parallel for multiple sources)
75- Use `repomix` for GitHub repos
76
77## Mode 2: Scan & Fix Invalid Skills
78
79### What It Validates
80
81| Check | Rule | Severity |
82|-------|------|----------|
83| Frontmatter exists | Must have `---` delimiters | Error |
84| Description single-line | No literal newlines in description value | Error |
85| Description not empty | Must have description for discoverability | Warning |
86| Name format | Lowercase, hyphens, max 64 chars | Error |
87| No unknown official fields | Flag fields not in official schema | Info |
88| Description has category | Should start with `[Category]` | Warning |
89| File size | SKILL.md should be <500 lines | Warning |
90| Quick Summary exists | Must have `## Quick Summary` in first 30 lines | Warning |
91
92### Scan Workflow
93
941. **Discover** — Glob `.claude/skills/*/SKILL.md` for all skills
952. **Parse** — Read first 20 lines of each file, extract frontmatter
963. **Validate** — Check each rule above
974. **Report** — List issues grouped by severity (Error > Warning > Info)
985. **Fix** — If user confirms, fix Error-level issues automatically:
99 - Missing frontmatter → add minimal `---\nname: {dir-name}\ndescription: ''\n---`
100 - Multi-line description → collapse to single line
101 - Invalid name → suggest kebab-case fix
102
103### Validate Script
104
105```bash
106# Report only
107node .claude/skills/skill-create/scripts/validate-skills.cjs
108
109# Report + auto-fix (removes invalid fields, renames typos)
110node .claude/skills/skill-create/scripts/validate-skills.cjs --fix
111
112# Scan specific directory
113node .claude/skills/skill-create/scripts/validate-skills.cjs --path .claude/skills/my-skill
114```
115
116## Requirements
117
118<user-prompt>$ARGUMENTS</user-prompt>
119
120---
121
122**IMPORTANT Task Planning Notes (MUST FOLLOW)**
123
124- Always plan and break work into many small todo tasks
125- Always add a final review todo task to verify work quality and identify fixes/enhancements