Now you stop preparing and start using Claude Code
This part creates a throwaway practice repository, teaches the minimum Git loop around AI edits, and walks you through a real Claude Code session using plan mode first.
Git basics for AI-assisted work
This is not a full Git course. It is the minimum you need to work around AI edits without feeling blind. Think of Git as project memory plus change inspection.
A project folder Git is tracking
When you run git init, Git starts tracking history in this folder.
A named checkpoint
A commit is a saved snapshot with a message, such as Create first playground page.
AI without Git is reckless
If Claude Code changes a file and you are not tracking the before-and-after state, you lose the simplest way to inspect what happened.
Open any empty folder, run git init, then git status. If Git says you are on branch main and the working tree is clean, the repository exists and Git is awake.
Create a safe playground project
Do not begin with a work repository, a team repo, or a complicated app. Start with a throwaway folder whose entire job is to let you learn the loop safely.
mkdir ~/claude-code-playground
Creates a new folder in your home directory. The ~ means home, so this becomes something like /Users/you/claude-code-playground.
cd ~/claude-code-playground
Moves you into that new folder. Run pwd afterward if you want proof of your new location.
git init
Turns the folder into a Git repository so every change can be inspected and checkpointed.
code .
Opens the current folder in VS Code. The dot means "this folder right here," not some other location.
Create the starter files
Inside VS Code, create three files in the Explorer panel:
README.mdindex.htmlstyle.css
Then place this text in README.md:
A tiny HTML and CSS page gives you a visible result without adding extra runtime complexity. You do not need Python, Node.js, or a framework to see whether the workflow works.
First Claude Code session
The safest beginner pattern is: start in plan mode, ask for a small plan, read it carefully, then start a normal session and approve a tiny implementation. This teaches you the loop without handing over too much power too early.
Pass 1: plan only
Small and explicit
Claude explains the files, suggests a minimal plan, names index.html and style.css, and waits for approval.
Too much too fast
Claude proposes frameworks, dependencies, build tools, or a major redesign when you asked for a tiny starter page.
Pass 2: small implementation
Exit the plan-only session, then start a normal one:
If Claude wants to run a command you do not understand, reply with: Explain the command before you run it. That is a strong beginner habit, not a sign of weakness.
What to expect
- Claude inspects the files in the current folder.
- Claude proposes or directly requests permission to edit
index.htmlandstyle.css. - You approve only if the scope still looks tiny.
- Claude explains the outcome in plain English.
How to view the result in a browser
macOS: open index.html
Linux: xdg-open index.html
Windows: start index.html
WSL: explorer.exe . and then double-click index.html.
Review, approve, commit, recover
The workflow does not end when Claude finishes editing. The whole safety point is that you inspect the change, understand it at a high level, and save a named checkpoint only when it looks right.
git status
Shows which files changed. This answers: "What did Claude touch?"
git diff
Shows the actual before-and-after lines. This answers: "What changed inside those files?"
git add . and git commit -m
These turn the current working state into a named checkpoint you can return to mentally and operationally later.
As a beginner, you do not need destructive Git reset commands as your first recovery strategy. Use a practice repo, inspect first, commit often, and keep the changes small enough that you can reason about them.
Safe recovery mindset
- If the result is confusing, ask Claude to explain the diff in plain English.
- If the result is wrong, ask Claude to make a smaller correction instead of starting a bigger rewrite.
- If the repo is just a practice repo and everything feels messy, it is acceptable to delete the playground folder and rebuild it from scratch. That is one reason we started with a throwaway project.
Project memory and CLAUDE.md
Claude Code supports persistent instructions. The project-level memory file is usually named CLAUDE.md. The point is not to write a giant law book. The point is to give Claude a small, useful operating guide for this repo.
After running /init, keep the file short and beginner-friendly. For this playground repo, something like this is enough:
Shared with this repo
These instructions travel with the project and help Claude understand local expectations.
Your broader preferences
This can cover habits or preferences across projects. The important beginner lesson is simply that there are multiple instruction layers.
Rule dump
If you stuff a giant wall of rules into CLAUDE.md, it becomes harder to maintain and easier to ignore mentally. Keep it sharp and useful.