@recombobulate
Recombobulate
Member since Mar 2026
// 624 published tips
Anthropic now burns through your 5-hour session limits faster during peak hours. Here's how to restructure your Claude Code workflow to get the most out of every token.
Let Claude Code agents explore your codebase before making sweeping changes.
Describe your CLI's commands, flags, and validation rules and Claude will write a complete Click application — argument types, help text, error handling, and a pyproject.toml entry to install it as a real command.
The companyAnnouncements setting surfaces team messages to every developer at startup, directly in their Claude Code session.
Add tools to your deniedTools list to create a hard block that prevents Claude from ever running them — even if you accidentally click approve. Use it for destructive commands, production databases, or anything that should never happen from your dev machine.
Once you've written the happy path, ask Claude to think of every edge case you probably haven't — then write the tests for them too.
Most code is written for the happy path — everything works, data exists, APIs respond, and inputs are valid. Tell Claude to read your code and add error handling for every failure mode — null values, network timeouts, invalid data, missing config, and unexpected states — so your app degrades gracefully instead of crashing.
Add skipDangerousModePermissionPrompt: true to your settings.json to stop Claude Code asking "are you sure?" at the start of every bypass-mode session.
In Ghostty, use Ctrl+Shift+Cmd+4 to copy a screen region to clipboard, then Ctrl+V (not Cmd+V) to paste it directly into Claude Code.
Describe a feature in plain English and let Claude generate expressive Pest tests that read like documentation.
A PostToolUse hook fires after every tool execution — use it to write an audit log of every command Claude runs, every file it edits, and every search it performs, giving your team full visibility into what happened during a session.
Pipe your staged diff to Claude with -p to get a properly formatted conventional commit message back — add it as a shell alias for a one-keystroke workflow.
Split your dev docs into three focused files (plan, context, tasks) so Claude can re-orient instantly after a context reset without wading through a single bloated plan.md.
Point Claude Code at your existing cloud provider using CLAUDE_CODE_USE_BEDROCK or CLAUDE_CODE_USE_VERTEX — no direct Anthropic API key required, and all traffic stays within your cloud security boundary.
Claude Code ships new features, bug fixes, and model improvements frequently — run claude update to grab the latest version without reinstalling, so you're never stuck on an older build missing the good stuff.
Don't describe your entire feature in one massive prompt. Start with the simplest working version — "create a basic form that saves to the database" — then layer on validation, error handling, edge cases, and polish through follow-up prompts. Each step builds on working code, so you catch problems early and steer the result as it takes shape.
Use --effort to set reasoning depth per session, from quick low-effort tasks to maximum reasoning on complex problems.
Define specialised subagents inline with JSON when launching Claude Code, perfect for quick experiments and CI pipelines that need custom agents without config files.
Use @path syntax in CLAUDE.md to pull in READMEs, package.json, and other docs — so Claude always has the right context without duplicating content.
The otelHeadersHelper setting runs a script to generate fresh authentication headers for your OTel backend, refreshing automatically every 29 minutes.
Claude Code remembers your prompt history within a session — press the Up arrow to cycle back through previous prompts, edit them, and resend without retyping. Perfect for iterating on a prompt until you get it right.
Idempotency keys prevent duplicate charges and double-submitted orders when clients retry failed requests — Claude scaffolds the middleware in one prompt.
When Claude Code isn't working right — MCP servers failing, authentication errors, or unexpected behavior — run /doctor to get a diagnostic report that checks your configuration, API connection, installed tools, and settings across all scopes so you can pinpoint what's wrong.
The language setting makes Claude respond in your preferred language by default, across every session and project.
Tell Claude what you need — "add a tagging system where posts can have multiple tags" — and it writes the migration, creates the pivot table, adds the model relationships, and updates the relevant files, all from a plain English description of your schema change.
Pass --model when starting Claude Code to choose exactly which model you want — opus for complex architecture work, sonnet for everyday coding, haiku for quick lookups — without changing your default settings or switching after the session starts.
Don't dump an entire feature into one prompt — break it into focused steps for better results and easier review.
Drop a CLAUDE.md into any subdirectory and its rules only apply when Claude is working in that part of the codebase — different coding standards for the API vs the frontend, stricter rules for the payments module, or special instructions for generated code.
Ask Claude to write a GitHub reusable workflow for your shared CI steps — lint, static analysis, tests, caching, and coverage — so every repo calls one central definition instead of duplicating YAML.
Tell Claude what your app runs on and it will write a production-ready Dockerfile complete with multi-stage builds and sensible defaults.
Describe your stack and requirements and let Claude scaffold a complete feature flag system — database-backed toggles, per-user overrides, a Blade directive, and a Vue composable — without reaching for a paid service.
Pipe any file, log, diff, or command output straight into Claude Code using standard Unix pipes — Claude reads the piped content as context alongside your prompt, no copy-pasting needed.
Tell Claude which design pattern to use — Repository, Strategy, Observer, Decorator — and it applies it to your actual codebase, not a textbook example. It reads your existing code, identifies where the pattern fits, and refactors to implement it properly.
Ask Claude to scan your codebase for all environment variable usages and generate a complete .env.example with placeholder values and inline comments.
Press Shift+Enter to add new lines inside your prompt without sending it — perfect for writing structured, multi-paragraph instructions that read like a mini brief instead of cramming everything into one long line.
While --continue picks up the last session automatically, --resume shows you a list of all recent conversations so you can choose which one to reopen — jump back into that debugging session from Tuesday or the refactor you paused last week.
When typing file paths or slash commands in Claude Code, press Tab to autocomplete — it suggests matching files from your project and available commands, saving you from typing full paths or remembering exact command names.
Open multiple terminal windows and run separate Claude Code sessions simultaneously to work on several tasks at once.
Chain multi-step operations with && so Claude's sequence halts immediately on failure — no more half-applied refactors or committed broken code.
Describe a UI feature in plain English and get a fully wired Livewire component — properties, actions, validation, and Blade template included.
Tell Claude to read your application's routes, static assets, and API paths, then generate an nginx or Apache config that handles everything correctly — reverse proxying, SSL, static file serving, and URL rewrites, all matching what your app actually needs.
Tell Claude to analyze how your project's files and directories are organized — it spots misplaced files, inconsistent naming, overcrowded folders, and framework convention violations, then suggests a cleaner structure and helps you reorganize safely.
Restrict which tools Claude has access to with --allowedTools and --disallowedTools — make Claude read-only by blocking Edit and Write, prevent command execution by blocking Bash, or whitelist only the specific tools a CI job needs. Fine-grained control for safety-conscious workflows.
The --print flag turns Claude Code into a one-shot CLI tool that reads from stdin and writes to stdout — perfect for embedding in shell scripts, git hooks, and Unix pipelines.
The official Claude Code VS Code extension embeds the full CLI experience in a panel inside your editor — same tools, same CLAUDE.md, same session management, but without switching to a terminal.
Skip the dodgy online converters — ask Claude Code to compress images and convert video files locally using sips, FFmpeg, or any other CLI tool on your machine.
Use git worktrees to spin up isolated copies of your repo and run multiple Claude Code sessions simultaneously — each working on a different feature without stepping on each other's toes.
Tell Claude to trace every import and dependency across your codebase, then show you which modules depend on which — spotting circular dependencies, God modules everything imports, and tightly coupled layers that should be independent.
The Claude Code Desktop app can automatically start your web server and test the output in a built-in browser for a complete feedback loop.
When a task is large — "add a payment system" or "refactor the entire API" — tell Claude to work in explicit phases: plan first, build the foundation, add features one at a time, then test. Phased work produces fewer bugs than asking for everything in one shot.
Extend Claude Code with MCP servers to add database access, GitHub integration, web search, and more — right from the terminal.
Stop wrestling with regex syntax — describe the pattern you need and Claude will write it, test it, and explain every part.
The /cost command shows you exactly how many tokens and dollars the current session has used — run it any time you want a reality check.
Describe your stack and hosting setup and let Claude write a production-ready Nginx or Caddy config — rate limiting, cache headers, SPA routing, and proxy settings all handled correctly.
Pipe your SQL DDL or Laravel migrations to Claude and get a complete Prisma schema back — foreign keys become relations, enums map correctly, and @@map attributes preserve your existing table names.
Use the Claude mobile app's Code tab to write and review code from your phone without opening a laptop.
Migrating to Tailwind doesn't have to be tedious — paste your CSS and Claude converts it to utility classes and updates your markup.
Verbose test output wastes Claude's context window — run tests with compact or quiet flags so Claude only has to process what matters: the failures.
Tell Claude to scan your codebase for common security vulnerabilities — SQL injection, XSS, broken authentication, insecure deserialization, and the rest of the OWASP Top 10 — and it finds the actual vulnerable lines with specific fixes, not generic advice.
Add --output-format json to get Claude Code's response as structured JSON instead of plain text — perfect for shell scripts, CI pipelines, and automation workflows that need to parse, filter, or chain Claude's output programmatically.
Ask Claude to read your code and produce a Mermaid diagram — render it instantly in GitHub, Notion, or any Markdown viewer.
Point Claude at your class-based React components and it converts them to modern function components — replacing lifecycle methods with useEffect, this.state with useState, and class methods with hooks, while preserving all the behavior and updating the tests.
Major version upgrades are scary — deprecated methods, renamed classes, changed signatures, removed features. Tell Claude which dependency to upgrade and it reads the upgrade guide, bumps the version, then systematically finds and fixes every breaking change across your entire codebase.
Ask Claude to migrate your Tailwind v2 utility classes and config to v4 — it handles renamed utilities, the new CSS-first config format, and @theme variable mappings across your whole codebase.
Describe your project and the commands you run constantly — Claude will write a complete Makefile with phony targets, a help command, and coloured output that makes your workflow self-documenting.
Paste your routes file and ask Claude to add sensible rate limiting rules tailored to each endpoint's risk profile.
Set CLAUDE_CODE_NEW_INIT in settings.json to make /init interview you for targeted improvements instead of overwriting your existing CLAUDE.md.
PreToolUse hooks can do more than block — return updatedInput to silently rewrite commands, file paths, or URLs before Claude executes them.
Pair a UserPromptSubmit hook with a skill-rules.json config to reliably trigger the right skill on every prompt instead of relying on Claude's 50/50 automatic detection.
Use claude export to save a full conversation transcript as markdown or JSON — perfect for documenting decisions, sharing a debugging session with your team, or reviewing what Claude did before committing the changes.
You're not limited to a single CLAUDE.md at the project root. Drop additional CLAUDE.md files into subdirectories to give Claude module-specific context — different conventions for the frontend vs backend, special rules for a legacy module, or testing guidelines that only apply to one package.
Configure a Stop hook to play a system sound the moment Claude finishes, so you can step away without constantly checking the terminal.
Distributed tracing turns mysterious slowdowns into pinpointed bottlenecks. Ask Claude to wire up OpenTelemetry across your application without digging through the docs.
Tell Claude to find every external API call in your code and add resilience — exponential backoff for retries, circuit breakers that stop calling a failing service, timeout handling, and fallback responses so a third-party outage doesn't take your app down with it.
Use /batch to fan out large-scale code changes across parallel worktree agents that work without conflicts.
Describe your OAuth providers and requirements and let Claude scaffold the full login flow — PKCE, state verification, account linking, token issuance, and Pest tests — with the security pitfalls handled correctly.
Stop describing files vaguely — use tab completion and @ references to point Claude at exactly the right files.
When you're ready to open a PR, ask Claude to read all the commits on your branch, understand the full scope of changes, and write a proper description — summary, what changed, why it matters, and testing instructions — so reviewers know exactly what they're looking at.
Tell Claude to add /health and /ready endpoints that check your app's vital signs at runtime — database connectivity, Redis availability, queue worker status, disk space, and external service reachability — so load balancers and monitoring tools know when something breaks.
Force Claude to return structured JSON instead of conversational text — perfect for piping into scripts and automation.
Prevent automated Claude Code runs from saving session data to disk, keeping your CI pipelines clean and your .claude directory lean.
Get shadcn/ui fully configured with the right Tailwind and tsconfig setup in one prompt — then ask Claude to customise the components you own.
CSS animations are expressive but syntax-heavy. Describe the motion you want — fade, slide, bounce, shimmer — and Claude handles the keyframes, timing functions, and accessibility considerations.
Unused functions, unreferenced exports, and orphaned CSS classes accumulate silently — ask Claude to track them down before they become a maintenance burden.
A PreToolUse hook can intercept test runner commands and filter output to show only failures, cutting thousands of tokens from Claude's context.
Tell Claude to read your project's tools and create a Makefile with discoverable targets for every common workflow — setup, dev, test, lint, build, deploy, and database tasks — giving your team one consistent interface regardless of the underlying toolchain.
Tell Claude which webhook provider you're integrating — Stripe, GitHub, Twilio, or any other — and it reads the docs, builds the handler with signature verification, idempotent event processing, and proper retry handling so you never miss or double-process an event.
Instead of Googling shell syntax, describe what you want — "find all files modified this week over 1MB" — and Claude writes the command, tests it on your system, explains what each flag does, and iterates until it works.
Tell Claude what commands you type repeatedly and it'll write a set of shell aliases tailored to your workflow — ready to drop straight into your shell config.
Can't find an ESLint rule that enforces your team's specific convention? Describe the bad pattern in plain English and Claude will write the rule and the tests.
Add deny rules to your project settings to prevent Claude Code from reading .env files, credentials, and other sensitive paths.
Add a consistent prefix like /my- to all your custom skills so they stay grouped and scannable in the slash command list.
When something works locally but breaks in staging, ask Claude to compare your config files, environment variables, and runtime settings across environments — it spots the mismatches that cause environment-specific failures.
Describe subagent configuration in plain English — model, mode, background execution, worktree isolation, and role — without memorising any formal parameter names.
Tell Claude which package to upgrade and it reads the migration guide, bumps the version, finds every breaking change in your code, updates the affected files, and runs the tests — turning a scary major version bump into a guided process.
Pipe your git diff directly to Claude and get a properly formatted Keep a Changelog entry — Added, Changed, Fixed, and all.
Skip the manual setup and get Claude responding to @claude mentions in your PRs with a single command.
When Claude starts heading in the wrong direction, press Escape to stop it immediately — then redirect with a follow-up instead of waiting for a full wrong response.
Describe your schedule in plain English — "every weekday at 9am" or "first Monday of each month at midnight" — and Claude writes the cron expression, explains each field, and lists the next few fire times so you can verify it before deploying.
When running Claude Code in automation or headless mode, pass --max-turns to cap the number of agentic steps it takes before stopping. This prevents runaway operations, controls costs, and ensures Claude finishes within a predictable budget of actions.
mosh (mobile shell) keeps your SSH connection to a remote Claude Code server alive through network switches, laptop sleep, and wifi drops — where regular SSH would silently die.
Claude Code uses a small, fast model for background operations like title generation and memory summarisation. You can override which model it uses with an environment variable.
Inconsistent API error shapes are a frontend developer's nightmare — describe your error contract and let Claude write middleware that enforces it everywhere.
When Claude generates shell scripts for you, ask it to add `set -euo pipefail` at the top — three flags that turn silent failures into hard stops.
Switch Claude Code between planning and acting with a single keystroke — Shift+Tab toggles plan mode on and off, so you can have Claude think through an approach before it starts making changes.
Point Claude at your JavaScript files and it adds TypeScript types — inferring types from actual usage, function signatures, API responses, and patterns in the code — so you can migrate gradually without rewriting everything at once.
A .claudeignore file lets you hide irrelevant files and directories from Claude Code, keeping it focused on what matters.
Reserve Claude Code's max effort level for architectural and complex decisions where deeper reasoning pays off, and stick to default for everyday tasks to keep token usage in check.
The -p (print) flag runs Claude Code as a one-shot command — ask a question, get an answer, and return to your shell. Perfect for quick lookups, scripting, piping output, and integrating Claude into shell workflows without starting a full interactive session.
Ask Claude to read your route files and generate an importable Postman or Insomnia collection — complete with example payloads inferred from your validation rules.
Install the official iMessage plugin with one command to interact with Claude Code directly from your Mac's Messages app — a full Claude Code channel without opening a terminal.
Define your project's domain terms in CLAUDE.md — what a "tenant" means vs a "user", what "settlement" refers to in your billing system — so Claude uses the correct vocabulary in code, variable names, comments, and explanations every time.
When a page takes five seconds to load or an API endpoint times out under load, tell Claude which route is slow and it traces the entire code path — controller, services, queries, loops — identifying N+1 queries, redundant computations, missing indexes, and cacheable operations, then fixes each bottleneck.
Paste raw API JSON and ask Claude to derive fully typed TypeScript interfaces — no more writing them by hand.
Describe what your Artisan command should do and let Claude generate the full class, scheduler registration, and Pest tests to go with it.
Instead of reading docs and editing config files manually, ask Claude Code to configure your entire shell, plugins, and prompt in one go.
Describe your backend logic and let Claude scaffold Next.js Server Actions or Route Handlers with TypeScript types, Zod validation, and proper error handling.
Let Claude wire up a Server-Sent Events endpoint with heartbeats, clean disconnect handling, and a matching EventSource client — the right tool for one-way real-time streams.
Paste a GitHub issue URL into Claude Code and it reads the issue title, description, labels, and comments — then explores your codebase to find the relevant code and implements the fix, complete with tests, matching your project's conventions.
Hand-maintained API docs always drift from reality. Tell Claude to read your routes, controllers, validation rules, and response shapes, then generate an OpenAPI specification that matches what the code actually does — accurate paths, parameters, request bodies, response schemas, and status codes.
Use prompt hooks to evaluate tool calls with an LLM instead of bash scripts, describing your safety policies in plain English rather than brittle regex patterns.
Ask Claude to audit your UI components for WCAG accessibility issues — it catches semantic problems, missing ARIA attributes, and keyboard navigation gaps that automated tools miss.
Add a "Bad Patterns" section to your CLAUDE.md with real examples of code you don't want — explicit negative constraints cut rejected suggestions far more effectively than positive rules alone.
The local scope in Claude Code settings lets each developer have their own overrides — different default models, personal MCP servers, or custom allowed tools — without conflicting with the shared project settings or cluttering git history.
When you're stuck on a bug, tell Claude what you've already attempted — "I tried clearing the cache, restarting the queue worker, and checking the env file" — so it skips the obvious suggestions and goes straight to the less obvious causes you haven't considered.
Give Claude a clear product brief and let it scaffold a working full-stack MVP — backend, frontend, and dev tooling — in a single session.
Ask Claude to analyse your repo structure and git history, then generate a CODEOWNERS file that automatically requests the right reviewers whenever specific files change.
Instead of waiting for @claude mentions, configure the Claude GitHub Actions workflow to run automatically when a PR opens — so every PR gets reviewed without anyone having to remember to ask.
Add a short persona description to your CLAUDE.md to control how Claude communicates — terse one-liners vs detailed explanations, formal vs casual tone, or domain-specific vocabulary — so every response matches how your team actually talks.
Tell Claude to scan your README, docs, comments, and config files for URLs and verify they still work — it finds 404s, redirects to deprecated pages, and outdated references, then updates them or flags the ones it can't resolve.
Regex is powerful but painful to write and debug. Describe what you want to match in plain English — "extract the domain from an email address" or "match dates in DD/MM/YYYY format" — and Claude writes the pattern, explains each part, and tests it against your examples.
The /doctor command validates your API key, model access, and tool availability in one shot — run it first when things go wrong.
Ask Claude to add a rule to CLAUDE.md whenever you correct it, so the same mistake never happens twice.
Describe the functionality you want to share across Nuxt apps and let Claude generate a properly structured Nuxt 3 module with composables, plugins, and auto-imports.
Stop staring at a blank commit message wondering how to summarize your changes. Tell Claude to read the staged diff and write a clear, conventional commit message — it understands the intent behind the code changes and writes a message that future you will thank you for.
Instead of describing what went wrong, paste the raw test output into Claude Code — it reads assertion errors, expected vs actual values, and stack traces, then navigates to the source and fixes the issue in one go.
Describe your infrastructure in plain English — "I need a VPC with public and private subnets, an RDS instance, and an ECS cluster" — and Claude writes the Terraform HCL, checks for common misconfigurations, and explains the resource dependencies.
Tell Claude to search your codebase for every environment variable reference, then generate a documentation table — variable name, where it's used, what it controls, whether it's required, and what the default is — so new developers know what to configure.
When Claude needs to implement something from a library or API it might not know well, paste the documentation URL — Claude fetches and reads the page, then writes code that follows the actual docs instead of guessing from training data that might be outdated.
Instead of writing a CLAUDE.md from scratch, run /init and let Claude analyze your project — it reads your directory structure, package files, config, and conventions, then generates a tailored CLAUDE.md with the right commands, architecture notes, and coding standards already filled in.
Give Claude live access to the web by connecting the Brave Search MCP server — no more answers that stop at its training cutoff.
The /add-dir command lets you expand Claude's file access to additional directories mid-session — essential for monorepos and shared libraries.
Claude Code Review installs as a GitHub App and dispatches a team of AI agents on every PR to catch bugs with inline comments before they hit your codebase.
Run Claude Code's initialization hooks and exit immediately, reusing your hook infrastructure for CI setup and environment preparation without starting a session.
No need to type /plan — Shift+Tab instantly toggles between plan mode and execution mode mid-conversation.
Use /model to swap between Opus, Sonnet, and Haiku mid-conversation — match the model's power to the task's complexity.
Stop updating CHANGELOG.md by hand — pipe your git log to Claude and get a properly formatted Keep a Changelog entry appended in seconds.
Paste any cryptic regex and ask Claude to explain it in plain English and rewrite it with verbose inline comments — so you understand it when you need to change it.
Claude Code's full codebase context makes it a powerful writing partner for strategy docs, product specs, and meeting notes -- the plans it produces reference your actual technical constraints, not generic boilerplate.
claude --help and its subcommand variants give you a full reference for every flag and option without opening a browser — useful when you're in the middle of a script or a flow state.
Before asking Claude to scaffold a new feature, point it at your existing code first — it will match your naming, structure, error handling, and test patterns exactly rather than defaulting to framework boilerplate.
Describe what you want your CI pipeline to do in plain English and let Claude write the full YAML — no more fumbling with Actions syntax.
Install the laravel-best-practices Boost skill to equip your AI agent with 100+ curated Laravel conventions, so it generates idiomatic code by default.
Scaffold a complete Chrome extension with Manifest V3, TypeScript, Vite bundling, content scripts, and background workers from a single prompt.
Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.
The /btw command lets you ask quick side questions that are answered immediately but never added to the conversation history.
Claude Code's input supports multiline prompts — press Enter to start a new line without sending. Structure complex prompts with line breaks for readability, paste multi-paragraph instructions, or write detailed specs that Claude can follow step by step.
In CI environments where no human is present to approve tool calls, --dangerously-skip-permissions lets Claude Code run without any permission prompts — use it only in sandboxed, throwaway environments.
When you close a Claude Code session and realize you need to keep going, launch with --continue (or -c) to resume the last conversation with full context — no need to re-explain what you were working on.
Long sessions eat into your context window — /compact lets Claude summarise the conversation and continue with a lighter footprint.
Generate complete SEO meta tags, OpenGraph properties, and Twitter Card markup for all your pages using a reusable helper Claude builds from your routes.
Bruno is the open-source, Git-friendly alternative to Postman — collections live as plain files in your repo, not locked in the cloud. Claude can generate a full collection directly from your route definitions.
When you need to transform existing data — backfill a new column, clean up inconsistent formats, merge duplicate records, or split a field into parts — describe the transformation in English and Claude writes a safe, reversible migration script.
Flaky tests are maddening — they pass locally, fail in CI, pass again when you retry. Tell Claude to read the test, identify the source of non-determinism — timing issues, shared state, date dependencies, or order-dependent setup — and fix the root cause so the test is reliably green or reliably red.
Scaffold a full Node.js CLI tool with Commander.js, including subcommands, flags, interactive prompts, and coloured output — all from a single prompt.
Point Claude Code at a script that returns a fresh API key from your vault, so you never hardcode credentials again.
When your app throws an error, don't just Google the message — paste the full stack trace into Claude Code. It reads the trace, opens the referenced files in your codebase, follows the call chain, and pinpoints the actual root cause instead of just explaining the symptom.
Instead of piecing together a CI pipeline from Stack Overflow snippets, tell Claude to read your project and generate a GitHub Actions workflow that actually matches your stack — the right language version, your real test commands, proper caching, and the services your tests depend on.
Before refactoring code that looks wrong or unnecessary, tell Claude to check git blame and the commit history to understand why it was written that way. What looks like a bug might be a deliberate workaround — and Claude can find the original commit message that explains the reasoning before you accidentally undo it.
Claude Code channels let you message a running session from Discord or Telegram, so you can check progress and give instructions from your phone while Claude works on your local files.
Tell Claude to read your routes, controllers, request validation, and response structures, then generate a complete OpenAPI (Swagger) specification — every endpoint, parameter, request body, response shape, and auth requirement, derived from the code itself.
Tell Claude to read your backend code and find performance problems — O(n²) loops hidden in simple-looking functions, N+1 database queries, redundant API calls, missing pagination, and expensive operations inside request handlers that should be queued.
Tell Claude to add feature flag checks around new or risky code — it reads your feature flag library or creates a simple one, wraps the feature with toggle logic, adds the flag to your config, and preserves the old code path so you can roll back instantly.
Describe your task and let Claude generate a properly formatted branch name — feat/add-user-search, fix/checkout-race-condition, refactor/auth-middleware — following your team's naming convention without you having to think about the format.
Set --max-turns to cap how many tool-use steps Claude takes before stopping and waiting for your input — useful when you want autonomous work within a boundary, not an unbounded run that changes 50 files before you can review.
Let Claude generate battle-tested HTML email templates with inline styles, table layouts, and Outlook-compatible markup that renders correctly everywhere.
Send POST requests to external services on every tool call using HTTP hooks, with header authentication and the ability to block actions from a remote endpoint.
The /loop command repeats a prompt or slash command on a schedule while your session is active — perfect for polling builds, monitoring logs, or checking deploy status.
If you're halfway through typing a prompt and want to scrap it, press Ctrl+C to clear the input and start fresh — no need to select-all and delete. Different from Escape, which interrupts Claude's response after you've already sent.
Instead of writing CLAUDE.md from scratch, run /init and let Claude read your project structure, dependencies, and conventions to generate a starter file — pre-filled with the right commands, patterns, and rules for your specific stack.
Add "run the tests after each change" to your prompt and Claude shifts into an edit-test-fix loop — make a change, run the suite, fix any failures immediately, then move to the next change. Regressions get caught at the smallest possible scope instead of piling up.
Claude Code isn't just a CLI — it's also an SDK you can import into your own scripts and tools. Build custom agents that read code, make edits, and run commands programmatically, creating AI-powered workflows tailored to your team's exact needs.
Pass --system-prompt to give Claude Code a temporary instruction set for a single session — act as a security reviewer, a database expert, or a strict code reviewer — without modifying your CLAUDE.md or project settings.
Bloated Docker images slow CI, increase attack surface, and cost money — paste your Dockerfile and ask Claude to audit it for quick wins.
Instead of copying a generic Dockerfile and tweaking it for an hour, tell Claude to read your project — the package files, config, build scripts, and runtime requirements — and generate a production-ready Dockerfile that's actually tailored to what your app needs.
Install Claude Code globally with npm, then run it from any project directory — the CLI is where the full power of piping, hooks, and scripting lives.
CLAUDE.md loads into every message. Move workflow-specific instructions into skills that load on demand to reduce token costs across your session.
When you hit a bug in Claude Code itself — a tool that fails, a wrong edit, or unexpected behavior — type /bug to file a report without leaving your session. It captures the context automatically so the team can reproduce and fix it.
When you need to port code from one language to another — a Python script to JavaScript, a Bash utility to PHP, or a Ruby service to Go — Claude translates the logic while rewriting it idiomatically for the target language, using its conventions, libraries, and patterns instead of a line-by-line copy.
Ask Claude Code to generate draw.io XML and paste it straight into diagrams.net for a quick, editable architecture overview.
Let Claude write custom Vite plugins with the right Rollup hooks, HMR support, and TypeScript declarations — without spelunking through the plugin API docs yourself.
Tell Claude to read your queries, ORM calls, and WHERE clauses, then suggest which database indexes to add — it identifies missing indexes that would speed up slow queries, flags redundant indexes wasting write performance, and generates the migration to add them.
Ask Claude to write JSDoc, PHPDoc, or docstrings for your functions as you go — consistent documentation without the context-switching.
Replace Claude Code's entire default system prompt with your own custom instructions, turning it into a specialised tool for reviews, audits, or migrations.
Cloudflare Workers run at the edge with zero cold starts — but setting up routing, environment bindings, and TypeScript types still takes more than a few minutes. Let Claude scaffold it.
When you find code that doesn't make sense, ask Claude to run git blame and read the commit messages — it connects the what with the why by tracing who changed it, when, and what problem they were solving.
Describe the data you need in plain English and Claude writes the query — but unlike a generic chatbot, it reads your migrations, models, and schema files to get the exact table names, column types, and relationships right.
When Claude needs context from a sibling repo, shared library, or documentation folder that lives outside your working directory, pass --add-dir to include it — Claude can read those files alongside your project without switching directories.
Tell Claude to scan your codebase — indentation style, line endings, trailing whitespace, final newlines — and generate an .editorconfig file that matches what's already there, so every editor in your team formats consistently without anyone arguing about tabs vs spaces.
The -p flag turns Claude into a non-interactive shell tool — pipe in any command output and get an instant analysis without opening a session.
When an MCP server misbehaves, /mcp gives you a live view of every connected server, its status, and the tools it's exposing — right inside your session.
Fat controllers are where good architecture goes to die — paste yours into Claude and ask it to extract the business logic into a proper service layer.
Got untested legacy code? Claude can write tests around the existing behaviour as-is — no refactoring required first.
Tell Claude your project layout and preferences — grouping strategy, schedules, PR limits, assignees — and it'll write a Dependabot config that keeps your dependencies fresh without drowning you in PRs.
Describe the job your Symfony command should do and get back a fully wired console command with argument definitions, progress bars, and styled output.
Astro ships zero JavaScript by default — perfect for content-heavy sites. But wiring up content collections, layouts, and dynamic routes still takes time. Let Claude do the scaffolding.
Using voice dictation to write Claude Code prompts is faster than typing and removes the keyboard bottleneck between your idea and the terminal.
Asking Claude to diagnose before fixing leads to better solutions — you'll catch the root cause instead of papering over symptoms.
Drop a Markdown file into .claude/commands/ and it becomes a slash command — no config, no code, just a prompt in a file that your whole team can share.
Tell Claude to find magic numbers, hardcoded URLs, string literals, and inline thresholds scattered through your code, then extract them into a central config file — making your app configurable without changing code.
Tell Claude to scan your codebase for copy-pasted logic — similar functions, repeated patterns, and near-identical code blocks — then extract the shared parts into reusable functions, components, or utilities while updating all the call sites.
Tell Claude what data you need — "all users who signed up this month but haven't made a purchase" — and it reads your schema, understands the relationships, and writes the query in your framework's query builder or raw SQL, with the right joins, conditions, and aggregations.
Feed your PRD into Taskmaster to get a structured task list before writing any code — then work through it with Claude one task at a time.
Attach a FileChanged hook to your .envrc or .env file so Claude Code automatically reloads your environment variables the moment it edits them.
Setting up Turborepo from scratch means juggling workspaces, pipeline configs, and shared packages. Claude can scaffold the whole thing in one prompt.
Give Claude a PR number or URL and ask it to review the changes — it fetches the diff, reads the affected files in full, and gives you a thorough code review without leaving your terminal.
Describe your data access patterns and let Claude decide what to cache, for how long, and how to invalidate it properly.
Paste a Vue component packed with inline data-fetching logic and ask Claude to extract it into a typed Pinia store — it handles the refactor, updates the component, and writes the Vitest tests.
Route Claude Code's permission prompts to a custom MCP tool in CI, so automated runs get programmatic approval instead of blanket allow-all or fail-on-prompt.
Every event emitted while processing a single prompt shares a prompt.id UUID, letting you trace the complete chain of API calls and tool executions.
When npm install, composer update, or pip install fails with version conflicts — paste the error and Claude reads your dependency tree, identifies the incompatible versions, and tells you exactly which version constraints to change to make everything resolve.
Point Claude at code that assumes everything works perfectly and it adds the error handling you skipped — try/catch blocks, null checks, timeout handling, graceful degradation, and user-friendly error messages for every failure mode the happy path ignores.
When you need a new feature that follows the same structure as one you already built — a new CRUD, a new API resource, a new admin panel section — point Claude at the existing one and say "build another like this for Products." Claude reads every file involved and replicates the full pattern with correct names, relationships, and wiring.
CORS errors are cryptic and inconsistent across browsers — paste your headers and config and let Claude pinpoint exactly what's wrong.
Describe your async processing requirements and let Claude write the complete queued job class, retry logic, event dispatching, and Pest tests — without the boilerplate grind.
The cleanupPeriodDays setting controls how long session transcripts are kept, or set it to 0 to disable persistence entirely.
Front-load your requirements, limitations, and preferences before describing the task — "use Pest not PHPUnit, no mocks, must work with PHP 8.3" — so Claude builds the right thing from the start instead of you correcting it after.
The $ARGUMENTS placeholder in custom slash command files turns a static prompt into a reusable tool — pass different values each time you invoke it, just like a function that takes arguments.
Tell Claude to instrument your functions with structured logging, performance timing, and error tracking — it reads the business logic, identifies the key decision points, and adds observability without touching what the code actually does.
Pipe your git diff or config files to Claude to catch hardcoded API keys, passwords, and tokens before they ever reach your remote repository.
Claude Code can automatically save notes about your project across sessions — build commands, debugging insights, and your corrections — without you writing a single line of CLAUDE.md.
Pipe your git log between two tags to Claude and get polished, user-facing release notes for GitHub Releases or a blog post — not just a list of commits.
The --channels flag lets MCP channel servers forward Claude's permission prompts to your phone, so long-running sessions don't stall while you're away from the keyboard.
The --bare flag skips CLAUDE.md, hooks, skills, plugins, and MCP servers at startup, giving you a minimal, fast Claude Code invocation ideal for CI pipelines and scripted tasks.
Convert your existing REST API routes into fully typed tRPC procedures with Zod validation — Claude reads your handlers and generates the routers.
Define exactly which built-in tools Claude can access in a session, from full capabilities down to read-only or even no tools at all.
Configure ~/.claude/keybindings.json to disable Enter from sending your prompt — use Ctrl+X then Enter instead to prevent accidental mid-thought submissions.
Point Claude at untyped files and ask it to add type annotations — it infers types from usage patterns, function signatures, and call sites across your codebase, then adds TypeScript types, Python hints, or PHPDoc blocks in place.
Tell Claude to scan your codebase for dead code — unused functions, orphaned files, unreachable branches, imports with no references, and config for features that were removed — then safely delete what's confirmed dead so your project stays lean.
When you need to share sample data, create test fixtures, or debug with production-like records, tell Claude to sanitize the data — replacing real names, emails, phone numbers, and IDs with realistic fakes while keeping the structure, relationships, and data types intact.
Describe your tech stack and let Claude write a comprehensive .gitignore — no more accidental commits of build caches, editor files, or .env secrets.
Configure your editor to autosave every 500ms so Claude Code picks up your edits from the filesystem almost in real time.
Paste your Options API component and ask Claude to rewrite it with script setup syntax — it handles emits, watchers, lifecycle hooks, and composable extraction automatically.
Set your preferred model once in settings.json rather than passing --model on every command — and use availableModels to restrict model choice for teams and cost control.
Scaffold a custom MCP server with Claude to give it direct access to your internal APIs, dashboards, and microservices.
Claude Code accepts images from any clipboard source — screenshots, Slack messages, browser windows, and design mockups all paste directly into your prompt.
Migrate JavaScript to TypeScript one file at a time with Claude — set up allowJs, convert leaf modules first, then tighten strict mode when you're ready.
Claude Code can see images — paste a screenshot of a broken layout, a weird rendering glitch, or a design mockup directly into the prompt and Claude will diagnose the issue from the pixels.
In CI pipelines and trusted automation environments where no human is available to approve tool calls, pass --dangerously-skip-permissions so Claude Code runs fully autonomously — reading, writing, and executing without permission prompts. Only use this in environments you control.
Use headless mode to automate code reviews, generate changelogs, and enforce standards in your CI pipeline.
Scan your source files for hardcoded strings and let Claude generate complete locale files — keys, structure, and all.
Undocumented code is technical debt waiting to bite you. Ask Claude to bulk-generate accurate docblocks for your entire codebase in one sweep.
When your API spec changes, ask Claude to diff two versions and produce a structured changelog that separates breaking changes, deprecations, and new additions in developer-friendly language.
Claude Code exits 0 on success and non-zero on failure — use standard shell patterns like &&, ||, and $? to build reliable automation that handles errors gracefully.
The AWS CDK lets you define cloud infrastructure in real code, but the API surface is enormous. Describe what you need in plain English and let Claude translate it into a deployable stack.
Pass your first prompt directly on the command line with -p so Claude starts working the moment the session opens — no waiting for the UI, no typing, just instant execution of your task from a terminal command or script.
When your Claude Code session gets long and responses slow down, run /compact to summarize the conversation history and free up context window space — keeping your session alive without losing important context.
Tell Claude about the git commands you type most often — viewing logs a certain way, checking out PRs, cleaning up branches — and it creates git aliases that turn multi-flag commands into short, memorable shortcuts you'll actually use every day.
Feed your application logs to Claude via stdin and get an instant summary of errors, anomalies, and patterns worth investigating.
Paste your bundle analysis output and Claude will identify the biggest wins — duplicate dependencies, oversized imports, and code-splitting opportunities.
Claude Code's JSON output includes cost_usd and duration_ms metadata — pipe it through jq to log spending per run and catch runaway automation before it gets expensive.
Tell Claude to read your toolchain and create well-organized package.json or composer.json scripts — properly chained build pipelines, consistent naming, helpful descriptions, and shortcuts for common workflows so your team always knows which command to run.
Hand-crafting fake data for development is tedious — describe your models and let Claude write a realistic seeder in seconds.
Get a full Changesets release pipeline configured in your monorepo — including GitHub Actions workflows for version PRs and npm publishing — with one prompt.
The Claude Code desktop app gives you a dedicated, always-available window on Mac or Windows — same tools and CLAUDE.md as the CLI, but it won't disappear when you close your terminal tabs or restart your shell.
Claude Code can search the web and fetch documentation pages — when you're working with a new library, an obscure error, or an API that shipped after Claude's training data, tell it to look it up instead of guessing.
Instead of hunting for JSON settings files, use `claude config` to list, read, and modify your Claude Code configuration from the command line — across all three scopes (local, project, user) without opening a single file.
Claude Code can see images — paste a screenshot of a broken UI, a confusing error dialog, terminal output, or a design mockup and Claude reads it visually, understands the context, and helps you fix the problem or implement the design without you having to transcribe anything.
Before deploying, tell Claude to scan your code for security issues — SQL injection, XSS, CSRF gaps, insecure defaults, hardcoded secrets, broken auth, and mass assignment risks. Claude reads your actual code, not just patterns, so it finds vulnerabilities that generic scanners miss.
Paste a sluggish query and Claude will explain what's wrong, suggest indexes, and rewrite it — no DBA required.
Tell Claude what the code should do before it exists — it writes the failing test first, then implements the minimum code to make it pass, then refactors. True test-driven development where the test defines the contract and the implementation follows.
Ask Claude to scan your package.json and flag dependencies worth updating, explaining why each one matters before you blindly run npm update.
Don't wait until your context window is nearly full -- run /compact at around 60% while Claude still has full visibility over the session.
Claude Code's auto-fix feature monitors your PRs in the cloud, fixing CI failures and addressing review comments automatically so you can walk away and come back to a green PR.
Tell Claude to read your application's dependencies, runtime, build steps, and config, then generate a Dockerfile that matches — multi-stage builds, proper layer caching, non-root user, and only the files your app actually needs, all derived from the project itself.
Paste a PR URL or diff into Claude Code and it reviews the changes like a senior developer — checking for bugs, edge cases, security issues, naming, test coverage, and adherence to project conventions — then gives structured feedback organized by severity.
MCP servers aren't just for third-party integrations — you can build your own to give Claude direct access to your internal tools, databases, APIs, and workflows. A custom MCP server turns any system your team uses into a tool Claude can call natively from your session.
Give Claude your error message and stack trace with the prompt "trace this error backward" to get a root-cause analysis that walks the full call chain.
Tell Claude to read how your code calls external APIs, then generate mock responses that match the real shape — so you can develop and test without hitting rate limits, requiring API keys, or depending on services being online.
Claude Code ships updates frequently — new features, performance improvements, bug fixes, and model upgrades. Run claude update regularly to get the latest version, or check what's new with claude --version to see if you're behind.
Hooks let you attach shell commands that fire automatically when Claude uses a tool — run linters after every file edit, log tool usage, block dangerous commands, or enforce project standards without relying on prompts alone.
Ask Claude to read your migrations and output a Mermaid ER diagram — it renders natively in GitHub, Notion, and most wikis with zero extra tooling.
Use /rename to give any session a meaningful name mid-conversation — it updates the terminal title immediately and makes the session easy to find in the resume picker later.
Optimistic updates make your UI feel instant — the component updates before the server confirms, then rolls back on error. Getting this right without a library is tricky. Claude handles it cleanly.
Paste your controllers or service methods and ask Claude to spot N+1 query problems and fix them with proper eager loading.
When a Python script is slow, the bottleneck is rarely where you expect. Instead of guessing, run a profiler and paste the output to Claude — it reads the numbers and tells you exactly what to fix.
After an outage, give Claude the timestamp range and ask it to pull together a timeline — git commits, config changes, deployment events, and log entries — so your postmortem starts with a clear picture of what happened and when.
When you're stuck, explain the problem to Claude the way you'd explain it to a colleague — Claude asks the clarifying questions a good pair partner would, reads the code you're talking about, and often leads you to the answer you already had buried in your head.
When you're integrating with a third-party API — Stripe, Twilio, SendGrid, or any REST service — tell Claude to build a clean client wrapper with typed methods, error handling, retries, and response mapping, so the rest of your code never touches raw HTTP calls.
Flip the usual workflow: write a failing test that describes exactly what you want, then tell Claude to make it pass. The test becomes your specification — Claude reads it, understands the expected behavior, and writes the implementation that satisfies it. Test-driven development, powered by AI.
Describe your cross-cutting concern — rate limiting, API versioning, request logging, auth checks — and Claude generates the full middleware class, registers it in the correct group, and writes Pest tests to cover it.
Split your project rules across multiple files in .claude/rules/ and scope each one to load only for matching file paths — keeping Claude's context lean and relevant.
Tell Claude which endpoints need protection and it reads your framework's middleware patterns to add rate limiting, response caching, and cache headers — configured per-route based on the endpoint's sensitivity and expected traffic.
The --max-budget-usd flag sets a hard spending limit on print-mode runs, stopping Claude Code when the cap is hit so automated workflows never go over budget unexpectedly.
When you need to cherry-pick across branches, squash a messy history, bisect for a regression, or rewrite commits — describe what you want in plain English and Claude figures out the right sequence of git commands, explains the risks, and runs them safely.
When it's time to cut a release, tell Claude to read your git log since the last tag and generate a human-readable changelog — organized by category (features, fixes, breaking changes), with clear descriptions that make sense to users, not just developers who read the commits.
Describe your full stack in plain English and Claude will write a production-ready docker-compose.yml with all services wired up correctly.
Describe your stack and build requirements and let Claude write a proper vite.config.ts — path aliases, dev proxies, chunk splitting, source maps, and tree-shaking all configured correctly.
Instead of hand-editing settings.json, use `claude config` to get, set, list, and delete configuration values from the command line.
When a long session accumulates baggage from failed attempts or abandoned approaches, /clear wipes the conversation history so Claude can focus on the current task without old noise.
Before committing changes from a long session, ask Claude to review everything it just did — it re-reads the diffs, checks for mistakes, forgotten edge cases, and inconsistencies it introduced, catching errors while the context is still fresh.
When API docs give you a working cURL example, paste it into Claude and it converts it into proper code for your language — a typed HTTP request with headers, authentication, request body, response parsing, and error handling, ready to drop into your codebase instead of shelling out to curl.
Paste your TypeScript interfaces and ask Claude to generate matching Zod schemas with sensible validators — not just bare type mappings.
The v1 release of Claude Code GitHub Actions consolidates model, max_turns, and other options into a single claude_args parameter that accepts any CLI flag.
When you find code using a pattern you don't recognize — a design pattern, a framework idiom, or a clever technique — ask Claude to explain what it does, why it was chosen, and when you'd use it yourself. It reads the actual implementation to give a concrete explanation, not a textbook one.
Tell Claude to create a startup validation script that checks every requirement before your app runs — missing env vars, unreachable databases, wrong PHP/Node versions, missing extensions, and invalid config — so you get clear errors at boot instead of cryptic failures at runtime.
Configure MCP servers at user scope for cross-project tools and project scope for repo-specific connections — both configs merge at runtime.
ADRs document why you made a technical choice. Claude can write them after you explain the trade-offs — keeping your decision history intact.
Pass --max-turns via claude_args in your GitHub Actions workflow to cap how many iterations Claude runs — saving both GitHub minutes and API token costs.
When Claude is mid-response and you realize it's going down the wrong path — wrong approach, wrong file, or misunderstanding the task — press Escape to interrupt immediately. You keep everything so far and can redirect without waiting for it to finish.
Open multiple terminal tabs and run separate Claude Code sessions simultaneously — one fixing tests, another writing docs, another refactoring a module — each working independently so you get three tasks done in the time of one.
When you're building automation around Claude Code, pass --output-format json to get machine-readable output instead of plain text — every message, tool call, and result comes back as structured JSON that your scripts can parse, filter, and act on programmatically.
Lock Claude down to a specific set of tools when running automated tasks — no file writes, no shell execution, just the tools you trust for that job.
FastAPI's async-first design and automatic docs are great — but the boilerplate for JWT auth, schemas, and routing still slows you down. Let Claude bootstrap the whole thing.
Scaffold a typed, multi-runtime Hono API with middleware, Zod validation, and the right adapter for your deployment target — in one prompt.
Tell Claude to read your database schema and models, then add input validation to your API endpoints and forms — column types become type checks, NOT NULL becomes required, string lengths become max rules, and foreign keys become exists checks, all derived from the actual constraints.
When Claude starts referencing files you've since deleted, remembering old code you've already changed, or getting confused by contradictory instructions from a long session — type /clear to wipe the slate clean. Unlike /compact which preserves context, /clear gives you a true fresh start without restarting the CLI.
Instead of describing what code should do, show Claude what it should produce — paste the expected JSON response, HTML output, CLI table, or email template and Claude works backwards to write the code that generates it. The output IS the spec, and there's no room for misinterpretation.
Plan mode lets Claude research and design an approach before writing any code.
When hitting an error, paste the full stack trace — Claude Code can pinpoint the issue instantly.
Describe the interactive behaviour you want and let Claude generate a clean Alpine.js component with the right x-data, x-bind, and x-on directives.
Unlike --system-prompt which replaces everything, --append-system-prompt layers additional instructions on top of your existing CLAUDE.md and default system prompt. Keep all your project context and just add a temporary constraint or focus area for one session.
--output-format stream-json emits newline-delimited JSON events as Claude works — perfect for real-time processing, cost logging, and building tooling around Claude Code.
Paste your API routes and ask Claude to generate complete MSW 2.x handlers with realistic payloads and error variants — no more hand-crafting mocks.
Pulumi lets you write infrastructure as real TypeScript — describe what you need and Claude can generate fully-typed Pulumi stacks using loops, conditionals, and reusable component abstractions that HCL can't express.
Use worktree.symlinkDirectories and worktree.sparsePaths to avoid duplicating large directories and speed up worktree creation in monorepos.
Joining a new team or inheriting a project? Instead of spending days reading code file by file, ask Claude to explore the codebase and give you a guided tour — the architecture, key files, how requests flow through the system, where the business logic lives, and what conventions the team follows.
After Claude makes changes to your code, ask it to explain what it did and why it made specific choices. This turns every coding task into a learning opportunity — you understand the reasoning behind the approach, learn patterns you can apply yourself, and catch any decisions you disagree with before moving on.
The ANTHROPIC_MODEL environment variable sets your preferred model globally — no more passing --model on every command.
Start every Claude Code session on the right model — use --model at launch so you're not paying Opus prices for Sonnet-level work from the first prompt.
Create Markdown files in ~/.claude/output-styles to give Claude a completely custom persona and behaviour, replacing its default software engineering system prompt.
When Claude adds extra features, refactors surrounding code, creates helper functions you didn't need, or makes your simple bug fix into a full rewrite — tell it to do less. "Only change what I asked for, nothing else" keeps Claude focused on the minimum viable change.
The GitHub MCP server gives Claude Code read/write access to your repos, issues, and PRs — all from the terminal.
Complex prompts are unreadable as escaped single-liners. Use shell HEREDOCs to write clean, structured prompts directly in your scripts.
Give Claude the full picture upfront before it writes any code, so it builds the right thing the first time with fewer correction rounds.
Three environment variables control which attributes are included in Claude Code OTel metrics, letting you manage cardinality and storage costs.
Install the Claude Code VS Code extension and get the full CLI experience embedded in your editor — Claude reads your open files, sees your cursor position, and makes edits directly in the editor tabs you're already working in.
Long sessions eat through your context window as conversation history piles up. Type /compact to summarize the conversation so far and reclaim space — keeping Claude's understanding of what you're working on while freeing up room for more work.
Claude Code isn't just a terminal tool — official extensions for VS Code and JetBrains bring the same Claude Code experience directly into your editor. Get an inline chat panel, see diffs as they happen, and approve changes without leaving the IDE you already live in.
Remove tools entirely from Claude's context with --disallowedTools to enforce hard constraints like read-only analysis.
When you join a new project or inherit unfamiliar code, ask Claude to explore the repo and explain the architecture — it maps the directory structure, identifies key files, traces how requests flow, and gives you the context that no README ever covers.
Set ANTHROPIC_BASE_URL to route Claude Code through a central gateway for cost tracking, usage limits, and compliance — no code changes required.
Wrapping Claude Code in a tmux session on a remote machine means your session survives connection drops, airplane wifi, and closed laptops.
Put example prompts for common tasks directly in your CLAUDE.md — "to add a new API endpoint, say X" — so every developer on the team gets the same quality results without each person figuring out the best way to phrase requests from scratch.
Type /cost at any point to see how many tokens you've used in the current session, how much it's costing, and which operations are consuming the most context — so you can make informed decisions about when to /compact, /clear, or switch models.
When typing feels slow — describing a complex bug, explaining architecture, or thinking through a problem out loud — press Option+V to switch to voice input. Speak naturally and Claude Code transcribes your words into a prompt, so you can describe what you need at the speed of thought.
Claude Code hooks let you run shell commands automatically before or after tool calls.
Describe the change you want in plain English and Claude will write the migration — foreign keys, indexes, enums, and all.
Tell Claude to read your models and database schema, then generate factory definitions and seed data that actually make sense — proper relationships, realistic values, domain-appropriate formats, and edge cases, not random strings and lorem ipsum.
Point Claude at code in one language and tell it to rewrite in another — Python to Go, PHP to JavaScript, Ruby to Rust — and it translates not just the syntax but the idioms, using the target language's patterns, standard library, and conventions instead of a literal word-for-word port.
Paste your API routes or controller methods and ask Claude to audit them for naming inconsistencies, missing conventions, and design smells before they ship.
Every production app needs a health check endpoint for load balancers and container orchestrators — Claude scaffolds a robust one in seconds.
Before closing a long session, ask Claude to write a progress file summarizing what's done, what's in progress, and what's next — so the next session (or a teammate) can pick up exactly where things left off without rereading the whole conversation.
Install the Chrome extension so Claude Code can see, evaluate, and iterate on its own frontend output automatically.
Ask Claude to read your project structure and write a complete CONTRIBUTING.md — setup steps, branching conventions, test instructions, and PR process, all tailored to your actual stack.
Integration tests cover the seams between your code and real dependencies — they're the tests that actually catch production bugs, and Claude writes them fast.
Tell Claude to read your models, migrations, and relationships, then generate factory definitions that produce realistic, interconnected test data — proper names, valid emails, sensible dates, correct foreign keys, and state variations that cover your actual business logic.
Kubernetes YAML is verbose and unforgiving — describe what you need in plain English and let Claude write the manifests.
External API calls fail. Retry logic with exponential backoff is boilerplate most developers put off — hand it to Claude instead and get it done properly.
Start a new Claude Code session for each task rather than running 200-message threads — your context stays cleaner, your output stays consistent, and your rate limits stretch further.
Adding clear completion conditions to your prompts keeps Claude focused and prevents it from stopping too early or going too far.
The /status command shows you everything about your current session in one view — which model you're using, how full your context window is, your working directory, and active configuration — without interrupting your workflow.
Accessibility is important but tedious to retrofit. Tell Claude to scan your templates and components, then add the right ARIA roles, labels, keyboard handlers, focus management, and semantic HTML — making your app usable by screen readers and keyboard-only users without you learning the entire WCAG spec.
Every project has traps — the billing module that silently fails if you forget to queue the job, the legacy table with column names that don't match the model, the config value that must be set before tests run. Document these gotchas in your CLAUDE.md so Claude avoids the same mistakes your team spent days debugging.
Use the Laravel Boost MCP server to give Claude access to version-specific Laravel docs, your database schema, and read-only SQL queries — all without leaving the conversation.
Show Claude a controller with scattered Eloquent calls and ask it to extract a repository — it generates the interface, implementation, service provider binding, and test fake in one shot.
Give Claude your OpenAPI spec and ask for a handcrafted typed API client — clean method names, custom error handling, and TanStack Query hooks, without the ugly auto-gen output.
String together multiple claude -p calls with && to build automated multi-step workflows — lint the code, then run the tests, then generate a changelog, then create the PR — each step running only if the previous one succeeds.
Stack CLAUDE.md files at different directory levels so each part of your monorepo gets the exact context it needs.
While --continue picks up your last session, --resume opens a searchable picker of all recent conversations so you can switch between parallel workstreams instantly.
Tell Claude what data you need — "monthly revenue by product category, excluding refunds, for the last quarter" — and it reads your schema, writes the query with proper joins and aggregations, and explains what each part does so you can verify it's correct.
When you need to rename something — a poorly named function, a confusing variable, or a class that no longer reflects its purpose — Claude finds every reference across the codebase and renames them all consistently, including imports, type hints, comments, config, and tests.
Tell Claude when you want something to run — "every weekday at 9am", "first Monday of each month at midnight", "every 15 minutes during business hours" — and it writes the correct cron expression, explains each field, and verifies it matches what you described.
Closed a session and realized you weren't done? Pass --continue (or -c) when launching Claude Code to pick up exactly where you left off — same context, same files, same conversation history — without re-explaining what you were working on.
Pipe yesterday's git log to Claude and get a clean, human-readable summary of what you actually shipped — perfect for standups.
Ask Claude to write a complete webhook handler — signature verification, idempotency checks, and per-event-type routing — so security is baked in from the start rather than bolted on later.
Stop hand-crafting complex SQL — describe the logic you need and let Claude write the view or stored procedure, complete with a migration file.
Real-time features feel complex but Claude can wire up WebSocket connections, rooms, and broadcast events for your stack faster than reading the docs.
acceptEdits mode auto-approves all file writes and edits while still asking you to confirm bash commands — the sweet spot between default mode and full auto.
Describe your server setup in plain English and let Claude write a complete, idempotent Ansible playbook — modules, handlers, roles, and all the boilerplate you'd otherwise look up.
Get Drizzle ORM configured with migrations, a typed client, and connection pooling from a single prompt — or let Claude translate your existing Prisma schema.
Tell Claude to scan your project for security vulnerabilities — SQL injection, XSS, hardcoded secrets, insecure dependencies, and missing auth checks — and it reads your actual code to produce specific, actionable findings, not generic warnings.
One simple habit that prevents a lot of silent regressions: ask Claude to explain what the code does before touching it.
PHP 8.1 backed enums are cleaner than constants — but scaffolding them with helpers, labels, and Eloquent casts is boilerplate Claude can write instantly.
Prevent cascading failures in distributed systems by asking Claude to wire up a circuit breaker — describe the thresholds and it handles the state machine.
Turn repetitive instructions into reusable skills that persist across sessions and keep Claude consistent without manual reminders.
CLI tools like gh, aws, and gcloud don't add persistent tool definitions to your context, saving tokens compared to equivalent MCP servers.
Set autoMemoryEnabled to false in settings.json to stop Claude Code silently writing memory files, without losing any context already captured.
Instead of describing the logic, show Claude what the result should look like — paste the expected JSON response, the desired CLI output, or the HTML you want — and Claude writes the code that produces exactly that, working backward from examples instead of forward from specs.
Ask Claude to plan the full Jest-to-Vitest migration — it converts mocks, fakes, and spies, updates configs, and flags anything that needs manual attention before you touch a single test file.
Add the Slack MCP server to let Claude post deployment updates, incident alerts, or standup summaries directly to your channels.
Auto mode lets Claude judge which actions are safe to run on your behalf, so long sessions complete without constant approval prompts.
Packages accumulate over time and slow down installs. Claude can analyse your dependency list against your source files and flag the ones that are likely dead weight.
Use Claude to generate a full SvelteKit project structure with routes, layouts, and server-side data loading patterns — ready to run from day one.
Use --fork-session to branch a conversation into a new session, keeping the original intact while exploring alternatives.
Configure hooks in your Claude Code settings so commands run automatically when Claude uses specific tools — lint after every file edit, run tests after code changes, or log every bash command, all without asking Claude to do it.
When you've finished one task and want to start a completely different one, run /clear to reset the conversation — Claude forgets the previous context so stale decisions, old file reads, and irrelevant discussion don't pollute your next task.
When you're stuck on a design decision or debugging a tricky problem, describe your thinking out loud to Claude — it asks clarifying questions, spots flaws in your logic, suggests alternatives you haven't considered, and helps you reach a better answer than either of you would alone.
The --append-system-prompt flag adds your custom rules to the end of Claude's default system prompt without replacing it, giving you extra control without losing built-in capabilities.
Tell Claude to read your code and your existing tests, find what's not covered — untested edge cases, missing error paths, uncovered branches, and entire functions with no tests at all — then write the tests that close the gaps.
When a problem is genuinely hard, the word "ultrathink" pushes Claude to allocate its maximum reasoning budget before responding.
Type /fast to switch Claude Code into faster output mode — same model, faster generation. Perfect for quick lookups, simple edits, and rapid-fire questions where you don't need Claude to think as deeply before responding.
After Claude finishes a task, ask it to list everything that could go wrong before you ship for a free second review that catches edge cases.
Paste your Rust compiler errors into Claude and get a clear explanation of the ownership issue plus a corrected version of your code.
Use claudeMdExcludes in settings.local.json to block CLAUDE.md files from other teams or packages in a monorepo from loading into your Claude context.
Fast mode makes Opus 4.6 respond 2.5x faster at a higher cost per token. Toggle it with /fast for live debugging and rapid iteration.
Keep your context window focused and uncluttered — use subagents for research, .claudeignore to hide noise, and /clear when switching tasks.
Ask Claude to add jest-axe or Playwright accessibility tests alongside your components — so WCAG regressions get caught in CI before they reach users.
Let Claude write your .github templates so contributors always provide the context reviewers actually need.
Explicitly stating what should stay untouched prevents Claude from making unwanted changes to surrounding code.
Point Claude at your error handling code and ask it to rewrite the user-facing messages — turning cryptic "Error 422: Validation failed" into clear, actionable text that tells users what went wrong and how to fix it.
When you find confusing code and want to know why it exists — not just what it does — ask Claude to run git blame, read the commit messages and related changes, and explain the intent behind the code so you know whether it's safe to change.
Writing a plan.md before Claude starts building gives you a persistent checkpoint you can hand to a fresh session to continue exactly where you left off.
Babel plugins let you transform JavaScript AST at build time — stripping debug calls, injecting metadata, enforcing patterns. Writing one from scratch means learning the visitor API. Claude already knows it.
Tell Claude to read your git history between two tags or since the last release, then generate a formatted changelog — features, bug fixes, breaking changes, and improvements, grouped by category with human-readable descriptions, ready for release notes or CHANGELOG.md.
When you tell Claude what to do, also tell it why. "Add rate limiting" is vague — "add rate limiting because our API is getting hammered by a single client causing timeouts for everyone else" gives Claude the context to choose the right approach, scope, and error messages.
Skip the blank page — /init scans your codebase and generates a tailored CLAUDE.md in seconds.
Let Claude configure Nx in your monorepo — dependency graphs, affected builds, caching, and task pipelines — so CI only rebuilds what changed.
Tell Claude to read your codebase and generate Mermaid diagrams — class diagrams, sequence diagrams, ER diagrams, or flowcharts — based on the real code structure, not imagined abstractions. Paste the output into any Mermaid renderer to visualize instantly.
Internationalizing an existing app means finding every hardcoded string in every template, moving it to a translation file, and replacing it with a translation function call. Tell Claude to do it — it scans your views, extracts every user-facing string, and wires up the translation keys automatically.
See exactly what files Claude has loaded, how much context they consume, and whether you're approaching the limit.
Let Claude spawn parallel subagents to tackle multiple tasks simultaneously — like having a team of junior devs on demand.
Pipe your staged diff to Claude and get a clear, detailed PR description in seconds — no more blank PR boxes or one-liners that say "fixes stuff".
Add a single CLAUDE.md rule so Claude automatically pipes output to pbcopy when you need to paste it somewhere else.
Tell Claude to read your Dockerfile, environment variables, port config, and health check endpoints, then generate properly structured Kubernetes deployment, service, and ingress manifests — so your k8s config matches what your app actually needs.
Limit which tools Claude Code can use by setting allowedTools in your project settings or passing --allowedTools on the CLI — restrict to read-only for code reviews, block file writes in CI, or limit to specific MCP tools for safety.
The Filesystem MCP server gives Claude read/write access to whole directories, unlocking bulk file operations, cross-project searches, and codebase-wide audits without copying content into the chat.
Hand Claude your heap snapshots or server code and ask it to trace memory leaks — it spots missing event listener cleanup, unbounded caches, and stream lifecycle bugs that are easy to miss in code review.
Stop passing the same flags every time you launch Claude Code. Use claude config to set your preferred model, permission mode, and other defaults — at user level for personal preferences or project level for team-wide settings that everyone inherits automatically.
Ask Claude Code to commit after each logical step so you always have a safe point to roll back to if things go sideways.
Migrate React class components to functional components with hooks — Claude handles lifecycle methods, state, refs, and HoC replacements automatically.
Use the CLAUDE_CODE_EFFORT_LEVEL environment variable in settings.json to permanently change Claude Code's default reasoning depth, no flag required.
Create reusable slash commands in your project so common prompts like "run tests and fix failures" or "review this file for security issues" become a single /command instead of typing the same instructions every time.
Prefix any shell command with ! in a Claude Code session to run it directly — the output appears in the conversation, giving Claude immediate context without you switching to another terminal or asking Claude to run it for you.
When a teammate's commit or a merge makes changes you don't understand, paste the diff into Claude and ask it to explain — not review for quality, but walk you through what each change does, why it matters, and how the pieces connect.
Tell Claude to read your code and produce Mermaid diagrams — class relationships, request flows, database schemas, state machines, or sequence diagrams — so you can see your architecture visually without drawing anything by hand.
Unit tests mock the database. Real integration tests talk to one. Testcontainers spins up Docker containers on demand — and Claude can wire the whole setup up for you.
Migrate from ESLint and Prettier to Biome in one prompt — Claude reads your existing config, translates custom rules, and wires up your scripts.
Use --max-turns to cap how many tool-use cycles Claude takes in non-interactive mode — prevents runaway automation in CI pipelines and scripts, and exits with a non-zero code when the limit is hit.
Describe your domain and let Claude design an event sourcing implementation with event classes, a store interface, and aggregate reconstruction logic.
Feed your test coverage report to Claude and let it write the missing tests — targeting uncovered branches, edge cases, and error paths.
Combine shell loops with claude --print to apply AI-powered transformations to hundreds of files in one go — add headers, convert formats, or extract data at scale.
The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.
Not sure why Claude is doing what it's doing? --verbose streams every tool call in real time so you can see exactly how it's working through your request.
Let Claude write custom PHPStan and Larastan rules that enforce your team's conventions, complete with AST visitor logic and config registration.
Generate typed, immutable Data Transfer Objects with validation and factory methods for your API endpoints in PHP or TypeScript.
Claude Code can see images — paste a screenshot of a broken layout, a design mockup, or a browser error and Claude reads the visual context alongside your code to pinpoint what's wrong and fix it.
Tell Claude to read your business logic and add log statements at the important decision points — where conditions branch, where external calls happen, and where data transforms — so when something goes wrong in production, the logs tell you exactly where and why.
Claude Code checks credentials in a specific order. A stale ANTHROPIC_API_KEY in your shell can shadow your subscription login without any obvious error.
Add MCP servers to Claude Code so it can directly query your database, search documentation, check monitoring dashboards, or interact with any external service — extending what Claude can do far beyond reading files and running commands.
Every language evolves — callbacks become async/await, class components become hooks, jQuery becomes vanilla JS, and var becomes const. Tell Claude to read your legacy code and upgrade it to modern patterns, one module at a time, while keeping the behavior identical and the tests passing.
Tell Claude to search your code for every environment variable reference and generate a .env.example with safe placeholder values, grouped by service — so new developers know exactly which variables to configure without reading every config file themselves.
Give Claude your API routes and it'll write a complete k6 or Artillery load testing script — thresholds, ramp-up stages, and realistic payloads included.
Ask Claude to write a git bisect test script, then paste the identified bad commit's diff for an instant explanation of what broke and why.
Describe your API endpoint and let Claude generate idiomatic Go handlers with proper error handling, middleware, and JSON responses.
Use --json-schema to get validated, schema-conforming JSON output from Claude Code in automated pipelines.
Helm is the standard package manager for Kubernetes, but writing charts by hand is tedious. Claude can scaffold a complete, production-ready Helm chart from your existing setup in seconds.
Tell Claude to search for all TODO, FIXME, HACK, and XXX comments across your project — it groups them by urgency, identifies which ones are actually blocking, suggests which to fix now vs later, and can resolve the straightforward ones immediately.
When a specific query is slow, run EXPLAIN on it and paste the execution plan into Claude — it reads the plan, spots full table scans, bad join orders, and missing indexes, then rewrites the query and suggests schema changes to make it fast.
Instead of memorizing migration syntax, describe the schema change you need — "add a nullable published_at timestamp to the posts table" or "create a many-to-many relationship between users and roles" — and Claude writes the complete migration file using your framework's conventions.
API versioning keeps old clients working while you evolve your interface — Claude scaffolds the routing structure and deprecation headers in one prompt.
When you need to make the same edit to dozens of files — update a copyright header, change an import path, add a license notice, or swap a deprecated function call — describe the change once and let Claude apply it everywhere with full context awareness.
Tell Claude to read your project's test runner, linter, build tools, and deployment target, then generate a GitHub Actions workflow that actually matches your stack — not a generic template, but a pipeline built from what your project uses.
Instead of manually editing settings JSON to add MCP servers, use the claude mcp command — add servers with one line, list what's configured, remove ones you don't need, and scope them to the right level, all from the terminal.
When you hit a merge conflict, don't guess which side to keep — ask Claude to read both versions, understand the intent behind each change, and produce the correct merge that preserves both developers' work without breaking the logic.
Point Claude at untyped code and tell it to add types — TypeScript annotations to JavaScript, type hints to Python, PHPDoc blocks to PHP, or generics to Java. Claude reads the actual usage, infers the correct types from context, and adds them without changing any behavior.
A CLAUDE.md file at the root of your project gives Claude Code persistent context about your codebase.
Every time you correct Claude or agree on a preference, capture it in CLAUDE.md — it becomes the persistent memory that carries across every future session.
Configure permission rules so Claude can run common commands without asking every time — and keep guardrails on anything destructive.
Scaffold single-database or database-per-tenant multi-tenancy in Laravel with global scopes, middleware, queue context, and tenant-aware caching.
Set a backup model with --fallback-model so automated tasks survive temporary model overloads without failing.
Ask Claude to stash your work-in-progress with a meaningful description, list your stashes with summaries of what each contains, and apply the right one later — no more guessing which stash@{3} has your half-finished feature.
Stop wrestling with regex syntax — describe the pattern you want in plain English and Claude writes the expression, explains every part, and tests it against your sample data so you know it works before you paste it into production code.
Tell Claude about a manual task you do repeatedly — deploying, backing up a database, cleaning up old files, syncing environments — and it writes a shell script that automates the whole workflow, with proper error handling, logging, and safety checks built in.
Soft deletes let you recover accidentally deleted records and maintain audit trails — Claude handles the migration, model changes, and query scoping in one shot.
The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.
Two built-in output styles turn Claude Code into a coding tutor: Explanatory adds insights alongside your work, Learning adds TODO(human) markers for you to implement yourself.
Describe your user journeys in plain English and let Claude write the full E2E test suite — beats staring at Playwright docs for an hour.
Paste your webpack.config.js into Claude and get a working vite.config.ts back, with notes on any plugins, aliases, or environment variable handling that needs updating.
Tell Claude to read your API response classes, TypeScript interfaces, or actual response data and generate JSON Schema definitions — for API documentation, contract testing, runtime validation, and keeping frontend and backend types in sync.
Paste deeply nested if/else blocks and ask Claude to refactor them into flat guard clauses — same behaviour, dramatically easier to read.
The env key in settings.json injects environment variables into every Claude Code session, so you can set NODE_ENV, database URLs, or telemetry config without touching your shell profile.
Start a Claude Code session in your terminal and continue it on the web, or pull a web session into your local terminal with --remote and --teleport.
Claude Code runs on 5-hour rolling windows that start from your first message — send a lightweight wakeup message at 6am to unlock three windows per day instead of two.
Tell Claude to read your routes file and write a smoke test that visits every endpoint — just checking that nothing returns a 500 error. It's the cheapest possible safety net: one test file that catches the most obvious breakage across your entire app.
Framing your prompt with a specific role sharpens the quality of Claude's output — it primes the model to weight the right kind of expertise.
A CLAUDE.md in your home directory sets preferences that apply to every project — no more re-explaining your coding style from scratch.
Paste your Eloquent model into Claude and get back a complete Filament v3 resource with form fields, table columns, filters, and a RelationManager stub.
Turn your existing OpenAPI spec into enforced request validation middleware — Claude wires up the right library for your framework and formats errors consistently.
Point Claude at a bloated file and tell it to break it apart — it identifies logical boundaries, extracts each section into its own module, wires up the imports and exports, and updates every file that references the original so nothing breaks.
Describe your coding preferences and let Claude write working ESLint and Prettier configs — no more config docs rabbit holes or mysterious rule conflicts.
Before refactoring a multi-file codebase, ask Claude to trace the data flow first — it surfaces hidden dependencies and makes the resulting suggestions far more reliable.
When a file has grown too large — a 1,000-line controller, a God object, or a component that does everything — tell Claude to break it apart into smaller, focused modules, moving each responsibility into its own file while keeping everything wired together and working.
For complex tasks — big refactors, architectural changes, multi-file features — switch to plan mode so Claude researches and proposes a step-by-step approach before touching any code. Review the plan, adjust it, then let Claude execute with confidence.
Once you've settled an architectural debate with Claude, write the decision into CLAUDE.md — or it will suggest the same alternatives again next session.
Tell Claude which framework version you're upgrading to — Laravel 13, React 19, Next.js 15 — and it reads the upgrade guide, scans your code for breaking changes, updates deprecated APIs, and migrates your codebase one step at a time.
Describe your data model in plain English and let Claude generate a complete Prisma schema with relations, indexes, and enums — ready to migrate.
When you need a new controller, component, or service that should match the style of one that already exists, point Claude at the example — "create a ProductController following the same pattern as UserController" — and it replicates the conventions exactly.
When your branch is ready for review, tell Claude to read the diff against main and write a PR description — a clear summary of what changed, why, how to test it, and anything reviewers should pay attention to. Better descriptions lead to faster, more focused reviews.
Claude Code agents can work in isolated git worktrees so they don't interfere with your current branch.
Paste your real query patterns and ask Claude to recommend the right database indexes — composite vs single-column, correct column order, write performance trade-offs, and ready-to-run migrations.
Paste untyped Python functions and ask Claude to add proper type annotations — it infers types from usage and replaces loose dicts with TypedDict or dataclasses.
Enabling strict: true on an existing codebase unleashes hundreds of errors — pipe them to Claude in batches and work through them fast.
When you're learning a framework your project uses — Laravel, React, Next.js — ask Claude to explain how it works using the actual code in front of you, not abstract tutorials. It connects concepts to real implementations you can read, modify, and experiment with.
Claude Code normally works within your current directory, but --add-dir lets you bring in additional directories — shared libraries, sibling packages in a monorepo, a design system, or API specs from another project — so Claude can read and reference them alongside your code.
Paste your React components and ask Claude to audit every useEffect dependency array — it catches stale closures and fixes the root cause, not just the lint warning.
Printf debugging doesn't belong in production. Claude can wire up structured JSON logging with request context, log levels, and external service routing in minutes.
Launch Claude Code directly in Plan, Default, or Auto mode from the command line, so you never forget to set the right guardrails before starting work.
Ask Claude to rename a function, class, or variable and it updates every reference across your whole project — imports, tests, comments, config files, and string literals — catching things a simple find-and-replace would miss.
Describe a feature as a user story — "As a user, I want to save items to a wishlist so I can buy them later" — and Claude builds the entire thing: migration, model, controller, routes, UI components, validation, and tests, all wired together and working.
Tell Claude to audit how errors are handled throughout your project — inconsistent try/catch blocks, missing error responses, swallowed exceptions, and varied logging formats — then unify them into a single consistent pattern based on what your best code already does.
Tell Claude your stack and what you need from Sentry — user context, environment filtering, source maps, release tracking — and it wires up the full integration rather than just the hello-world snippet from the docs.
Paste a React component and ask Claude to write comprehensive RTL tests covering rendering, user interactions, and async behaviour — following RTL best practices.
Claude Code exports detailed events via OpenTelemetry logs, giving you a full audit trail of every tool call, API request, and user prompt.
Instead of a risky big-bang rewrite, ask Claude to replace legacy code one piece at a time — it reads the old implementation, writes the new version alongside it, routes traffic between both, and removes the old code only after the new path is proven.
List your project's build, test, lint, and deploy commands in CLAUDE.md — Claude reads this before running anything, so it uses your actual scripts instead of guessing npm test when you need pnpm run test:integration.
Not sure what Claude Code can do? Type /help to see the full list of slash commands, keyboard shortcuts, CLI flags, and built-in features — it's the fastest way to discover capabilities you didn't know existed without leaving your session.
Paste old PHP 7 code and ask Claude to modernise it with enums, named arguments, match expressions, and constructor property promotion.
Before investing days in a complete feature, ask Claude to build a rough working prototype in minutes — just enough to validate the idea, test the user flow, or demo to stakeholders. If the prototype proves the concept, then build it properly. If not, you saved days.
Tell Claude to check that related files are in sync — models match their migrations, forms match the APIs they submit to, TypeScript types match the backend responses, and config matches what the code actually references. When they drift apart, bugs hide in the gaps.
Ask Claude to write streaming CSV and Excel exports that use LazyCollection to handle large datasets without memory spikes — plus queued exports and email delivery for very large result sets.
dontAsk mode auto-denies every tool that isn't on your allow list, making Claude fully non-interactive and safe for locked-down CI environments.
Describe your authorisation rules in plain English and let Claude generate a complete Laravel Policy class, Gates, and the tests to cover them.
Share your server config or middleware code and ask Claude to identify missing or misconfigured security headers and provide drop-in fixes.
Let Claude generate a complete PWA setup — manifest, service worker with Workbox, caching strategies, and all the meta tags you'd otherwise forget.
If your app uses AI — classification, summarization, extraction, or generation — use Claude Code to draft the system prompts, write few-shot examples, test edge cases, and iterate until the output is reliable, all before you wire it into your production code.
Not every task needs deep reasoning. Type /fast to switch Claude Code into fast mode — same model, faster output — for quick edits, simple questions, and routine changes. Toggle it off when you need Claude to think harder on complex problems.
If your API predates your documentation, ask Claude to reverse-engineer a full OpenAPI spec from your route files.
Drop a GitHub issue URL into Claude Code and it reads the issue description, comments, and labels, finds the relevant code in your project, and starts implementing the fix — turning a bug report or feature request into working code in one prompt.
Use Claude Code to write failing tests first, then implement the code to make them pass.
Describe your data model in plain English and let Claude generate a complete GraphQL SDL schema, resolver stubs, and DataLoader setup in one shot.
Let Claude read your entire codebase and generate a comprehensive onboarding guide that actually reflects the current state of the project.
The --continue flag loads your most recent conversation instantly, no session ID required.
Ask Claude to generate Storybook stories from your existing React components — it reads your prop types and produces complete CSF3 story files with meaningful variants in seconds.
The --name flag sets a human-readable session name at launch, making it easy to resume specific threads later.
Describe your cloud infrastructure in plain English and let Claude write the Terraform — modules, variables, outputs, and all.
Configure ignorePatterns in settings to exclude node_modules, dist, vendor, and other large directories from Claude's file scanning — so it searches faster, reads less noise, and never wastes time on generated or third-party code.
Tell Claude to read your lockfile and check every dependency's license — it flags GPL packages in MIT projects, identifies unknown licenses, and spots the copyleft or commercial restrictions that could cause legal headaches before they become problems.
Point Claude at undocumented functions and it reads the implementation to write accurate JSDoc, PHPDoc, or docstring comments — including parameter descriptions, return types, thrown exceptions, and usage examples that actually match what the code does.
Press the up arrow key to cycle through your previous prompts — find the one you want, edit it, and send it again. Perfect for tweaking a prompt that almost worked, retrying with different constraints, or repeating a command you use often.
Claude Code has four ways to reset or roll back — each for a different situation. Reaching for the wrong one wastes tokens or loses work you wanted to keep.
In iTerm2, paste clipboard images into Claude Code with Cmd+V — first capture a screenshot to your clipboard with Ctrl+Shift+Cmd+4 instead of the default Cmd+Shift+4.
BDD Gherkin feature files document expected behaviour in plain English and drive your test suite — Claude writes them from a user story in seconds.
Let Claude scaffold a Tauri 2 desktop app with typed Rust commands and a matching TypeScript frontend — bridging both languages so you don't have to.
Forgetting to wrap related database writes in a transaction is a classic source of data corruption. Ask Claude to audit your codebase and fix the boundaries.
The biggest productivity gains come from combining Claude Code features — CLAUDE.md sets the rules, custom commands automate prompts, hooks enforce standards, memory persists context, and plan mode + fast mode let you shift gears. Together, they make Claude Code better every day you use it.
Offset pagination breaks at scale. Cursor-based pagination is the right approach — and Claude can implement it in any framework from a plain-English description.
Stage your changes and ask Claude to write the commit message — it reads the diff, understands what changed and why, and writes a clear, conventional commit message that actually describes the work, not just "fix stuff" or "update files".
The trigger_phrase parameter lets you change the default @claude mention to any custom keyword, useful for running multiple Claude workflows on the same repo.
Use Esc+Esc and choose "Summarize from here" to compress only the noisy middle of a session while keeping your original context and instructions intact.
Type ! followed by any shell command directly in the Claude Code prompt to run it inline — the output lands straight in your conversation without switching to a separate terminal.
Paste git merge conflict markers into Claude Code and let it intelligently resolve both sides — then verify with your test suite.
Upgrading a codebase doesn't require a big-bang rewrite — ask Claude to modernise individual files while keeping the behaviour identical.
Ask Claude to set up lint-staged and Husky for your project — it handles the config, hook files, install commands, and the edge cases you'd otherwise debug for an hour.
The UserPromptSubmit hook fires before every prompt — use it to silently inject git context, project info, or enforce guardrails without changing your workflow.
When your terminal gets cluttered with long outputs, press Ctrl+L to clear the visible display — your conversation context stays intact, but the screen resets so you can focus on what comes next without scrolling through old output.
Add a Dead Letter Queue to your job processing system — Claude configures retries, moves failed jobs, wires up alerting, and builds a requeue endpoint so nothing disappears silently.
Your CLAUDE.md grows organically and accumulates contradictions, outdated rules, and missing context over time. Ask Claude to audit it against your actual codebase — it flags rules that don't match reality and suggests what's missing.
Tell Claude about your backend route and data shape, and get a fully wired Inertia page component back in seconds.
Use a cron schedule trigger with Claude Code GitHub Actions to run automated tasks like daily commit summaries without any human mention.
The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.
Point Claude at a file in one language and ask it to rewrite it in another — it reads the source, understands the intent, and produces idiomatic code in the target language that matches your project's existing conventions.
Tell Claude what you want to enforce — lint before commit, test before push, validate commit messages — and it writes the git hook script, installs it in .git/hooks or your hook manager, and makes it executable so it runs automatically.
MCP servers can be scoped at three levels — user (available everywhere you work), project (shared with the team via version control), or enterprise (managed by your organization). Pick the right scope so each project gets exactly the tools it needs without cluttering unrelated ones.
Combine multiple @filename references in one prompt to give Claude precise, simultaneous context across related files — no describing, no guessing.
Describe your data model in plain English and get back ActiveRecord models, associations, validations, and migration files ready to run.
Tag Claude Code telemetry with team, department, and cost centre attributes so you can track spending per group in your observability backend.
Use the CwdChanged and FileChanged hooks with CLAUDE_ENV_FILE to automatically reload your direnv environment whenever Claude switches project directories.
When you need data in a different format — JSON to YAML, CSV to SQL INSERTs, XML to a PHP array, a log file to a structured table, or a database dump to markdown — paste it into Claude and tell it what format you want. Claude handles the conversion instantly, including edge cases like escaping, quoting, and nested structures.
Start any message with # to instantly save a note to Claude Code's persistent memory — without breaking your flow to run a separate command.
Paste your nested .then() chains or callback-style code and ask Claude to rewrite it as clean async/await — it handles edge cases that naive refactors miss.
The --debug flag enables verbose logging for Claude Code, and an optional category filter like "api,mcp" lets you narrow output to exactly the subsystem you need to investigate.
Before diving into implementation, ask Claude to compare multiple approaches so you can make an informed decision instead of backtracking later.
Every codebase has inconsistencies — some controllers return responses one way, others differently; some services throw exceptions, others return null. Tell Claude to pick the best pattern and apply it everywhere so the codebase reads like it was written by one developer.
Turn your most common prompts into reusable slash commands — drop a markdown file into .claude/commands/ and it becomes a /command you and your team can invoke anytime, with consistent instructions every time.
When Claude is heading down the wrong path — editing the wrong file, writing code you don't want, or giving a long explanation you don't need — press Escape to stop it immediately. You keep everything it did up to that point and can redirect with a new prompt.
pnpm workspaces are powerful but the initial config always involves fiddling with workspace files and tsconfig paths. Just describe your packages and let Claude generate the whole structure.
Rewind bad turns instead of correcting them, so Claude never processes the wrong output and you save tokens on every subsequent message.
Describe the command-line tool you need — what flags it takes, what it does, what it outputs — and Claude builds the whole thing: argument parsing, help text, validation, error handling, and the core logic, ready to use or distribute to your team.
Scaffold a complete BullMQ setup with typed job queues, retry logic, rate limiting, scheduled jobs, and a monitoring dashboard in one prompt.
When you're torn between two implementations — a recursive vs iterative approach, REST vs GraphQL, queue vs cron — show Claude both options and it analyzes the tradeoffs for your specific context, then recommends one with concrete reasoning you can evaluate.
Run Claude Code directly inside Cursor, VS Code, or any editor with an integrated terminal — keep your editor and AI session in a single window.
Start a line with # in your prompt and Claude treats it as a comment — it's ignored during processing but stays in your input for your own reference. Useful for annotating complex prompts, temporarily disabling instructions, or leaving notes for your future self.
The PreToolUse hook fires before every tool call and supports blocking via exit code 2, letting you write custom scripts that intercept dangerous commands before Claude executes them.
The Postgres MCP server gives Claude read access to your real schema and data — so it writes SQL against your actual tables, not imaginary ones.
When you need to make the same change to 20 files — add a trait to every model, wrap all API responses in a consistent format, add logging to every controller, or update an import path everywhere — describe the change once and tell Claude to apply it across every matching file. One prompt, twenty edits, zero copy-paste.
Jumping into an unfamiliar repo is painful — ask Claude to be your tour guide before you start making changes.
Enable sandbox mode to let Claude run bash commands freely within controlled filesystem and network boundaries.
Point Claude at code full of for loops and manual accumulators, and ask it to refactor them to map, filter, reduce, and flatMap — cleaner, more readable, and often fewer lines without changing the behavior.
Not every hard problem needs maximum reasoning — matching the thinking keyword to the task's actual complexity gets better results faster.
You don't need a teammate to catch issues before committing — pipe your diff to Claude for a fast, targeted review.
Staring at a blank README? Claude Code can read your entire project and write one for you — complete with setup steps, usage examples, and architecture notes.
Paste JSON, CSV, YAML, TOML, or XML and ask Claude to convert it — it handles nested structures, tricky edge cases, and format quirks automatically.
Storybook 8 uses CSF3 — if your stories are still in the older Template pattern, Claude can migrate your entire stories directory in one session.
When running multiple Claude sessions in parallel, a shared plan.md acts as the source of truth — each agent reads it to understand what's in progress, what's done, and what to pick up next.
Paste your PageSpeed Insights or DevTools data and ask Claude to identify the root causes of poor LCP, CLS, and INP scores — it traces each metric back to specific code and writes the fixes.
Show Claude Code a Figma export, a hand-drawn wireframe, or a screenshot of a reference design and ask it to build the component — no describing layouts in words required.
Use --strict-mcp-config to restrict Claude Code to only the MCP servers you explicitly provide, ignoring all other sources.
Trigger automatic tool search earlier so idle MCP tool definitions stop consuming your context window and tokens.
Pass custom instructions to /compact so Claude preserves test output, code changes, and other context that matters to your workflow.
The Claude Agent SDK gives you Claude Code's full tool suite as a Python or TypeScript library. Build autonomous agents with built-in file, bash, and search tools.
Writing a filename as plain text in CLAUDE.md does nothing — use the @filename syntax, then verify with /context that it actually loaded.
The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.
Type /hooks in Claude Code to open a read-only view of every registered hook, its matcher, source file, and configuration — essential for debugging why a hook isn't firing.
The claude mcp add command registers an MCP server with Claude Code in a single line — giving Claude new tools like database access, browser automation, or API integrations without editing config files by hand.
After pulling changes, ask Claude to compare your .env against .env.example — it finds missing variables, flags deprecated ones, and adds new entries with sensible defaults so your local environment never falls out of sync.
Use separate CLAUDE.md files or conditional sections so Claude follows different rules depending on the context — strict and non-destructive in CI, verbose in development, focused on code quality during reviews — all from the same project.
When your app throws an error, paste the full stack trace into Claude Code — it reads every frame, opens the source files at the exact lines referenced, traces the actual cause, and fixes the bug, not just the symptom.
Point Claude at your templates and components and it adds what's missing for accessibility — ARIA labels, alt text, keyboard navigation, focus management, semantic HTML, and screen reader support — making your UI usable by everyone without a full accessibility audit.
Claude Code can remember things between sessions — use /memory to save project decisions, your preferences, and important context so you don't have to re-explain the same things every time you start a new conversation.
Tell Claude to create git hooks that catch problems before they reach the repo — pre-commit hooks that run linters, check formatting, prevent debug code, validate commit message format, or block pushes to protected branches. Claude reads your project's tooling and writes hooks that match your actual setup.
Use the --agent flag with custom markdown files in .claude/agents/ to launch purpose-built Claude sessions with restricted tools and scoped system prompts.
Before jumping to implementation, describe the problem conversationally and let Claude be your thinking partner. It asks clarifying questions, surfaces tradeoffs you haven't considered, suggests approaches, and pokes holes in your plan — so by the time you say "ok, build it," both of you know exactly what to build and why.
Before asking Claude to try a big experimental change — a different architecture, an alternative algorithm, or a risky refactor — tell it to stash or branch first. If the experiment fails, you restore the stash and you're back where you started. Zero risk, maximum experimentation.
Got a module with zero tests? Point Claude at the code and it reads the implementation, identifies every behavior — the happy path, edge cases, error conditions, and boundary values — then writes a comprehensive test suite that documents what the code actually does and catches regressions if anything changes.
When you need Claude to make changes in one area without affecting another, add negative constraints — "fix the bug but don't change the public API", "refactor the internals but don't create new files", or "update the logic but don't modify any tests." Explicit exclusions prevent Claude from making well-intentioned changes you'll have to undo.
Paste error messages with "why did this fail?" instead of "fix this" to get Claude to diagnose the root cause before applying a fix.
Good comments explain why, not what. Tell Claude to read your complex code and add inline comments that explain the reasoning behind non-obvious decisions — why this algorithm was chosen, why this edge case exists, why the order matters — so the next developer (or future you) understands the intent without reverse-engineering the logic.
Claude can read your application code — the jobs, queues, API endpoints, scheduled tasks, and critical business logic — and generate monitoring rules that alert on the things that actually matter: failed payments, queue backlogs, stale cron jobs, error rate spikes, and slow endpoints, all tailored to your real system.
When you have a written specification — a PRD, a requirements doc, a technical design, or even detailed meeting notes — pipe it directly into Claude Code as context. Claude reads the full document, understands every requirement, and implements the feature exactly as specified instead of you re-explaining it piece by piece.
Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.
Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.
Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.
When Claude writes error messages, button labels, validation text, or onboarding flows, it defaults to generic developer-speak. Add a "Users" section to your CLAUDE.md describing who your actual users are — their technical level, industry jargon, and what they care about — so Claude writes copy that makes sense to THEM, not to developers.