Skip to main content

Claude Code Skills: Complete Guide to Slash Commands

Master Claude Code's Skills system. Learn how slash commands work, built-in skills available, and how to create custom skills for your workflow.

Updated October 21, 2026: Rewritten against the current skills docs: skills are SKILL.md files in their own folders, the frontmatter and argument examples now use real fields (the old trigger: and args: keys were never read), and the built-in tables now list actual bundled skills plus /skills, /reload-skills, and /skill-doctor.

Skills are Claude Code’s reusable prompts and workflows: a SKILL.md file with instructions that you invoke with /skill-name, or that Claude loads on its own when it’s relevant. Custom slash commands have been merged into skills. This guide covers bundled skills, customization, and how to create your own.

What are Skills?

According to the official skills documentation, Skills are:

  • Reusable prompt templates triggered by slash commands or loaded automatically when relevant
  • Workflow automations that combine multiple steps
  • Custom extensions you can create for your needs
  • Project-specific commands that understand your codebase

Think of Skills as macros that encode common workflows into single commands. Claude Code skills follow the open Agent Skills standard, and a file in .claude/commands/ still works as a skill.

How Skills Work

User types: /deploy

Claude Code:
1. Finds the skill in .claude/skills/deploy/SKILL.md (project),
   ~/.claude/skills/ (personal), a plugin, or the bundled set
2. Loads the skill's full instructions (only its description
   sat in context before it was invoked)
3. Executes the workflow defined in the skill
4. Returns results to user

Built-in Commands and Bundled Skills

Core Commands

SkillCommandPurpose
Init/initInitialize CLAUDE.md for new project
Help/helpShow available commands
Clear/clearStart a new conversation with empty context
Config/configView/edit configuration
Permissions/permissionsManage tool permissions
Doctor/doctorSetup checkup (a bundled skill that proposes fixes)

Bundled Development Skills

SkillCommandPurpose
Code Review/code-review (alias /review)Review the current diff or a PR for correctness bugs
Simplify/simplifyClean up changed code for reuse, simplicity, and efficiency
Verify/verifyBuild and run your app to confirm a change works
Batch/batchSplit a large change into parallel background subagents
Debug/debugTurn on debug logging and troubleshoot the session

Skill and Memory Management

SkillCommandPurpose
Skills/skillsList skills, sort by token cost, toggle visibility
Reload Skills/reload-skillsRe-scan skill directories without restarting
Skill Doctor/skill-doctorShow each skill’s context cost and usage
Memory/memoryEdit CLAUDE.md files and manage auto memory

Commands such as /memory-save or /memory-search are custom skills built around the Memory MCP server, not part of Claude Code. Bundled skills are marked Skill in the commands reference, and the disableBundledSkills setting turns them off.

Using Skills

Basic Usage

Simply type the slash command:

/code-review

Claude will execute the skill’s workflow.

With Arguments

Whatever follows the skill name reaches the skill as $ARGUMENTS (or $0, $1, … by position):

/code-review high 1234
/fix-issue 123
/migrate-component SearchBar JavaScript TypeScript

Chaining Skills

Skills can be used in sequence. A skill name at the start of a message runs it directly; a name after plain text gives Claude permission to run it while it responds:

User: Make the changes we discussed, then run /commit

Claude:
  → Makes the changes
  → Executes /commit skill
  → Creates proper commit message

In the terminal you can also stack skills at the start of one message, such as /write-tests /fix-issue 123.

Skill File Structure

Each skill is a directory with a SKILL.md file inside .claude/skills/ (project) or ~/.claude/skills/ (personal):

.claude/
├── skills/
│   ├── commit/
│   │   └── SKILL.md        # Git commit skill
│   ├── review-pr/
│   │   └── SKILL.md        # Code review skill
│   └── deploy/
│       ├── SKILL.md        # Deployment skill
│       └── checklist.md    # Supporting file, loaded when needed
├── commands/
│   └── legacy-command.md   # Older single-file format, still works
└── settings.json

The directory name (or the frontmatter name) becomes the command. Plugin skills are namespaced as /plugin-name:skill-name.

Skill Definition Format

---
name: commit
description: Create a git commit with a conventional commit message. Use when the user asks to commit changes.
disable-model-invocation: true
allowed-tools: Bash(git add *) Bash(git commit *) Bash(git status *)
---

# Commit Skill

## Instructions

1. Check git status for staged changes
2. Analyze the changes to understand what was modified
3. Generate a conventional commit message:
   - feat: New feature
   - fix: Bug fix
   - docs: Documentation
   - refactor: Code refactoring
   - test: Test changes
   - chore: Maintenance

4. Create the commit with the generated message
5. Show the commit result

## Format

Use this commit message format:

type(scope): description

  • Detail 1
  • Detail 2

Co-Authored-By: Claude noreply@anthropic.com


## Example Output

Created commit: abc1234

feat(auth): add JWT token refresh mechanism

  • Implement automatic token refresh before expiration
  • Add refresh token rotation for security
  • Update auth middleware to handle refresh flow

Co-Authored-By: Claude noreply@anthropic.com

All frontmatter fields are optional, but description tells Claude when to use the skill. disable-model-invocation: true keeps Claude from running a side-effecting skill on its own, and allowed-tools pre-approves the listed tools for the turn that invokes it. Claude Code silently ignores fields it doesn’t recognize.

Creating Custom Skills

Step 1: Create the Skill Directory

Create a directory for the skill in .claude/skills/:

mkdir -p .claude/skills/deploy

Step 2: Define the Skill

Save this as .claude/skills/deploy/SKILL.md:

---
name: deploy
description: Deploy to staging environment
disable-model-invocation: true
---

# Deploy to Staging

## Prerequisites Check

1. Verify all tests pass
2. Check for uncommitted changes
3. Confirm current branch

## Deployment Steps

1. Build the project:
   ```bash
   npm run build
  1. Run pre-deployment tests:

    npm run test:e2e
  2. Deploy to staging:

    npm run deploy:staging
  3. Verify deployment:

    • Check health endpoint
    • Run smoke tests

Post-Deployment

  • Report deployment status
  • Show deployed URL
  • Note any warnings

### Step 3: Use the Skill

/deploy


Claude Code watches skill directories, so edits take effect in the current session. If you created a brand-new top-level skills directory mid-session, run `/reload-skills`.

## Advanced Skill Patterns

### Pattern 1: Parameterized Skills

Accept arguments in your skill:

```markdown
---
name: feature
description: Start a new feature branch
argument-hint: "[feature-name]"
arguments: [feature]
disable-model-invocation: true
---

# New Feature Workflow

## Steps

1. Create branch: `feature/$feature`
2. Set up feature structure
3. Create initial files
4. Open PR draft

Pattern 2: Conditional Skills

Different behavior based on context:

---
name: review-changes
description: Review code changes, either a PR or the local diff
---

# Code Review

## Determine Review Type

If reviewing a PR:
- Fetch PR changes
- Compare with base branch

If reviewing local changes:
- Check git diff
- Review staged and unstaged

## Review Checklist

- [ ] Code quality
- [ ] Security considerations
- [ ] Test coverage
- [ ] Documentation
- [ ] Performance implications

Pattern 3: Multi-Agent Skills

Skills that orchestrate multiple agents (add context: fork to run the whole skill in its own subagent instead):

---
name: audit
description: Comprehensive codebase audit
---

# Codebase Audit

## Phase 1: Parallel Analysis

Launch these agents simultaneously:

1. **Explore Agent (quick)**: Map codebase structure
2. **Explore Agent (medium)**: Find code patterns
3. **security-auditor**: Security scan
4. **code-reviewer**: Quality check
5. **test-runner**: Coverage analysis

## Phase 2: Synthesize Results

Combine findings into:
- Security issues (by severity)
- Quality concerns
- Coverage gaps
- Recommended improvements

## Output Format

Audit Report

Security (X issues)

  • Critical: …
  • High: …

Quality (X concerns)

  • …

Coverage (X%)

  • Missing: …

Recommendations

  1. …
  2. …

Pattern 4: Interactive Skills

Skills that ask for input:

---
name: scaffold
description: Scaffold new component/feature
---

# Scaffold Generator

## Questions

Ask the user:
1. What type? (component/api/service/hook)
2. Name?
3. Location? (suggest based on type)

## Generate Based on Answers

For component:
- Create component file
- Create test file
- Create styles file
- Export from index

For API:
- Create route handler
- Create validation schema
- Create test file
- Update API routes index

Project-Specific Skills

Example: E-commerce Skills

# .claude/skills/add-product/SKILL.md
---
name: add-product
description: Add a new product to catalog
---

## Product Creation Workflow

1. Create product migration
2. Add product schema
3. Create API endpoints
4. Add admin UI components
5. Write tests

Example: API Development Skills

# .claude/skills/new-endpoint/SKILL.md
---
name: new-endpoint
description: Create new API endpoint with full setup
---

## Endpoint Creation

1. Create route handler
2. Add input validation (Zod)
3. Implement business logic
4. Add error handling
5. Write tests
6. Update API docs
7. Run security-auditor

Skill Categories

A custom skill library usually grows into categories like these. Apart from the bundled /code-review, these are examples of skills you write or install, not commands that ship with Claude Code:

Workflow Skills

/workflow        # Full development workflow
/focus-problem   # Problem analysis
/test-first     # TDD workflow
/smart-commit   # Intelligent git commit

Quality Skills

/self-review     # Self-review and fix loop
/code-review     # Code review (bundled)
/security-check  # Security scan
/doc-audit      # Documentation check

Git Skills

/commit-push-pr  # Commit, push, and PR
/smart-commit    # Conventional commits

AI Interop Skills

/handoff-codex   # Hand off to Codex CLI
/handoff-gemini  # Hand off to Gemini CLI
/interop-broker  # Route to best CLI

Skills vs Agents vs MCP

FeatureSkillsAgentsMCP
PurposeWorkflow automationTask executionTool extension
Trigger/command or automatic by descriptionAgent tool (formerly Task)Tool calls
ScopePersonal, project, plugin, or orgBuilt-in and custom (.claude/agents/)External services
CustomizationEasy (markdown)Easy (markdown)Medium (code)
Context costLow (description until invoked)Own context windowVariable (low with tool search)

When to Use Each

Use Skills when:

  • You have repeatable workflows
  • You want slash command shortcuts
  • You need project-specific commands
  • You want to encode team patterns

Use Agents when:

  • You need parallel execution
  • You want specialized analysis
  • You need autonomous task handling
  • You want model selection flexibility

Use MCP when:

  • You need external data access
  • You want persistent storage
  • You need API integrations
  • You want database access

Skill Best Practices

1. Keep Skills Focused

# Good: Single purpose
/deploy-staging  # Deploy to staging
/deploy-prod     # Deploy to production

# Avoid: Too broad
/deploy          # Deploy to... somewhere?

2. Document Thoroughly

Put the key use case first in description, and keep SKILL.md under about 500 lines by moving reference material into supporting files:

---
name: my-skill
description: Clear one-line description of what it does and when to use it
argument-hint: "[target]"
---

# Skill Name

## Purpose
What this skill does and when to use it.

## Prerequisites
What needs to be in place before running.

## Steps
Detailed workflow steps.

## Examples
Example usage and expected output.

3. Include Error Handling

## Error Handling

If build fails:
- Show error details
- Suggest fixes
- Don't proceed with deployment

If tests fail:
- Report failed tests
- Ask before continuing

4. Use Agents Appropriately

## Quality Checks

After implementation:
- Run code-reviewer agent for quality
- Run test-runner agent for coverage
- Run security-auditor if touching auth/payment

Discovering Skills

List Available Skills

/skills

Shows every available skill, including custom, plugin, and bundled ones. Type to filter, press t to sort by token count, and press Space to change whether a skill is visible to Claude and the / menu.

Check Skill Definition

Look in .claude/skills/ and ~/.claude/skills/ to see custom skill definitions. Run /reload-skills after adding a new top-level skills directory, and /skill-doctor to find skills that cost context but never get used.

Bundled Skill Documentation

Bundled skills are documented in the commands reference and the skills documentation.

Getting Started

Today:

  1. Try /code-review on your next change
  2. Use /skills to see available skills
  3. Review the bundled skills

This week:

  1. Create one custom skill for your workflow
  2. Add team-specific skills to your project
  3. Document skills in your README

This month:

  1. Build a library of project skills
  2. Share skills across team projects
  3. Create multi-agent skills for complex workflows

Skills encode your expertise into reusable commands. Build them once, use them forever.

Sources: Claude Code Skills Documentation, Commands Reference, Claude Code GitHub