Артыкул апублікаваны на англійскай мове.
14 Claude Code Slash Commands That Will Change How You Work
A practical tour of 14 Claude Code commands, from init, memory and compact to review, doctor and inline shell calls, that cut repetition and keep sessions fast.
It's 11:47 PM and you've been fighting a simple feature for almost four hours. The Claude Code session has hundreds of messages in it, the context window is nearly full, and replies are getting slower. You keep hopping between terminal, browser, GitHub, docs and the chat. The AI that was meant to help you build software has turned into one more thing to manage.
Then a colleague glances at your screen and asks why you aren't using the built-in commands. If you didn't know they existed, you probably treat Claude Code as a chatbot that happens to live in a terminal. It's closer to a full development environment, and a handful of slash commands show it. Here are the 14 that matter most, in rough order of how soon they pay off.
1. /init: stop re-explaining the project
Every fresh project begins the same way. You spend twenty minutes describing what the app does, which framework it uses, how folders are laid out, the coding conventions and the overall architecture, and only then can you ask a real question.
/init scans the repository and writes a project memory file documenting your codebase. The next conversation starts with that context already loaded. You run it once and benefit every day after.
2. /memory: teach it your style
Claude tends to write perfectly valid code that isn't how you'd write it. So you end up repeating rules like these:
- Prefer composition over inheritance.
- Never use
anyin TypeScript. - Comment only the tricky logic.
- Always add unit tests.
By the tenth repetition it's clear you're wasting effort. /memory lets you record those preferences once. From then on the tool adapts to you instead of making you adapt to its defaults, and the result is a collaborator that already knows how you work.
3. /pr_comments: keep review feedback in the session
Pull requests get messy fast. One reviewer wants different names, another wants better error handling, a third suggests rethinking the architecture. The usual routine is bouncing between GitHub and the assistant, trying to keep both in sync.
/pr_comments pulls the review comments straight into your session, so Claude knows what reviewers asked for before any edits begin. Nothing gets forgotten, and you aren't juggling tabs.
4. /btw: ask a side question without derailing
Say you're halfway through building authentication and wonder how JWT expiry differs from refresh tokens. Normally you'd search the web or ask in the main thread, and either way your task gets interrupted.
/btw lets you ask that aside without disturbing the current conversation. It sounds minor, yet it's one of the bigger productivity wins on the list.
5. /compact: the one to reach for most
Every long session ends up in the same place: replies slow down, the context window fills, and you start wondering whether to start over. Starting over means losing context and burning another twenty minutes on explanations.
Type /compact instead. Claude condenses the important parts of the conversation, drops the unneeded history and carries on with the work. It's the command you'll wish you'd learned first.
6. !: run shell commands inline
Prefix a line with an exclamation mark and the command runs right inside the chat:
! git status
! npm test
! npm install
The output lands in the conversation, so there's no copy-pasting and no window switching. On its own it's tiny, but it spares you dozens of small interruptions a day.
7. /cost: watch usage before it bites
Token usage is easy to ignore until you hit the limit, at which point Claude starts forgetting earlier parts of the conversation and you can't tell why. /cost shows current usage, remaining context and other session stats. It works as a fuel gauge, so you know when to optimize instead of running dry unexpectedly.
8. /model: match the model to the task
Some work is hard architectural thinking, and some is a quick regex. /model switches models in seconds. Use a more capable one for heavy reasoning and a lighter one for fast iteration. Once you start switching deliberately, the tool feels far more flexible.
9. /fast: trade polish for speed
When you're brainstorming, trying ideas, refactoring or experimenting, a perfect answer matters less than a quick one. /fast returns responses sooner, which makes rapid iteration smoother. Once the implementation is done, switch back for a deeper review.
10. /review: a second pair of eyes before merging
Run /review before each merge. It goes beyond formatting and looks for:
- logic bugs
- performance problems
- security risks
- missing edge cases
- general code quality improvements
Sometimes it flags things you missed entirely, and sometimes it just confirms you're on track. Both outcomes are worth the few seconds.
11. /clear: reset without losing your setup
Conversations sometimes go sideways because of wrong assumptions, the wrong direction or too much noise. Rather than quitting Claude altogether, /clear resets the conversation and leaves your overall setup in place. Think of it as tidying your desk without moving offices.
12. /doctor: first stop when something feels off
If Claude acts strangely, don't panic. /doctor inspects your setup, configuration, permissions and environment, so you don't lose time debugging a problem that isn't your code.
13. /terminal-setup: bridge the terminal gap
A constant annoyance is pasting terminal output back into Claude, again and again. /terminal-setup closes that gap. Once configured, Claude fits alongside your terminal more naturally and stops feeling like a separate tool.
14. /help: the one everyone forgets
The simplest command may be the most useful. Whenever you forget what Claude can do, type /help. It reminds you of features you haven't touched in weeks, and even after months of use you'll find commands you'd forgotten about.
The real payoff
Generating code isn't the biggest feature here. The real value is how it changes the way you work. Better prompts help, but the larger shift is treating Claude Code as an entire development environment instead of an AI chatbot. If you only ask it to write functions, you're using a fraction of what it offers.
So pick these 14 commands, use them for a week, and then try going back to your old workflow. You probably won't want to.