skill-creator
npx skills add https://github.com/mauromedda/agent-toolkit --skill skill-creator
Skill 文档
ABOUTME: Skill for creating well-structured Claude Code skills
ABOUTME: Enforces conventions from CLAUDE.md and provides init/validate tooling
Skill Creator
Create effective Claude Code skills following established conventions.
Quick Reference
| Script | Purpose |
|---|---|
init_skill.py |
Create new skill with proper structure |
validate_skill.py |
Validate skill frontmatter and structure |
Run with --help for full options:
uv run ~/.claude/skills/skill-creator/scripts/init_skill.py --help
Skill Anatomy
Every skill consists of:
skill-name/
âââ SKILL.md (required)
â âââ YAML frontmatter (name, description, allowed-tools)
â âââ ABOUTME headers (after closing ---)
â âââ Markdown body (instructions)
âââ Optional resources/
âââ scripts/ - Executable code (Python/Bash)
âââ references/ - Documentation loaded on demand
âââ assets/ - Files used in output (templates, etc.)
SKILL.md Structure
Frontmatter (Required)
---
name: skill-name
description: >-
What the skill does and WHEN to use it. Include trigger phrases.
Triggers on "keyword1", "keyword2", "keyword3".
allowed-tools: Read, Write, Edit, Bash
---
Allowed frontmatter keys: name, description, allowed-tools, license, metadata
ABOUTME Headers (Required)
MUST appear immediately after the closing ---:
---
name: my-skill
description: What it does. Triggers on "x", "y".
allowed-tools: Read, Write
---
# ABOUTME: [Brief description of file purpose]
# ABOUTME: [Key context or dependencies]
# Skill Title
Body (Required)
Write instructions Claude needs to execute the skill effectively.
ð RESUMED SESSION CHECKPOINT
When a session is resumed from context compaction, verify skill creation state:
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â SESSION RESUMED - SKILL CREATION VERIFICATION â
â â
â Before continuing skill creation/update work: â
â â
â 1. Was I in the middle of creating/updating a skill? â
â â Check summary for skill names being worked on â
â â Check ~/.claude/skills/ for partial skills â
â â
â 2. Did the skill pass validation? â
â â Run: uv run validate_skill.py <skill-path> â
â â
â 3. Are ABOUTME headers correct? â
â â Must appear AFTER closing --- of frontmatter â
â â Must have 2 lines describing purpose and context â
â â
â If skill creation was in progress: â
â â Re-validate the skill structure â
â â Check description is under 1024 chars â
â â Ensure trigger phrases are included â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Workflow: Create New Skill
Step 1: Initialize
uv run ~/.claude/skills/skill-creator/scripts/init_skill.py \
my-new-skill \
--path ~/.claude/skills
Step 2: Edit SKILL.md
- Update the description with clear trigger phrases
- Write ABOUTME headers describing the skill purpose
- Add workflow instructions or decision trees
- Reference any scripts/references you’ll create
Step 3: Add Resources (Optional)
- scripts/: Add helper scripts for repeatable operations
- references/: Add detailed docs that load only when needed
- assets/: Add templates or files used in output
ð¨ IMPORTANT: When creating scripts, invoke the appropriate language skill FIRST:
.shfiles â/bash.pyfiles â/python.gofiles â/golang
Step 4: Validate
uv run ~/.claude/skills/skill-creator/scripts/validate_skill.py \
~/.claude/skills/my-new-skill
Step 5: Test
Test the skill by invoking it in a Claude Code session with trigger phrases.
Workflow: Update Existing Skill
When modifying an existing skill (adding features, fixing issues, improving documentation):
Step 1: Understand Current Structure
Read the existing SKILL.md to understand:
- Current sections and their organization
- Where new content fits logically
- Existing patterns and style to follow
# Check current structure
head -50 ~/.claude/skills/<skill-name>/SKILL.md
Step 2: Plan Changes
Before editing, identify:
- Where the new content belongs (which section)
- How it relates to existing content (new section vs. addition to existing)
- Style consistency (follow existing formatting patterns)
Step 3: Make Changes
Follow these rules when editing:
- Preserve ABOUTME headers – never remove or modify unless intentional
- Maintain consistent formatting – match existing heading levels, list styles
- Add to existing sections when content is related
- Create new sections only when content is distinct
- Update trigger phrases if adding new use cases
Step 4: Validate
uv run ~/.claude/skills/skill-creator/scripts/validate_skill.py \
~/.claude/skills/<skill-name>
Step 5: Test
Verify the skill triggers correctly with both old and new trigger phrases.
Design Principles
Conciseness
Context window is shared. Only include what Claude does NOT already know. Prefer examples over verbose explanations.
Progressive Disclosure
| Level | When Loaded | Size Target |
|---|---|---|
| Frontmatter | Always | ~100 words |
| SKILL.md body | When triggered | <500 lines |
| References | On demand | Unlimited |
Degrees of Freedom
Match specificity to task fragility:
- High freedom (text instructions): Multiple valid approaches
- Medium freedom (pseudocode/params): Preferred pattern with variation
- Low freedom (specific scripts): Fragile operations requiring consistency
Patterns
See references/patterns.md for:
- Sequential workflow patterns
- Conditional workflow patterns
- Output template patterns
- Domain-specific organization
Validation Rules
The validate script checks:
- Frontmatter: Valid YAML, required fields present
- Name: Hyphen-case, max 64 chars, matches directory name
- Description: No angle brackets, max 1024 chars, includes triggers
- Structure: ABOUTME headers present after frontmatter
Common Issues
| Issue | Solution |
|---|---|
| Skill not triggering | Add trigger phrases to description |
| Skill not triggering on updates | Add “update skill”, “modify skill” to triggers |
| ABOUTME before frontmatter | Move ABOUTME after closing --- |
| Description too long | Move details to SKILL.md body |
| Missing allowed-tools | Add tools the skill needs |
| Style inconsistency after edit | Read existing skill first; match patterns |