Lesson 456 of 2116
Slash Commands: Built-Ins And Custom
Slash commands are the keyboard shortcuts of Claude Code. The built-ins handle plumbing; the custom ones are where teams encode their workflows.
Lesson map
What this lesson covers
Learning path
The main moves in order
- 1What slash commands do
- 2slash command
- 3session control
- 4custom command
Concept cluster
Terms to connect while reading
Section 1
What slash commands do
Slash commands are special inputs starting with / that trigger meta-actions instead of going to the model. They control session state (`/clear`, `/compact`), surface help (`/help`), and let teams define custom workflows that anyone can run by name.
The built-ins worth memorizing
Compare the options
| Command | What it does | When to use |
|---|---|---|
| /clear | Resets session context | Starting unrelated work |
| /compact | Summarizes the session, replaces context with summary | Long session, context filling up |
| /init | Creates a starter CLAUDE.md | First time in a project |
| /help | Lists available commands | Forgot a name |
| /status | Shows current session state | Sanity check |
Custom slash commands
Custom commands let your team encode 'the way we do X' as a runnable name. They live in your project (typically under a `.claude/` folder) and become available as `/name`. Anyone with the repo gets the workflow for free.
Examples worth building
- /review — runs a checklist for the current changes (lint, tests, conventions, security)
- /spike — generates a throwaway prototype script in a sandbox folder
- /changelog — drafts a CHANGELOG entry from the diff
- /perf — runs a perf harness on a function and reports the numbers
- /release-notes — pulls commit messages and writes user-facing notes
Apply: build one custom command
- 1Pick a workflow you do every week (review, deploy, changelog)
- 2Write a prompt that describes the workflow precisely
- 3Save it as a custom slash command in `.claude/commands/`
- 4Run it three times; refine the prompt
- 5Commit it so the rest of the team can use it
Key terms in this lesson
The big idea: slash commands turn 'how we work' into a one-keystroke entry point. Master /compact, then build the few customs your team actually runs.
End-of-lesson quiz
Check what stuck
15 questions · Score saves to your progress.
Tutor
Curious about “Slash Commands: Built-Ins And Custom”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Creators · 10 min
Building A Custom Slash Command End-To-End
Custom slash commands are how teams encode 'the way we do X.' Building one well takes thinking about the prompt, the context, and the output shape — not just the name.
Creators · 9 min
What Perplexity Is: Search-Augmented LLM, Not A Chatbot
Perplexity is built around the idea that every answer should cite its sources. Treating it like ChatGPT misses the point — and the reliability gap that comes with it.
Creators · 10 min
Spaces: Building Team Knowledge Bases In Perplexity
Spaces are Perplexity's project containers — system prompts, files, and shared chat history. They turn the search engine into a research workspace.
