| name | skill-template |
| description | Generate custom skill/command from template. Use when creating a new skill or slash command from scratch, or scaffolding a skill file with correct frontmatter. |
| user-invocable | true |
Skill Template Generator
Generate a custom skill (slash command) based on requirements.
Usage: /skill-template [skill-name] [purpose]
Templates
| Purpose | Template | Features |
|---|
| Workflow | Multi-step | Sequential steps |
| Generator | Creator | File creation |
| Checker | Validator | Validation rules |
| Automation | Runner | Command execution |
| Agent-backed | Delegator | Runs in a forked subagent |
Process
-
Gather Requirements
- Skill name (lowercase, hyphenated)
- Purpose
- Arguments (if any — space-separated names)
- Workflow steps
- Context isolation (
context: fork)?
- Agent backing (
agent:, only with context: fork)?
- Tool restrictions?
-
Select Template based on purpose
-
Generate File at .claude/skills/[name]/SKILL.md
-
Validate with /skill-check
Frontmatter Reference (official fields)
Only description is meaningfully required (name defaults to the directory
name). All other fields are optional.
---
name: skill-name
description: What it does
when_to_use: When to reach for it
user-invocable: true
model: sonnet
effort: medium
allowed-tools:
- Read
- Write
- Bash
disallowed-tools:
- WebFetch
context: fork
agent: agent-name
argument-hint: "[issue-number]"
arguments: target flags
disable-model-invocation: false
paths:
- "src/**/*.ts"
shell: bash
hooks:
PreToolUse:
- matcher: Bash
hooks:
- type: command
command: echo "Bash used"
Stop:
- hooks:
- type: command
command: ./scripts/verify.sh
once: true
---
Non-official fields to avoid: metadata, license, version (not part of the
spec). once is valid only inside a hooks[] entry, never at the top level.
Workflow Template Structure
---
name: [name]
description: [What it does. Include when to use it.]
user-invocable: true
allowed-tools:
- Read
- Write
- Bash
- Grep
- Glob
context: fork
argument-hint: "<task-description>"
# when_to_use: Use when the user asks about X or mentions Y. # Optional trigger hint
# arguments: target mode # Optional: names for $target, $mode
---
# [Skill Name]
## Workflow
### Step 1: [Name]
### Step 2: [Name]
### Step 3: [Name]
## Arguments
Uses `$ARGUMENTS` for raw input (or `$name` per the `arguments` field)
## Output
Summary when complete
Example
/skill-template deploy-staging "deploy to staging"
Output: Created .claude/skills/deploy-staging/SKILL.md
Usage: /deploy-staging