claude-install
Complete Training Guide

50 Tips to Master Claude Code

A detailed reference for developers — from first launch to advanced multi-agent workflows. Prepared for the IndiaNIC Engineering Team.

1

ACT 1: FOUNDATIONS

Tips 1–25

TIP 1

Run from Root Directory

1:18
What

Always launch Claude Code from the root directory of your project repository.

Why It Matters

Claude Code zips and reads your project context from wherever you start it. Running from a subdirectory means Claude only sees part of your codebase, leading to incomplete understanding, missed dependencies, and incorrect suggestions. Starting from root ensures Claude has the full picture of your project structure, imports, and configurations.

How To Do It

Open your terminal, navigate to your project root (where your package.json, .git folder, or main config files live), and then run the claude command. If you are already in a subdirectory, cd back to root first.

Pro Tip

If you work with monorepos, consider running Claude Code from the monorepo root so it understands cross-package dependencies.

TIP 2

Run /init Immediately

1:56
What

Use the /init command as your very first action in a new project to generate a CLAUDE.md file.

Why It Matters

The CLAUDE.md file is Claude Code's instruction manual for your project. Without it, Claude has no persistent knowledge of your project conventions, architecture, or rules. Running /init lets Claude analyze your entire codebase and generate a tailored CLAUDE.md automatically, saving you hours of manual documentation.

How To Do It

After starting Claude Code in your project root, type /init and press Enter. Claude will scan your codebase and generate a CLAUDE.md file with project structure, tech stack info, and initial rules.

Pro Tip

Review and refine the generated CLAUDE.md immediately. Claude's initial analysis is a good starting point, but you will want to add project-specific conventions and critical rules.

TIP 3

CLAUDE.md is Hierarchical

2:54
What

Understand that CLAUDE.md operates on a hierarchical system, reading and prioritizing rules from top to bottom.

Why It Matters

Rules at the top of your CLAUDE.md carry more weight and are processed first. This means your most critical instructions (like never delete the database or always use TypeScript) should be placed at the top. Misunderstanding this hierarchy can lead to conflicting rules where less important guidelines override critical ones.

How To Do It

Structure your CLAUDE.md with the most important rules and project identity at the top, followed by domain-specific guidelines, then workflow preferences, and finally nice-to-have suggestions at the bottom.

Pro Tip

Think of it like a constitution: amendments at the top are foundational principles, while those further down are operational guidelines.

TIP 4

Keep CLAUDE.md Concise

3:27
What

Aim for approximately 300 lines in your CLAUDE.md file to prevent context bloat.

Why It Matters

Every line in CLAUDE.md consumes tokens from Claude's context window. An overly verbose CLAUDE.md (500+ lines) wastes valuable context space that could be used for actual coding tasks. This leads to reduced reasoning quality, higher costs, and slower responses.

How To Do It

Audit your CLAUDE.md regularly. Remove redundant rules, merge similar guidelines, and use concise language. If a rule can be stated in one line, do not use three. Remove rules that Claude already follows by default.

Pro Tip

Use the /context command periodically to check how much of your context window CLAUDE.md is consuming.

TIP 5

Structure: What, Domain, Validation

3:58
What

Organize your CLAUDE.md into three core sections: What (project requirements), Domain (business/technical context), and Validation (how to verify work).

Why It Matters

This three-part structure gives Claude a complete mental model of your project. What tells Claude what the project does. Domain provides business logic and terminology. Validation gives Claude the tools to self-check its work through tests, linting, or build commands.

How To Do It

Create three clearly labeled sections in your CLAUDE.md. Under What, describe the project purpose and stack. Under Domain, explain key business concepts. Under Validation, list commands like npm test, npm run build, or specific test scripts.

Pro Tip

The Validation section is arguably the most impactful. Including build and test commands here enables Claude to self-correct without your intervention.

TIP 6

Shift+Tab Toggles Modes

5:58
What

Use the Shift+Tab keyboard shortcut to switch between Accept Edits mode and Plan Mode.

Why It Matters

Plan Mode is essential for complex or new features because it forces Claude to think through the approach before writing code. This gives you a chance to course-correct before any code is written, preventing wasted time on wrong approaches.

How To Do It

Press Shift+Tab at any time to toggle between modes. Start new features in Plan Mode to get Claude's execution plan, review it, iterate if needed, then switch to Accept Edits mode to execute.

Pro Tip

Plan Mode is especially valuable when working on unfamiliar codebases or implementing complex features with multiple file changes.

TIP 7

Escape Interrupts

6:40
What

Press the Escape key to immediately stop Claude's current thinking or generation process.

Why It Matters

Sometimes you can tell early on that Claude is heading in the wrong direction. Interrupting early lets you provide corrections and redirect Claude before it goes further down the wrong path.

How To Do It

Simply press the Escape key once while Claude is generating. This stops the current process and returns control to you. You can then provide new instructions or clarifications.

Pro Tip

Watch Claude's thinking blocks to catch wrong assumptions early. The moment you see a wrong assumption, hit Escape immediately.

TIP 8

Double Escape Clears Input

7:43
What

Quickly clear your current input field by double-tapping the Escape key.

Why It Matters

When you have typed a long prompt but decide to start over, manually selecting and deleting text is slow. Double-tapping Escape instantly clears the input field.

How To Do It

With text in your input field, quickly press Escape twice in succession. The input field will be cleared instantly.

Pro Tip

This is particularly useful when you have pasted a long prompt or code snippet and realize you need to reframe your request entirely.

TIP 9

Double Escape on Empty = Rewind

7:59
What

When your input field is already empty, double-tapping Escape lets you rewind to a previous context point.

Why It Matters

This is Claude Code's built-in undo system. If Claude made changes you do not like, rewinding restores your context to an earlier state. It is faster than manually undoing changes.

How To Do It

Make sure your input field is empty, then double-tap Escape again. You will be presented with rewind options to choose from.

Pro Tip

While useful for quick corrections, Git remains a more reliable safety net for significant changes. Use rewind for small fixes and Git for major rollbacks.

TIP 10

Screenshot and Drag

8:29
What

Take a screenshot and drag it directly into the Claude Code interface to provide visual context.

Why It Matters

Sometimes showing Claude what you see is faster and more accurate than describing it. Claude can analyze images and understand visual context.

How To Do It

Use your system screenshot tool (Cmd+Shift+4 on Mac) to capture the relevant area, then drag the image file directly into the Claude Code terminal window.

Pro Tip

Combine this with Tip 11 (adding context to screenshots) for best results. A screenshot plus a one-line description is often more effective than a paragraph of text.

TIP 11

Add Context to Screenshots

8:44
What

Always provide a brief description or explanation alongside any screenshot you share with Claude.

Why It Matters

While Claude can analyze images, it cannot always infer your intent from the image alone. Adding context directs Claude's attention to exactly what matters.

How To Do It

After dragging a screenshot into Claude Code, type a brief description of what Claude should focus on. Be specific: instead of 'fix this', say 'the dropdown menu is overlapping the header'.

Pro Tip

For complex UIs, annotate your screenshots (draw arrows or circles) before dragging them in. This removes all ambiguity.

TIP 12

/clear Resets Context

9:41
What

Use the /clear command to completely wipe the current conversation context and start fresh.

Why It Matters

Over time, your context window fills up with previous prompts and responses. Clearing context when starting a new task ensures Claude works with a clean slate and maximum available context.

How To Do It

Type /clear and press Enter. This removes all previous conversation history from the current session.

Pro Tip

Make it a habit to /clear before starting any new feature or major task. Think of it as closing old browser tabs before starting new research.

TIP 13

/context Shows Token Usage

10:13
What

Use the /context command to visualize your current context window usage and identify what is consuming the most tokens.

Why It Matters

Context is your most precious resource. The /context command shows you exactly how many tokens CLAUDE.md, MCPs, conversation history, and other elements are using.

How To Do It

Type /context at any time to see a breakdown of your current token usage. Look for unexpectedly large items, especially MCPs which can consume thousands of tokens.

Pro Tip

Run /context after installing new MCPs to check their token footprint. Some MCPs consume a disproportionate amount of context for the value they provide.

TIP 14

Let Auto-Compaction Work

11:42
What

Allow Claude Code's automatic context compaction to summarize your session when it gets long, rather than fighting it.

Why It Matters

When your context window fills up, Claude Code automatically summarizes older parts. This compaction is surprisingly effective at preserving important information while discarding noise.

How To Do It

Simply continue working normally. When your context reaches capacity, Claude Code will automatically compact it. After compaction, Claude retains key decisions while freeing up space.

Pro Tip

If you notice compaction losing important context, consider persisting critical decisions in your CLAUDE.md or code comments before the session gets too long.

TIP 15

/model Switches Models

12:23
What

Use the /model command to change which AI model Claude Code uses for its responses.

Why It Matters

Different models excel at different tasks. Sonnet is fast and efficient for everyday coding. Opus provides deeper reasoning for complex architectural decisions and tricky bugs.

How To Do It

Type /model and select from the available options. Switch to Opus for complex work, and back to Sonnet for routine tasks to save costs.

Pro Tip

Use Opus for planning and architectural decisions, then switch to Sonnet for execution. This gives you the best reasoning where it matters most.

TIP 16

/resume Recovers Sessions

12:49
What

Use the /resume command to recover a previous session if your Claude Code instance is accidentally killed or disconnected.

Why It Matters

Losing a session mid-task can be extremely frustrating. The /resume command restores your previous context, saving 15–30 minutes of re-setup time per incident.

How To Do It

After restarting Claude Code, type /resume to see a list of recoverable sessions. Select the one you want to continue.

Pro Tip

If you frequently work on long sessions, consider persisting your current state periodically as an additional safety net alongside /resume.

TIP 17

/mcp Shows MCP Status

13:21
What

Use the /mcp command to view all currently installed Model Context Protocols and their status.

Why It Matters

Each MCP consumes context tokens just by being connected. Without visibility, you might have forgotten MCPs running that silently eat your context.

How To Do It

Type /mcp to see a list of all installed MCPs, their current status (connected/disconnected), and their approximate token usage. Disconnect MCPs you are not actively using.

Pro Tip

Only keep MCPs connected that you are actively using for your current task. A Figma MCP is unnecessary when you are doing backend work.

TIP 18

/help Shows All Commands

14:19
What

Use /help to access a comprehensive list of all available slash commands and their descriptions.

Why It Matters

Claude Code has many commands beyond the commonly used ones, and new commands are added with updates. Even experienced users discover new commands through /help.

How To Do It

Type /help at any time to see the full list of available commands with brief descriptions.

Pro Tip

Check /help periodically after Claude Code updates, as new commands and features are frequently added.

TIP 19

Git is Your Safety Net

14:33
What

Use Git as your primary safety net for version control, not just Claude Code's rewind feature.

Why It Matters

Git commits create permanent, shareable checkpoints that survive session resets, crashes, and context clears. Relying solely on rewind is risky because it is session-dependent.

How To Do It

Commit your code frequently, especially before asking Claude to make major changes. Use descriptive commit messages. Consider using branches for experimental Claude-driven changes.

Pro Tip

Create a Git alias for quick safety commits, something like git commit -am 'checkpoint before Claude changes'.

TIP 20

Add a Critical Rules Section

15:52
What

Include a dedicated Critical Rules section in your CLAUDE.md with explicit never-do and always-do instructions.

Why It Matters

A Critical Rules section acts as hard guardrails. For example, 'NEVER delete migration files' or 'ALWAYS run tests before committing' prevent catastrophic mistakes.

How To Do It

Add a clearly labeled section near the top of your CLAUDE.md. List rules in clear, direct language. Use NEVER and ALWAYS to make the intent unambiguous.

Pro Tip

Build your Critical Rules section over time. Every time Claude makes a mistake, add a rule to prevent it from happening again.

TIP 21

Ask Claude to Update Rules

17:08
What

After manually correcting Claude, ask it to update your CLAUDE.md rules so the same mistake does not happen again.

Why It Matters

If you correct Claude but do not update the rules, it will likely repeat the same mistake in future sessions. This creates a feedback loop that permanently improves Claude's behavior.

How To Do It

After correcting Claude, say something like: 'Add a rule to CLAUDE.md that we always use async/await instead of .then() chains in this project.'

Pro Tip

Review Claude's rule additions periodically to ensure they are concise and do not conflict with existing rules.

TIP 22

Use Workflow Triggers

17:46
What

Define specific keywords or phrases in your CLAUDE.md that trigger predefined skills or workflows when used.

Why It Matters

Workflow triggers let you create shortcuts for complex, multi-step processes. This standardizes workflows across your team and reduces the chance of missing steps.

How To Do It

In your CLAUDE.md, define triggers like: 'When I say build the app, run npm run lint, then npm test, then npm run build.'

Pro Tip

Create triggers for your most common workflows: deployment, testing, code review preparation, and database migrations.

TIP 23

Commit CLAUDE.md to Git

18:27
What

Include your project-specific CLAUDE.md file in your Git repository so the entire team benefits from it.

Why It Matters

When CLAUDE.md is committed to the repo, every team member who uses Claude Code automatically gets the same rules, conventions, and workflow triggers.

How To Do It

Simply git add CLAUDE.md and commit it like any other project file. Update it through pull requests so the team can review and discuss rule changes.

Pro Tip

Treat CLAUDE.md as a living team document. Include it in your PR review process so everyone can propose and discuss rule changes.

TIP 24

dangerously-skip for Throwaway Environments

19:34
What

Use the --dangerously-skip-permissions flag when running Claude Code in non-critical, throwaway environments.

Why It Matters

By default, Claude Code asks for permission before executing potentially dangerous commands. In safe environments like Docker containers or CI pipelines, these prompts slow you down.

How To Do It

Run Claude with: claude --dangerously-skip-permissions. Only use in isolated environments like Docker containers, VMs, or throwaway instances.

Pro Tip

Combine this with Tip 25 (allowlists) for a balanced approach where most actions are auto-approved but truly dangerous ones still require confirmation.

TIP 25

Combine Skip with Allowlists

20:39
What

Pair the dangerously-skip flag with the /permissions command to selectively allow or block specific actions.

Why It Matters

Using dangerously-skip alone is all-or-nothing. Combining it with allowlists gives you granular control: auto-approve common safe actions while requiring confirmation for dangerous ones.

How To Do It

Use /permissions to define which commands Claude can execute freely, and which still need approval. Then use dangerously-skip for the approved category.

Pro Tip

Create different permission profiles for different environments: permissive for local development, moderate for staging, and strict for production-adjacent.

2

ACT 2: DAILY WORKFLOW

Tips 26–32

TIP 26

Start Features in Plan Mode

21:38
What

Always begin new feature development by switching to Plan Mode before writing any code.

Why It Matters

Jumping straight into code generation without a plan often leads to rework. Plan Mode forces Claude to think through the architecture, identify affected files, and consider edge cases before touching any code.

How To Do It

Press Shift+Tab to enter Plan Mode. Describe the feature you want to build. Review Claude's proposed plan, iterate until satisfied, then switch to execution mode.

Pro Tip

Save particularly good plans as templates in your CLAUDE.md or a separate docs folder. They become reusable blueprints for similar features.

TIP 27

Fresh Context Beats Bloated

23:46
What

Prioritize working with fresh, condensed context over accumulated, bloated context from long sessions.

Why It Matters

As your session grows, the context window fills with outdated information and failed attempts. A fresh context with only relevant information produces better results, uses fewer tokens, and generates faster responses.

How To Do It

Use /clear when switching tasks. Start new sessions for new features rather than continuing marathon sessions.

Pro Tip

Before clearing context, quickly note any important decisions or progress in a comment or CLAUDE.md so you do not lose institutional knowledge.

TIP 28

Persist Before Ending Sessions

24:29
What

Save your current context and progress before ending a Claude Code session.

Why It Matters

When you close Claude Code, your conversation context is lost unless you explicitly save it. Persisting your state can save 10–15 minutes of re-setup time.

How To Do It

Before ending a session, ask Claude to summarize the current state and next steps. Save to a file or add relevant notes to CLAUDE.md.

Pro Tip

Create a workflow trigger: 'When I say save state, create a SESSION_NOTES.md with current progress, pending tasks, and key decisions made.'

TIP 29

Lazy Load Context

25:03
What

Load context only when it is actually needed for the current task, rather than preloading everything upfront.

Why It Matters

Loading all possible context at the start wastes tokens on information you may never use. Lazy loading keeps your context lean and relevant.

How To Do It

Start with minimal context. Use @-mentions to bring specific files into context only when the conversation reaches that topic. Avoid loading entire directories upfront.

Pro Tip

Think of context like RAM — you would not load every application at startup; you open them as needed.

TIP 30

Give Verification Commands

26:09
What

Integrate build commands, debugging logs, and automated tests into your workflow so Claude can verify its own work.

Why It Matters

Without verification commands, Claude cannot tell if its changes actually work. Providing commands like npm test creates an autonomous improvement loop.

How To Do It

Add verification commands to your CLAUDE.md Validation section. Include: build command, test command, linting command, and any project-specific validation scripts.

Pro Tip

Create a comprehensive validation script that runs all checks in sequence. Add it as a workflow trigger.

TIP 31

Consider Opus for Complex Work

27:32
What

Switch to the Opus model for challenging tasks that require deep reasoning and complex problem-solving.

Why It Matters

Opus excels at debugging subtle race conditions, designing complex systems, refactoring tightly coupled code, and making architectural decisions. The cost is higher, but quality justifies it.

How To Do It

Use /model to switch to Opus before tackling a complex task. Switch back to Sonnet for straightforward implementation once the approach is decided.

Pro Tip

Use Opus strategically for the 20% of tasks that are genuinely complex. Do not use it for simple file edits where Sonnet performs equally well.

TIP 32

Read Thinking Blocks

28:18
What

Pay close attention to Claude's extended thinking blocks to identify assumptions, errors, and reasoning patterns.

Why It Matters

Thinking blocks reveal Claude's internal reasoning process. Catching errors here is far cheaper than catching them in generated code.

How To Do It

When Claude generates a response, read through the thinking section. Verify Claude's understanding, assumptions, and planned approach. If you spot an error, interrupt (Escape) and correct it.

Pro Tip

If Claude's thinking reveals a correct understanding but a suboptimal approach, reference specific parts of its thinking in your correction.

3

ACT 3: POWER USER

Tips 33–40

TIP 33

Four Composability Primitives

29:34
What

Understand the four core composable building blocks of Claude Code: Skills, Commands, MCPs, and Subagents.

Why It Matters

These four primitives are the foundation of Claude Code's extensibility. Mastering them transforms Claude from a simple code assistant into a customizable development platform.

How To Do It

Learn each primitive individually, then experiment with combining them. Start with the primitive that addresses your biggest current pain point.

Pro Tip

Think of these primitives like LEGO blocks. Each is simple on its own, but combining them creates powerful, custom workflows.

TIP 34

Skills = Recurring Workflows

29:54
What

Create Skills to encapsulate and automate workflows that you perform repeatedly.

Why It Matters

Skills capture patterns as reusable templates that Claude can execute consistently. This eliminates repetitive instruction-giving and ensures consistency.

How To Do It

Identify workflows you perform more than twice. Ask Claude to create a Skill for each one. Skills are stored in your project and can be triggered by name.

Pro Tip

Share Skills across your team by committing them to the repository. This standardizes workflows.

TIP 35

Commands = Quick Shorthand

31:33
What

Use Commands as quick shorthands for actions you perform frequently.

Why It Matters

Commands are lighter-weight than Skills and serve as quick triggers for common actions. They reduce typing and ensure consistent execution.

How To Do It

Define Commands for your most frequent single-step actions: run test suite, format code, or generate a specific type of file.

Pro Tip

Use Commands for simple actions (run tests, format code) and Skills for complex workflows (deploy feature, set up new module).

TIP 36

Never Create Commands Manually

32:18
What

Always ask Claude to create or update Skills and Commands for you rather than writing them by hand.

Why It Matters

Claude understands the correct format, syntax, and best practices. Manually creating them risks syntax errors or suboptimal structure.

How To Do It

Simply tell Claude what you want. For example: 'Create a skill called deploy-staging that runs our staging deployment pipeline with all safety checks.'

Pro Tip

When Claude creates a Skill, review and test it immediately. Then iterate to refine the steps and handle edge cases.

TIP 37

MCPs = External Service Docs

33:02
What

Think of MCPs (Model Context Protocols) as connectors that let Claude interact with external services and tools.

Why It Matters

MCPs dramatically extend what Claude can do by connecting it to databases, design tools, project management, and cloud services. They are particularly powerful for cross-tool workflows.

How To Do It

Use /mcp to see available MCPs. To find new ones, ask Claude: 'Find me an MCP for [service name].'

Pro Tip

Be selective about which MCPs you keep connected. Each one consumes context tokens even when idle.

TIP 38

Ask Claude to Install MCPs

33:52
What

Have Claude manage the installation and configuration of MCPs instead of doing it manually.

Why It Matters

MCP installation involves configuration files, authentication setup, and sometimes dependency management. Claude knows the correct steps for popular MCPs.

How To Do It

Tell Claude which MCP you want: 'Install the Figma MCP' or 'Set up the PostgreSQL MCP for our database.'

Pro Tip

After installation, verify the MCP is working by asking Claude to perform a simple operation with it.

TIP 39

Subagents = Isolated Context

34:15
What

Use Subagents to perform parallel or atomic tasks with isolated context windows, protecting your main context.

Why It Matters

Subagents run as separate instances with their own context. They return only results, keeping your main context clean. Invaluable for running tests while coding or exploring multiple approaches simultaneously.

How To Do It

Explicitly request them: 'Use a subagent to research the best pagination library' or 'Spawn a subagent to run the test suite while we continue working.'

Pro Tip

Ask one subagent to try approach A and another to try approach B, then compare results without polluting your main context.

TIP 40

Avoid Instruction Overload

37:10
What

Keep your prompts concise and avoid giving Claude too many instructions at once.

Why It Matters

When you overload Claude with instructions, attention is divided and quality suffers. Breaking work into focused, sequential prompts produces better results.

How To Do It

Instead of one massive prompt, break work into logical steps. Complete and verify each step before moving to the next.

Pro Tip

A good rule of thumb is one clear objective per prompt. If you are writing more than 3–4 sentences, consider splitting into multiple prompts.

4

ACT 4: ADVANCED

Tips 41–50

TIP 41

Run Multiple Instances

38:02
What

Operate multiple Claude Code instances simultaneously to juggle different tasks and maximize productivity.

Why It Matters

Running multiple instances lets you assign each to a different task, effectively multiplying your throughput. Each instance maintains its own context.

How To Do It

Open multiple terminal windows. Start a separate Claude Code instance in each. Assign each to a specific task or area of your codebase.

Pro Tip

Be mindful of API usage limits. Use Git branches or worktrees (Tip 44) to isolate changes across instances.

TIP 42

iTerm Split Panes

39:06
What

Use split panes in iTerm (or similar terminal emulators) to manage multiple Claude Code instances on a single screen.

Why It Matters

Split panes let you see all instances simultaneously, monitor their progress, and quickly switch between them.

How To Do It

In iTerm, use Cmd+D for vertical split and Cmd+Shift+D for horizontal split. Start a Claude Code instance in each pane.

Pro Tip

Create a saved iTerm layout for your most common multi-instance setup. Launch your full environment with a single action.

TIP 43

Enable Notifications

40:33
What

Configure Claude Code to send notifications (sounds or system alerts) when tasks complete.

Why It Matters

When Claude is working on a long-running task, notifications let you fully focus on other work and respond immediately when Claude needs input or has finished.

How To Do It

Enable notifications in your Claude Code settings or terminal configuration. Configure sound alerts for task completion, error encounters, or input needs.

Pro Tip

Set different notification sounds for completion versus errors. This lets you gauge urgency without looking at the terminal.

TIP 44

Git Worktrees for Isolation

41:10
What

Use Git worktrees to work on different code executions within the same project simultaneously without branch switching.

Why It Matters

Git worktrees create separate working directories that share the same Git repository but operate on different branches. Zero risk of file conflicts.

How To Do It

Create a worktree with: git worktree add ../my-feature feature-branch. Run a separate Claude Code instance in each worktree.

Pro Tip

Name worktrees descriptively (e.g., worktree-api-refactor, worktree-ui-fixes) so you can quickly identify which instance is working on what.

TIP 45

/chrome Connects Browser

41:40
What

Use the /chrome command to connect Claude Code to a browser, enabling it to navigate web pages and interact with web interfaces.

Why It Matters

Claude can navigate to your running application, inspect UI elements, read console errors, interact with forms, and scrape documentation sites.

How To Do It

Type /chrome to establish a browser connection. Claude can then navigate URLs, interact with elements, take screenshots, and read page content.

Pro Tip

Use /chrome to have Claude verify its own frontend changes. After modifying a component, Claude can navigate to the page and fix visual issues.

TIP 46

Powerful for Debugging

43:17
What

Leverage the /chrome browser connection for advanced debugging of web applications.

Why It Matters

With /chrome, Claude can directly navigate to the problematic page, fill forms, read console errors, inspect network requests, and observe actual behavior.

How To Do It

Connect /chrome, then ask Claude to navigate to the buggy page. Describe the bug and let Claude reproduce and investigate it firsthand.

Pro Tip

For API debugging, have Claude use /chrome to make requests through the browser's network tab while simultaneously reviewing backend code.

TIP 47

Hooks Intercept Actions

43:41
What

Implement hooks (pre-hooks and post-hooks) to automatically perform actions before or after Claude executes commands.

Why It Matters

Hooks add automation layers. Pre-hooks can validate inputs; post-hooks can clean up or verify results. This creates reliable, automated workflows.

How To Do It

Define hooks in your Claude Code configuration. Pre-hooks run before specified commands, post-hooks run after.

Pro Tip

Start with a small set of critical hooks (like auto-formatting after edits) and expand as you identify repetitive manual steps.

TIP 48

Auto-Format with PostToolUse

44:10
What

Set up PostToolUse hooks to automatically format or lint code after every edit Claude makes.

Why It Matters

Claude generates well-structured code but may not always match your exact formatting preferences. PostToolUse hooks ensure all code matches your standards automatically.

How To Do It

Configure a PostToolUse hook that runs your project's formatter after Claude edits files. For example, run prettier --write on modified files.

Pro Tip

Include both formatting and linting in your PostToolUse hooks. Formatting fixes style; linting catches potential issues.

TIP 49

Block Dangerous Commands

44:24
What

Use hooks to prevent Claude from executing commands that could cause catastrophic damage.

Why It Matters

A pre-hook that blocks commands like rm -rf /, DROP DATABASE, or force pushes to main acts as a final safety net against catastrophic mistakes.

How To Do It

Create pre-hooks that intercept commands and check them against a blocklist. Include patterns for database destruction, recursive deletion, and force pushes to protected branches.

Pro Tip

Maintain a team-wide blocklist that evolves with your infrastructure. When someone discovers a new dangerous pattern, add it to the shared hooks configuration.

TIP 50

Explore the Plugin Ecosystem

44:43
What

Discover and utilize community-shared plugins that combine various composable elements for enhanced workflows.

Why It Matters

The community creates and shares plugins for common workflows like CI/CD integration, code review automation, and documentation generation. This accelerates your setup.

How To Do It

Search for Claude Code plugins in community repositories, forums, and the official ecosystem. Evaluate and install plugins that match your workflow.

Pro Tip

Contribute your own plugins back to the community. Packaging useful Skills or workflows as plugins helps others and often results in community improvements you can benefit from.