@bagwaa
Richard Bagshaw
Member since Mar 2026
// 318 published tips
The /add-dir command lets you expand Claude's file access to additional directories mid-session — essential for monorepos and shared libraries.
A CLAUDE.md file at the root of your project gives Claude Code persistent context about your codebase.
Plan mode lets Claude research and design an approach before writing any code.
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.
Keep your context window focused and uncluttered — use subagents for research, .claudeignore to hide noise, and /clear when switching tasks.
Use Claude Code to write failing tests first, then implement the code to make them pass.
Configure permission rules so Claude can run common commands without asking every time — and keep guardrails on anything destructive.
Long sessions eat into your context window — /compact lets Claude summarise the conversation and continue with a lighter footprint.
Skip the blank page — /init scans your codebase and generates a tailored CLAUDE.md in seconds.
No need to type /plan — Shift+Tab instantly toggles between plan mode and execution mode mid-conversation.
Configure MCP servers at user scope for cross-project tools and project scope for repo-specific connections — both configs merge at runtime.
Paste a sluggish query and Claude will explain what's wrong, suggest indexes, and rewrite it — no DBA required.
Jumping into an unfamiliar repo is painful — ask Claude to be your tour guide before you start making changes.
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 a problem is genuinely hard, the word "ultrathink" pushes Claude to allocate its maximum reasoning budget before responding.
Stop updating CHANGELOG.md by hand — pipe your git log to Claude and get a properly formatted Keep a Changelog entry appended in seconds.
Unused functions, unreferenced exports, and orphaned CSS classes accumulate silently — ask Claude to track them down before they become a maintenance burden.
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.
Ask Claude to add a rule to CLAUDE.md whenever you correct it, so the same mistake never happens twice.
Open multiple terminal windows and run separate Claude Code sessions simultaneously to work on several tasks at once.
Configure a Stop hook to play a system sound the moment Claude finishes, so you can step away without constantly checking the terminal.
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.
Quickly execute shell commands without leaving your Claude Code conversation.
Claude Code hooks let you run shell commands automatically before or after tool calls.
Claude Code agents can work in isolated git worktrees so they don't interfere with your current branch.
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.
Build reusable slash commands that trigger specific prompts or workflows.
When hitting an error, paste the full stack trace — Claude Code can pinpoint the issue instantly.
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.
Let Claude Code agents explore your codebase before making sweeping changes.
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.
Run Laravel/Pest tests with --compact for clean, scannable output that wastes less of Claude's context window — fewer lines means less noise when Claude is reading your test results.
Drop a screenshot of a broken UI into Claude Code and get an instant diagnosis and fix.
Use headless mode to automate code reviews, generate changelogs, and enforce standards in your CI pipeline.
Not every hard problem needs maximum reasoning — matching the thinking keyword to the task's actual complexity gets better results faster.
A .claudeignore file lets you hide irrelevant files and directories from Claude Code, keeping it focused on what matters.
Ask Claude Code to commit after each logical step so you always have a safe point to roll back to if things go sideways.
Sometimes you don't want a summary — you want a clean slate. /clear wipes the conversation history so you can start a new task without any baggage.
Start any message with # to instantly save a note to Claude Code's persistent memory — without breaking your flow to run a separate command.
Closed your terminal mid-task? The --resume flag reopens your last session with full context intact — no re-explaining needed.
Stop describing files vaguely — use tab completion and @ references to point Claude at exactly the right files.
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.
Use /model to swap between Opus, Sonnet, and Haiku mid-conversation — match the model's power to the task's complexity.
Force Claude to return structured JSON instead of conversational text — perfect for piping into scripts and automation.
Extend Claude Code with MCP servers to add database access, GitHub integration, web search, and more — right from the terminal.
Don't dump an entire feature into one prompt — break it into focused steps for better results and easier review.
Stack CLAUDE.md files at different directory levels so each part of your monorepo gets the exact context it needs.
One simple habit that prevents a lot of silent regressions: ask Claude to explain what the code does before touching it.
You don't need a teammate to catch issues before committing — pipe your diff to Claude for a fast, targeted review.
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.
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.
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.
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.
Got untested legacy code? Claude can write tests around the existing behaviour as-is — no refactoring required first.
Claude's heading in the wrong direction and you can see it — don't wait for it to finish. Hit Escape to stop it immediately and redirect.
Set the model right from the command line when you launch Claude Code — useful for scripting, CI, and matching the model's power to the task at hand.
A CLAUDE.md in your home directory sets preferences that apply to every project — no more re-explaining your coding style from scratch.
The /doctor command validates your API key, model access, and tool availability in one shot — run it first when things go wrong.
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.
The ANTHROPIC_MODEL environment variable sets your preferred model globally — no more passing --model on every command.
The GitHub MCP server gives Claude Code read/write access to your repos, issues, and PRs — all from the terminal.
Combine multiple @filename references in one prompt to give Claude precise, simultaneous context across related files — no describing, no guessing.
Append extra rules to Claude's system prompt per pipeline run without overriding your project's CLAUDE.md — perfect for CI guardrails.
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.
--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.
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.
Paste raw API JSON and ask Claude to derive fully typed TypeScript interfaces — no more writing them by hand.
Give Claude live access to the web by connecting the Brave Search MCP server — no more answers that stop at its training cutoff.
Tell Claude what your app runs on and it will write a production-ready Dockerfile complete with multi-stage builds and sensible defaults.
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.
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.
Ask Claude to scan your package.json and flag dependencies worth updating, explaining why each one matters before you blindly run npm update.
Pipe yesterday's git log to Claude and get a clean, human-readable summary of what you actually shipped — perfect for standups.
Stop wrestling with regex syntax — describe the pattern you need and Claude will write it, test it, and explain every part.
Ask Claude to write JSDoc, PHPDoc, or docstrings for your functions as you go — consistent documentation without the context-switching.
Describe your user journeys in plain English and let Claude write the full E2E test suite — beats staring at Playwright docs for an hour.
Hand-crafting fake data for development is tedious — describe your models and let Claude write a realistic seeder in seconds.
If your API predates your documentation, ask Claude to reverse-engineer a full OpenAPI spec from your route files.
Kubernetes YAML is verbose and unforgiving — describe what you need in plain English and let Claude write the manifests.
Upgrading a codebase doesn't require a big-bang rewrite — ask Claude to modernise individual files while keeping the behaviour identical.
Describe the change you want in plain English and Claude will write the migration — foreign keys, indexes, enums, and all.
Ask Claude to read your code and produce a Mermaid diagram — render it instantly in GitHub, Notion, or any Markdown viewer.
CORS errors are cryptic and inconsistent across browsers — paste your headers and config and let Claude pinpoint exactly what's wrong.
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 cloud infrastructure in plain English and let Claude write the Terraform — modules, variables, outputs, and all.
Feed your application logs to Claude via stdin and get an instant summary of errors, anomalies, and patterns worth investigating.
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".
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.
Paste JSON, CSV, YAML, TOML, or XML and ask Claude to convert it — it handles nested structures, tricky edge cases, and format quirks automatically.
Paste your API routes or controller methods and ask Claude to audit them for naming inconsistencies, missing conventions, and design smells before they ship.
Describe your tech stack and let Claude write a comprehensive .gitignore — no more accidental commits of build caches, editor files, or .env secrets.
Paste deeply nested if/else blocks and ask Claude to refactor them into flat guard clauses — same behaviour, dramatically easier to read.
Pipe your git diff or config files to Claude to catch hardcoded API keys, passwords, and tokens before they ever reach your remote repository.
Describe your coding preferences and let Claude write working ESLint and Prettier configs — no more config docs rabbit holes or mysterious rule conflicts.
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.
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 read your route files and generate an importable Postman or Insomnia collection — complete with example payloads inferred from your validation rules.
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.
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.
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.
Paste your controllers or service methods and ask Claude to spot N+1 query problems and fix them with proper eager loading.
Describe your authorisation rules in plain English and let Claude generate a complete Laravel Policy class, Gates, and the tests to cover them.
Describe what your Artisan command should do and let Claude generate the full class, scheduler registration, and Pest tests to go with it.
Split your terminal into panes with tmux and run a separate Claude Code session in each — monitor one while working in another, all in a single window.
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.
Paste your TypeScript interfaces and ask Claude to generate matching Zod schemas with sensible validators — not just bare type mappings.
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.
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.
Set ANTHROPIC_BASE_URL to route Claude Code through a central gateway for cost tracking, usage limits, and compliance — no code changes required.
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.
Ask Claude to scan your codebase for all environment variable usages and generate a complete .env.example with placeholder values and inline comments.
Describe your data model in plain English and let Claude generate a complete GraphQL SDL schema, resolver stubs, and DataLoader setup in one shot.
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.
Scan your source files for hardcoded strings and let Claude generate complete locale files — keys, structure, and all.
Paste your components and Claude will flag WCAG violations, missing ARIA attributes, and keyboard navigation issues — then fix them.
Let Claude write your .github templates so contributors always provide the context reviewers actually need.
Describe your data access patterns and let Claude decide what to cache, for how long, and how to invalidate it properly.
Paste your components and Claude will write a complete stories file — variants, edge cases, and interactive controls included.
Migrating to Tailwind doesn't have to be tedious — paste your CSS and Claude converts it to utility classes and updates your markup.
Add a "bad patterns" section to CLAUDE.md with concrete examples of code you never want to see -- Claude absorbs your no-go list before writing a single line.
ADRs document why you made a technical choice. Claude can write them after you explain the trade-offs — keeping your decision history intact.
Enabling strict: true on an existing codebase unleashes hundreds of errors — pipe them to Claude in batches and work through them fast.
Instead of reading docs and editing config files manually, ask Claude Code to configure your entire shell, plugins, and prompt in one go.
Don't wait until your context window is nearly full -- run /compact at around 60% while Claude still has full visibility over the session.
Paste your bundle analysis output and Claude will identify the biggest wins — duplicate dependencies, oversized imports, and code-splitting opportunities.
Inconsistent API error shapes are a frontend developer's nightmare — describe your error contract and let Claude write middleware that enforces it everywhere.
Add skipDangerousModePermissionPrompt: true to your settings.json to stop Claude Code asking "are you sure?" at the start of every bypass-mode session.
Configure your editor to autosave every 500ms so Claude Code picks up your edits from the filesystem almost in real time.
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 Options API component and ask Claude to rewrite it with script setup syntax — it handles emits, watchers, lifecycle hooks, and composable extraction automatically.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Use voice dictation tools like Monologue or WhisperFlow to speak prompts directly into your Claude Code terminal — Claude handles imperfect transcription better than any traditional dictation app.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Chain multi-step operations with && so Claude's sequence halts immediately on failure — no more half-applied refactors or committed broken code.
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.
Wrapping Claude Code in a tmux session on a remote machine means your session survives connection drops, airplane wifi, and closed laptops.
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.
Describe a feature in plain English and let Claude generate expressive Pest tests that read like documentation.
Tell Claude about your backend route and data shape, and get a fully wired Inertia page component back in seconds.
Paste your routes file and ask Claude to add sensible rate limiting rules tailored to each endpoint's risk profile.
Add the Slack MCP server to let Claude post deployment updates, incident alerts, or standup summaries directly to your channels.
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.
Paste old PHP 7 code and ask Claude to modernise it with enums, named arguments, match expressions, and constructor property promotion.
Describe a UI feature in plain English and get a fully wired Livewire component — properties, actions, validation, and Blade template included.
Describe your API endpoint and let Claude generate idiomatic Go handlers with proper error handling, middleware, and JSON responses.
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.
Describe your domain and let Claude design an event sourcing implementation with event classes, a store interface, and aggregate reconstruction logic.
Use Claude to generate a full SvelteKit project structure with routes, layouts, and server-side data loading patterns — ready to run from day one.
Describe your data model in plain English and get back ActiveRecord models, associations, validations, and migration files ready to run.
Paste your Rust compiler errors into Claude and get a clear explanation of the ownership issue plus a corrected version of your code.
Describe your backend logic and let Claude scaffold Next.js Server Actions or Route Handlers with TypeScript types, Zod validation, and proper error handling.
Describe the job your Symfony command should do and get back a fully wired console command with argument definitions, progress bars, and styled output.
Auto mode lets Claude judge which actions are safe to run on your behalf, so long sessions complete without constant approval prompts.
Describe your data model in plain English and let Claude generate a complete Prisma schema with relations, indexes, and enums — ready to migrate.
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.
Share your server config or middleware code and ask Claude to identify missing or misconfigured security headers and provide drop-in fixes.
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.
Paste your Eloquent model into Claude and get back a complete Filament v3 resource with form fields, table columns, filters, and a RelationManager stub.
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.
Paste a React component and ask Claude to write comprehensive RTL tests covering rendering, user interactions, and async behaviour — following RTL best practices.
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.
Long multi-step prompts with lots of context are harder to type than to speak — your brain can narrate relationships and constraints faster than your fingers can type them.
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.
Pipe your git diff directly to Claude and get a properly formatted Keep a Changelog entry — Added, Changed, Fixed, and all.
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.
Stop hand-crafting complex SQL — describe the logic you need and let Claude write the view or stored procedure, complete with a migration file.
PHP 8.1 backed enums are cleaner than constants — but scaffolding them with helpers, labels, and Eloquent casts is boilerplate Claude can write instantly.
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.
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.
Real-time features feel complex but Claude can wire up WebSocket connections, rooms, and broadcast events for your stack faster than reading the docs.
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.
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.
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 the --print flag to send a single prompt to Claude and pipe the response straight to stdout — perfect for scripts and CI pipelines.
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.
Undocumented code is technical debt waiting to bite you. Ask Claude to bulk-generate accurate docblocks for your entire codebase in one sweep.
Complex prompts are unreadable as escaped single-liners. Use shell HEREDOCs to write clean, structured prompts directly in your scripts.
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.
Stop writing API clients by hand. If you have an OpenAPI or Swagger spec, Claude can generate a fully-typed client that matches your codebase conventions in minutes.
Attach a FileChanged hook to your .envrc or .env file so Claude Code automatically reloads your environment variables the moment it edits them.
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.
Distributed tracing turns mysterious slowdowns into pinpointed bottlenecks. Ask Claude to wire up OpenTelemetry across your application without digging through the docs.
Writing Ansible YAML by hand is repetitive and easy to get wrong. Describe your infrastructure requirements in plain English and let Claude generate the playbook.
Setting up Turborepo from scratch means juggling workspaces, pipeline configs, and shared packages. Claude can scaffold the whole thing in one prompt.
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.
Install the laravel-best-practices Boost skill to equip your AI agent with 100+ curated Laravel conventions, so it generates idiomatic code by default.
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.
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.
Prevent cascading failures in distributed systems by asking Claude to wire up a circuit breaker — describe the thresholds and it handles the state machine.
Every production app needs a health check endpoint for load balancers and container orchestrators — Claude scaffolds a robust one in seconds.
Soft deletes let you recover accidentally deleted records and maintain audit trails — Claude handles the migration, model changes, and query scoping in one shot.
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.
Idempotency keys prevent duplicate charges and double-submitted orders when clients retry failed requests — Claude scaffolds the middleware in one prompt.
BDD Gherkin feature files document expected behaviour in plain English and drive your test suite — Claude writes them from a user story in seconds.
The --resume flag lets you pick up any past session by name or UUID, so you can defer work and return to it days later without re-explaining context.
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.
API versioning keeps old clients working while you evolve your interface — Claude scaffolds the routing structure and deprecation headers in one prompt.
Bloated Docker images slow CI, increase attack surface, and cost money — paste your Dockerfile and ask Claude to audit it for quick wins.
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.
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.
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.
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.
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.
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.
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.
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 --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.
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.
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.
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.
Turn repetitive instructions into reusable skills that persist across sessions and keep Claude consistent without manual reminders.
Let Claude generate battle-tested HTML email templates with inline styles, table layouts, and Outlook-compatible markup that renders correctly everywhere.
Scaffold a full Node.js CLI tool with Commander.js, including subcommands, flags, interactive prompts, and coloured output — all from a single prompt.
Let Claude write custom PHPStan and Larastan rules that enforce your team's conventions, complete with AST visitor logic and config registration.
Scaffold single-database or database-per-tenant multi-tenancy in Laravel with global scopes, middleware, queue context, and tenant-aware caching.
Generate complete SEO meta tags, OpenGraph properties, and Twitter Card markup for all your pages using a reusable helper Claude builds from your routes.
Migrate React class components to functional components with hooks — Claude handles lifecycle methods, state, refs, and HoC replacements automatically.
Generate typed, immutable Data Transfer Objects with validation and factory methods for your API endpoints in PHP or TypeScript.
Scaffold a complete BullMQ setup with typed job queues, retry logic, rate limiting, scheduled jobs, and a monitoring dashboard in one prompt.
Scaffold a complete Chrome extension with Manifest V3, TypeScript, Vite bundling, content scripts, and background workers from a single prompt.
Instead of hand-editing settings.json, use `claude config` to get, set, list, and delete configuration values from the command line.
Use --effort to set reasoning depth per session, from quick low-effort tasks to maximum reasoning on complex problems.
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.
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.
Set a backup model with --fallback-model so automated tasks survive temporary model overloads without failing.
Use --json-schema to get validated, schema-conforming JSON output from Claude Code in automated pipelines.
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.
Remove tools entirely from Claude's context with --disallowedTools to enforce hard constraints like read-only analysis.
Use --strict-mcp-config to restrict Claude Code to only the MCP servers you explicitly provide, ignoring all other sources.
Use --fork-session to branch a conversation into a new session, keeping the original intact while exploring alternatives.
Skip the manual setup and get Claude responding to @claude mentions in your PRs with a single command.
Point Claude Code at a script that returns a fresh API key from your vault, so you never hardcode credentials again.
Trigger automatic tool search earlier so idle MCP tool definitions stop consuming your context window and tokens.
CLI tools like gh, aws, and gcloud don't add persistent tool definitions to your context, saving tokens compared to equivalent MCP servers.
Tag Claude Code telemetry with team, department, and cost centre attributes so you can track spending per group in your observability backend.
Use worktree.symlinkDirectories and worktree.sparsePaths to avoid duplicating large directories and speed up worktree creation in monorepos.
Add deny rules to your project settings to prevent Claude Code from reading .env files, credentials, and other sensitive paths.
Enable sandbox mode to let Claude run bash commands freely within controlled filesystem and network boundaries.
Pass custom instructions to /compact so Claude preserves test output, code changes, and other context that matters to your workflow.
Rewind bad turns instead of correcting them, so Claude never processes the wrong output and you save tokens on every subsequent message.
Type /model mid-session to switch from Opus to Sonnet, saving tokens on execution-heavy work without losing output quality.
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.
Claude Code accepts images from any clipboard source — screenshots, Slack messages, browser windows, and design mockups all paste directly into your prompt.
Ask Claude Code to generate draw.io XML and paste it straight into diagrams.net for a quick, editable architecture overview.
Give Claude the full picture upfront before it writes any code, so it builds the right thing the first time with fewer correction rounds.
Paste git merge conflict markers into Claude Code and let it intelligently resolve both sides — then verify with your test suite.
Scaffold a custom MCP server with Claude to give it direct access to your internal APIs, dashboards, and microservices.
Feed your test coverage report to Claude and let it write the missing tests — targeting uncovered branches, edge cases, and error paths.
Give Claude a clear product brief and let it scaffold a working full-stack MVP — backend, frontend, and dev tooling — in a single session.
Let Claude read your entire codebase and generate a comprehensive onboarding guide that actually reflects the current state of the project.
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.
Convert your existing REST API routes into fully typed tRPC procedures with Zod validation — Claude reads your handlers and generates the routers.
Let Claude generate a complete PWA setup — manifest, service worker with Workbox, caching strategies, and all the meta tags you'd otherwise forget.
Let Claude configure Nx in your monorepo — dependency graphs, affected builds, caching, and task pipelines — so CI only rebuilds what changed.
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.
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.
Replace Claude Code's entire default system prompt with your own custom instructions, turning it into a specialised tool for reviews, audits, or migrations.
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.
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.
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.
Define specialised subagents inline with JSON when launching Claude Code, perfect for quick experiments and CI pipelines that need custom agents without config files.
Run Claude Code's initialization hooks and exit immediately, reusing your hook infrastructure for CI setup and environment preparation without starting a session.
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.
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.
Prevent automated Claude Code runs from saving session data to disk, keeping your CI pipelines clean and your .claude directory lean.
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.
Use a cron schedule trigger with Claude Code GitHub Actions to run automated tasks like daily commit summaries without any human mention.
Claude Code exports detailed events via OpenTelemetry logs, giving you a full audit trail of every tool call, API request, and user 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.
Three environment variables control which attributes are included in Claude Code OTel metrics, letting you manage cardinality and storage costs.
The otelHeadersHelper setting runs a script to generate fresh authentication headers for your OTel backend, refreshing automatically every 29 minutes.
A PreToolUse hook can intercept test runner commands and filter output to show only failures, cutting thousands of tokens from Claude's context.
CLAUDE.md loads into every message. Move workflow-specific instructions into skills that load on demand to reduce token costs across your session.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Ask Claude to read your repo and generate complete GitHub Issue template files in the YAML forms format — bug reports, feature requests, and config.yml all tailored to your actual stack.
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.
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.
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.
Set CLAUDE_CODE_NEW_INIT in settings.json to make /init interview you for targeted improvements instead of overwriting your existing CLAUDE.md.
Writing AGENTS.md as plain text in CLAUDE.md has no effect — use @AGENTS.md to actually load the file into context.
The --continue flag loads your most recent conversation instantly, no session ID required.
The --name flag sets a human-readable session name at launch, making it easy to resume specific threads later.
The cleanupPeriodDays setting controls how long session transcripts are kept, or set it to 0 to disable persistence entirely.
The companyAnnouncements setting surfaces team messages to every developer at startup, directly in their Claude Code session.
The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.
The language setting makes Claude respond in your preferred language by default, across every session and project.
The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.
The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.
The /btw command lets you ask quick side questions that are answered immediately but never added to the conversation history.
The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.