Claude Code Slash Commands: The Complete Guide (2026) — Claude Skills 360 Blog
Blog / Guide / Claude Code Slash Commands: The Complete Guide (2026)
Guide

Claude Code Slash Commands: The Complete Guide (2026)

Published: April 21, 2026
Read time: 11 min read
By: Claude Skills 360

Claude Code slash commands are one of the most underused features for developers who want to go beyond one-off prompts. They let you invoke specialized behaviors, trigger automation, and — when you extend them with custom skills — build a personal toolkit that compounds over time.

This guide covers every built-in slash command, explains the skill system, and shows you how to build workflows that run the same way every time.

What Are Slash Commands in Claude Code?

Slash commands are text shortcuts you type in the Claude Code input that invoke a specific behavior. Instead of writing “Please review the changed files and create a commit with a descriptive message,” you type /commit.

Built-in commands are baked into Claude Code. Custom skills (sometimes called custom slash commands) are markdown files you add to your project or global config — Claude loads them as context and follows their instructions.

The distinction matters: built-in commands run logic; custom skills load instructions.

Complete List of Built-In Claude Code Commands

Session Management

/clear — Clears the current conversation context. Use this when you’re switching tasks and don’t want previous context confusing Claude Code about what you’re building.

/reset — Resets Claude Code to its initial state, clearing context and any in-session memory. Useful when a session has gone sideways.

/compact — Triggers context compression. Claude Code summarizes the conversation so far into a compact representation, freeing up context window space for longer sessions.

Project Intelligence

/memory — Opens the memory management interface. Lets you add, view, or remove persistent notes that Claude Code carries across sessions. Critical for projects with context that’s hard to reconstruct from scratch.

/init — Analyzes your current codebase and generates a CLAUDE.md file with project context, conventions, and common commands. Run this once when starting work in a new repo.

/doctor — Diagnoses Claude Code’s configuration, checks for permission issues, and validates your setup. Run this if commands or hooks aren’t working as expected.

Code Review and Shipping

/review — Triggers a structured code review of recent changes. Claude Code examines modified files, checks for bugs, security issues, and style inconsistencies, and provides a prioritized feedback list.

/commit — Creates a git commit for staged changes. Claude Code reads the diff, generates a descriptive commit message following your project’s conventions (learned from git history), and runs git commit.

/pr — Creates a GitHub pull request. Claude Code summarizes all commits since branching, writes a PR title and description, and calls gh pr create. Requires the GitHub CLI.

Utilities

/help — Lists available commands and their descriptions. Also surfaces any custom skills you’ve loaded.

/bug — Opens a GitHub issue template pre-filled with diagnostic information. For reporting issues with Claude Code itself.

/status — Shows current session status: model in use, context usage, active permissions, and loaded skills.

/fast — Toggles fast mode, which uses Claude Opus 4.6 optimized for faster output. Same model, different output streaming.

/vim — Toggles vim keybindings in the Claude Code input. For developers who can’t type in anything that doesn’t have hjkl navigation.

Task Management

/todo — Opens the task list for the current session. Claude Code maintains a structured todo list during complex multi-step tasks. /todo shows current status and lets you add items.

/plan — Enters plan mode. Claude Code researches the codebase and writes a structured implementation plan before touching any files. You review and approve before work begins.

Custom Skills: Extending the Slash Command System

This is where Claude Code’s power really compounds. Custom skills are markdown files that define a specialized capability — Claude Code loads them and executes their instructions when invoked.

A skill file looks like this:

---
name: security-audit
description: Run a comprehensive security audit of the current codebase
---

You are a senior security engineer performing a comprehensive audit.

## Audit Protocol

1. Scan all routes and API endpoints for authentication bypass vulnerabilities
2. Check all SQL queries for injection vectors
3. Review input validation on user-facing forms
4. Audit file upload handlers for path traversal
5. Check for secrets hardcoded in source files
6. Review CORS and CSP headers

## Output Format

Produce a structured report with:
- CRITICAL issues (exploitable in production)
- HIGH issues (significant risk)
- MEDIUM issues (should fix before next release)
- LOW issues (best practice violations)

For each issue: file, line, description, severity, remediation.

Save this to ~/.claude/skills/security-audit.md and invoke it with /security-audit.

Where Claude Code Loads Skills From

Claude Code checks three locations, in priority order:

  1. Global skills~/.claude/skills/ (your personal toolkit, available in every project)
  2. Project skills.claude/skills/ in any directory you’ve given Claude Code access to
  3. Skills directory specified in CLAUDE.md — you can point to any path

If two skills have the same name, the more specific one wins (project overrides global).

Directory Structure

~/.claude/
├── settings.json
└── skills/
    ├── commit.md
    ├── security-audit.md
    ├── api-spec.md
    ├── deploy-check.md
    └── write-tests.md
your-project/
└── .claude/
    └── skills/
        ├── seed-db.md          # project-specific
        └── deploy-staging.md   # project-specific

Building Effective Custom Skills

The difference between a skill that works once and one you use every day is specificity. Vague instructions produce variable outputs. Precise instructions produce consistent results.

Anatomy of a well-written skill:

---
name: api-spec
description: Generate OpenAPI 3.1 spec from an Express router file
---

## Context

You are documenting API endpoints for a REST API using Express.js. 
The codebase uses TypeScript, Zod for validation, and JWT authentication.

## Input

The user will specify a router file path (e.g., `src/routes/users.ts`).
If no file is specified, analyze all files in `src/routes/`.

## Process

1. Read the specified route file(s)
2. Identify every route handler (GET, POST, PUT, DELETE, PATCH)
3. For each route:
   - Extract the path pattern
   - Identify required auth (check for `requireAuth` middleware)
   - Read Zod schemas to document request body and query params
   - Identify response shapes from return statements

## Output

Generate valid OpenAPI 3.1 YAML. Include:
- All paths with correct HTTP methods
- Request body schemas (JSON)
- Query parameter definitions
- Authentication requirements (Bearer JWT)
- Response schemas with status codes 200, 400, 401, 403, 404, 500
- Descriptions for each endpoint

Write the output to `docs/api-spec.yaml`, creating the file if it doesn't exist.

What makes this skill effective:

  • Specifies the exact tech stack (no guessing)
  • Defines what to do when input is ambiguous
  • Gives a step-by-step process, not a goal
  • Specifies the exact output format and destination

The Difference Between Skills and Agents

This comes up frequently. The short version:

SkillsAgents
RunsWhen you invoke with /nameAutonomously, triggered by events
NeedsHuman in the loopCan run without intervention
Good forRepeatable tasks you initiateBackground work, monitoring, pipelines
StateSingle sessionCan span sessions

A skill is a power tool you pick up. An agent is a worker you send off.

The Claude Skills 360 bundle includes both: 2,350+ skills for common development tasks plus 45 autonomous agents for background work, organized across 18 categories.

Advanced Patterns

Chaining Skills

Skills can invoke other skills. Add this to any skill file:

## After completing this task:

Run `/commit` to commit your changes with a descriptive message.
Then run `/pr` to open a pull request with a summary of the work.

This creates a mini-pipeline: you invoke one skill, it does its work, then triggers the next two automatically.

Parameterized Skills

Skills can accept arguments. Reference them with $ARGUMENTS:

---
name: test-coverage
description: Generate tests for a specific module
---

Generate comprehensive tests for the module at: $ARGUMENTS

If no argument provided, ask which module to test.

## Test Requirements

- Unit tests for all exported functions
- Integration tests for database interactions
- Edge case coverage (null inputs, empty arrays, error states)
- Use the testing framework already in use (check package.json)

Invoke with: /test-coverage src/services/auth.ts

Skills for Onboarding

One of the highest-ROI uses is an onboard.md skill that runs the first time someone joins a project:

---
name: onboard
description: Complete developer onboarding for this project
---

Walk the new developer through:

1. Read CLAUDE.md and summarize the project architecture in plain English
2. List all environment variables needed (from .env.example)
3. Run `git log --oneline -20` and explain the recent development history
4. Identify the three most important files they should read first
5. Show them the available Claude Code skills for this project (.claude/skills/)
6. Run the test suite and confirm it passes: `npm test`

Produce a "start here" summary they can refer back to.

Common Mistakes

Mistake 1: Writing goals instead of procedures

❌ “Make the code better”
✅ “Check all function signatures for missing TypeScript return types. For each function missing a return type, add the explicit return type. Don’t change any logic.”

Mistake 2: Vague output specs

❌ “Report what you find”
✅ “Output a markdown table with columns: File | Line | Issue | Severity | Fix”

Mistake 3: Missing context

❌ Skill file with no tech stack info
✅ Skill file that reads CLAUDE.md first, knows the stack, and applies domain-specific rules

Mistake 4: One skill for everything

Build narrow, composable skills rather than one god-skill that tries to do everything. Small skills stay useful longer as the codebase evolves.

Getting Started: First 3 Skills to Build

If you’re new to custom skills, start here. These three cover 80% of common use cases:

Skill 1 — commit.md: Custom commit message format for your team’s conventions. Even if you use /commit, a custom skill can override the default with your preferred format (Conventional Commits, ticket numbers, etc.).

Skill 2 — review.md: Code review focused on your stack’s specific pitfalls. A React team might emphasize hook dependency arrays; a Postgres team might focus on query plans.

Skill 3 — debug.md: Your personal debugging protocol. Instrument the code, check logs, isolate the variable, test the hypothesis. Written once, consistent forever.

Scaling Your Skill Library

Individual developers typically accumulate 20-40 skills over 6-12 months of active use. Teams working on the same codebase often share project-level skills through the .claude/skills/ directory committed to the repo.

The compounding effect is real: the second time you use a skill, it’s free. The hundredth time, you’ve recouped the initial investment many times over.

If you’d rather start with a comprehensive library than build from scratch, the Claude Skills 360 bundle includes 2,350+ pre-built skills across every major development domain — from the same categories you’d eventually build yourself, already refined and production-tested.

The free starter kit includes 360 skills to get you started.

Put these ideas into practice

Claude Skills 360 gives you production-ready skills for everything in this article — and 2,350+ more. Start free or go all-in.

Back to Blog

Get 360 skills free