Mastering Claude Code slash commands
Every built-in slash command, when to use it, and how to write your own, with real Australian small-business examples you can copy.
Want this done for you? Book a free 30-minute AI audit
Slash commands are typed shortcuts inside a Claude Code session. Built-ins like /clear, /model and /compact handle session management. Custom ones (Markdown files in .claude/commands/) let you turn repeat workflows into one-line invocations. The examples below, /standup, /changelog, /quote, /audit-leads and /aud-blogpost, show the pattern.
Slash commands are the difference between Claude Code as a chat window and Claude Code as a workflow tool. Once you stop typing the same instructions out longhand and start firing them as commands, the tool gets dramatically more useful.
The built-in commands worth knowing
These ship with Claude Code. Type / in any session to see the full list; these are the ones most worth knowing.
Session management
/clear, wipe the conversation history and start fresh. Use it when you switch tasks or when the model is getting confused by stale context./compact, summarise the conversation so far into a shorter version. Use it when you want to keep context but free up tokens before a big task./resume, pick up a previous session. Indispensable when your terminal crashes mid-refactor.
Model + budget control
/model, switch model (e.g./model opusfor tricky bits,/model haikufor cheap text edits). Switching mid-session is fine; it picks up the current context./usage(also/cost), show session cost and how much of your plan’s allowance you’ve used.
Project setup
/init, generate a starterCLAUDE.mdfor your project. Run this once in any new repo and let Claude analyse your codebase, then edit the result. Saves writing the file from scratch./memory, open the memory file for editing (Claude’s persistent notes about your project + preferences)./add-dir, add another directory to the session’s working set. Useful when your work spans multiple repos.
Workflows
/rewind, undo Claude’s recent file edits or go back to an earlier point in the conversation./review, review a diff or branch for problems (an alias of/code-review)./help, list every available command, including your custom ones.
Writing your first custom slash command
Custom commands are plain Markdown files. The current way is a skill: a folder in .claude/skills/ (project) or ~/.claude/skills/ (every project) containing a SKILL.md, which you can run as /folder-name. A single file in .claude/commands/ still works too, and its filename becomes the command name. The examples below use the single-file form because it’s shortest.
A minimal example. Save this as ~/.claude/commands/aud.md:
---
description: "Australianise text: en-AU spelling, $AUD, DD/MM/YYYY dates."
---
Rewrite the following text in Australian English. Use organised not organized, colour not color, centre not center. Convert all currency to AUD with explicit AUD label. Convert all dates to DD/MM/YYYY format. Use en dashes not em dashes. Preserve tone.
Now in any Claude Code session, type /aud and paste your text. Claude rewrites it to Australian conventions.
Five example custom commands
These are examples of the kind of commands that suit a small business. Copy them and adapt them to your own workflow.
/standup, generate a Slack-ready daily standup
---
description: "Generate today's Slack standup from yesterday's git activity."
---
Run `git log --since='24 hours ago' --author="$(git config user.email)" --pretty=format:'%h %s'` and summarise into three sections:
**Yesterday:** What I shipped (bullet list, plain English, no commit hashes)
**Today:** What I'm doing (read the GitHub issues assigned to me)
**Blockers:** Anything in #blocked label
Format for Slack. Keep it under 200 words.
/changelog, append the latest release to a CHANGELOG
---
description: "Add today's changes to CHANGELOG.md grouped by type."
---
Read the git log since the last entry in CHANGELOG.md. Group commits into Added / Changed / Fixed / Removed. Write the new section at the top of CHANGELOG.md with today's date in DD/MM/YYYY format. Keep entries to one line each.
/quote, generate a client quote PDF brief
---
description: "Generate a one-page client quote from a scope description."
---
I'll paste a scope of work. Generate a one-page quote in this format:
- Header: client name, project name, date (DD/MM/YYYY)
- Scope (3-5 bullet points, plain English)
- Deliverables (numbered list)
- Investment: amount in AUD ex-GST
- Timeline: weeks from go-ahead
- Next step: book a kickoff call
Save the result to `docs/quotes/[client-slug]-[YYYY-MM-DD].md`.
/audit-leads, triage recent enquiries
---
description: "Pull and summarise recent audit-form leads."
---
Read the file ops/leads-export.csv (an export from your form tool or CRM). For each lead in the last 14 days, score it 1-5 on fit (look for: business size, urgency, budget signals, Australian location). Output a ranked list with one-sentence rationale per lead. Flag the top 3 for follow-up today.
/aud-blogpost, draft a blog post in your house style
---
description: "Draft a new On Autopilot blog post in our voice and frontmatter shape."
---
Start a new MDX article in src/content/blog/ with our standard frontmatter:
- title (under 70 chars)
- description (under 160 chars)
- publishDate (today in YYYY-MM-DD)
- author: jenn-yang
- type: opinion | briefing | news
- eyebrow
- tags: array
Voice rules: Australian English, no em dashes (use en dashes), conversational, lead with the answer, AUD pricing, DD/MM/YYYY dates, no AI-isms ("get into", "elevate", "let's dive in" → cut all). Aim for 800-1200 words.
I'll give you the topic in my next message.
Tips for custom commands
-
Name commands after verbs.
/audit-leadsnot/leads;/standupnot/morning. Verbs make muscle memory. -
Add
$ARGUMENTSfor parameters. You can include$ARGUMENTSin the markdown body and Claude substitutes whatever you type after the command. Useful for/find <term>style commands. -
Reference files explicitly. Mention a file with
@path/to/thing.mdto pull a template or context into the prompt. -
Don’t over-engineer. A command that’s used once a week beats a command that’s “more general” but used once a month. Build for the workflow you actually have.
-
Share team commands via git. Project skills and commands live in your repo’s
.claudefolder. Commit them and the team gets the same shortcuts.
What to build next
If you want to go deeper than slash commands:
- Claude Code hooks, run deterministic scripts on tool events (e.g. format every file after Claude edits it)
- Skills vs subagents, when to wrap a workflow as a skill vs split into a subagent
- MCP servers for the AU business stack, connect Xero, Shopify, Gmail
Or start saving your own commands as you notice repeat work. The fastest test: if you’ve typed roughly the same prompt three times this week, it should be a slash command.
Common questions
Where do custom slash commands live?
As skills: .claude/skills/<name>/SKILL.md in a project, or in the .claude/skills folder in your user profile for every project. Older single files in .claude/commands/ still work.
Can a slash command run shell commands?
Indirectly. The command file gives Claude instructions, and Claude can choose to run Bash. For deterministic execution, build a hook (Bash run on a tool event) instead, see our hooks guide.
Do slash commands count against my token budget?
Yes. They're just shortcuts that expand to a prompt. The expansion itself is short but the work Claude does is billed normally.
Want this built for your business?
Book a free 30-minute AI audit call with Jenn Yang. We map where your time goes, name the first systems worth building and give you fixed AUD prices. No obligation.
Book a free AI auditOr have us run it for you, end to end: On Autopilot is Australia's outsourced AI department.