Module 4 · Page 6 of 8 · 15 minutes

Helpful tips for working with Claude Code

Claude Code works best when you give it the right evidence, keep the task focused, and reset when the conversation becomes cluttered.

You do not need to master every advanced feature in Claude Code. The tips below are the ones most useful for the kinds of projects you are building now.

These tips are extracted from Anthropic's Claude Code best practices guide.

Protect the context window

Claude's context window contains the conversation, the files it reads, and the output from commands and tools. It can fill up surprisingly quickly. As the context becomes crowded, Claude may lose track of earlier instructions or make more mistakes.

Keep each session focused. More context is not always better context.

Avoid a kitchen-sink session: one long conversation containing exploration, failed attempts, repeated corrections, unrelated questions, and then a completely new task.

Tip If Claude keeps going down the wrong path, correct it once or twice. If the same problem keeps returning, use /clear or simply start a new session, and start fresh with a cleaner prompt that incorporates what you learned.

A fresh session is often better than continuing to add corrections on top of failed approaches.

Show Claude what you mean

Sometimes an example communicates your goal more clearly than a long description.

Use screenshots

You can copy and paste an image into Claude Code or drag and drop it into the prompt. Screenshots are especially useful for visual work.

Instead of
Make the dashboard look better.
Try
[paste screenshot]

Make my dashboard look like this. When you're done, take a
screenshot of the result, compare the two, and fix the remaining
differences.

Reference existing patterns

If your project already contains something similar to what you want, point Claude to it. That is often better than describing the design from scratch.

Example
Look at the summary cards already used on the homepage.
Follow the same layout and styling when adding a card for
operating margin.

Point directly to the source

If a specific file contains the rule or information Claude needs, tell it where to look rather than asking it to search broadly.

Example
Use @pricing-policy.md to determine which discount rules
should apply.

In Claude Code, @ is a convenient way to reference a file directly.

Describe the symptom, not the fix

When something is broken, you do not need to know which line of code should change. Tell Claude what happened, what you expected, and what a successful fix should look like.

Example
When I select "West" from the region filter, the revenue chart
becomes blank even though the source data contains West-region
records.

Find the cause, fix it, and verify that the filter works for
every region.
Tell Claude what happened, what you expected, and how you will know it is fixed.

Explore → Plan → Execute

For larger or uncertain tasks, separate understanding the problem from changing the project.

Explore
  ↓
Understand the project and relevant information
  ↓
Plan
  ↓
Decide what should change
  ↓
Execute
  ↓
Build and verify

You do not need this overhead for every tiny change. Use it when the task is unclear, touches several parts of the project, or could easily go in the wrong direction.

Let Claude interview you

Sometimes you know what you want at a high level but do not yet know all the requirements. Instead of guessing what details to include, ask Claude to interview you.

Example
I want to automate this monthly report. Before building anything,
interview me about the workflow, exceptions, output requirements,
and anything else you need to know.

This can surface missing decisions and business rules before the agent starts building.

Interrupt bad work early

Press Esc

If Claude starts moving in the wrong direction, press Esc. You do not need to wait for it to finish. The conversation remains, so you can immediately redirect it.

Use /clear or simply start a new session when the current session has gone bad

If you have corrected the same issue several times and Claude still returns to the wrong approach, stop trying to rescue the conversation. Use /clear and restart with a better description of the task.

Do not correct forever. Sometimes the best correction is a fresh session.

Do not explore forever

Exploration is useful, but it also consumes time and context. Give Claude boundaries when the project is large.

Example
Inspect the files related to inventory forecasting and identify
the three most relevant ones. Do not explore unrelated folders.

Explore enough to make a good decision—not everything that could possibly be relevant.

Helpful Claude Code commands

Claude Code has many slash commands, but you only need a small handful for everyday work. Type / at the start of a prompt to see the commands available in your version.

Command What it does
/model Switch the model Claude Code is using.
/resume Return to an earlier conversation.
/compact Summarize the conversation so far to free up context.
/context Show what is currently taking up space in the context window.
/usage Show usage information, including session cost or plan usage limits.
/memory View and manage CLAUDE.md files and Claude Code's auto memory.
/clear Start a fresh conversation with empty conversational context.
/plan Enter Plan mode.
/permissions View or change the rules controlling which tools Claude can use without asking.
/mcp View and manage MCP server connections.
/help Show help and available commands.

Workflow habits at a glance

If you want to... Try this
Show Claude the design you want Paste or drag in a screenshot
Reuse an existing style Point to a similar feature or file
Give Claude the right evidence Point directly to the source
Reference a file quickly Use @filename
Handle a larger or uncertain task Explore → Plan → Execute
Discover missing requirements Ask Claude to interview you
Stop work that is going in the wrong direction Interrupt early and redirect
Prevent endless exploration Explicitly scope what Claude should inspect
Keep performance strong Keep sessions focused and context clean

These are habits, not rigid rules. As you use Claude Code more, you will develop a feel for when to give it freedom and when to narrow the task.

Next · Page 7 of 8
Use case I: event recap