Gaëtan Wittebolle.FR
← guides
Claude Code, the guide
Chapter 8 / 16

Part 1 · Foundations

  • 01What is Claude Code?
  • 02Step-by-step installation
  • 03CLAUDE.md, the brain of your project

Part 2 · Communicate and plan

  • 04How to talk to Claude Code
  • 05Plan before coding
  • 06The daily work cycle

Part 3 · Advanced tools

  • 07Specialized agents
  • 08The shortcuts that speed everything up
  • 09Permissions

Part 4 · Mastery

  • 10Memory between sessions
  • 11Case study, a feature from A to Z
  • 12The 11 fatal mistakes to avoid

Part 5 · Going to production

  • 13The checklists
  • 14Setting up infrastructure

Part 6 · Bonus, a power user's setup

  • 15Generating images from Claude Code
  • 16My complete setup

Part 3 · Advanced tools

The shortcuts that speed everything up

Chapter 8 · 8 min reading

🎯

This chapter introduces the pre-configured slash commands that automate common tasks. You type the command, Claude does the rest. Reading time: 8 minutes.

What is a slash command?

Slash commands are shortcuts that trigger a specific behavior in Claude. Instead of writing a long prompt, you type /name and Claude knows exactly what to do.

There are three kinds:

  1. Native commands: built into Claude Code (e.g. /compact, /model, /plan)
  2. Skills and plugins: installable in one click (e.g. /commit, /review, /debug)
  3. Your custom commands: the agents from the previous chapter (e.g. /front)

The essential commands for development

/commit, save cleanly

Analyzes the diff (the changes you've made), understands the context, and creates a Git commit with a descriptive message.

💡

Before (without /commit): you had to figure out which files changed, write a message that summed up the changes, and run the Git commands manually.

With /commit: Claude does it all in 5 seconds. The message is always clear and consistent.

When to use it: after every complete feature or fix. Don't commit work in progress.

/review, check the quality

Re-reads all the code modified since the last commit and looks for:

  • Potential bugs: incorrect logic, unhandled edge cases
  • Security flaws: exposed data, injections, hardcoded keys
  • Inconsistencies: code that doesn't follow the project's conventions
  • Dead code: unused imports, functions never called

When to use it: before every important /commit. It's your safety net.

/debug, debug methodically

When something breaks, /debug runs a structured process:

  1. Reproduce the problem
  2. Isolate the root cause
  3. Diagnose the precise bug
  4. Fix with the minimal solution
  5. Verify that the fix works without breaking anything else

When to use it: when you have unexpected behavior and don't know where it's coming from.

Code creation commands

/component, create a React component

Generates a typed component with props, state, and styles, from a description.

/component A date picker that shows a calendar in a popup, with month-by-month navigation and highlighting for dates with events.

/server-action, create a server action

Generates a Server Action with Zod validation, error handling, and authentication checks.

/server-action Archive a piece of content: marks the content as archived (soft delete) and removes it from the calendar.

/form-builder, create a complete form

Generates a complete form with:

  • Zod validation schema (validation rules)
  • react-hook-form (form state management)
  • shadcn/ui components (inputs, selects, buttons)
  • Error handling and loading states

/form-builder Content creation form with: title (required, max 100 characters), platform (LinkedIn / Instagram / YouTube), editorial pillar (select from the compass), and body text (textarea with character counter).

/migration-sql, create a migration

Generates a Supabase SQL migration with:

  • The table or table change
  • The RLS policies (row-level security)
  • The indexes for performance

/migration-sql Add a streaks table with: user_id (FK), current_streak (int), best_streak (int), last_publication_date (timestamp). RLS by user_id.

/test-gen, generate tests

Generates unit tests for existing code.

/test-gen Generate the tests for the Server Action in src/lib/actions/streak.ts. Cover: streak calculation, broken streak case, and best streak update.

Quality commands

/pr, create a Pull Request

Creates a complete GitHub Pull Request with title, description, and a test checklist.

/pr

/deploy-check, pre-deploy checklist

Runs a complete checklist before going to production:

  • Typecheck passes
  • Lint passes
  • Tests pass
  • Build succeeds
  • Environment variables configured
  • No hardcoded API keys in the code

Content commands

These commands are optional and specific to "build in public", the practice of publicly sharing how you build your app.

/ship, shipping log

Generates a recap of what you shipped today, formatted for a post.

/recap, weekly recap

Generates a weekly summary for a newsletter or social media.

/bip, build in Public post

Generates an Instagram post from the day's work.

The magic trio for getting started

If you only remember 3 commands, these are the ones:

⚡
  1. /review before every commit, catches bugs before they hit production
  2. /commit to save, clear and consistent messages with no effort
  3. /debug when things break, structured diagnosis instead of guessing

The rest will come naturally once you're comfortable with the workflow.

Session management commands

These commands don't create code, but they manage the quality of your session. Ignoring them is like driving without checking the fuel gauge.

/compact, free up the context

When the conversation gets long, Claude loses quality. /compact summarizes everything and frees up space.

When to use it: as soon as the context goes past 50-60%. Don't wait for 80%, that's already too late.

/rewind (or Esc Esc), undo a wrong direction

Undoes the latest code changes AND rolls back the conversation. More effective than fixing things manually.

When to use it: as soon as Claude heads down the wrong path. The longer you wait, the harder it is to recover.

/clear, start from scratch

Wipes the entire conversation. Useful when you switch topics completely mid-session.

When to use it: when you go from a bug fix to a new feature. No need to drag the bug context along.

/model, choose the effort level

Lets you choose the model and the effort level: low (fast), medium (balanced), high (smarter). Boris Cherny recommends high for everything.

When to use it: at the start of a session, or when you switch from a small fix (low is enough) to a complex feature (high).

/fast, toggle speed vs depth

Switches between normal mode and fast mode. The model stays the same (Opus), but the output is faster with shorter reasoning.

When to use it: for small tweaks, simple questions, or when you want to speed things up. Switch back to normal mode for complex tasks.

/btw, parallel conversation

Lets you ask Claude a question while it's working, without interrupting its current task. Like a Post-it on a focused colleague's desk.

When to use it: you think of something while Claude is coding, but you don't want to break its flow.

/loop, recurring tasks

Runs a command on a regular interval (every 5 min, 10 min, etc.) for up to 3 days.

When to use it: monitoring a deploy, checking the status of a PR, polling a build.

Example: /loop 5m /deploy-check checks the deploy status every 5 minutes.

/schedule, scheduled remote agents

Creates autonomous agents that run on a cron (every hour, every day, etc.) even when your computer is off. The agent runs in Anthropic's cloud.

When to use it: automated daily monitoring, scheduled security checks, periodic reports.

Concrete example: an agent that compiles your tech watch every morning at 7am and pushes the result into Notion.

/rename and /resume, manage your sessions

/rename gives a name to your session (e.g. "TODO - refactor credits"). /resume picks it up later with all the context intact.

When to use it: when you have to interrupt a task and resume it the next day.

💡

Takeaway: slash commands are shortcuts that eliminate repetitive work. /review + /commit + /debug cover 80% of your code needs. /compact + /rewind cover 100% of your session management needs. Both are essential.

← Chapter 7

Specialized agents

Chapter 9 →

Permissions