Site icon Efficient Coder

Master These 10 Hidden Claude Code Commands for Instant Developer Efficiency Gains

Master Claude Code: 10 Hidden Commands for Peak Efficiency

In the rapidly evolving landscape of AI programming tools, Claude Code has established itself as arguably the most powerful general-purpose Agent available. Yet, a fascinating disparity exists among users. While some developers have mastered the art of running Agent Teams in parallel, others are still struggling with basic mechanics—like how to create a new line in the terminal—unaware of essential functions that could save hours of work.

I recently witnessed a colleague preparing to scrap an entire project and start over because a typo in their Prompt led to a “completely unrecognizable” codebase. When I casually suggested using the “rewind” feature, they looked at me blankly: “What’s rewind?”

That moment was an eye-opener. I asked a room of seven or eight people if they knew that pressing Esc twice in Claude Code reverts code. Only one hand went up.

This gap in knowledge isn’t due to a lack of intelligence; it’s the breakneck speed of updates. Claude Code evolves so fast that features often appear without formal announcement, sometimes mentioned only in a passing Tweet by the dev team. Drawing from my extensive personal experience, I’ve curated the most practical, high-impact hidden commands. This isn’t a bloated encyclopedia; it’s a tactical guide to instantly upgrading your coding experience.


Image Source: Unsplash

1. /btw: How to “Interrupt” Without Polluting the Context?

Core Question: How can you ask a quick question during a long task without interrupting the process or wasting tokens?

The /btw (by the way) command is a recent addition, introduced on March 11th. The overwhelming response on social media—millions of views on the announcement post—proves how desperate developers were for this feature.

The “Context Pollution” Problem

Previously, if Claude Code was refactoring a massive module and you suddenly wondered, “Wait, where is that test file located?”, you were stuck. If you asked, Claude would stop, answer the question, and that irrelevant exchange would be permanently logged in the context window. This “context pollution” often causes the Agent to drift off course when it resumes the main task.

Your only other option was to wait until the entire job was finished, but even then, asking the question later would still clutter your history.

A Parallel Conversation Mechanism

/btw solves this elegantly. While Claude is executing a task, type /btw followed by your question.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034835318751600641)

This spawns a parallel process. Claude answers your question instantly without pausing the original task. It’s purely concurrent. Once you have your answer, a simple press of the spacebar or enter dismisses the temporary exchange.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034835432257830912)

The main task continues uninterrupted, and the conversation history remains pristine. Better yet, because it reuses the current prompt cache, it costs almost zero extra tokens. This is a “cannot go back” feature—I use it multiple times in every long session.

2. /rewind: The “Undo” Button You Didn’t Know You Had

Core Question: When a code modification goes wrong, how can you revert precisely without losing the valuable discussion context?

This is the feature that stumped my colleagues. In Claude Code, double-tapping Esc or typing /rewind acts as your safety net.

Decoupling Code from Conversation

While the command existed previously, a February update added a game-changer: the ability to rewind code and conversation separately.

Before this, trying a new approach meant committing fully. If you said, “Try refactoring this using Method A” and it failed, rewinding would wipe both the bad code and the discussion leading up to it. Claude would lose all memory of why you tried Method A in the first place.

Now, /rewind presents a menu.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034835812962144256)

You can choose to:

  1. Rewind both code and conversation.
  2. Rewind conversation but keep code changes.
  3. Rewind code but keep conversation.

The Experimental Workflow

The third option is a powerhouse for experimentation. If you test a risky implementation that doesn’t pan out, you can revert the code to its previous state while keeping the chat history intact. Claude remembers the failure, learns from it, and can pivot to a new approach without you needing to re-explain the context. It eliminates the need to tearfully run git reset and risk messing up your local repo.

3. /insights: Letting AI Analyze Your Habits

Core Question: How can you audit your own workflow to find inefficiencies you didn’t know you had?

/insights is a sleeper hit. It generates a local HTML report analyzing your usage over the past month.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034836097541558272)

A Mirror to Your Workflow

After typing the command, Claude creates a detailed webpage. It breaks down:

  • Your most frequently used commands.
  • Repetitive operational patterns.
  • Recommendations for custom commands or Skills based on your behavior.

It feels like Claude Code is observing you.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034836243062956034)

The report is surprisingly granular. It even highlights “cringe moments” or failures, like incorrect server link configurations, and offers specific advice on how to fix your memory settings. I recommend running this once a month. It offers a perspective on your work habits that is impossible to see from the inside.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034836790713212928)

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034836889149333504)

4. /model opusplan: Saving Money for Pro Users

Core Question: How can Pro subscribers maximize their limited Opus budget without sacrificing code quality?

This is a true “hidden command” that doesn’t appear in the standard /model switcher. It is vital for users on the $20 Pro plan.

Smart Model Dispatch

By entering /model opusplan, you activate a dual-model strategy. When complex reasoning or architecture planning is required, it automatically invokes Claude Opus 4.6. For the actual code execution, it switches to Claude Sonnet 4.6.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034837014080794624)

Why This Matters

Planning requires deep thinking. Opus is superior at understanding project-wide dependencies and architecture. However, writing the actual code—especially for routine tasks—is something Sonnet handles perfectly well, and much faster.

Pro users have a tight Opus quota. Burning through it on simple coding tasks is wasteful. This command ensures the “smartest” model only handles the strategy, while the “fast and cheap” model handles the labor. It is the definitive way to stretch a Pro subscription.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034837047991787520)

5. /simplify: The Triple-Agent Code Review

Core Question: How can you ensure AI-generated code is optimized for reuse, quality, and speed simultaneously?

Integrated in late February, /simplify is essentially a three-in-one code review tool.

Parallel Review Agents

When you run this command, Claude Code spawns three parallel Agents to scan your changes:

  1. Code Reuse Agent: Checks for duplicate logic.
  2. Code Quality Agent: Analyzes style and readability.
  3. Runtime Efficiency Agent: Identifies performance bottlenecks.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034837424149602304)

They aggregate findings into a concise report, pinpointing exactly where you can optimize.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034837480940429312)

Replacing /review

The older /review command feels obsolete compared to this. AI code often contains subtle redundancies—extra imports, repeated logic, or verbose syntax—that humans might miss. /simplify catches them effectively. It’s like having three colleagues review your code instantly. I make it a habit to run this after every major feature update.

6. /branch: The Multiverse of Development

Core Question: How can you explore a different implementation path without abandoning your current progress?

Formerly /fork, this command (now /branch) creates a divergent path in your conversation history.

Session Forking

It works like a “save state” in a video game. If you are midway through a discussion about a feature and want to try a radically different approach without losing the current context, you branch.

The original session remains untouched, while a new session copies the history and moves forward independently. You can run two experiments in parallel and compare the results later.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034838589318807553)

Think of /rewind as a “undo button” (regret), while /branch is a “parallel universe” (exploration).

7. /loop: Your Automated Watchdog

Core Question: How can you make Claude perform repetitive checks automatically?

/loop allows for scheduled, recurring tasks.

Usage and Safety

The syntax is straightforward: /loop [interval] [task].
Example: /loop 5m check deployment status.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034839273229492229)

This runs the task every 5 minutes (default is 10 minutes). The results appear directly in the chat, allowing Claude to react to them immediately.

To prevent runaway tasks, these loops automatically expire after 3 days. The task runs one last time and then deletes itself. For indefinite loops, the team recommends using the desktop version.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034839415818973184)

8. /remote-control: Code From Your Couch

Core Question: How can you control your local instance securely from a mobile device?

Also launched in late February, this feature is a productivity hack. Type /rc or /remote-control, and it generates a URL.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034840031186362370)

Secure Remote Access

Open the link on your phone, and your entire Claude Code session is mirrored. It is fully synchronized: send a command on mobile, it runs on your terminal; see the output on desktop, it updates on mobile.

Crucially, the code never leaves your computer. Your phone is just a remote interface. Your file system, MCP servers, and configs remain local. It’s the perfect balance of convenience and security for “Vibe Coding” on the go.

9. /export: Preserving Institutional Knowledge

Core Question: How do you save a complex architectural discussion for future reference?

Simple but essential. /export saves your current conversation as a Markdown file.

Why Bother?

Architectural decisions often emerge from long, back-and-forth discussions. If you don’t save this context, retrieving the logic later is a nightmare. Exporting creates a permanent record, perfect for documentation or team sharing.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034840503783653376)

It also enables cross-tool collaboration. You can export a Claude Code log and feed it to another tool (like Codex) to get a second opinion on a bug. It’s a simple way to prevent vendor lock-in for your problem-solving logic.

10. Keyboard Shortcuts: Stop Doing It The Hard Way

Beyond commands, a few key shortcuts separate power users from beginners.

1. Ctrl+V: Paste Screenshots Directly

Stop saving screenshots to files and dragging them in. Just take a screenshot and hit Ctrl+V in the terminal.
Note for Mac Users: This is Ctrl+V, NOT Cmd+V. Don’t ask me why, just memorize it.

2. Ctrl+J: New Line

Trying to write a multi-line prompt? Enter sends the message. Ctrl+J (or Option+Enter on Mac) creates a new line.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034840852322033667)

3. Ctrl+R: Search History

Need that long prompt you wrote yesterday? Ctrl+R searches your entire input history.

[

Image

](https://x.com/Khazix0918/article/2034842244600275340/media/2034840998116040705)

4. Ctrl+U: Delete Line

Messed up a line? Ctrl+U wipes the current input instantly.



Image Source: Unsplash

Practical Summary & Cheat Sheet

Here is a quick reference guide to the commands discussed above.

Command Reference Table

Command Core Function Best Use Case Rating
/btw Side-question without context pollution Quick questions during long tasks ⭐⭐⭐⭐⭐
/rewind Selective revert of code/chat Undoing bad code but keeping the lesson ⭐⭐⭐⭐⭐
/insights Usage habit analysis Monthly workflow audit ⭐⭐⭐⭐
/model opusplan Opus plans, Sonnet executes Pro users optimizing cost/performance ⭐⭐⭐⭐⭐
/simplify Triple-agent code review Post-feature quality check ⭐⭐⭐⭐
/branch Session forking Exploring alternative solutions ⭐⭐⭐
/loop Scheduled tasks Monitoring deployments ⭐⭐⭐
/rc Mobile remote control Coding away from desk ⭐⭐⭐⭐
/export Save chat as Markdown Documentation & collaboration ⭐⭐⭐
Ctrl+V Paste image from clipboard Debugging with screenshots ⭐⭐⭐⭐⭐

Essential Shortcuts Checklist

  • New Line: Ctrl + J (Mac: Option + Enter)
  • Paste Image: Ctrl + V (Mac: Use Ctrl, not Cmd)
  • Search History: Ctrl + R
  • Clear Line: Ctrl + U
  • Undo/Revert: Double-tap Esc

One-Page Summary

Claude Code’s true power lies in its interaction design, not just its model capabilities. /btw keeps your context clean, while /rewind provides a safety net for experimentation. Cost-conscious Pro users should immediately enable /model opusplan. For quality assurance, /insights offers self-reflection, and /simplify acts as an automated reviewer. Advanced workflows are unlocked via /branch for parallel paths, /loop for automation, and /rc for mobile access. Finally, mastering simple shortcuts like Ctrl+J and Ctrl+V removes friction from the daily grind.

Frequently Asked Questions (FAQ)

Q1: Does /btw consume extra tokens?
A: Almost zero. It reuses the existing prompt cache, making it a highly efficient way to ask questions.

Q2: How is /rewind different from git reset?
A: /rewind operates on the conversation level, allowing you to keep the “memory” of the discussion while reverting the code changes. git reset only touches the files.

Q3: What does /simplify check for?
A: It launches three parallel agents to analyze code reuse, code quality, and runtime efficiency.

Q4: I have a Pro subscription. How do I save Opus quota?
A: Use the hidden command /model opusplan. This reserves Opus for high-level planning and uses Sonnet for execution.

Q5: Can I use Claude Code on my phone?
A: Yes. Type /rc to generate a secure URL. Open it on your phone to control your local terminal session remotely.

Q6: What is the shortcut to paste images in the terminal?
A: Ctrl + V. Mac users must use the Control key, not Command.

Q7: Will /loop run forever?
A: No. To prevent forgotten tasks, loops automatically expire and delete themselves after 3 days.

Q8: How do I save a conversation?
A: Use /export to download the entire chat history as a Markdown file.

Exit mobile version