[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 MUST 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
Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
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): disable-model-invocation: false, 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-43description: [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 MUST 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**Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).**
27
28## Modes
29
30| Mode | Trigger | Action |
31| -------------- | -------------------------------------------------- | ------------------------------------- |
32| **Create** | `$ARGUMENTS` describes a new skill | Create skill following workflow below |
33| **Scan & Fix** | `$ARGUMENTS` mentions scan, fix, validate, invalid | Run validation across all skills |
34
35## Prerequisites
36
37- **MUST READ** `references/claude-skill-schema.md` — Official Claude Code SKILL.md schema
38
39## Mode 1: Create Skill
40
41### Workflow
42
431. **Clarify** — If requirements unclear, use `AskUserQuestion` for: purpose, auto vs user-invoked, trigger keywords, tools needed
442. **Check Existing** — Glob `.claude/skills/*/SKILL.md` for similar skills. Avoid duplication.
453. **Create Directory** — `.claude/skills/{skill-name}/SKILL.md`
464. **Write Frontmatter** — Follow schema from `references/claude-skill-schema.md`
475. **Write Instructions** — Concise, actionable, progressive disclosure
486. **Add References** — Move detailed docs to `references/` directory if content >200 lines
497. **Add Scripts** — Create `scripts/` for executable helpers if needed
508. **Validate** — Run frontmatter validation (see Mode 2 single-file check)
51
52### Frontmatter Template
53
54```yaml
55---
56name: { kebab-case-name }
57description: '[Category] What it does. Triggers on: keyword1, keyword2.'
58---
59```
60
61**Official fields:** `name`, `description`, `argument-hint`, `disable-model-invocation`, `user-invocable`, `allowed-tools`, `model`, `context`, `agent`, `hooks`
62
63**Project conventions (non-official but used here):** `disable-model-invocation: false`, `version: X.Y.Z`
64
65### Rules
66
67- SKILL.md is instructions, not documentation. Teach Claude HOW to do the task.
68- Single-line `description` (multi-line YAML breaks catalog parsing)
69- Description must include trigger keywords for auto-activation
70- Use `[Category]` prefix in description (e.g., `[Frontend]`, `[Planning]`, `[AI & Tools]`)
71- Keep SKILL.md under 500 lines; use `references/` for detail
72- Progressive disclosure: frontmatter → SKILL.md summary → reference files
73- Token efficiency: every line must earn its place
74- No URLs without context — explain what the link provides
75- Use `researcher` subagent if topic needs research
76- Use `Explore` subagent for URLs/repos (parallel for multiple sources)
77- Use `repomix` for GitHub repos
78
79## Mode 2: Scan & Fix Invalid Skills
80
81### What It Validates
82
83| Check | Rule | Severity |
84| -------------------------- | ---------------------------------------------- | -------- |
85| Frontmatter exists | Must have `---` delimiters | Error |
86| Description single-line | No literal newlines in description value | Error |
87| Description not empty | Must have description for discoverability | Warning |
88| Name format | Lowercase, hyphens, max 64 chars | Error |
89| No unknown official fields | Flag fields not in official schema | Info |
90| Description has category | Should start with `[Category]` | Warning |
91| File size | SKILL.md should be <500 lines | Warning |
92| Quick Summary exists | Must have `## Quick Summary` in first 30 lines | Warning |
93
94### Scan Workflow
95
961. **Discover** — Glob `.claude/skills/*/SKILL.md` for all skills
972. **Parse** — Read first 20 lines of each file, extract frontmatter
983. **Validate** — Check each rule above
994. **Report** — List issues grouped by severity (Error > Warning > Info)
1005. **Fix** — If user confirms, fix Error-level issues automatically:
101 - Missing frontmatter → add minimal `---\nname: {dir-name}\ndescription: ''\n---`
102 - Multi-line description → collapse to single line
103 - Invalid name → suggest kebab-case fix
104
105### Validate Script
106
107```bash
108# Report only
109node .claude/skills/skill-create/scripts/validate-skills.cjs
110
111# Report + auto-fix (removes invalid fields, renames typos)
112node .claude/skills/skill-create/scripts/validate-skills.cjs --fix
113
114# Scan specific directory
115node .claude/skills/skill-create/scripts/validate-skills.cjs --path .claude/skills/my-skill
116```
117
118## Requirements
119
120<user-prompt>$ARGUMENTS</user-prompt>
121
122---
123
124**IMPORTANT Task Planning Notes (MUST FOLLOW)**
125
126- Always plan and break work into many small todo tasks
127- Always add a final review todo task to verify work quality and identify fixes/enhancements