Post your build ideas
LocalASO Track App Store keyword ranks in every countryFind your vibe. Find you job which is just for you and your dataDealtab Brand Deal Tracker That Does The Work For YouIs Major Cooked? Free AI risk score + roast for your college majorWiral.Social LinkedIn, Scheduler, Scheduling Tool, Ghostwriter
Solo Era solo activities, solo maxxing, sidequests, challengeCadentiq daily routine, wellbeing, self care, healthy habitsTexeva Your businessKeepsake Project Management, Freelancers, DesignersOrvyx AI You create

Claude Code tutorial: your first session, step by step

To use Claude Code, install it, open a terminal in a project folder and run claude. Begin with read-only questions about the code, then ask for one small change and approve or reject the edit it shows you. Press Shift+Tab to change permission modes, Esc to stop a response, /rewind to undo, and /clear when you switch tasks. The nine steps below fit in a single sitting.

What do you need before this Claude Code tutorial?

Three things: Claude Code installed, an account that can log in, and a project folder to practice on. If you have not installed it yet, follow how to install Claude Code, then come back. If you are weighing which plan to buy, the Claude Code pricing guide lists what each one includes.

Use a project you can afford to break, ideally one under git version control. A throwaway folder works. This page teaches the tool itself. The guide to building an app with Claude Code covers going from an idea to a finished app; keep that for after you are comfortable here.

Create a safe practice project (any terminal)
mkdir claude-practice
cd claude-practice
git init
echo "# Practice project" > README.md
git add README.md && git commit -m "Start practice project"
claude

Committing first gives you a clean starting point. Whatever Claude does next, you can see it with git diff and discard it with git.

Step 1: How do you start a Claude Code session?

Open a terminal in the project folder and type claude. The first time, it asks you to log in through your browser. After that you see a prompt with the version, the current model and the working directory above it. Type a message and press Enter, the same as chatting.

Everything Claude does is relative to the folder you started it in. Start it at the root of one project, not in your home directory. Type /help any time to list commands, and /exit (or Ctrl+D twice) to leave.

Commands you run in your shell to start Claude Code
CommandWhat it does
claudeStarts an interactive session
claude "fix the build error"Starts a session with a first prompt already sent
claude -p "explain this function"Runs one question, prints the answer, then exits
claude -cContinues the most recent conversation in this directory
claude -rLets you resume an earlier conversation

These come from the official quickstart. The full list is in the CLI reference, and the guide to Claude Code commands covers the slash commands you type inside a session.

Step 2: What should you ask first?

Ask questions before you ask for changes. Claude reads your project files as it needs them, so you do not paste code in. Questions cost nothing to undo and show you how well it understands the project.

Five read-only first prompts
what does this project do?
what technologies does this project use?
where is the main entry point?
explain the folder structure
how do I run the tests for this project?

Read the answers critically. If Claude gets the structure wrong, correct it now: "the API lives in server/, not src/." You can also ask about the tool itself, for example "what can Claude Code do?" or "how do I create custom skills in Claude Code?", and it will answer from its own documentation.

On an empty practice folder there is little to explain, so skip to step three and create something first.

Step 3: How do you make your first change?

Ask for one small, specific change. Vague requests make Claude explore widely and guess. Specific ones make it work fast.

  • Weak: "fix the bug."
  • Strong: "fix the login bug where users see a blank screen after entering wrong credentials."
  • For an empty folder: "create a small script that prints the current date, and add a README line explaining how to run it."

Claude finds the right file and shows you the change before it applies it. If it asks, choose Yes to approve or say no and tell it what to do differently. Read the diff each time. After a few edits, run /diff to review everything in your working tree, including what Claude changed so far.

Then test the result yourself. Run the script or the tests. Asking Claude to run them is fine, but looking at the output with your own eyes is how you learn what its work is worth.

Step 4: What are permission modes and which should you use?

A permission mode decides what Claude may do without asking you. Press Shift+Tab to cycle through modes mid-session; the status bar shows which one is active. Which mode a session starts in depends on your version and settings, so check the status bar the first time.

Claude Code permission modes, from the official docs
ModeWhat runs without askingBest for
defaultReads onlySensitive work, reviewing every action
acceptEditsReads, file edits, and common filesystem commands such as mkdir, touch, mv and cpIterating on code you are reviewing
planReads; Claude blocks edits until you approve a planExploring before changing anything
autoEverything, with background safety checksLong tasks and fewer prompts
bypassPermissionsEverythingIsolated containers and virtual machines only

For your first sessions, stay in the default manual mode so you see each action. Move to acceptEdits once you trust a task, and use plan mode before anything bigger than a small fix: start with claude --permission-mode plan, or press Shift+Tab until it reads plan mode. The plan mode guide shows how to review a plan, and the permissions guide covers allow and deny rules for specific commands.

Step 5: Which shortcuts make Claude Code faster?

A handful of keys and prefixes do most of the work. Learn these before anything else.

Keys and prefixes worth learning first
InputWhat it does
@ then a pathAutocompletes a file path so you can point Claude at a specific file
/ at the startOpens the list of commands and skills; Tab completes
! at the startShell mode: runs a command directly and adds its output to the session
EscStops the current response mid-turn; Claude keeps the work done so far
Esc twice (empty prompt)Opens the rewind menu
Shift+TabCycles permission modes
Up arrowRecalls earlier prompts
Ctrl+CInterrupts a running operation; with nothing running, the first press clears your input and a second exits

Pointing Claude at the file beats describing it: "refactor @src/utils/date.ts to remove the duplicated parsing" avoids a search. Pressing Esc the moment a response heads the wrong way saves tokens and time.

Step 6: How do you undo a change Claude made?

Claude Code takes a checkpoint of your code before each prompt that starts a turn. Run /rewind, or press Esc twice on an empty prompt, to open the rewind menu. It lists your earlier prompts. Choose one, then choose what to restore:

  • Restore code and conversation to that point.
  • Restore conversation only, keeping the current code.
  • Restore code only, keeping the conversation.
  • Summarize from here or up to here, which compresses part of the conversation to free space.

Checkpoints cover edits made by Claude's file-editing tools. They are not a replacement for git. Commit before big tasks, and use git diff and git restore for anything outside what rewind tracks. Together they make it safe to let Claude try things.

Step 7: Can Claude Code handle git for you?

Yes, in plain language. These prompts come from the official quickstart:

Git prompts for Claude Code
what files have I changed?
commit my changes with a descriptive message
create a new branch called feature/quickstart
show me the last 5 commits
help me resolve merge conflicts

Read the commit message before you accept it. Claude Code asks before it runs commands in the default mode, so you see the exact git command each time. That is a good way to learn git too.

Step 8: How do you keep a long session useful?

Every session has a limited context window. As a conversation grows, the window fills, usage climbs, and Claude Code summarizes older history automatically when it nears the limit. A long session can drift from what you first asked for. Manage it on purpose:

Commands for managing a session
CommandUse it when
/contextYou want to see how full the context window is, and which memory files loaded
/compact [focus]The session is long but you want to continue it; optionally say what to preserve
/clearYou are starting unrelated work and want an empty context
/resumeYou want to go back to an earlier conversation
/modelYou want a different model; the default is fine to start
/usageYou want to see your plan limits or token usage

A good rhythm is one task per session. Finish it, commit, run /clear, and begin the next. If you close the terminal mid-task, claude -c picks up the last conversation in that folder.

Step 9: How do you teach Claude Code about your project?

Run /init in a real project. Claude inspects the codebase and writes a starting CLAUDE.md with build commands, test instructions and the conventions it found. Claude Code reads that file at the start of every session, so it stops asking things you have already answered. Edit it down to the facts Claude cannot guess; the guide to writing CLAUDE.md has a full template.

Later, when you find yourself repeating a procedure, it belongs in a skill, and when something must happen every time without fail, such as running a formatter, it belongs in a hook. Those are covered in the guides to Claude Code skills and Claude Code hooks.

What should you build to practice?

Pick something small enough to finish in one sitting, with an output you can check. A script, a one-page tool, a command-line helper. The board has plenty that other people posted and will not build. Three that fit a first session, all posted on the board:

Browse all developer tools ideas for more. Each idea has a generated build prompt you can copy into Claude Code as your first message. Then follow this loop: plan, build one piece, run it, review the diff, commit.

A six-prompt practice session
1. what does this folder contain? (or: I want to build [idea]; suggest a minimal first version, no code yet)
2. [switch to plan mode with Shift+Tab] propose a plan for the smallest working version
3. [approve the plan] build step 1 only, then stop so I can run it
4. run it and show me the output
5. /diff   (review everything that changed)
6. commit my changes with a descriptive message, then /clear

What mistakes do beginners make with Claude Code?

  • Approving by reflex. Read the command or the diff before you press Yes. A prompt that installs a package or deletes files deserves a second look.
  • Asking for everything at once. Break work into steps. "Build a dashboard" produces a guess. A numbered list of three steps produces something checkable.
  • Skipping version control. Without a commit to return to, a bad run is hard to undo.
  • Never clearing. One giant session for a whole day drifts. Use /clear between tasks.
  • Not giving it a way to check. Include a test, an expected output or a command to run. When Claude can verify its own work, it catches problems before you do.

Once these are habits, go deeper with the Claude Code best practices. Claude Code also runs outside the terminal, in the desktop app, on the web and in editors; the VS Code extension guide covers the editor route.

Frequently asked questions

How do I use Claude Code?

Open a terminal in your project folder and run claude. Log in the first time, then type what you want in plain English. Start with questions about the code, then request one small change, read the diff, and approve it. Use Shift+Tab to change permission modes and /rewind to undo changes.

Is Claude Code good for beginners?

It can be, if you stay in the default permission mode and read each action before approving. You do not need to write code, but you do need to describe tasks precisely and check results. Use git so any mistake can be undone, and keep each session to one small task.

What is the first thing to do in Claude Code?

Ask a read-only question, such as what does this project do, or where is the main entry point. That shows how well Claude understands your project without changing anything. Then run /init to generate a starting CLAUDE.md, and request one small, specific change.

Do I need to know how to code to use Claude Code?

You do not need to write code, but you need to read what it produces well enough to judge it and run it. Start with small projects and a clear brief. Claude Code builds what you ask for, including a vague request, so precise descriptions matter more than syntax.

How do I stop or undo something Claude Code is doing?

Press Esc to stop the current response; Claude keeps the work done so far. To undo changes, run /rewind or press Esc twice on an empty prompt and pick a checkpoint. Checkpoints cover Claude's file edits, so commit to git before big tasks as a second safety net.

What commands should a beginner learn first?

Learn /help, /init, /clear, /compact, /rewind and /usage, plus the shell commands claude, claude -c and claude -p. Inside a prompt, use @ to point at files and ! to run a shell command. Shift+Tab cycles permission modes, and Esc stops a response.

Created with AI assistance and edited for this site. Examples are illustrative and do not represent customer research. About the publisher.