You already have a project folder, either code you exported from an app builder or a small tool someone handed you, and you have been told Claude Code is the tool to graduate to. This walkthrough covers one real session on that project and the four habits that decide whether the agent helps you or quietly ruins a week of work: start from a clean git commit, decide what it may touch before it starts, make it plan before it edits, and review the result one commit at a time.
What you need first: a terminal you can open, git installed so that git --version prints a version, a Claude account (a paid Claude plan or Anthropic Console credits, because Claude Code bills separately from chatting), and a project small enough to describe in one sentence. You do not need to read code for any of this, but you do need to be willing to look at file names and diffs.
1. Put the folder under git before the agent touches anything
Claude Code writes directly to your files, and there is no accept-or-reject diff window between you and the disk. Git is the only undo that survives. Open a terminal in the project folder and make a baseline commit:
1cd path/to/your-project
2git init
3git add -A
4git commit -m "baseline before using Claude Code"
5git statusYou should see nothing to commit, working tree clean. If git status lists modified files, commit or stash them before you continue. A dirty tree breaks the whole method, because from then on you cannot tell your edits from the agent's.
If the folder contains a .env file, a database file, or anything holding a password, add those names to .gitignore and commit again. You are about to give an agent read access to every file in this directory, and you do not want credentials sitting in a diff you might push somewhere later.
2. Install it, start it in the project root, and write down how the project runs
Install Claude Code with npm (npm install -g @anthropic-ai/claude-code, which needs Node.js 18 or newer) or with the native installer from the docs. Install routes and flags change often, so if a line here fails, check the current install page before assuming you did something wrong.
Then, from inside the project folder rather than your home directory, run:
1claudeThe first run walks you through login. You should land in an interactive prompt inside your project, with a line under the box telling you which model and which permission mode you are in.
Now teach it this project once so you do not repeat yourself every session. Type /init. Claude reads the folder and writes a CLAUDE.md file summarising what it found. Open that file and correct it: add the command that runs the app, the command that runs the tests, and one line saying what the project is. That file is read at the start of every session, which makes it the cheapest place to record a fact you would otherwise repeat, such as "the dev server is npm run dev on port 3000" or "do not touch legacy/". If you correct the agent on the same point twice, the correction belongs in CLAUDE.md, not in a third prompt.
3. Decide what it is allowed to touch, before it asks
Every action Claude Code takes runs with your user account's power: the same files, the same credentials, the same ability to push to git, call your cloud provider, or delete a database row. The boundary question is therefore not whether the tool is trustworthy, but what on this machine you would not want an AI to touch.
At first it asks roughly one question per action. Edits prompt you ("Do you want to create src/App.tsx?"), and shell commands prompt you ("Do you want to run npm test?"), each with options to allow once, allow that kind of command from now on, or refuse and say what to do instead. File reads go through silently. The beginner mistake is approving everything for an hour, because the prompts are tedious and nothing has gone wrong yet.
Type /permissions to see and edit the rules, and put a deny list there first, so that some things are refused no matter how the question is phrased. Rules are a tool plus a pattern:
1{
2 "permissions": {
3 "deny": ["Read(./.env)", "Read(./.env.*)", "Bash(git push:*)"],
4 "allow": ["Bash(npm run test:*)", "Bash(npm run lint)"]
5 }
6}Denying .env means the agent cannot read your secrets even if a prompt would have persuaded you. Allowing your test command removes the interruption you would otherwise meet every few minutes. The pattern syntax is the part of this workflow that most often changes shape between versions, so check it against the permissions docs.
The other lever is the mode. Press Shift+Tab to cycle it and read the label that appears under the prompt box rather than trusting a fixed order. One mode asks before every edit, one accepts file edits automatically but still asks before commands, and plan mode lets the agent read and search while changing nothing. Never use the mode that skips all checks on a project you care about. It is for throwaway sandboxes, and it removes exactly the switch that lets you say no.
4. Get a plan before any edits
With the boundary set, state what you want together with one instruction: propose a plan first. Either switch to plan mode and ask, or simply write it:
Read the project. I want the quote form to save to the database instead of console.log. Propose a plan: which files you would change, and how you would prove it works. Don't edit yet.
Claude searches the folder and answers with a list of steps. This is the most valuable minute of the session, because the plan is a scope check you can read without reading code. Look for three things. Does the file list match your mental picture of the project? Does it name a command or test that will show the change worked? And has it quietly added something you never asked for, such as a new library, a login screen, or a migration that rewrites existing rows? That third one is the AI's default guess, not your requirement, and it is far cheaper to delete from a plan than from a working project.
Press Escape to stop an action mid-stream when you see it heading the wrong way. Nothing already written to disk is undone, which is what step 1 is for. Then say in plain words what was wrong. You can also type /clear before a genuinely unrelated task, since a long session accumulates stale instructions and a fresh one with a clear sentence beats a crowded one.
5. Review the diff, run the thing, then commit
When the agent says it is done, it will also tell you what it verified. Treat that as a claim. Ask it to run the check and show the output, then run the app yourself, because a test the agent wrote can only prove what the agent thought to check.
The review is where most of the value of this workflow sits:
1git status
2git diff --stat
3git diff--stat gives you the file list, and every file you do not recognise is a question worth asking. Then ask the agent to explain the change in words: one sentence per file, no code. You are not auditing the implementation. You are checking that the shape of the change matches the plan you approved.
If it matches, commit it, and write the message about behaviour rather than files:
1git add -A
2git commit -m "quote form saves to the database"If it does not, git checkout -- . discards the edits to tracked files and returns you to the baseline, while git stash parks them if you want to look later. git clean -fd is what removes new files the agent created. None of this restores data: a migration it already ran against your local database is not in git.
The rule that holds it together is one session, one commit. If a session produced four separable changes and they all work, commit them separately, with git add src/form.tsx followed by its own commit. Months from now, a series of small commits tells you which change broke something; one enormous commit tells you only that the agent was involved.
Where this leaves you
You now have a workflow rather than a magic tool: a baseline commit, a deny list, a plan you read first, and a review that ends in a commit. Choose the first project with that workflow in mind. It works best when the project is one folder deep and one command proves it works, which is why QA automation is a genuinely good first job for Claude Code. Teaching it to drive a browser test suite against an app you already have gives it a check it can run itself, and you can verify the suite by breaking the app on purpose and watching it go red. Visual work is the harder case: a frontend-design plugin can add taste to what it builds, but nothing in it tells you the page looks right, so your own eyes do all the work.
One honest caveat. Command names, mode cycling and permission syntax in Claude Code move fast, and the details above were written without live access to the current documentation. If a flag or menu label disagrees with what you see, type /help and trust the tool over this article.