Slash commands and skills
Working with Claude on Projects
Claude Code ships with a set of built-in slash commands for actions you perform often — code review, help, configuration, memory consolidation. On top of those, you can write your own skills: custom slash commands that live inside a project and trigger any workflow you can express in a prompt. This chapter covers both layers.
Built-in Slash Commands
Built-in commands are typed directly into the Claude Code chat input. They open panels, trigger operations, or configure behaviour — they are not sent to the model as chat messages.
Lists all available slash commands for the current session, including any custom skills loaded from the project. Your first stop when you forget a command name.
Triggers a code review of the current branch. Can be scoped to a PR number or run locally against uncommitted changes.
/code-review ultra
/code-review ultra 42
Deprecated alias for /code-review ultra. Does the same thing — launches a multi-agent cloud review of the branch. Prefer the newer form.
Clears the current conversation context without closing the session. Useful when you want to start a fresh exchange without losing your project setup.
Manually triggers context compaction — summarises older turns to free space. Normally happens automatically; useful if you want to compact before the automatic threshold.
Opens the memory management panel. Lets you view, add, edit, or delete memory files interactively without switching to a file editor.
Shows the current project status — loaded CLAUDE.md files, active memory files, token usage, and the current model.
Toggles Fast mode on/off. Fast mode uses Claude Opus with optimised output — it does not downgrade to a smaller model. Useful for rapid iteration when response time matters more than maximum depth.
/permissions, /config, /agents, /hooks, /doctor. These are available in an interactive claude terminal session. In the desktop app, use the app's own UI for model selection and settings instead.
The /code-review Command in Depth
/code-review is the most powerful built-in. It comes in two flavours:
Standard review
/code-review with no arguments reviews the uncommitted changes in the current working tree — staged and unstaged. Good for a quick review before committing.
Ultra review
/code-review ultra (or /code-review ultra <PR number>) launches a multi-agent cloud review. Multiple Claude instances work in parallel across different review angles — correctness, security, style, architecture — and produce a consolidated report.
- Requires a git repository. No GitHub remote needed for the no-arg form (bundles the local branch).
- With a PR number:
/code-review ultra 42— reads the PR from GitHub directly. - This is billed separately (multi-agent runs consume more tokens than a single-model review).
- You cannot launch ultra review via Bash or the API — it must be triggered from the Claude Code UI.
Skills — Custom Slash Commands
A skill is a markdown file that defines a custom slash command. When Claude loads your project, it reads any skills registered in your project settings and makes them available as /skill-name commands. Invoking a skill sends its prompt (with any arguments substituted) to Claude as a message — the skill is executed by the model, not the CLI.
How a skill file is structured
name: session-diary
description: Generate an end-of-session diary entry
---
Generate a session diary for this conversation.
Format: a structured markdown file at
claude-generated-files/claude_session_diary_{{date}}.md
Include sections:
1. Date and session summary (2–3 sentences)
2. Full session transcript (USER / ASSISTANT pairs)
3. Files generated this session
4. Decisions and preferences saved to memory
Write the file then confirm the path.
The name field becomes the command trigger: /session-diary. The body is the prompt sent to Claude when the command is invoked. You can include argument placeholders like {{date}} or $ARGUMENTS — Claude substitutes them from what you type after the command name.
Creating a Skill — Step by Step
.claude/skills/ inside your project. If the directory doesn't exist, create it. Each skill is its own .md file.name and description, then the prompt body. The name must be lowercase with hyphens (no spaces). The description appears in /help..claude/settings.json under "skills". Or, if using the desktop app, skills in .claude/skills/ may be picked up automatically — check /help to confirm the skill appears./skill-name in the chat. If the skill takes arguments, test with /skill-name some argument. Iterate on the prompt body until the output matches your expectation.Example Skills for This Project
claude-generated-files/claude_session_diary_YYYY-MM-DD.md./chapter vpn6 looks up the shorthand in the VPN course memory file and generates the corresponding chapter HTML. Encapsulates the entire chapter-generation workflow — styling lookup, content generation, file write, and status update — into a single command.Skills vs Shorthand Prompts
Both skills and shorthand prompts are ways to trigger a workflow with minimal typing. The difference is where the spec lives and how Claude receives it:
| Shorthand prompt | Skill | |
|---|---|---|
| How triggered | Type a keyword (e.g. vpn6) in chat |
Type /skill-name in chat |
| Spec location | Memory file (read by Claude on relevance) | Skill .md file (always loaded as a command) |
| Prompt delivery | Claude reads the memory, constructs the action | Skill body is sent directly as the prompt |
| Arguments | Embedded in the keyword (e.g. vpn6 = chapter 6) |
Passed after the command name; substituted via $ARGUMENTS |
| Reliability | Depends on Claude loading the right memory file | Prompt is always the same — deterministic trigger |
| Best for | Flexible workflows where context varies per invocation | Repeatable workflows with a fixed structure every time |
In practice, shorthand prompts and skills are complementary. Use shorthand for course-chapter generation (where the chapter number and course vary) and skills for project-wide recurring actions (progress report, session diary, memory consolidation) that don't vary by invocation.
When to Build a Skill
A skill is worth creating when a workflow meets most of these criteria:
- You perform it more than a handful of times across sessions
- The prompt is long or complex enough that retyping it is error-prone
- The steps are consistent — same structure every time, possibly with a parameter
- Getting it slightly wrong has a meaningful cost (e.g. writing to the wrong file path, forgetting a SQL step)
Don't create skills for one-off tasks, tasks that vary too much to have a fixed prompt, or tasks where typing a short note to Claude is just as fast. Premature skill creation produces a .claude/skills/ directory full of files you never use.