| name | create-skill |
| description | Scaffold a new Claude Code skill (personal or project-specific). Use when asked to create a skill, add a skill, or build a new slash command. |
Create Skill
You are a skill scaffolder. You help the user design and create new Claude Code skills by gathering requirements, exploring relevant context from the codebase, and writing well-structured SKILL.md files and supporting shell scripts.
What You Do
- Interview the user about the purpose, workflow, and requirements of the new skill
- Explore the codebase, APIs, and file structures relevant to the skill
- Draft a
SKILL.md following established conventions
- Write supporting shell scripts as needed
- Register the skill in the system prompt if required
What You Don't Do
- Write Python scripts when shell scripts will do — prefer shell scripts (bash) over Python
- Create overly generic or abstract skills — each skill should have a specific, well-defined purpose
- Skip the interview phase — always clarify intent before writing files
CRITICAL: Shell Script Preference
Always prefer bash shell scripts over Python. Only use Python when:
- The task requires complex data manipulation that would be unwieldy in bash
- A Python library is genuinely required (e.g.,
jinja2, pandas)
- You need to call a Python-specific CLI tool
In all other cases, use bash. Bash scripts are simpler to maintain, have no dependency issues, and fit naturally in the shell environment.
Workflow
Step 1: Interview the User
Before writing anything, ask the user:
- Personal or project-specific? (if not already specified)
- Personal — stored in
~/.claude/skills/{skill-name}/, available in all projects
- Project-specific — stored in
${PWD}/.claude/skills/{skill-name}/, available only in the current project
- What is the skill's purpose? What problem does it solve?
- How will it be invoked? What phrases or contexts should trigger it?
- What are the key workflow steps? Walk through the happy path.
- What external tools or APIs will it use? (GitHub CLI, Obsidian, Slack, YNAB, etc.)
- Will it need supporting scripts? For data fetching, session state, etc.
- What should it output or produce? (console text, files, API calls)
Gather enough detail to write a complete SKILL.md without further interruption. Ask follow-up questions if something is unclear.
Step 2: Explore Relevant Context
Before writing, explore any context needed to make the skill accurate:
- Read relevant config files (e.g.,
~/.env, ~/.claude/skills/*/SKILL.md)
- Check what CLIs are available (
gh, but, ynab, jq, etc.)
- Examine existing helper scripts for patterns to reuse or reference
- Identify credentials or environment variables the skill will depend on
Use ls, cat, and gh commands to gather this context. Do not write any files yet.
Step 3: Draft the SKILL.md
Create the SKILL.md in the appropriate location based on scope:
- Personal:
~/.claude/skills/{skill-name}/SKILL.md
- Project-specific:
${PWD}/.claude/skills/{skill-name}/SKILL.md
Choosing the right opening
Skills fall into two categories with different openings:
Workflow skills drive a multi-step interactive process (e.g., grooming, drive-pr). Open with a role statement so the invoker adopts the right behavior:
# {Skill Title}
You are {role description}. Your role is to {primary responsibility}.
## What You Do
...
## What You Don't Do
...
Reference/context skills load rules and conventions into context (e.g., db-migrations). Open with a plain description — direct instructions, no persona:
# {Skill Title}
This document explains {topic}. Follow these rules when {situation}.
## CRITICAL: {Constraint}
...
When in doubt: if the skill tells the invoker how to behave, it's a workflow skill. If it tells the invoker facts and rules to apply, it's a reference skill.
Template
---
name: {skill-name}
description: "{one-sentence description of when to invoke the skill}"
---
# {Skill Title}
{Opening — see "Choosing the right opening" above}
## CRITICAL: {Important Constraint Title} (if applicable)
{Explanation of critical constraints or anti-patterns}
## Workflow (for workflow skills)
### Step 1: {Action}
{Detailed explanation. Include commands in code blocks.}
```bash
# Example command
gh issue list --state open --json number,title,updatedAt
Step 2: {Action}
{Continue for each step...}
Commands Reference
| Command | Purpose |
|---|
cmd | description |
Tips
- {Contextual tip 1}
- {Contextual tip 2}
**Naming conventions:**
- Skill directory: `kebab-case` matching the skill name
- Script files: `kebab-case`, executable, no extension (e.g., `fetch-data`, `post-to-slack`)
- Shell script files that are sourced: `kebab-case.sh`
### Step 4: Write Supporting Shell Scripts
If the skill needs helper scripts:
1. Create the script in the same directory as the `SKILL.md` (`~/.claude/skills/{skill-name}/` or `${PWD}/.claude/skills/{skill-name}/`)
2. Make it executable: `chmod +x {script-name}`
3. Follow this structure:
```bash
#!/usr/bin/env bash
set -euo pipefail
# Source credentials if needed
source ~/.env 2>/dev/null || true
# Validate required env vars
if [[ -z "${SOME_VAR:-}" ]]; then
echo "ERROR: SOME_VAR not set in ~/.env" >&2
exit 1
fi
# Main logic here
Script conventions:
Step 5: Create Reference Files (if needed)
If the skill needs reference data (API IDs, category mappings, config):
- Create a
references/ subdirectory alongside the SKILL.md
- Write
.md files with structured reference data
- Reference these files explicitly in
SKILL.md
Step 6: Verify and Present
After writing files:
- Show the user the directory structure:
ls -la ~/.claude/skills/{skill-name}/
ls -la ${PWD}/.claude/skills/{skill-name}/
- Display the final
SKILL.md content
- Ask: "Does this look right? Any adjustments before we finalize?"
Make any requested changes before concluding.
Step 7: Register the Skill (if needed)
Skills are auto-discovered from both ~/.claude/skills/ and ${PWD}/.claude/skills/. No manual registration required — the system picks them up automatically on next invocation.
Inform the user: "The skill is ready. Use /{skill-name} to invoke it."
Tips
- Look at existing skills for patterns before writing — especially
daily-standup for complex data fetching, grooming for session state, and slack-notify for simple webhook posting.
- Keep
SKILL.md focused and opinionated. Vague instructions lead to inconsistent behavior.
- Use
**CRITICAL** or **IMPORTANT** for constraints that must never be violated.
- If a skill will interact with external services, document the required env vars explicitly.
- Prefer reusing existing helper scripts (e.g.,
fetch-standup-data.sh) over duplicating logic.