Your first Claude Code session

Start Claude Code in a project, sign in, ask it about your code before changing anything, approve one small change, use Git safely, and learn the handful of commands from Anthropic's quickstart that you will use every day.

Beginner8 min readUpdated November 29, 2026

Before you begin

This lesson follows Anthropic's Claude Code quickstart as we read it on November 29, 2026, with our own advice on working safely added around it. You need Claude Code installed (the previous lesson covers that) and an account that includes it.

Pick a project you know reasonably well for your first session: a small website, a script, a side project. Make sure it is under version control with Git and that you have committed your current work. That way every change Claude Code makes is easy to see and easy to undo.

Start it in a project

Claude Code works on the folder you start it in. Open a terminal, go to your project and start it. The quickstart shows:

cd /path/to/your/project
claude

Replace the path with your own project's folder.

On first use, the quickstart says Claude Code prompts you to log in. With a Claude subscription or Console account, you follow the prompts and finish signing in in your browser. Claude Code then stores your login. If you later need to switch accounts or sign in again, the quickstart says to type /login inside a running session.

When it is ready, you see the Claude Code prompt, with the version, the current model and the working folder shown above it. That last detail is worth a glance every time: it confirms which project Claude Code is about to work on.

Ask before you change anything

Your first prompts should be questions, not changes. The quickstart suggests starting with prompts like these:

what does this project do?
what technologies does this project use?
where is the main entry point?
explain the folder structure

The quickstart notes that Claude Code reads your project files as needed, so you do not have to paste anything in. Asking questions first does two useful things. It lets you judge how well it understands your project before you trust it with edits. And it builds up shared context in the session, so later requests are more likely to land in the right place.

Push with follow-ups, just as you would in a chat. "Which file handles user login?" "Why is that function so long?" "What would break if I renamed this?" If an answer seems wrong, say so and point to the file you think is relevant.

Make one small change

Now try a small, low-risk change. The quickstart's example is adding a hello world function to the main file. A real equivalent might be fixing a typo in a page, improving an error message or adding a comment.

First change prompt
The error message when the password is too short just says "Invalid". Change it to "Password must be at least 8 characters". Show me the change before applying it.

The quickstart says Claude Code finds the right file and shows you the change, and that if it asks before making the change, you select Yes to approve.

Read the change before approving. Is it the file you expected? Did it change only what you asked? Small first changes make this easy to check, which is exactly why they are a good place to start.

Ask it about itself

You do not have to memorise the documentation. The quickstart suggests asking Claude Code about its own capabilities, with prompts such as "what can Claude Code do?" and "how do I create custom skills in Claude Code?". For anything important, such as settings that affect permissions, follow its answer up on Anthropic's documentation pages, which are the authority.

Worked example: reviewing a change properly

Say you asked for the password error message change above and it reports success. A quick, thorough review takes a couple of minutes:

  1. Read its summary. Which files does it say it changed? One file is expected for this task. Five would be a warning sign.
  2. Ask Git. Type "what files have I changed?" or look at the diff yourself. Confirm the list matches the summary.
  3. Read the actual lines. Is the new message exactly what you asked for? Did anything else change nearby, such as formatting or other messages?
  4. Run it. Open the page or run the tests and trigger the error to see the new message.
  5. Commit with a clear message, or ask Claude Code to write one, and read it before accepting.

This feels slow the first few times. It becomes quick with practice, and it is the habit that keeps a fast tool from quietly making a mess.

Permission modes

The quickstart explains that each session has a permission mode, which sets which actions Claude Code can take without asking you first, and that pressing Shift+Tab at any time switches the mode for the current session.

For your first sessions, stay in a mode where it asks before editing files and running commands. You will approve more often, but you will see exactly what it does, which is how you learn to trust it, or not, for your kind of work. Relax the setting later, for specific kinds of work, once you know how it behaves in your project.

Use Git with it

The quickstart shows Claude Code handling Git conversationally, with prompts like these:

what files have I changed?
commit my changes with a descriptive message
create a new branch called feature/quickstart

A safe routine for each task:

  1. Start from a clean, committed state.
  2. For anything bigger than a one-line fix, ask it to create a branch.
  3. Let it make the change and run the tests.
  4. Review the changes yourself, then commit.
  5. If it went wrong, you can return to the last commit. Ask it to explain the Git commands it proposes before you approve them, especially anything that discards work.

A slightly bigger task

Once a small change has gone well, try something with a few steps. The quickstart's examples include adding input validation to a registration form and fixing a bug where users can submit empty forms. Its tips suggest being specific and breaking complex tasks into steps.

Bigger task prompt
Users can submit the feedback form with an empty message. First, find where the form is handled and explain the cause. Then propose a fix and a test that covers it. Wait for my OK before editing.

Explain first, then plan, then edit. That order catches misunderstandings before any file changes.

The handful of commands to know

The quickstart lists the commands you will use most. From your terminal:

  • claude starts an interactive session.
  • claude "task" starts a session with a first prompt, for example claude "fix the build error".
  • claude -p "query" runs a one-off query and exits.
  • claude -c continues the most recent conversation in the current folder.
  • claude -r resumes a previous conversation.

Inside a session:

  • /help shows the available commands.
  • /clear starts a new conversation; /resume brings back the previous one.
  • /exit , or Ctrl+D twice, exits Claude Code.

The quickstart also mentions typing / to see available commands and skills, Tab for command completion and the up arrow for command history. Anthropic's command reference has the full list.

Ending a session well

  • Leave the project in a clean state. Commit what you want to keep, and discard experiments you do not.
  • Note what you learned. If you had to explain the same thing twice, such as how to run the tests, that belongs in a CLAUDE.md file, covered in the next lesson.
  • Exit cleanly with /exit, so the next session starts fresh, or continue later with claude -c if you want to pick up where you left off.

Common first-session mistakes

  • Starting in the wrong folder. It works on the folder you started it in. Check the folder shown above the prompt.
  • Asking for too much at once. "Rebuild the whole app in a new framework" is a recipe for a mess. Small steps.
  • Approving without reading. The approval step only helps if you look.
  • Skipping Git. Without a commit to go back to, a bad change is much harder to undo.
  • Keeping one session for everything. Use /clear between unrelated tasks so old context does not confuse new work.

Try it

  1. Commit your current work.
  2. Start Claude Code in your project and sign in.
  3. Ask three questions about the project and check the answers against what you know.
  4. Make one small change, review it, and commit it.
  5. Type /help and look through the commands available to you.

Questions people ask

Will it change files without asking?

That depends on the permission mode. The quickstart says the mode sets which actions it can take without asking, and that Shift+Tab switches it. Keep it asking while you are learning.

Can I go back to an earlier conversation?

Yes. The quickstart lists claude -c to continue the most recent conversation in the current folder, claude -r to resume a previous one, and /resume inside a session.

What if it says it fixed something but it did not?

Run the tests or check the behaviour yourself, tell it what still fails, and paste the error. Treat "done" as a claim to verify, not a fact.

Does it need my whole project to be tidy first?

No. It reads files as it needs them. But a project with a clear structure, working tests and a short README is easier for it to understand, just as it is for a new colleague.

Sources: Claude Code docs: Quickstart · Claude Code docs: Overview