The first time I let Claude Code run a fresh Android build, my terminal froze for 47 minutes. I restarted my Wi-Fi router twice. It wasn't the internet.
Short answer: Claude Code commands start with a
/at the beginning of your message. Built-in ones control the session, like/clear,/compactand/model. Custom ones are your own prompts saved as Markdown files in.claude/commands/, sorun-app.mdbecomes/run-app. Type/to see them all. Anything after the name goes into$ARGUMENTS.
Claude Code had killed Gradle at its 2 minute shell timeout, in the middle of a 1 GB download. The killed build left lock files in ~/.gradle. The next build waited for them forever.
That frozen cursor became the first rule in my first command. Today NowKit has 30 /kit-* commands, and every build command in them runs Gradle in the background and checks on it.
Here's what I learned writing all of them.
What are Claude Code commands?
Claude Code commands are shortcuts you type with a / at the start of a message. Built-in ones switch models, clear context or rewind. Custom ones run a prompt you saved as a file. Type / in a session to see every one available to you.
Two details from Anthropic's commands reference that I wish I knew earlier:
- A command only works at the start of your message. Text after the name becomes its arguments.
- If you send one while Claude is still answering, it waits in a queue and runs after the current turn. Dialogs like
/helpand/themeopen right away.
So /compact keep the paywall decisions is one command with an instruction, not a chat message.
Which built-in Claude Code commands do I actually use?
These ten cover most days. /init once per project, /clear between tasks, /compact and /context in long sessions. /rewind when Claude goes the wrong way, /usage to watch your plan.
| Command | What it does (as of December 2026) | When it helps |
|---|---|---|
/init | Writes a CLAUDE.md guide for the project | Once, on a new project, then I cut it down |
/clear | Starts a new conversation with empty context | Between two unrelated tasks |
/compact | Summarizes the conversation to free up context | Halfway through a long build session |
/context | Shows what is filling the context window | When Claude starts forgetting my rules |
/model | Switches the model and saves it as default | Bigger model for planning, smaller for edits |
/rewind | Goes back to an earlier point in chat and code | When an edit went the wrong way |
/resume | Opens an earlier conversation | Next morning, to continue yesterday's work |
/memory | Edits your CLAUDE.md files | When I add a rule I keep repeating |
/permissions | Manages allow, ask and deny rules for tools | To stop approving ./gradlew every time |
/usage | Shows session cost and plan usage limits | Before a long run, so I don't hit a limit |
The descriptions come from the same commands reference. /cost is an alias for /usage now, so older tutorials still work.
Here's the catch with long sessions: the context fills up, and the rules from the first hour get squeezed. A fresh /clear for each new task keeps them sharp.
How do you create a custom slash command in Claude Code?
Make a Markdown file in .claude/commands/ inside your project. The file name becomes the command, so .claude/commands/compile-check.md becomes /compile-check. Write the prompt in the file, add a description at the top, and commit the folder so everyone who clones the project gets it.
Here's a small one from a mobile project. It checks one module compiles and explains the first error:
---
description: Compile one Gradle module and explain the first error
argument-hint: [module]
---
## Current changes
!`git status --short`
1. Run `./gradlew :$0:compileDebugKotlin` in the background. Check the output every 30 seconds. Never kill it.
2. If it fails, show me the first `e:` line only and explain it in one sentence.
3. Fix that one error and compile again. Stop after 3 tries and tell me what's left.
Type /compile-check app and $0 becomes app.

The !`git status --short` line is the part most people miss. Per Anthropic's skills docs, it runs before the prompt is sent, and its output replaces the line. So Claude gets the real data, not a request to go fetch it.
Want the command in every project on your machine? The personal place is ~/.claude/skills/<name>/SKILL.md.
How do arguments work in Claude Code commands?
$ARGUMENTS gets everything you type after the command name. $0, $1 and so on get one value each, counting from zero. Wrap a value with spaces in quotes, so it stays one argument.
So /rename-screen "Settings Screen" Profile gives $0 = Settings Screen and $1 = Profile.
If your file has no placeholder at all, Claude Code adds your text at the end as ARGUMENTS: <value>. Nothing gets lost.
The frontmatter fields I use most:
description: what the command does. Claude reads it to decide when the command fits.argument-hint: the hint shown while you type, like[module].allowed-tools: tools Claude can use without asking, during that command's turn.disable-model-invocation: true: Claude never runs it on its own, only when you type it.
Put the last one on anything that publishes, signs or deletes. Trust me, you don't want a release command running because Claude thought it was a good idea.
Are Claude Code slash commands and skills the same now?
Mostly, yes. Anthropic merged custom commands into skills. Your .claude/commands/ files keep working, and Claude can use them without you typing the name. A skill lives in its own folder with a SKILL.md, so it can also carry extra files like templates or scripts.
What that means in practice:
- Old command files: keep them. Nothing breaks.
- New work: Anthropic suggests a skill, because of the extra files.
- Same name in both places: the skill wins over the command file.
- Same skill in two places: personal beats project, per the skills docs.
My kits still ship command files for Claude Code. They work, and the same text renders for the other agents.
What did writing 30 Claude Code commands teach me?
Five rules, each one from something that broke. Long jobs run in the background. Every command is safe to run twice. Long ones can stop and pick up later. Big commands call small ones. And one source feeds every agent.
- Long jobs go in the background. That 47 minute freeze is why every build step polls instead of waiting in the foreground.
- Safe to run again. Every command checks what's already set and offers to keep, change or redo it.
- Stop and resume. Long ones can be picked up later, even in a new chat.
- Big commands call small ones.
/kit-publish-to-playruns the listing, screenshot and legal commands for you. - One source, five agents. Claude Code, Cursor, Codex, Antigravity and OpenCode each get their own copy.
Rule 5 has its own story. On Nov 29, I built a subscription tracker called Suby live, with Google's Antigravity CLI and the NowKit commands.
The agent reused my previous project. So the whole app got built in the wrong folder, my-app1, and the new folder stayed empty. I only noticed when the RevenueCat JSON showed up in the old app's folder.
Agent CLIs bind to a project, not to your folder. Now I check pwd before a new app, and I start one with --new-project.

Every command and what it does is in the commands reference. If you're new to Claude Code on Android, start with my frozen first build post. It covers the setup and the CLAUDE.md these commands lean on.
When should a prompt become a command?
When you type the same long prompt a second time. That's my rule. If a prompt has steps, a check at the end, and a thing that must never happen, it belongs in a file.
Signs it's time:
- You keep pasting the same paragraph from a notes app.
- Claude forgets one step every third time.
- A teammate asks "how did you make it do that?"
Keep each command to one job. When one grows past a screen, split it, and let a bigger command call the small ones.
So, write your first one today. Take the prompt you typed most this week and save it in .claude/commands/. Then type / and watch it show up.
If you'd rather start with 30 that already ship real apps, that's NowKit. /kit-start-setup names the app, sets the brand, turns on sign-in, paywall and analytics, and runs it. For more on going from AI prompts to a store listing, read my vibe coding app guide.




