Lesson 22
Creating Custom Skills
AI-generated
Creating Custom Skills
Create a SKILL.md file with proper frontmatter
Use argument substitution with $ARGUMENTS
Control who can invoke the skill (user, Claude, or both)
Share skills with your team or across projects
Add supporting files for complex skills
Bundled skills are useful, but the real power comes from creating your own. A custom skill can encode your team's workflows, automate repetitive tasks, or add domain-specific knowledge.
Skills are just markdown files with instructions. Claude reads them and follows what they say. If you can write instructions for a person, you can write a skill.
This lesson teaches you how to create, configure, and share custom skills.
Every skill is a directory with a SKILL.md file:
The directory name becomes the skill name. The SKILL.md file contains the instructions.
SKILL.md has two parts:
Frontmatter (optional) - YAML configuration between --- markers
Content - Markdown instructions Claude follows
Example:
Frontmatter configures how the skill behaves:
name - Display name (defaults to directory name):
description - When to use this skill:
Claude uses the description to decide when to apply the skill automatically.
disable-model-invocation - Prevent Claude from invoking automatically:
Use for skills with side effects that you want to trigger manually.
allowed-tools - Tools Claude can use without asking:
context - Run in a subagent:
The skill runs in a separate context, keeping your main session clean.
Skills can accept arguments. Use $ARGUMENTS as a placeholder:
When you run /fix-issue 123, Claude sees "Fix GitHub issue 123".
Positional arguments:
Or shorter:
Running /migrate Button React Vue substitutes Button, React, Vue.
If $ARGUMENTS is missing:
If your skill does not include $ARGUMENTS but the user provides arguments, Claude Code appends ARGUMENTS: <value> to the end.
Skill location determines who can use it:
Personal skills (~/.claude/skills/):
Available in all your projects. Good for personal workflows.
Project skills (./.claude/skills/):
Available in this project only. Check into Git to share with your team.
Plugin skills (<plugin>/skills/):
Distributed with plugins. Available where the plugin is enabled.
Priority: Enterprise > Personal > Project. If multiple skills have the same name, higher priority wins.
A skill for deploying your application:
Invoke with:
The disable-model-invocation: true ensures Claude only deploys when you explicitly ask.
A skill that adds your team's review checklist:
Claude applies your checklist when you run /review-pr.
Skills can include additional files:
Reference them from SKILL.md:
Claude loads these files when needed.
Skills can run shell commands and inject the output:
The ` !command ` syntax runs before Claude sees the skill. The output replaces the placeholder.
Skills are directories with SKILL.md files
Frontmatter configures name, description, and behavior
Use $ARGUMENTS for user input substitution
Store in ~/.claude/skills/ for personal or ./.claude/skills/ for project
Set disable-model-invocation: true for skills with side effects
Add supporting files for templates and examples
Use !command for dynamic context injection
Create your first custom skill:
Create the directory: mkdir -p ~/.claude/skills/hello
Create SKILL.md with this content:
Start Claude Code and run /skills to verify it appears.
Run /hello and see the greeting.
Run /hello world and see how $ARGUMENTS works.
Delete the skill directory when done experimenting.
This exercise shows how simple it is to create skills.
https://code.claude.com/docs/en/skills - Complete skill documentation
https://code.claude.com/docs/en/memory - How skills relate to CLAUDE.md
https://code.claude.com/docs/en/commands - Skill invocation