Uncover AIGuides
  1. Guides
  2. Tool guides
  3. How to use Claude Code
Guide · Claude Code

How to use Claude Code

Claude Code works best when you treat it like a capable new colleague: show it the project, give it one clear task and a way to check its own work. This tutorial goes from your first prompt to project rules, reviews and larger jobs.

Founder, Uncover AI
Updated Steps and commands from Anthropic's Claude Code docs, plus our own newsletter guidance

We have no affiliate deal with Anthropic, and nobody paid to appear on this page.

Logos are trademarks of their owners, shown for identification.

Before you start

You need a paid Claude plan, Claude Code installed, and a folder to work in. Claude Code is Anthropic's coding agent: it reads the files in a folder, edits them, runs commands and works with git, while you describe what you want 1. It suits developers, and also founders and marketers who want a small tool, a landing page or a data cleanup without writing the code themselves 3.

Know the permission modes before your first task. In Manual mode Claude asks before every edit or command. In Plan mode it reads and proposes without changing files. In Auto mode, the starting mode in recent versions, a separate classifier lets routine actions through and blocks risky ones 8. Press Shift+Tab to switch. Anthropic warns that the bypass mode, which skips every check, belongs only in an isolated container or virtual machine 8.

Your first task

Start with questions about a project you already know, then ask for one small change. Testing Claude on work where you know the right answers shows you quickly whether it reads your project the way you do.

  1. Open the projectIn a terminal, go to the folder and start Claude Code. In the desktop app, click Code, choose Local and open the folder 2 4.
  2. Ask before you change anythingAsk what the project does and where things live. Check two or three answers against what you know.
  3. Give one specific taskName the file, the behavior and what "done" looks like. "Fix the bug" gets worse results than a description of the symptom 2.
  4. Review and approveRead the proposed change. Approve it, or press Esc to stop Claude and redirect it 3.
  5. CommitAsk Claude to commit with a clear message, so the change is saved in git 2.
cd /path/to/your/project
claude

Prompts that work well for a first session, from Anthropic's quickstart 2:

what does this project do?

explain the folder structure

fix the login bug where users see a blank screen after entering wrong credentials

commit my changes with a descriptive message

No code project? Point Claude at a folder of files instead. Anthropic's beginner guide uses requests like "look at the screenshots on my Desktop and rename them based on what's in each image" 3. A marketer might try:

Read the CSV exports in this folder. Build a one-page HTML report with monthly signups by channel and a chart. Tell me which numbers you could not match across files.

Tip: type / to see every command and skill, and /help for a short list. claude -c continues your last conversation in that folder 2.

Project instructions in CLAUDE.md

CLAUDE.md is a plain text file Claude reads at the start of every session. Put in it what you would otherwise explain again each time: build and test commands, conventions and "always do X" rules 7.

Run /init and Claude writes a first version from your codebase, with the build commands, test steps and conventions it finds. If the file exists, /init suggests improvements instead of overwriting it 7. A short example in Anthropic's style 6:

# Code style
- Use ES modules (import/export) syntax, not CommonJS (require)
- Destructure imports when possible (eg. import { foo } from 'bar')

# Workflow
- Be sure to typecheck when you're done making a series of code changes
- Prefer running single tests, and not the whole test suite, for performance
What to put in CLAUDE.md, adapted from Anthropic's best practices, checked 23 Oct 2026.
IncludeLeave out
Commands Claude can't guessAnything it can learn by reading the code 6
Style rules that differ from the defaultsStandard conventions it already knows
How to run tests, and which runnerLong API documentation; link to it
Branch and pull request conventionsFacts that change often
Gotchas that aren't obvious"Write clean code" and other generic advice

If your repository already has an AGENTS.md for another coding agent, Claude Code reads it when there is no CLAUDE.md 7. Claude also keeps its own notes across sessions, called auto memory, which is on by default; open /memory to see or turn it off 7. Long procedures that only matter sometimes belong in a skill instead: see Claude Code skills and plugins.

Reviewing and testing changes

Give Claude a check it can run, and it fixes its own mistakes before you see them. Anthropic calls this the difference between a session you watch and one you can walk away from 6. A check is anything with a pass or fail: tests, a build, a linter, or a screenshot compared against a design.

write a validateEmail function. example test cases: user@example.com is true, invalid is false, user@.com is false. run the tests after implementing

the build fails with this error: [paste error]. fix it and verify the build succeeds. address the root cause, don't suppress the error

Plan before big changes

For work that touches several files, start in Plan mode: press Shift+Tab or begin the prompt with /plan. Claude reads files and writes a plan but does not edit your source until you approve it. Press Ctrl+G to edit the plan yourself before Claude starts 8.

Get a second opinion

Run /code-review, a built-in skill that checks the current diff for bugs in a fresh context, or ask Claude to "use a subagent to review" against your plan 6. A reviewer that did not write the code is not biased toward it. In the desktop app, click the +12 -1 change counter to open the diff, comment on specific lines, and Claude revises 4.

Undo safely

Press Esc twice or type /rewind to restore the conversation, the code, or both to an earlier point 6. That makes it cheap to let Claude try a risky idea. For checks that must run every time, such as a linter after each edit, ask Claude to write a hook; hooks run on every event, while CLAUDE.md is guidance 6.

Working with larger codebases

On a big project, keep each session focused. Opus 5.5 runs with a 1 million token window by default 10, and Anthropic says that with compaction near the top of it you'll rarely run out of context. Every request still sends the whole conversation, so use /clear between unrelated tasks: a focused context gets better answers and costs less 6.

Use subagents to investigate how our authentication system handles token refresh, and whether we have any existing OAuth utilities I should reuse.

I want to build [brief description]. Interview me in detail using the AskUserQuestion tool. Ask about technical implementation, UI/UX, edge cases, concerns, and tradeoffs. Keep interviewing until we've covered everything, then write a complete spec to SPEC.md.

Once a workflow is routine, you can run it without the chat window. claude -p "your prompt" runs one task and exits, which is how teams put Claude Code into scripts and CI 6.

Saving usage

Claude rereads your whole conversation on every message, so short, focused sessions last longest. On Pro and Max, Claude Code shares one five-hour and weekly limit with Claude chat 12. These are the habits our newsletter told readers to fix in October 2026, checked against Anthropic's docs:

  1. One task per sessionType /clear when you switch to unrelated work; stale context costs tokens on every message 9.
  2. Rewind instead of arguingAfter two failed corrections, rewind or clear and send a better prompt 6. Failed attempts left in the chat are re-sent with every later message 9.
  3. Ask side questions with /btwThe answer never enters the conversation history 6.
  4. Match the effort and model to the jobOpus 5.5 and Sonnet 5.5 default to medium effort; raise it with /effort only for hard problems 10. Anthropic's advice: "plan with Opus, execute with Sonnet" 11.
  5. Compact before a breakYour first message after a long pause reprocesses the full context 9. Run /compact with what to keep, such as /compact Focus on the API changes 6.

Type /usage to see your plan bars and what used them, by skill, subagent, plugin and MCP server. It suggests fixes for anything behind 10% or more of recent usage, and pressing f applies the ones it can 9. Our guide to Claude usage limits covers the plan side.

Questions people ask

Can I use Claude Code if I can't code?

Yes. Anthropic's beginner guide says you describe what you want in plain English and Claude writes the code. The desktop app's Code tab avoids the terminal entirely; start with a small task you can check yourself.

How do I use Claude Code in VS Code?

Install the Claude Code extension from the Extensions view, open its panel and sign in with your Claude plan. You get inline diffs, plan review and @-mentions of files; the same works in Cursor.

What should I put in CLAUDE.md?

Commands Claude can't guess, style rules that differ from the defaults, test instructions and project gotchas. Keep it under 200 lines and run /init to generate a first draft.

How do I stop Claude Code asking permission every time?

Use Auto mode, where a classifier approves routine actions and blocks risky ones, or pre-approve commands you trust with /permissions. Avoid the bypass mode outside an isolated machine.

How do I undo what Claude Code did?

Press Esc twice or type /rewind to restore code, conversation or both to an earlier checkpoint. Checkpoints only cover Claude's own file edits, so commit to git as well.

About the authorFounder, Uncover AI

Anthony Chebat is the founder of Uncover AI and writes the Uncovering AI newsletter, read by more than 195,000 people. He has written about AI tools in the newsletter since 2023. Every guide here is checked against the vendors' own pricing and help pages and updated when plans or models change.

Anthony on LinkedIn

Sources

  1. Claude Code overview
  2. Claude Code quickstart
  3. Terminal guide for new users
  4. Get started with the desktop app
  5. Claude Code advanced setup
  6. Claude Code best practices
  7. How Claude remembers your project (CLAUDE.md)
  8. Claude Code permission modes
  9. Claude Code: manage costs effectively
  10. Claude Code model configuration
  11. Models, usage and limits in Claude Code
  12. Using Claude Code with your Pro or Max plan
  13. Claude pricing