Claude Code Secret Commands — 12 Hidden Slash Commands Inside the CLI (2026)
Most Claude Code users only know /clear and /model. We tested every command in the CLI and found 12 hidden ones that change how Claude Code actually works — with examples for each.
Get notified when we discover new Claude codes
We test new prompt commands every week. Join 4+ developers getting them in their inbox.
The Claude Code CLI has more commands than the docs show
If you've used Claude Code (the terminal CLI from Anthropic, not the browser chat), you've probably typed /clear and /model and called it a day. Maybe /help once.
What the official help screen doesn't tell you is that there are at least a dozen more commands and prompt prefixes that genuinely change how Claude Code behaves inside the terminal — some of them documented in obscure release notes, some discovered by the community through trial and error, and a few that only work in specific contexts.
We spent three weeks running every undocumented command we could find against Claude Code 2.x in April 2026. Here are the 12 that consistently work, with what they do and when to use them.
How to use these (the format)
There are two kinds of "secret commands" in Claude Code:
- Built-in slash commands — type
/<name>at the prompt. These are CLI-level features. - Prompt prefixes — type a keyword like
L99or/ghostat the start of your message. These are model-level conventions Claude has learned to recognize.
Both feel like "secret codes" because neither shows up in the standard onboarding flow. We'll mark each one as [CLI] or [PROMPT] so you know which is which.
1. /resume — Pick up where you left off [CLI]
Most people don't know Claude Code stores your conversation history locally. /resume lets you jump back into a previous session by listing recent conversations and letting you pick one. Useful when you accidentally close the terminal or your machine reboots in the middle of a long debugging session.
This is the single most underused command in the entire CLI.
2. /compact — Stay in context without losing state [CLI]
When Claude Code's context window starts getting full, the standard advice is to start a fresh session. /compact is the better answer — it summarizes the current conversation into a much shorter version, then continues. You keep the gist of what you were working on without burning your context budget.
When to use it: any time you've been in a conversation for more than ~30 messages and you're about to ask something complex.
3. /cost — How much have you spent? [CLI]
/cost shows you the API spend on your current session in real time. Most users discover this only after they get a surprise bill. If you're on the BYO API key model (which we recommend), this command is the difference between "oh nice it's working" and "oh no I just spent $40 on a documentation refactor."
4. /init — Generate a CLAUDE.md for your repo [CLI]
If you've never written a CLAUDE.md for your project, run /init from inside your repo. Claude Code will scan the codebase, infer the conventions, and write a starter CLAUDE.md for you. It's not perfect, but it's a much better starting point than a blank file.
The CLAUDE.md file is the single highest-leverage thing you can add to a project that uses Claude Code. It tells Claude how to think about your codebase before every conversation. Full guide here.
5. /agents — List and switch between agents [CLI]
Claude Code 2.x supports custom subagents — specialized Claude instances you can spawn for specific tasks (testing, security review, refactoring, etc.). /agents lists the agents installed in your project and lets you switch between them. If you've never used this command, you're using Claude Code in single-agent mode and missing half the product.
Best Claude Code Agents in 2026 →
6. L99 — The depth code [PROMPT]
Type L99 at the start of any prompt. Claude Code switches into a noticeably more committed, less-hedged response style. Instead of "there are several approaches," you get "do this, here's why, here's what would change my answer."
L99 Should I use Postgres or SQLite for this CLI tool?
The difference is dramatic for any "should I" question where Claude's default instinct is to give you a menu. Full L99 explainer.
📘 Want all 120 codes with before/after examples?
The cheat sheet has every code tested over 3 months — with when-NOT-to-use warnings, combos that stack, and 10 real workflows. From $5.
7. ULTRATHINK — Maximum reasoning depth [PROMPT]
ULTRATHINK is the most aggressive thinking-mode prefix that consistently works in Claude Code. It produces 800-1200 word responses with multiple analytical layers, explicit reasoning steps, and a clearly marked conclusion. Slow output, far better quality on hard questions.
Use it for: architecture decisions, debugging mysterious bugs, postmortems. Skip it for: anything you could answer in two sentences.
8. /skeptic — Challenge the question before answering [PROMPT]
/skeptic is the most underrated prompt prefix in the entire ecosystem. It tells Claude to challenge your premise before answering. Half the time you'll discover you were asking the wrong question, which saves you from building the wrong thing.
/skeptic Should I add a recommendation engine to my 200-user app?
Claude will probably tell you no, and explain why your current users don't need one yet. That's the value. Full /skeptic guide.
9. /ghost — Strip the AI tells from generated text [PROMPT]
If you're using Claude Code to generate any kind of text that humans will read — README files, commit messages, error messages, marketing copy — /ghost removes the recognizable AI fingerprints. No more "It's worth noting," no more "Here's what I think," no more balanced sentence pairs.
/ghost Write a README for this project. The audience is junior backend devs.
10. PERSONA — Channel a specific expert [PROMPT]
PERSONA is one of the few prompt prefixes that produces dramatically different output, but only if you make the persona specific. Vague personas ("act like an expert") barely change anything. Specific personas with a stated history, bias, and opinion produce a different kind of answer entirely.
PERSONA: Senior backend engineer at Stripe, 12 years, hates microservices, has been burned by Kubernetes three times. Review my service architecture.
The specificity is the unlock. Full PERSONA guide →
11. /nofilter — Get the unhedged opinion [PROMPT]
/nofilter tells Claude to drop the soft-pedaled, balanced, both-sides-of-the-issue framing and just say what it actually thinks. It's not a jailbreak — it doesn't bypass safety. It bypasses hedging.
Use it for: code reviews, technical opinions, design critiques. Skip it for: anything subjective where you want multiple perspectives.
12. /mirror — Match a specific writing style [PROMPT]
Give Claude a sample of your writing (a few hundred words is enough) and prefix the next prompt with /mirror. It will match your sentence rhythm, vocabulary, and tone instead of defaulting to its own style.
Use case for developers: writing release notes that sound like the founder, drafting changelog entries that match the project's voice, ghostwriting blog posts that don't feel auto-generated.
What doesn't work in Claude Code
We also tested these and they did nothing or actively hurt the response:
/jailbreak— Makes Claude Code more cautious, not less.DAN mode— This is a ChatGPT meme. Claude has no context for it./godmode(with no follow-up) — Just produces longer output, not better.- Random uppercase strings (
ALPHA,OMEGA,MAX) — Pattern-matching only, no real effect. /expert(without specifying which kind) — Useless without a specific persona.
If someone tells you these are hidden Claude Code commands, they haven't tested them.
The pattern: built-in commands compound, prompt prefixes layer
The biggest difference between the [CLI] commands and the [PROMPT] prefixes is how they interact.
The CLI commands (/resume, /compact, /cost, /init, /agents) change the state of your Claude Code session. They're tools. You use them once and move on.
The prompt prefixes (L99, ULTRATHINK, /skeptic, /ghost, PERSONA, /nofilter, /mirror) change the behavior of Claude's response inside the session. They're modifiers. You use them on every prompt where they apply, and you can stack them.
Most power users we know combine 2-3 prefixes per prompt. Common combos:
PERSONA + L99— expert perspective + committed opinion. Best for technical decisions./skeptic + ULTRATHINK— challenge the question + maximum depth on the answer. Best for high-stakes architecture./ghost + /punch— humanize + sharpen. Best for any text that humans will read.
Get all 120 codes (free + paid)
We maintain a tested list of all the prompt prefixes that consistently work — currently 120, updated every two weeks as Claude Code evolves.
Free: Browse 11 working codes at clskills.in/prompts — click to copy, no signup.
Full reference (120 codes, $5-$10): The Claude Code Cheat Sheet includes every tested code with before/after examples, when-NOT-to-use warnings, combo stacks, and 10 ready-made workflow playbooks. Lifetime updates.
Related guides
- 100 Claude Secret Codes — The Full List
- 7 Hidden Claude Prompts That Actually Work
- Claude Cheat Codes — The Complete Guide
- Claude Code Slash Commands (2026)
- How to Write a CLAUDE.md File
- Setup Claude Code From Scratch
TL;DR
Claude Code has 5 underused built-in commands (/resume, /compact, /cost, /init, /agents) and at least 7 prompt prefixes that consistently change how it responds (L99, ULTRATHINK, /skeptic, /ghost, PERSONA, /nofilter, /mirror). Learn the CLI commands first — they save the most time. Then layer in 2-3 prompt prefixes per session to get dramatically better output.
🎁 Get 15% off — subscribe to the newsletter
Join 30+ developers. Get the FIRST15 discount code instantly. One email when there’s something worth sharing.