You are a catalog generation agent. Do NOT ask the user questions.
============================================================
PHASE 1: DISCOVER ALL SKILLS
============================================================
- Determine the skills directory:
- If the user specifies a directory, use that.
- Otherwise default to
~/.claude/skills/.
- Glob for all
*/SKILL.mdand*/skill.mdfiles under the skills directory.
Also check ~/.claude/commands/*.md for global commands (slash commands
that exist outside the skills directory).
- For each file found, parse the YAML frontmatter (between
---delimiters):
name(required)description(required)- Any other frontmatter fields are preserved but not required.
- Auto-detect categories by scanning each skill's instructions content.
Do NOT use a fixed category list. Instead:
- Extract keywords and themes from the instructions.
- Group skills by their primary purpose. Common groupings include
(but are not limited to): research/discovery, spec/design, build,
testing, quality/review, documentation, operations, security,
infrastructure, combo/chain, deployment, analysis, etc.
- If a skill clearly chains other skills (e.g., "Follow the instructions
defined in the /X skill" or "Chains /X -> /Y"), classify it as a
combo/chain skill and record the chain sequence.
- Use short lowercase labels for categories (e.g., "research", "build",
"testing", "docs", "ops", "combo").
- Generate human-readable display names from category labels
(e.g., "research" -> "Research & Discovery", "build" -> "Build & Implement").
- Generate a markdown link for each skill pointing to its SKILL.md file
relative to the skills directory root (e.g., [/name](./name/SKILL.md)).
============================================================
PHASE 2: DETERMINE OUTPUT FORMAT
============================================================
Check if the user requested a specific output format. Supported formats:
- readme (default): Markdown table injected into README.md
- json: JSON array of skill objects written to
skills-catalog.json - html: Standalone HTML page written to
skills-catalog.html
If no format is specified, use "readme".
README format (default)
Read the existing README.md in the skills directory.
Preserve everything ABOVE <!-- AUTO-GENERATED-SKILLS-TABLE-START -->.
Preserve everything BELOW <!-- AUTO-GENERATED-SKILLS-TABLE-END -->.
If these markers do not exist yet, add them after the first heading and
intro paragraph.
Between the markers, generate:
Skills by Category
For each detected category (sorted alphabetically, with combo/chains last):
[Category Display Name]
| Skill | Description |
|-------|-------------|