name: my-skill-creator description: >- Interactive guide for creating and improving Claude Code skills (SKILL.md files). Use when the user explicitly asks to create, update, or fix a skill definition. Triggers: "スキルを作って", "スキル作成", "create a skill", "new skill", "build a skill", "improve this skill", "update skill", "fix my skill", "skill doesn't trigger". Do NOT use for general coding tasks, PR creation, code review, or any task that merely contains the word "create" without referring to skill authoring. license: Complete terms in LICENSE.txt argument-hint: "[skill-name]"
Skill Creator
Interactive guide for creating effective skills that extend Claude's capabilities.
Reference Materials
Consult these based on your needs:
- Complete official guide: See
references/complete-guide.mdfor Anthropic's full skill-building guide (fundamentals, planning, testing, distribution, 5 design patterns, troubleshooting) - Workflow patterns: See
references/workflows.mdfor sequential and conditional workflow design - Output patterns: See
references/output-patterns.mdfor template and example patterns
Core Principles
- Concise is key: Claude is already smart. Only add context Claude doesn't already have. Prefer concise examples over verbose explanations. Challenge each piece of information: "Does this justify its token cost?"
- Progressive disclosure: Metadata always loaded (~100 words) → SKILL.md body on trigger (<5k words, <500 lines) → Bundled resources as needed.
- Appropriate degrees of freedom: High freedom for flexible tasks (text-based instructions), medium for preferred patterns (pseudocode/scripts with parameters), low for fragile/error-prone operations (specific scripts, few parameters).
Skill Structure
skill-name/
├── SKILL.md (required, case-sensitive)
│ ├── YAML frontmatter (name + description, required)
│ └── Markdown body (instructions)
├── scripts/ - Executable code (deterministic, token-efficient)
├── references/ - Documentation loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts)
Do NOT include: README.md, CHANGELOG.md, INSTALLATION_GUIDE.md, or other auxiliary files.
Frontmatter
---
name: kebab-case-name # Must match folder name, no spaces/capitals
description: | # Under 1024 chars, no XML tags (< >)
What it does. Use when user asks to [specific phrases].
Do NOT use for [negative triggers].
argument-hint: "[arg-name]" # Shown in autocomplete UI (optional)
---
Required fields
| Field | Rules |
|---|---|
name |
Lowercase, hyphens only. Max 64 chars. No reserved words (anthropic, claude). |
description |
Max 1024 chars. No XML tags. Third-person voice. |
Optional fields
| Field | Purpose |
|---|---|
argument-hint |
Autocomplete hint (e.g., [url], <issue-number>, [create|review]) |
disable-model-invocation |
true to prevent auto-triggering (manual /name only) |
allowed-tools |
Restrict tools (e.g., Read, Grep, Bash(gh *)) |
model |
Model override when skill is active |
effort |
Effort level: low, medium, high, xhigh, max |
context |
fork to run in isolated subagent |
agent |
Subagent type when context: fork (e.g., Explore, Plan) |
license |
License identifier (e.g., MIT) |
compatibility |
Environment requirements (1-500 chars) |
metadata |
Custom key-value pairs (author, version, mcp-server) |
Arguments in body
Use these variables in skill body to reference user arguments:
| Variable | Description |
|---|---|
$ARGUMENTS |
All arguments as a single string |
$0, $1, ... |
Individual arguments by index |
${CLAUDE_SKILL_DIR} |
Directory containing SKILL.md |
If $ARGUMENTS is not referenced in the body, arguments are auto-appended as ARGUMENTS: <value>.
Description is the primary triggering mechanism. Structure: [What it does] + [When to use it] + [Negative triggers]
Good descriptions:
# Specific, actionable, with negative trigger
description: >-
Analyze Figma design files and generate developer handoff documentation.
Use when user uploads .fig files or asks for "design specs" or "design-to-code handoff".
Do NOT use for general image editing or non-Figma design tools.
# Clear scope with subcommands
description: >-
Unified PR workflow: review, auto-fix, and create/update GitHub PRs.
Default runs full flow (review → fix → create). Subcommands: create, review.
Use when creating PRs or requesting "PR作成", "レビュー".
Bad descriptions:
description: Helps with projects. # Too vague, no triggers
description: Creates sophisticated multi-page documentation systems. # Missing triggers
description: Implements the Project entity model with hierarchical relationships. # Too technical
Resource Guidelines
| Type | When to Include | Key Points |
|---|---|---|
scripts/ |
Same code rewritten repeatedly; deterministic reliability needed | Test by running; token-efficient; may execute without loading into context |
references/ |
Detailed docs that Claude should reference while working | Keeps SKILL.md lean; for files >10k words, include grep patterns in SKILL.md |
assets/ |
Files used in output, not loaded into context | Templates, images, fonts, boilerplate code |
Avoid duplication: Information should live in either SKILL.md or references, not both.
Progressive Disclosure Patterns
Split into reference files when SKILL.md approaches 500 lines. Reference all split files from SKILL.md with clear descriptions of when to read them.
- Pattern 1 — High-level guide: Core instructions in SKILL.md, detailed docs in references
- Pattern 2 — Domain-specific: One reference file per domain/variant (e.g.,
references/aws.md,references/gcp.md) - Pattern 3 — Conditional: Basic content in SKILL.md, advanced/specialized content in references
Keep references one level deep from SKILL.md. For reference files >100 lines, include a table of contents.
Skill Creation Process
- Understand the skill with concrete examples
- Plan reusable skill contents (scripts, references, assets)
- Initialize the skill (run
init_skill.py) - Edit the skill (implement resources and write SKILL.md)
- Test and iterate based on real usage
Step 1: Understand with Concrete Examples
Skip only when usage patterns are already clearly understood.
Ask focused questions to understand the skill's scope:
- "What functionality should the skill support?"
- "Can you give examples of how this skill would be used?"
- "What would a user say that should trigger this skill?"
Avoid overwhelming users — start with the most important questions, follow up as needed. Conclude when there is a clear sense of the functionality the skill should support.
Step 2: Plan Reusable Contents
For each concrete example, analyze:
- How to execute from scratch
- What scripts, references, and assets would be helpful for repeated execution
Examples:
- PDF rotation →
scripts/rotate_pdf.py(same code rewritten each time) - Frontend webapp →
assets/hello-world/template (same boilerplate each time) - BigQuery queries →
references/schema.md(table schemas rediscovered each time)
Step 3: Initialize the Skill
Determine the output directory
Choose the correct skill output directory based on the current working directory:
- If inside a dotfiles repository (i.e., the repo manages chezmoi dotfiles and contains a
dot_claude/skills/directory): create the skill underdot_claude/skills/in that repository. This ensures the skill is tracked by Git and deployed via chezmoi. - Otherwise: create the skill under
.claude/skills/in the project root (or~/.claude/skills/for global skills).
Run the initializer
For new skills, run:
scripts/init_skill.py <skill-name> --path <output-directory>
The script creates the directory, generates SKILL.md with TODO placeholders, and creates example resource directories. Delete unneeded example files after initialization.
Skip if iterating on an existing skill.
Step 4: Edit the Skill
The skill is for another Claude instance to use. Include information that is beneficial and non-obvious.
Writing Guidelines
- Use imperative/infinitive form
- All "when to use" information goes in the description, not the body. The body is only loaded after triggering.
- Be specific and actionable: provide exact commands with parameters, not vague instructions
- Include error handling for common failure modes
- Scope permissions minimally: use
allowed-toolsin frontmatter to restrict tool access to only what the skill needs - Separate network-dependent operations: isolate steps that require network access (API calls, package installs) from steps that perform local file operations, so failures in one do not cascade
- Reference bundled resources clearly with paths and context for when to read them
Design Pattern References
- Multi-step processes: See
references/workflows.md - Output formats/quality standards: See
references/output-patterns.md - 5 advanced patterns (sequential workflow orchestration, multi-MCP coordination, iterative refinement, context-aware tool selection, domain-specific intelligence): See
references/complete-guide.mdChapter 5
Reusable Contents
Start with the resources identified in Step 2. This step may require user input (e.g., brand assets, API documentation).
- Test all added scripts by running them
- Delete unneeded example files from initialization
Step 5: Test and Iterate
Testing Checklist
- Triggering tests: Does the skill trigger on obvious tasks? On paraphrased requests? Does it NOT trigger on unrelated topics? (Target: 90% trigger rate on relevant queries)
- Functional tests: Are outputs correct? Do scripts work? Are edge cases handled?
- Performance comparison: Measure concrete metrics with vs. without the skill:
- Token consumption (target: 30-50% reduction)
- API/tool call failure rate (target: 0 failures)
- End-to-end task completion rate
- Number of user interventions required
Debugging trigger issues: Ask Claude "When would you use the [skill name] skill?" — Claude will quote the description back. Adjust based on what's missing.
Iteration Signals
| Signal | Problem | Solution |
|---|---|---|
| Skill doesn't load when it should | Undertriggering | Add more detail, keywords, and trigger phrases to description |
| Skill loads for unrelated queries | Overtriggering | Add negative triggers, be more specific, clarify scope |
| Inconsistent results | Instruction quality | Be more specific, add validation steps, use scripts for determinism |
| Instructions not followed | Buried or verbose | Put critical instructions at top, use bullet points, move details to references |
| Slow or degraded responses | Context overload | Move docs to references/, keep SKILL.md under 5,000 words, reduce enabled skills |
Production Tip: Explicit Invocation
For critical or production workflows where routing accuracy matters, instruct users to invoke skills explicitly rather than relying on fuzzy description matching:
Use the <skill-name> skill to [do X].
This bypasses the description-based routing and guarantees the correct skill is loaded. Recommended for CI/CD pipelines, automated workflows, or when multiple similar skills are enabled.
For detailed troubleshooting, see references/complete-guide.md (Chapter 5: Patterns and Troubleshooting).