Skip to content

Claude Code guide in three levels, Beginner to Advanced: hands-on lessons with checked exercises, every volatile fact cited to its source. Independent community guide.

docs: fix what a simulated Beginner pilot found (#72)

Wesam Abousaideb5d59534910
diff --git a/docs/beginner/01-install-and-look-around.md b/docs/beginner/01-install-and-look-around.md
index d25cab2..e67e60a 100644
--- a/docs/beginner/01-install-and-look-around.md
+++ b/docs/beginner/01-install-and-look-around.md
@@ -18,10 +18,12 @@ By the end of this lesson you can install Claude Code, sign in, start it in a re
```
**Windows:** `New-Item -ItemType Directory -Force .practice` and `Add-Content (git rev-parse --git-path info/exclude) '.practice/'`.
-- Usage: light.
+- Usage: light, meaning a few short prompts in one session. Inside Claude Code, `/usage` shows your session cost and plan usage limits ([Commands](https://code.claude.com/docs/en/commands)).
> [!NOTE]
-> On native Windows, run the commands marked **Windows** in PowerShell. Installing [Git for Windows](https://git-scm.com/downloads/win) lets Claude Code use Bash; without it, Claude Code uses PowerShell instead ([Quickstart](https://code.claude.com/docs/en/quickstart)).
+> On native Windows, run every command in PowerShell. A command with no **Windows** line works there as written; where a **Windows** line follows a command, use it instead. Installing [Git for Windows](https://git-scm.com/downloads/win) lets Claude Code use Bash; without it, Claude Code uses PowerShell instead ([Quickstart](https://code.claude.com/docs/en/quickstart)).
+>
+> If PowerShell refuses to run `npm` with `running scripts is disabled on this system`, type `npm.cmd` wherever a lesson says `npm` (for example `npm.cmd run check -- b-1`), or allow local scripts for your account as [Troubleshoot installation](https://code.claude.com/docs/en/troubleshoot-install#running-scripts-is-disabled-on-this-system) shows.
## The idea
@@ -52,6 +54,7 @@ The header Claude Code shows when it starts gives the version and the model. The
claude --version
```
+ If your shell says `claude` isn't found or isn't recognized, the install folder isn't on your `PATH` yet: fix it with [Troubleshoot installation](https://code.claude.com/docs/en/troubleshoot-install#command-not-found-claude-after-installation) before you go on.
3. Go to your practice copy and save that output for the check:
```bash
@@ -67,8 +70,12 @@ The header Claude Code shows when it starts gives the version and the model. The
claude
```
- The first time, Claude Code asks you to sign in: with a Claude subscription or Console account, follow the prompts in your browser. With an API key or a cloud provider, follow the [Quickstart](https://code.claude.com/docs/en/quickstart) instead. The header above the prompt then shows the version, the model and the folder.
-5. Type `/status`. The **Status** tab lists the version, the model and the account. Close it to get back to the prompt.
+ The first time, Claude Code asks you to sign in. At the login prompt in the terminal, choose your account type; with a Claude subscription or Console account, you then finish in your browser. If the browser shows a code instead of sending you back, paste it into the terminal at the `Paste code here if prompted` prompt ([Authentication](https://code.claude.com/docs/en/authentication)). With an API key or a cloud provider, follow the [Quickstart](https://code.claude.com/docs/en/quickstart) instead.
+
+ In a repository you haven't trusted yet, Claude Code also shows the workspace trust dialog, which asks whether you trust the folder ([Security](https://code.claude.com/docs/en/security#additional-safeguards)). **No, exit** is highlighted at first, and pressing Enter on it quits Claude Code. You made this copy, so press the Down arrow to choose **Yes, I trust this folder**, then press Enter. Claude Code saves that trust for the whole repository, so it doesn't ask again here ([Configure permissions](https://code.claude.com/docs/en/permissions#project-allow-rules-and-workspace-trust)).
+
+ The header above the prompt then shows the version, the model and the folder.
+5. Type `/status`. The **Status** tab lists the version, the model and the account you signed in with (rows such as **Login method** and **Email**). Press `Esc` to close it ([Interactive mode](https://code.claude.com/docs/en/interactive-mode#general-controls)). Your version may be newer than the one at the top of this page: this guide is checked against the `stable` release channel, and Claude Code follows `latest` unless you choose otherwise ([Configure the release channel](https://code.claude.com/docs/en/setup#configure-release-channel)).
6. Ask two questions about the code:
```text
@@ -84,10 +91,10 @@ The header Claude Code shows when it starts gives the version and the model. The
## Your turn
-Repeat steps 2 to 7 in your practice copy, or in your own repository:
+Repeat the example in your practice copy, or in your own repository, with questions of your own:
-1. Save `claude --version` to `.practice/version.txt`.
-2. Start `claude` in that folder.
+1. In that folder, save `claude --version` to `.practice/version.txt`.
+2. Start `claude` there. Your own repository shows the trust dialog again, because trust is saved per repository: choose **Yes, I trust this folder** only for code you know.
3. Open `/status` and note the model and the account.
4. Ask two questions of your own about the code, then end the session with `/exit`.
@@ -98,22 +105,22 @@ You are done when all of these are true:
- [ ] `.practice/version.txt` holds a line such as `X.Y.Z (Claude Code)`. Check it with `cat .practice/version.txt`.
- [ ] Self-check (not tested): you can say which model and which account `/status` showed.
-Run `npm run check -- b-1` in your practice copy. In your own repository, run `npm run check -- b-1 --dir <your repo>` from your practice copy instead.
+Run `npm run check -- b-1` in your practice copy. In your own repository, run `npm run check -- b-1 --dir <your repo>` from your practice copy instead. An npm error such as `Could not read package.json` or `Missing script: "check"` means you ran it outside your practice copy: `cd` into the copy and run it again.
-If the first item fails, run `claude --version` on its own. If the shell says `claude` isn't found, the install folder isn't on your `PATH` yet; [Troubleshoot installation](https://code.claude.com/docs/en/troubleshoot-install) matches the error to a fix.
+If the first item fails, run `claude --version` on its own: when it prints an error, fix it as Worked example step 2 describes; when it prints a version, save it again in the folder the check reads (your practice copy, or the repository you passed to `--dir`).
## Watch out
-- A new session can edit most files and run most commands without asking you first ([Quickstart](https://code.claude.com/docs/en/quickstart)). In this lesson, only ask questions; the next lesson shows how to choose what Claude may do on its own.
+- A new session can edit most files and run most commands without asking you first ([Quickstart](https://code.claude.com/docs/en/quickstart)). In this lesson, only ask questions; the next lesson shows how to choose what Claude may do on its own. Even a question can lead Claude to run a command that writes files, such as running the tests to answer you: run `git status` when the session ends, and before lesson 2, commit or remove anything it lists.
## Go further
- [How Claude Code works](https://code.claude.com/docs/en/how-claude-code-works): what happens between your question and its answer.
-- [Configure the release channel](https://code.claude.com/docs/en/setup#configure-release-channel): this guide is checked against the `stable` channel, which skips releases with major regressions.
+- [Configure the release channel](https://code.claude.com/docs/en/setup#configure-release-channel): how to move to `stable`, which skips releases with major regressions.
- [Troubleshoot installation](https://code.claude.com/docs/en/troubleshoot-install): fixes for install and sign-in errors.
---
-<sub>Sources: [Quickstart](https://code.claude.com/docs/en/quickstart) · [Advanced setup](https://code.claude.com/docs/en/setup) · [Commands](https://code.claude.com/docs/en/commands) · [Troubleshoot installation](https://code.claude.com/docs/en/troubleshoot-install) · [gitignore](https://git-scm.com/docs/gitignore)</sub>
+<sub>Sources: [Quickstart](https://code.claude.com/docs/en/quickstart) · [Advanced setup](https://code.claude.com/docs/en/setup) · [Authentication](https://code.claude.com/docs/en/authentication) · [Security](https://code.claude.com/docs/en/security) · [Configure permissions](https://code.claude.com/docs/en/permissions) · [Commands](https://code.claude.com/docs/en/commands) · [Interactive mode](https://code.claude.com/docs/en/interactive-mode) · [Troubleshoot installation](https://code.claude.com/docs/en/troubleshoot-install) · [gitignore](https://git-scm.com/docs/gitignore)</sub>
<sub>← [Beginner index](README.md) · [Permission modes and plan mode](02-permission-modes-and-plan-mode.md) → · Topic: [Models, effort and cost](../topics/models-effort-and-cost.md) · [Stuck on this lesson?](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=lesson-feedback.yml&lesson=b-1)</sub>
diff --git a/docs/beginner/02-permission-modes-and-plan-mode.md b/docs/beginner/02-permission-modes-and-plan-mode.md
index dac78a1..8f6ad01 100644
--- a/docs/beginner/02-permission-modes-and-plan-mode.md
+++ b/docs/beginner/02-permission-modes-and-plan-mode.md
@@ -1,6 +1,6 @@
# Choose who approves what: permission modes and plan mode
-<sub>**Beginner** · Lesson 2 of 5 · about 15 minutes · Needs: [Install, sign in and look around](01-install-and-look-around.md) · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>
+<sub>**Beginner** · Lesson 2 of 5 · about 20 minutes · Needs: [Install, sign in and look around](01-install-and-look-around.md) · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>
## Goal
@@ -8,7 +8,7 @@ By the end of this lesson you can pick a permission mode for a task, switch mode
## You need
-- Your copy of the practice template, cloned, with no uncommitted changes, and Node.js LTS for its checks (a Codespace on your copy has both). To practice in one of your own repositories instead, keep the template copy as well: the check runs from it. Set up the repository's `.practice/` folder as [lesson 1](01-install-and-look-around.md#you-need) describes, if you haven't yet.
+- Your copy of the practice template, cloned, with no uncommitted changes, and Node.js LTS for its checks (a Codespace on your copy has both). To practice in one of your own repositories instead, commit or stash your work there first so it has no uncommitted changes either, and keep the template copy as well: the check runs from it. Set up the repository's `.practice/` folder as [lesson 1](01-install-and-look-around.md#you-need) describes, if you haven't yet.
- Usage: light.
> [!NOTE]
@@ -27,6 +27,8 @@ Four modes matter now:
| `⏸ plan mode on` | Plan | Reads, plus commands a background safety check approves when auto mode is available, then writes a plan. It can't edit your files until you approve the plan |
| `⏵⏵ auto mode on` | Auto | Everything, with background safety checks |
+Manual suits sensitive work and unfamiliar code, where you want to review every action yourself. Auto suits long tasks, where it saves you from approving every step.
+
Plan mode is the habit to build first: you see the whole change as a plan before Claude edits any of your files.
## Worked example
@@ -39,14 +41,20 @@ Plan mode is the habit to build first: you see the whole change as a plan before
Make parseConfig in src/config.js reject an empty file with a clear error message, and add a test for it.
```
-4. Claude reads files and may run commands to explore, but doesn't edit your files. Then it shows a plan and asks how to proceed, with three choices: **Yes, and use auto mode** (it reads **Yes, auto-accept edits** if auto mode isn't available to you); **Yes, manually approve edits**; **No, keep planning**. Until you choose, the session stays in plan mode.
-5. If the plan touches more than you asked for, such as a new test file, choose **No, keep planning** and say what to change:
+4. Claude reads files and may run commands to explore, but doesn't edit your files. If it needs a decision from you first, it asks a [multiple-choice question](https://code.claude.com/docs/en/tools-reference#askuserquestion-tool-behavior): pick an option or type your own answer, and it keeps planning. Then it shows a plan and asks how to proceed, with three choices:
+ - **Yes, and use auto mode** (it reads **Yes, auto-accept edits** if auto mode isn't available to you)
+ - **Yes, manually approve edits**
+ - A text field that reads **Tell Claude what to change** (the [docs](https://code.claude.com/docs/en/permission-modes#review-and-approve-a-plan) call this choice **No, keep planning**)
+
+ The first choice is highlighted when the menu opens. Until you choose, the session stays in plan mode.
+5. Send the plan back once, even if it already looks right, so you practice it. Use `Down arrow` to move the highlight to **Tell Claude what to change**, type this correction on that line, and press `Enter`:
```text
Keep the change to src/config.js and test/config.test.js. Don't add new files.
```
-6. When the revised plan looks right, leave it on screen and open another terminal in the same folder. Save what git sees, and the files the plan says it will change, one path per line:
+ Claude revises the plan and shows the menu again. If you press `Enter` before typing, Claude Code shows `User rejected Claude's plan:` and the session stays in plan mode, waiting for you: type the correction at the prompt instead.
+6. When the revised plan looks right, leave it on screen and open another terminal in the same folder. Save what git sees, and the files the plan says it will change, one path per line, written the way `git status` shows them (relative to the repository root, with forward slashes):
```bash
git status --porcelain > .practice/b-2-before.txt
@@ -54,7 +62,9 @@ Plan mode is the habit to build first: you see the whole change as a plan before
```
**Windows:** `'src/config.js','test/config.test.js' | Set-Content .practice/b-2-plan.txt` replaces the `printf` line.
-7. Back in Claude Code, choose **Yes, manually approve edits**. The session leaves plan mode, and Claude asks before each edit. Approve them one at a time. When Claude is done, save what git sees now, in the other terminal:
+7. Back in Claude Code, use `Down arrow` to move the highlight to **Yes, manually approve edits** and press `Enter`. Pressing `Enter` on the highlighted first choice would let Claude edit without asking you. The session leaves plan mode for Manual mode, so Claude asks before each edit and before most shell commands, such as running the tests.
+
+ Read each request and answer with plain **Yes**: the other Yes choices stop Claude asking again for that kind of action, or switch the session to Accept edits or auto mode ([Configure permissions](https://code.claude.com/docs/en/permissions#permission-system)). If a command does more than the plan needs, choose **No** and tell Claude what to do instead. When Claude is done, save what git sees now, in the other terminal:
```bash
git status --porcelain > .practice/b-2-after.txt
@@ -71,12 +81,12 @@ Plan mode is the habit to build first: you see the whole change as a plan before
Repeat the example in your practice copy, or your own repository, with a small change of your own:
1. Switch to plan mode with `Shift+Tab` until the status bar reads `⏸ plan mode on`.
-2. Ask for the change.
-3. Send the plan back once with **No, keep planning** and one correction.
+2. Ask for the change, and answer any question Claude asks.
+3. Send the plan back once: type one correction in **Tell Claude what to change** and press `Enter`.
4. While the final plan is on screen, run step 6's commands in another terminal, with your plan's file list.
-5. Approve with **Yes, manually approve edits**, approve each edit, then save `git status --porcelain > .practice/b-2-after.txt`.
+5. Approve with **Yes, manually approve edits**, read and approve each edit and command as in step 7, then save `git status --porcelain > .practice/b-2-after.txt`.
-Stop before committing. The next lesson takes a change to a commit.
+Stop before committing. The next lesson starts from a clean tree and takes a new change to a commit.
## Check
@@ -86,9 +96,9 @@ You are done when all of these are true:
- [ ] Every path in `.practice/b-2-after.txt` appears in `.practice/b-2-plan.txt`.
- [ ] Self-check (not tested): say, in one sentence, when you would pick Manual instead of Auto.
-Run `npm run check -- b-2` in your practice copy. In your own repository, run `npm run check -- b-2 --dir <your repo>` from your practice copy instead.
+In the other terminal, run `npm run check -- b-2` in your practice copy. In your own repository, run `npm run check -- b-2 --dir <your repo>` from your practice copy instead.
-If `.practice/b-2-before.txt` lists files, check that the status bar read `⏸ plan mode on` when you sent the prompt, then look in the session for a command Claude ran that wrote a file. If a changed path is missing from `.practice/b-2-plan.txt`, compare the plan you approved with what Claude changed.
+If `.practice/b-2-before.txt` lists files, either the tree wasn't clean when Your turn started (the worked example's files there mean step 8 was skipped; in your own repository, they are your uncommitted work), or Claude wrote a file before you approved: check that the status bar read `⏸ plan mode on` when you sent the prompt, and look in the session for a command Claude ran that wrote a file. Either way, set the changes aside with `git stash push --include-untracked` (or commit your own work), then repeat Your turn from step 1 so the snapshots are saved again. If a changed path is missing from `.practice/b-2-plan.txt`, check that the plan file writes it the way `git status` does, then compare the plan you approved with what Claude changed.
## Go further
@@ -97,6 +107,6 @@ If `.practice/b-2-before.txt` lists files, check that the status bar read `⏸ p
---
-<sub>Sources: [Choose a permission mode](https://code.claude.com/docs/en/permission-modes) · [Interactive mode](https://code.claude.com/docs/en/interactive-mode) · [Commands](https://code.claude.com/docs/en/commands)</sub>
+<sub>Sources: [Choose a permission mode](https://code.claude.com/docs/en/permission-modes) · [Interactive mode](https://code.claude.com/docs/en/interactive-mode) · [Commands](https://code.claude.com/docs/en/commands) · [Tools reference](https://code.claude.com/docs/en/tools-reference) · [Configure permissions](https://code.claude.com/docs/en/permissions)</sub>
<sub>← [Install, sign in and look around](01-install-and-look-around.md) · [Beginner index](README.md) · [Your first change, from request to commit](03-first-change.md) → · Topic: [Permissions and safety](../topics/permissions-and-safety.md) · [Stuck on this lesson?](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=lesson-feedback.yml&lesson=b-2)</sub>
diff --git a/docs/beginner/03-first-change.md b/docs/beginner/03-first-change.md
index 35a63fa..bf69bcf 100644
--- a/docs/beginner/03-first-change.md
+++ b/docs/beginner/03-first-change.md
@@ -8,8 +8,9 @@ By the end of this lesson you can take one change from request to commit: explor
## You need
-- Your copy of the practice template with no uncommitted changes, and Node.js LTS (a Codespace on your copy has it). If lesson 2's change is still there, set it aside with `git stash push --include-untracked -m b-2`.
+- Your copy of the practice template, and Node.js LTS (a Codespace on your copy has it).
- To practice in one of your own repositories instead, keep the template copy as well: the check runs from it. Set up the repository's `.practice/` folder as [lesson 1](01-install-and-look-around.md#you-need) describes, if you haven't yet.
+- No uncommitted changes where you practice. If lesson 2's change is still there, set it aside with `git stash push --include-untracked -m b-2`; in your own repository, commit it instead if you want to keep it. Later lessons don't use what you set aside, and `git stash list` shows it.
- Usage: light.
## The idea
@@ -41,46 +42,51 @@ The practice app checks Markdown links, but it skips any link with a title, such
Plan a change so links with a title, like [setup](setup.md "Setup guide"), are checked too. Add a test for it to test/links.test.js.
```
- Read the plan. When it names only `src/links.js` and `test/links.test.js`, choose **Yes, manually approve edits**.
-3. Implement and test. Approve each edit, then ask:
+ Read the plan. When it names only `src/links.js` and `test/links.test.js`, choose **Yes, manually approve edits**. If it names other files too, send it back as in [lesson 2](02-permission-modes-and-plan-mode.md#worked-example): in **Tell Claude what to change**, ask Claude to keep the change to those two files.
+3. Implement and test. Approve each edit. Claude also asks before most commands, such as running the tests: read each one. Answer plain **Yes** when it does what the plan needs, as in lesson 2. Answer **No** and say what to do instead when it does more, such as a command that stashes, overwrites or moves files. Don't choose **Yes, and switch to auto mode**: background safety checks would then review the rest of this lesson's steps instead of you ([Choose a permission mode](https://code.claude.com/docs/en/permission-modes#switch-permission-modes)). Then ask, even if Claude already ran the tests, so you see the result yourself:
```text
run the tests
```
- Claude asks before running `npm test`; approve it. The test summary should report `fail 0`.
-4. Review the diff. Type `/diff` to see every change Claude made, beside anything else you haven't committed ([Interactive mode](https://code.claude.com/docs/en/interactive-mode#review-changes-with-%2Fdiff)). Read each line. In a second terminal, `git diff` shows the same changes.
-5. Correct. Suppose the new test covers only double quotes:
+ Claude Code collapses long command output to a short summary. Press `Ctrl+O` to expand it ([Interactive mode](https://code.claude.com/docs/en/interactive-mode#general-controls)), find the test summary near the end, and press `Esc` to go back. It should report `fail 0`.
+4. Review the diff. Type `/diff` to see the changes Claude made, beside anything else you haven't committed ([Interactive mode](https://code.claude.com/docs/en/interactive-mode#review-changes-with-%2Fdiff)). One of two views opens:
+ - A panel beside the conversation. Its list leaves test files out until you click the line that counts them, so click it. The panel can also open on its own once Claude edits files: if it's already open, read it there, because typing `/diff` closes it.
+ - A list above the prompt. Select a file with the arrow keys, press `Enter` to read its diff, and press `Esc` to go back.
+
+ Read each line, the test included. In a second terminal, `git diff` prints the uncommitted changes to files git already tracks. For a new file Claude created, run `git add -N <file>` first so it shows up ([git add](https://git-scm.com/docs/git-add#Documentation/git-add.txt--N)).
+5. Correct. Read the new test. If it covers only double-quoted titles, ask:
```text
The test covers only double-quoted titles. Add a case for a single-quoted title, like [faq](faq.md 'FAQ'), and run the tests again.
```
+ If it already covers single quotes, ask for another small change you would want instead, such as giving each kind of title its own test. Then check the diff again.
6. Commit:
```text
commit this with a message that says what changed
```
- Approve the `git commit` command. Then, in your terminal, save the commit for the check and confirm nothing is left over:
+ Claude asks before it runs the commit. Read the whole command, then choose **Yes**. If it also creates a branch, that's fine: the check works on any branch. To keep the commit on your current branch, say so in your prompt. Then, in the second terminal, save the commit for the check and confirm nothing is left over:
```bash
git rev-parse HEAD > .practice/b-3-commit.txt
git status
```
- `git status` reads `nothing to commit, working tree clean`.
+ `git status` ends with `nothing to commit, working tree clean`.
## Your turn
Repeat the example with a second gap: links whose target sits in angle brackets, such as `[my notes](<my notes.md>)`.
1. Explore in plan mode: ask how the app reads a link's target.
-2. Plan the change, with a test in `test/links.test.js`, and approve it with **Yes, manually approve edits**.
-3. Approve the edits and ask Claude to run the tests.
-4. Review the diff with `/diff`.
+2. Plan the change, with a test in `test/links.test.js`. Send the plan back if it names other files, then approve it with **Yes, manually approve edits**.
+3. Approve the edits and any test commands with **Yes**, then ask Claude to run the tests.
+4. Review the whole diff with `/diff`, the test file included.
5. Ask for one correction, even a small one, and check the diff again.
-6. Ask Claude to commit, then run `git rev-parse HEAD > .practice/b-3-commit.txt`.
+6. Once the correction is in, ask Claude to commit the change, its test and your correction together. Then, in the second terminal, run `git rev-parse HEAD > .practice/b-3-commit.txt`.
In your own repository, pick a small change of your own that comes with a test.
@@ -93,9 +99,9 @@ You are done when all of these are true:
- [ ] Nothing is left uncommitted: `git status --porcelain` prints nothing.
- [ ] Self-check (not tested): you read the whole diff before committing and asked Claude for at least one correction.
-Run `npm run check -- b-3` in your practice copy. In your own repository, run `npm run check -- b-3 --dir <your repo>` from your practice copy instead. If that repository has no `npm test` script, first save your test command's exit code with `<your test command>; echo $? > .practice/b-3-tests.txt` (**Windows:** `<your test command>; $LASTEXITCODE > .practice/b-3-tests.txt`).
+In the second terminal, run `npm run check -- b-3` in your practice copy. In your own repository, run `npm run check -- b-3 --dir <your repo>` from your practice copy instead. If that repository has no `npm test` script, first save your test command's exit code with `<your test command>; echo $? > .practice/b-3-tests.txt` (**Windows:** `<your test command>; $LASTEXITCODE > .practice/b-3-tests.txt`).
-If the commit changes no test file, ask Claude to add the test and amend the commit with `git commit --amend`, if you haven't pushed it yet, so the code and its test land together; then save it again with `git rev-parse HEAD > .practice/b-3-commit.txt`. If the tests fail, read the first failure and ask Claude to fix the code, not the test. If `git status --porcelain` lists files, commit them or set them aside with `git stash push --include-untracked`.
+If the commit changes no test file, or only tests, the code and its test didn't land in one commit: ask Claude to amend the commit with the missing test (`git commit --amend`), or to combine the last two commits into one, as long as you haven't pushed them. Then save the commit again with `git rev-parse HEAD > .practice/b-3-commit.txt`. If the tests fail, read the first failure and ask Claude to fix the code, not the test. If `git status --porcelain` lists files, commit them or set them aside with `git stash push --include-untracked`.
## Go further
@@ -105,6 +111,6 @@ If the commit changes no test file, ask Claude to add the test and amend the com
---
-<sub>Sources: [Best practices](https://code.claude.com/docs/en/best-practices) · [Choose a permission mode](https://code.claude.com/docs/en/permission-modes) · [Interactive mode](https://code.claude.com/docs/en/interactive-mode) · [Commands](https://code.claude.com/docs/en/commands)</sub>
+<sub>Sources: [Best practices](https://code.claude.com/docs/en/best-practices) · [Choose a permission mode](https://code.claude.com/docs/en/permission-modes) · [Interactive mode](https://code.claude.com/docs/en/interactive-mode) · [Commands](https://code.claude.com/docs/en/commands) · [git add](https://git-scm.com/docs/git-add)</sub>
<sub>← [Permission modes and plan mode](02-permission-modes-and-plan-mode.md) · [Beginner index](README.md) · [Keep a session on track](04-keep-a-session-on-track.md) → · Topic: [Permissions and safety](../topics/permissions-and-safety.md) · [Stuck on this lesson?](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=lesson-feedback.yml&lesson=b-3)</sub>
diff --git a/docs/beginner/04-keep-a-session-on-track.md b/docs/beginner/04-keep-a-session-on-track.md
index 227d9eb..ca11bb0 100644
--- a/docs/beginner/04-keep-a-session-on-track.md
+++ b/docs/beginner/04-keep-a-session-on-track.md
@@ -8,7 +8,7 @@ By the end of this lesson you can keep a session on track: see how full its cont
## You need
-- Your copy of the practice template with no uncommitted changes, and Node.js LTS (a Codespace on your copy has it). To practice in one of your own repositories instead, keep the template copy as well: the check runs from it. Set up the repository's `.practice/` folder as [lesson 1](01-install-and-look-around.md#you-need) describes, if you haven't yet.
+- Your copy of the practice template with no uncommitted changes, and Node.js LTS (a Codespace on your copy has it). To practice in one of your own repositories instead, keep the template copy as well: the check runs from it. Set up the repository's `.practice/` folder as [lesson 1](01-install-and-look-around.md#you-need) describes, if you haven't yet. Start that repository with no uncommitted changes too: commit them, or set them aside with `git stash push --include-untracked`.
- Usage: light.
## The idea
@@ -27,7 +27,7 @@ Compact when you want to keep going on the same task; clear when you start a dif
## Worked example
-1. Start `claude` in your practice copy and type `/context`. The grid shows how much of the window is used, broken down by category, including your messages and the memory files that loaded ([Explore the context window](https://code.claude.com/docs/en/context-window)).
+1. Start `claude` in your practice copy and type `/context`. The grid shows how much of the window is used, broken down by category, including your messages and any memory files, such as `CLAUDE.md`, that loaded ([Explore the context window](https://code.claude.com/docs/en/context-window)). Your practice copy has no `CLAUDE.md` yet, so you may see no memory files; [lesson 5](05-project-memory.md) adds one.
2. Fill it a little:
```text
@@ -41,35 +41,37 @@ Compact when you want to keep going on the same task; clear when you start a dif
/compact keep what we learned about check-links.js
```
- The conversation is replaced by a summary, and `/context` shows more free space.
-4. Make a change to undo. Ask for it, and approve the edit if Claude asks:
+ The conversation is replaced by a summary: in `/context` the messages part shrinks and free space grows. After one short question there is little to summarize, so the change is small; compacting pays off when a conversation gets long.
+4. Make a change to undo. Rewind can't undo changes Claude makes by running commands (see [Watch out](#watch-out)), so the prompt asks for its file editing tool. Approve the edit if Claude asks:
```text
- In src/cli.js, change the success message to "All relative links are fine."
+ In src/cli.js, change the success message to "All relative links are fine." Use your file editing tool, not a shell command.
```
- In a second terminal, save what git sees:
+ In a second terminal in the same folder, save what git sees:
```bash
git status --porcelain > .practice/b-4-before-rewind.txt
```
The file lists `src/cli.js`.
-5. Rewind. Type `/rewind`, or press `Esc` twice with an empty prompt. Pick the prompt from step 4 and choose **Restore code and conversation**. Then, in the second terminal:
+5. Rewind. Type `/rewind`, or press `Esc` twice with an empty prompt. Pick the prompt from step 4 and choose **Restore code and conversation**. If the menu offers only **Restore conversation**, the summarize options and **Never mind**, Claude changed the file with a command, which rewind can't undo: choose **Never mind**, press `Esc` to close the menu ([Interactive mode](https://code.claude.com/docs/en/interactive-mode)), run `git restore src/cli.js` in the second terminal, and repeat step 4.
+
+ Once the code is restored, save what git sees in the second terminal:
```bash
git status --porcelain > .practice/b-4-after-rewind.txt
```
This file is empty: the edit is gone.
-6. Type `/clear`. The conversation starts over with empty context, and the old one stays available.
+6. The rewind put your step 4 prompt back in the input box, so anything you type now is added to it. Press `Esc` twice quickly to clear it: after the first press, a hint at the bottom reads `Esc again to clear`. Then type `/clear`. The conversation starts over with empty context, and the old one stays available.
7. Type `/exit`, then reopen the most recent conversation in this folder ([Manage sessions](https://code.claude.com/docs/en/sessions)):
```bash
claude --continue
```
- If it opens the empty conversation from step 6, run `/resume` and pick the earlier one. Inside a session, `/resume` with no argument opens a picker of earlier conversations.
+ If it opens the empty conversation from step 6, run `/resume` and pick the earlier one. Inside a session, `/resume` with no argument opens a picker of earlier conversations. The conversation you pick may still show the edit you rewound, because it was saved before the rewind. Your files stay as the rewind left them (`git status --porcelain` prints nothing), so don't ask Claude to make the edit again.
## Your turn
@@ -77,9 +79,9 @@ Repeat the example in your practice copy, or your own repository:
1. Run `/context`, ask one question about the code, and run `/context` again.
2. Run `/compact` with a sentence about what to keep.
-3. Ask for a small edit to one file, approving it if Claude asks. Save `git status --porcelain > .practice/b-4-before-rewind.txt`.
+3. Ask for a small edit to one file, ending the prompt with "Use your file editing tool, not a shell command.", and approve it if Claude asks. Save `git status --porcelain > .practice/b-4-before-rewind.txt`.
4. Rewind that prompt with **Restore code and conversation**, and save `git status --porcelain > .practice/b-4-after-rewind.txt`.
-5. Run `/clear`, then `/exit`, then `claude --continue`.
+5. Press `Esc` twice to clear the restored prompt, then run `/clear`, then `/exit`, then `claude --continue`.
## Check
@@ -91,7 +93,7 @@ You are done when all of these are true:
Run `npm run check -- b-4` in your practice copy. In your own repository, run `npm run check -- b-4 --dir <your repo>` from your practice copy instead.
-If the first file lists nothing, you saved it before the edit was made; make the edit again, save the file after it, then rewind again. If the second file still lists the file, open `/rewind` again and choose an option that restores code.
+If the first file lists nothing, you saved it before the edit was made; make the edit again, save the file after it, then rewind again. If the second file still lists the file Claude changed, rewind that prompt with an option that restores code, then save the second file again. When the menu no longer lists that prompt (after **Restore conversation**) or offers no option that restores code (Claude used a command), run `git restore <file>` and repeat Your turn steps 3 and 4 instead. Files you changed before the lesson also stay listed, because rewind can't undo them: commit them or set them aside with `git stash push --include-untracked`, then save the second file again.
## Watch out
@@ -104,6 +106,6 @@ If the first file lists nothing, you saved it before the edit was made; make the
---
-<sub>Sources: [Commands](https://code.claude.com/docs/en/commands) · [Explore the context window](https://code.claude.com/docs/en/context-window) · [Checkpointing](https://code.claude.com/docs/en/checkpointing) · [Manage sessions](https://code.claude.com/docs/en/sessions)</sub>
+<sub>Sources: [Commands](https://code.claude.com/docs/en/commands) · [Explore the context window](https://code.claude.com/docs/en/context-window) · [Checkpointing](https://code.claude.com/docs/en/checkpointing) · [Interactive mode](https://code.claude.com/docs/en/interactive-mode) · [Manage sessions](https://code.claude.com/docs/en/sessions)</sub>
<sub>← [Your first change, from request to commit](03-first-change.md) · [Beginner index](README.md) · [Project memory with CLAUDE.md](05-project-memory.md) → · Topic: [Memory and context](../topics/memory-and-context.md) · [Stuck on this lesson?](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=lesson-feedback.yml&lesson=b-4)</sub>
diff --git a/docs/beginner/05-project-memory.md b/docs/beginner/05-project-memory.md
index 32d7851..22293f1 100644
--- a/docs/beginner/05-project-memory.md
+++ b/docs/beginner/05-project-memory.md
@@ -18,7 +18,7 @@ Each session starts with a fresh context window, so you can end up repeating you
- Put in it what every session should know: the build and test commands, conventions, the project's layout, "always do X" rules. Keep it short; the docs suggest under 200 lines.
- Commit it, so everyone who works on the project gets the same instructions.
- `/init` writes a first version for you from what it finds in the code.
-- Claude treats CLAUDE.md as context, not as configuration it must obey. A rule that must never be broken needs a hook, which an Intermediate lesson teaches.
+- Claude treats CLAUDE.md as context, not as configuration it must obey. A rule that must never be broken needs a [hook](https://code.claude.com/docs/en/hooks-guide), which the [Intermediate level](../intermediate/README.md) teaches.
A session reads CLAUDE.md when it starts, so after you change the file, start a new session to be sure it uses the change.
@@ -31,27 +31,31 @@ A session reads CLAUDE.md when it starts, so after you change the file, start a
```
Claude reads the code and writes a `CLAUDE.md` with the commands and conventions it found. Approve the file if it asks. In a second terminal, read it with `cat CLAUDE.md`.
-2. Add a rule that shows up in files, so you can see whether a session follows it. Open the file with `/memory` or your editor, and add under a **Conventions** heading:
+2. Open `CLAUDE.md` in your editor, or type `/memory` and choose **Project instructions**, the `./CLAUDE.md` in this folder. Don't pick the user file in `~/.claude/`: it applies to all your projects ([View and edit with `/memory`](https://code.claude.com/docs/en/memory#view-and-edit-with-%2Fmemory)). A terminal editor such as Vim takes over the terminal until you save and quit.
+
+ In the practice copy, `/init` may also describe the course's own files: `checks/`, `capstone/` and `.github/`. Delete what it says about them and about `npm run check`, including any rule that says to keep your work off `main`: that rule is for the template repository, not your copy. Keep the other commands, including `npm test`, which the [capstone](capstone.md) checks for.
+
+ Then add a rule that shows up in files, so you can see whether a session follows it. Put it under a `## Conventions` heading, and add that heading at the end of the file if `/init` didn't write one:
```markdown
- Every new source file starts with the line `// Part of linkcheck.`
```
- Save the rule's exact line for the check:
+ In the second terminal, save the rule's exact line for the check:
```bash
echo '// Part of linkcheck.' > .practice/b-5-rule.txt
```
**Windows:** `'// Part of linkcheck.' | Set-Content .practice/b-5-rule.txt`
-3. Commit the file:
+3. Save `CLAUDE.md`, then commit it in the second terminal:
```bash
git add CLAUDE.md
git commit -m "Add project instructions for Claude Code"
```
-4. Type `/exit`, then start a new session with `claude`, so it reads the committed file.
+4. Type `/exit`, then start a new session with `claude`, so it loads CLAUDE.md with your rule. Type `/context all` and find `CLAUDE.md` under **Memory files**: the session has loaded it. Plain `/context` can collapse that list, and `all` expands it ([Commands](https://code.claude.com/docs/en/commands)).
5. Ask for a change that creates a new file:
```text
@@ -59,29 +63,40 @@ A session reads CLAUDE.md when it starts, so after you change the file, start a
```
Approve any permission prompts Claude shows.
-6. Look at the first line of the new file, then save the commit for the check:
+6. In the second terminal, look at the first line of the new file, save the commit for the check, and confirm nothing is left over:
```bash
head -1 src/stats.js
git rev-parse HEAD > .practice/b-5-commit.txt
+ git status
```
**Windows:** `Get-Content src/stats.js -TotalCount 1` replaces `head -1`.
- The first line should read `// Part of linkcheck.`, though you never asked for it in this session.
+ The first line should read `// Part of linkcheck.`, though you never asked for it in this session. `git status` should read `nothing to commit, working tree clean`. If it lists `src/stats.js`, Claude hasn't committed yet: ask it to commit, then save the commit again.
## Your turn
-Do the example's six steps yourself, in your practice copy:
+Repeat the example in your practice copy, or your own repository, with a new rule and a new file. Your practice copy already has a `CLAUDE.md`, so skip `/init` there:
+
+1. Open `CLAUDE.md` and replace the example's rule with a new one:
+
+ ```markdown
+ - Every new source file starts with the line `// linkcheck source.`
+ ```
+
+2. In the second terminal, save the new rule's exact line: `echo '// linkcheck source.' > .practice/b-5-rule.txt` (**Windows:** `'// linkcheck source.' | Set-Content .practice/b-5-rule.txt`).
+3. Commit `CLAUDE.md` there.
+4. Exit, start a new session, and check that `/context all` lists `CLAUDE.md` under **Memory files**.
+5. Ask for a new file and its test, and let Claude commit:
+
+ ```text
+ Add src/external.js with a function countExternal(markdown) that returns how many of the links findLinks finds are external, according to isExternal. Add a test in test/external.test.js, run the tests and commit.
+ ```
-1. Run `/init` and read the `CLAUDE.md` it writes.
-2. Add the `// Part of linkcheck.` rule and save it to `.practice/b-5-rule.txt`.
-3. Commit `CLAUDE.md`.
-4. Exit and start a new session.
-5. Ask for `src/stats.js` and its test, and let Claude commit.
-6. Check the first line of `src/stats.js` and save the commit to `.practice/b-5-commit.txt`.
+6. As in the example's step 6, check the first line of `src/external.js`, save the commit to `.practice/b-5-commit.txt`, and run `git status`.
-In your own repository, write the rule with your language's comment style, such as `# Part of my-project.`, and ask for a small new file.
+In your own repository, start with `/init`; if the repository already has a `CLAUDE.md`, `/init` suggests improvements rather than overwriting it. Write the rule in your language's comment style, such as `# Part of my-project.`, save that exact line to `.practice/b-5-rule.txt` in step 2, and ask for a small new file. If the repository has an `AGENTS.md`, put `@AGENTS.md` on the first line of `CLAUDE.md`: by default, once a `CLAUDE.md` exists, Claude reads it instead of `AGENTS.md` ([AGENTS.md](https://code.claude.com/docs/en/memory#agents-md)).
## Check
@@ -89,11 +104,11 @@ You are done when all of these are true:
- [ ] A committed CLAUDE.md holds the rule saved in `.practice/b-5-rule.txt`: `git show HEAD:CLAUDE.md` shows it.
- [ ] The commit named in `.practice/b-5-commit.txt` adds at least one file other than tests and Markdown, and each such file starts with that rule: `git show --stat $(cat .practice/b-5-commit.txt)` lists them. **Windows:** `git show --stat (Get-Content .practice/b-5-commit.txt)`.
-- [ ] Self-check (not tested): you started a new session after committing CLAUDE.md, and you can say why that matters.
+- [ ] Self-check (not tested): you started a new session after adding the rule to CLAUDE.md, and you can say why that matters.
Run `npm run check -- b-5` in your practice copy. In your own repository, run `npm run check -- b-5 --dir <your repo>` from your practice copy instead.
-If CLAUDE.md isn't committed, run `git add CLAUDE.md` and commit it. If a new file doesn't start with the rule, check that the rule is in the committed CLAUDE.md, start a new session, ask for a different new file, such as `src/summary.js`, and save that commit with `git rev-parse HEAD > .practice/b-5-commit.txt`.
+If CLAUDE.md isn't committed, run `git add CLAUDE.md` and commit it. If a new file doesn't start with the rule, start a new session and run `/context all`. When `CLAUDE.md` is missing under **Memory files**, the session can't see it: start `claude` in the folder that holds `CLAUDE.md`. When it is listed, Claude read the rule but didn't follow it. Either way, ask the session for a different new file, such as `src/summary.js` with a test, and to commit it. Then save that commit with `git rev-parse HEAD > .practice/b-5-commit.txt` and run the check again. Fixing the old file in place won't pass, because the check reads only the files that commit adds.
## Go further
@@ -102,6 +117,6 @@ If CLAUDE.md isn't committed, run `git add CLAUDE.md` and commit it. If a new fi
---
-<sub>Sources: [How Claude remembers your project](https://code.claude.com/docs/en/memory) · [Commands](https://code.claude.com/docs/en/commands) · [Best practices](https://code.claude.com/docs/en/best-practices)</sub>
+<sub>Sources: [How Claude remembers your project](https://code.claude.com/docs/en/memory) · [Commands](https://code.claude.com/docs/en/commands) · [Best practices](https://code.claude.com/docs/en/best-practices) · [Automate actions with hooks](https://code.claude.com/docs/en/hooks-guide)</sub>
<sub>← [Keep a session on track](04-keep-a-session-on-track.md) · [Beginner index](README.md) · [Beginner capstone](capstone.md) → · Topic: [Memory and context](../topics/memory-and-context.md) · [Stuck on this lesson?](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=lesson-feedback.yml&lesson=b-5)</sub>
diff --git a/docs/beginner/README.md b/docs/beginner/README.md
index 59a6975..04aee97 100644
--- a/docs/beginner/README.md
+++ b/docs/beginner/README.md
@@ -1,6 +1,6 @@
# Beginner
-<sub>**Beginner** · about 2 to 2½ hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>
+<sub>**Beginner** · about 2½ hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>
One session, one change. You install Claude Code, decide what it may do without asking, take one change from request to commit, keep a long session on track, and give it a project memory.
@@ -8,13 +8,17 @@ One session, one change. You install Claude Code, decide what it may do without
- [ ] Work in a terminal: change folders, run commands and read their output.
- [ ] Use git: clone a repository, commit, and read `git status` and `git diff`.
-- [ ] Sign in with a Claude subscription (Pro, Max, Team or Enterprise), a Claude Console account, or a supported cloud provider ([Quickstart](https://code.claude.com/docs/en/quickstart)).
+- [ ] Have a Claude subscription (Pro, Max, Team or Enterprise; the free plan doesn't include Claude Code), a Claude Console account, or access through a supported cloud provider ([Quickstart](https://code.claude.com/docs/en/quickstart), [Advanced setup](https://code.claude.com/docs/en/setup)). Lesson 1 shows you how to sign in.
New to the terminal? The official [Terminal guide for new users](https://code.claude.com/docs/en/terminal-guide) walks you through opening one and installing Claude Code.
## Practice
-Before lesson 1, make your own copy of the [practice template](https://github.com/wesammustafa/claude-code-practice): select **Use this template**, then **Create a new repository**, and clone your copy. Every Beginner exercise and the capstone run there, each with a check you run as `npm run check -- <lesson-id>`. The checks need Node.js LTS, which a Codespace on your copy has preinstalled. To practice in one of your own repositories instead, keep the template copy as well: the checks run from it with `--dir`.
+Before lesson 1, make your own copy of the [practice template](https://github.com/wesammustafa/claude-code-practice): select **Use this template**, then **Create a new repository**, and clone your copy. Every Beginner exercise and the capstone run there.
+
+Each core lesson and the capstone end with a check you run in your copy as `npm run check -- <id>`, where the id is `b-1` to `b-5` for the lessons and `b-capstone` for the capstone. The Electives end with a checklist you confirm yourself. The checks need Node.js LTS, which a Codespace on your copy has preinstalled. To practice in one of your own repositories instead, keep the template copy as well: the checks run from it with `--dir`.
+
+On native Windows, if PowerShell refuses to run `npm` with `running scripts is disabled on this system` ([Troubleshoot installation](https://code.claude.com/docs/en/troubleshoot-install#running-scripts-is-disabled-on-this-system)), follow the Windows note in [lesson 1](01-install-and-look-around.md#you-need).
## Lessons
@@ -24,14 +28,16 @@ Before lesson 1, make your own copy of the [practice template](https://github.co
4. [Keep a session on track](04-keep-a-session-on-track.md)
5. [Project memory with CLAUDE.md](05-project-memory.md)
-Each lesson takes 15 to 20 minutes, and the capstone 30 to 60.
+Each lesson takes about 20 minutes, and the capstone 30 to 60.
## Capstone
-[Fix a reported bug, from plan to commit](capstone.md): record your Claude Code version, then fix a reported bug in the practice template: plan the fix, change two files, make the failing test pass, and commit. Its check covers every statement below that leaves a file or a commit behind.
+[Fix a reported bug, from plan to commit](capstone.md): record your Claude Code version, then fix a reported bug in the practice template: plan the fix, change two source files, add a test that fails before the fix and passes after it, and commit. Its check covers what it can see in files and git, and the capstone page lists the rest of the [Beginner Exit](#by-the-end-of-this-level-you-can) for you to tick yourself.
## By the end of this level you can
+This list is the Beginner Exit ([Glossary](../reference/glossary.md)), which the capstone puts together in one task.
+
- [ ] Install Claude Code, sign in, start it in your repository, and tell which version, model and account you're on.
- [ ] Choose and switch permission modes, and approve a plan in plan mode before any change.
- [ ] Take one change from request to commit: explore, plan, implement, test, review the diff, correct, commit.
@@ -54,10 +60,10 @@ Optional lessons beside the core path:
## Next level
-[Intermediate](../intermediate/README.md): one developer's setup.
+[Intermediate](../intermediate/README.md): one developer's setup. Its lessons aren't published yet. The Intermediate index lists them, links each one as it is published, and links official courses to take meanwhile.
---
-<sub>Sources: [Quickstart](https://code.claude.com/docs/en/quickstart) · [Terminal guide for new users](https://code.claude.com/docs/en/terminal-guide) · [Commands](https://code.claude.com/docs/en/commands) · [Output styles](https://code.claude.com/docs/en/output-styles) · [Create custom subagents](https://code.claude.com/docs/en/sub-agents)</sub>
+<sub>Sources: [Quickstart](https://code.claude.com/docs/en/quickstart) · [Advanced setup](https://code.claude.com/docs/en/setup) · [Terminal guide for new users](https://code.claude.com/docs/en/terminal-guide) · [Troubleshoot installation](https://code.claude.com/docs/en/troubleshoot-install) · [Commands](https://code.claude.com/docs/en/commands) · [Output styles](https://code.claude.com/docs/en/output-styles) · [Create custom subagents](https://code.claude.com/docs/en/sub-agents)</sub>
<sub>Up: [Claude Code: Everything You Need to Know](../../README.md)</sub>
diff --git a/docs/beginner/capstone.md b/docs/beginner/capstone.md
index c152cf1..6d2810c 100644
--- a/docs/beginner/capstone.md
+++ b/docs/beginner/capstone.md
@@ -2,25 +2,34 @@
<sub>**Beginner** · Capstone · 30 to 60 minutes · Needs: the five [Beginner lessons](README.md), or their skills · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>
-This task puts the whole Beginner level together, with no step-by-step help. Its check covers every Beginner Exit statement that leaves a file or a commit behind. If it passes, you've shown those statements, whether you took the lessons or not.
+This task puts the whole Beginner level together. Unlike the lessons, it has no worked example: the steps say what to do, and you choose the prompts. The [Beginner Exit](README.md#by-the-end-of-this-level-you-can) is the list of what you can do by the end of this level. The check reads the files and the commit this task leaves behind, and you tick the rest of the Exit yourself under [What the check can't see](#what-the-check-cant-see). When both are done, you've shown the Beginner Exit, whether you took the lessons or not.
## You need
-- Your copy of the practice template, with no uncommitted changes, and Node.js LTS (a Codespace on your copy has it). The capstone runs in the template only.
+- Your copy of the practice template, with no uncommitted changes, and Node.js LTS (a Codespace on your copy has it). If `git status --porcelain` lists files, commit them or set them aside with `git stash push --include-untracked`. The capstone runs in the template only.
- If you skipped the lessons: create the `.practice/` folder in your copy (`mkdir -p .practice`; **Windows:** `New-Item -ItemType Directory -Force .practice`). The template already tells git to ignore it.
+- A committed `CLAUDE.md` in your copy that names the test command, `npm test`: `git show HEAD:CLAUDE.md` shows it. Lesson 5 gives you one; if yours doesn't name `npm test`, add it.
+- If you skipped lesson 5, or did it only in your own repository: start `claude` in your copy and run `/init`. In the new `CLAUDE.md`, delete what it says about the course's own files (`checks/`, `capstone/` and `.github/`) and about `npm run check`, including any rule to keep your work off `main`: that rule is for the template repository, not your copy. Make sure the file names `npm test`.
+- Commit any change to `CLAUDE.md` on its own before you start (`git add CLAUDE.md`, then `git commit -m "Add CLAUDE.md"`): the fix commit may change only the files the plan names.
- Usage: moderate.
+> [!NOTE]
+> On native Windows, run every command in PowerShell. A command with no **Windows** line works there as written; where a **Windows** line follows a command, use it instead. If `Shift+Tab` does nothing, press `Alt+M` instead ([Interactive mode](https://code.claude.com/docs/en/interactive-mode)).
+
## The task
-A teammate filed the bug report in `capstone/beginner-bug.md` in your practice copy: when `linkcheck.json` lists a folder that doesn't exist, the tool says every link resolves and exits with code 0. Fix it the way the Beginner lessons taught:
+A teammate filed the bug report in `capstone/beginner-bug.md` in your practice copy: when `linkcheck.json` lists a folder that doesn't exist, the tool says every link resolves and exits with code 0.
+
+To try the bug by hand, make a new folder outside your practice copy and save `{ "files": ["docs"] }` in it as `linkcheck.json`. Then run `npm run linkcheck -- <that folder>` in your copy: until the bug is fixed, it prints `All relative links resolve.` Don't put a `linkcheck.json` in your copy, because the check counts it as a change. **Windows:** save the file with `'{ "files": ["docs"] }' | Set-Content <that folder>\linkcheck.json`, not `>`. In Windows PowerShell 5.1, `>` writes UTF-16 ([about_Character_Encoding](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_character_encoding?view=powershell-5.1)), which the tool rejects as invalid JSON with exit code 2, even before the fix.
+
+Fix it the way the Beginner lessons taught:
1. Save the output of `claude --version` to `.practice/version.txt`.
-2. In a session, read the bug report and plan the fix in plan mode. The fix touches two source files and a test.
-3. While the plan is on screen, save `git status --porcelain` to `.practice/capstone-before.txt`, and the files the plan will change, one per line, to `.practice/capstone-plan.txt`.
-4. Approve the plan. Add a test that fails before the fix, then make it pass.
-5. Review the diff, ask for at least one correction, and make sure `npm test` passes.
-6. Make sure the committed `CLAUDE.md` names the test command, `npm test`. If you did lesson 5, it does. If you skipped it, run `/init`, check that the file names `npm test`, and commit it on its own, before the fix: the check accepts only planned files in the fix commit.
-7. Commit the fix, then save the commit with `git rev-parse HEAD > .practice/capstone-commit.txt`.
+2. Start a session and switch to plan mode before your first prompt. Then have Claude read the bug report and plan the fix. The fix touches two source files and a test. Ask for a plan that adds the test and runs it before changing the code, so you see it fail ([Best practices](https://code.claude.com/docs/en/best-practices#provide-specific-context-in-your-prompts): "write a failing test that reproduces the issue, then fix it").
+3. While the final plan is on screen, open another terminal in the same folder. Save `git status --porcelain` to `.practice/capstone-before.txt`. Save the files the plan will change, the test file included, to `.practice/capstone-plan.txt`: one path per line, relative to the repository root, with forward slashes, such as `src/cli.js`.
+4. Approve the plan. Watch the new test fail, then pass after the fix.
+5. Review the whole diff, the test file included, as in [lesson 3](03-first-change.md#worked-example). `git diff` leaves out a new file until you run `git add -N <file>` ([git add](https://git-scm.com/docs/git-add#Documentation/git-add.txt--N)). Ask for at least one correction that stays inside the files the plan names, and make sure `npm test` passes.
+6. Commit the fix and its test together, then save the commit with `git rev-parse HEAD > .practice/capstone-commit.txt`. The check reads only that commit, so if you change it later, save it again.
Keep the session on track as you go: check `/context`, and compact or rewind when it helps.
@@ -31,7 +40,7 @@ You are done when all of these are true:
- [ ] `.practice/version.txt` holds the output of `claude --version`.
- [ ] `.practice/capstone-before.txt`, saved while the plan was on screen, lists no changed files.
- [ ] The commit in `.practice/capstone-commit.txt` changes only files listed in `.practice/capstone-plan.txt`, including a test file.
-- [ ] The bug is fixed: with `{ "files": ["docs"] }` and no `docs/` folder, `npm run linkcheck -- <that folder>` exits with code 2.
+- [ ] The bug is fixed: with the bug report's `linkcheck.json` in a folder outside your copy, `npm run linkcheck -- <that folder>` exits with code 2.
- [ ] `npm test` passes.
- [ ] A committed `CLAUDE.md` names the test command, `npm test`.
- [ ] `git status --porcelain` prints nothing.
@@ -40,12 +49,13 @@ Run `npm run check -- b-capstone` in your practice copy. Each item that fails pr
## What the check can't see
-Some of the Beginner Exit leaves nothing in files or git. Tick these yourself, honestly:
+The check doesn't look at these parts of the Beginner Exit. Tick them yourself, honestly:
- [ ] I can tell which model and account a session uses, with `/status`.
- [ ] I can switch permission modes with `Shift+Tab` and say which one a task needs.
+- [ ] I read the whole diff before committing and asked Claude for at least one correction.
- [ ] I can keep a session on track with `/context`, `/clear`, `/compact`, `/rewind` and `/resume`.
-- [ ] I've seen a new session follow a rule from CLAUDE.md that I didn't repeat in the prompt.
+- [ ] I've seen a new session follow a rule from CLAUDE.md that I didn't repeat in the prompt. If you skipped lesson 5, its [Worked example](05-project-memory.md#worked-example) shows you how.
When every box on this page is ticked, you're ready for the [Intermediate level](../intermediate/README.md). Its "ready if" list is the Beginner Exit.
@@ -53,6 +63,6 @@ If this level helped, a star helps other developers find the guide.
---
-<sub>Sources: the [Beginner lessons](README.md), which cite the official pages for each step.</sub>
+<sub>Sources: [Best practices](https://code.claude.com/docs/en/best-practices) · [Interactive mode](https://code.claude.com/docs/en/interactive-mode) · [git add](https://git-scm.com/docs/git-add) · [about_Character_Encoding](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_character_encoding?view=powershell-5.1) · the [Beginner lessons](README.md), which cite the official pages for each step.</sub>
<sub>← [Project memory with CLAUDE.md](05-project-memory.md) · [Beginner index](README.md) · [Intermediate index](../intermediate/README.md) → · [Stuck on this capstone?](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=lesson-feedback.yml&lesson=b-capstone)</sub>
diff --git a/docs/beginner/electives/built-in-teachers.md b/docs/beginner/electives/built-in-teachers.md
index 8c2afa1..ed1ec02 100644
--- a/docs/beginner/electives/built-in-teachers.md
+++ b/docs/beginner/electives/built-in-teachers.md
@@ -1,6 +1,6 @@
# Learn from Claude Code itself
-<sub>**Beginner** · Elective · about 15 minutes · Needs: [Install, sign in and look around](../01-install-and-look-around.md) · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>
+<sub>**Beginner** · Elective · about 20 minutes · Needs: [Install, sign in and look around](../01-install-and-look-around.md) · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>
## Goal
@@ -8,7 +8,7 @@ By the end of this Elective you can use Claude Code's built-in teaching aids: `/
## You need
-- Your copy of the practice template.
+- Your copy of the practice template with no uncommitted changes.
- Usage: light.
## The idea
@@ -17,55 +17,68 @@ Claude Code can teach you while you work. Three aids are built in:
- **`/powerup`** runs quick interactive lessons on Claude Code's features, with animated demos ([Commands](https://code.claude.com/docs/en/commands)).
- **Output styles** change how Claude answers ([Output styles](https://code.claude.com/docs/en/output-styles)). In the **Explanatory** style, Claude adds short `Insight` blocks that explain the choices behind its code. The **Learning** style adds the same blocks and also leaves a few lines of real decisions for you to write.
-- **The guide to Claude Code**: when you ask a question about Claude Code's own features, Claude can hand it to `claude-code-guide`, a built-in helper for exactly those questions ([Create custom subagents](https://code.claude.com/docs/en/sub-agents)).
+- **The guide to Claude Code**: `claude-code-guide` is a built-in helper for questions about Claude Code's own features ([Create custom subagents](https://code.claude.com/docs/en/sub-agents)). Name it in your prompt, or Claude may answer from its own knowledge instead.
Why write some of the code yourself? In an Anthropic study, developers who learned a new library with an AI assistant scored lower, on average, on a quiz about it than developers who coded by hand. The ones who scored well used the assistant to ask questions and get explanations, not just to produce code ([How AI assistance impacts the formation of coding skills](https://www.anthropic.com/research/AI-assistance-coding-skills)). The Learning style builds that habit in.
## Worked example
-1. Start `claude` in your practice copy and run `/powerup`. Pick a lesson and follow it to the end.
+1. Start `claude` in your practice copy and run `/powerup`. Pick a lesson, try what it shows, and follow the hints on screen. A lesson counts as finished when you press `Enter` on its card (`Enter to mark done`). If a `/powerup` lesson names a `default` mode, that is Manual mode ([Choose a permission mode](https://code.claude.com/docs/en/permission-modes)), which [lesson 2](../02-permission-modes-and-plan-mode.md) covers.
2. Switch the output style:
```text
/output-style learning
```
- Claude Code saves the choice to `.claude/settings.local.json` in this project.
-3. Ask for a small change:
+ Claude Code saves the choice to `.claude/settings.local.json` in this project, so every session you start here keeps this style until you run `/output-style default`. Your turn ends with that step; if you stop before it, run it yourself.
+3. Ask for a small change that leaves a decision to you:
```text
- Add a function to src/links.js that counts the external links on a page, with a test.
+ Add a function to src/links.js that counts the external links on a page, with a test. Leave the decision about repeated links to me.
```
- Claude explains its choices in `Insight` blocks and leaves a short piece marked for you to write. Write it, then ask Claude to run the tests.
-4. Ask about Claude Code itself:
+ Claude explains its choices in `Insight` blocks, though not in every reply. When it reaches that decision, it adds a `TODO(human)` comment to the file and stops with a `Learn by Doing` request that says what to write ([Output styles](https://code.claude.com/docs/en/output-styles#learning)). Open the file it names in your editor, write your lines at the `TODO(human)` comment, save, and tell Claude you're done. Claude comments on your code and finishes the task; if it doesn't run the tests, ask it to. A style is an instruction, not a guarantee: if Claude writes all the code itself, ask it to leave the repeated-links decision to you.
+4. When the tests pass, set the change aside so later lessons start clean. Open a second terminal in the same folder and run:
+
+ ```bash
+ git stash push --include-untracked -m b-teachers
+ ```
+
+5. Back in Claude Code, ask about Claude Code itself, and name the helper so Claude hands the question to it ([Invoke subagents explicitly](https://code.claude.com/docs/en/sub-agents#invoke-subagents-explicitly)):
```text
- How do I make my own slash command in Claude Code?
+ Use the claude-code-guide agent: how do I make my own slash command in Claude Code?
```
- Your wording will differ, but the answer should point you to skills.
+ When Claude hands it over, the transcript shows a `claude-code-guide(...)` row with a short task description in the brackets. If no such row appears, Claude answered without the helper: send the prompt again. Your wording will differ, but the answer should point you to skills, a `SKILL.md` file under `.claude/skills/` ([Extend Claude with skills](https://code.claude.com/docs/en/skills)). It may also mention the older `.claude/commands/` folder, which still works.
## Your turn
1. Run `/powerup` and finish one more lesson.
-2. Switch to the Explanatory style with `/output-style explanatory`, ask Claude to explain `src/check-links.js`, and read its `Insight` blocks.
-3. Ask one question about a Claude Code feature you haven't used yet.
+2. Switch to the Explanatory style with `/output-style explanatory`, ask Claude to explain `src/check-links.js`, and read its `Insight` blocks. Then, in your second terminal, save the setting for the check:
+
+ ```bash
+ cp .claude/settings.local.json .practice/b-teachers-style.json
+ ```
+
+3. Ask `claude-code-guide` about a Claude Code feature you haven't used yet: start your prompt with `Use the claude-code-guide agent:`, and look for its row in the transcript. If you asked the helper something earlier in this session, Claude may send the question to that same helper: the transcript then shows `Resuming agent` instead of a new `claude-code-guide(...)` row, and that counts too.
4. When you're done, switch back with `/output-style default`.
## Check
-You are done when all of these are true:
+This Elective has no `npm run check`: tick each item yourself. You are done when all of these are true:
-- [ ] While you practiced, `.claude/settings.local.json` held your choice: before step 4 of Your turn, `cat .claude/settings.local.json` shows an `outputStyle` entry for the Explanatory style.
+- [ ] `.practice/b-teachers-style.json`, saved in step 2 of Your turn, has an `outputStyle` entry for the Explanatory style. Check it with `cat .practice/b-teachers-style.json`.
- [ ] Self-check (not tested): you finished two `/powerup` lessons.
+If the file is missing or names another style, run `/output-style explanatory` in Claude Code, repeat the `cp` command in your second terminal, then run `/output-style default`.
+
## Go further
- [Output styles](https://code.claude.com/docs/en/output-styles): every built-in style, and how to write your own.
---
-<sub>Sources: [Commands](https://code.claude.com/docs/en/commands) · [Output styles](https://code.claude.com/docs/en/output-styles) · [Create custom subagents](https://code.claude.com/docs/en/sub-agents) · [How AI assistance impacts the formation of coding skills](https://www.anthropic.com/research/AI-assistance-coding-skills)</sub>
+<sub>Sources: [Commands](https://code.claude.com/docs/en/commands) · [Output styles](https://code.claude.com/docs/en/output-styles) · [Create custom subagents](https://code.claude.com/docs/en/sub-agents) · [Choose a permission mode](https://code.claude.com/docs/en/permission-modes) · [Extend Claude with skills](https://code.claude.com/docs/en/skills) · [How AI assistance impacts the formation of coding skills](https://www.anthropic.com/research/AI-assistance-coding-skills)</sub>
<sub>Back to the [Beginner index](../README.md) · Topic: [Memory and context](../../topics/memory-and-context.md) · [Stuck on this lesson?](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=lesson-feedback.yml&lesson=b-teachers)</sub>
diff --git a/docs/beginner/electives/ide-extensions.md b/docs/beginner/electives/ide-extensions.md
index cdff954..3d22628 100644
--- a/docs/beginner/electives/ide-extensions.md
+++ b/docs/beginner/electives/ide-extensions.md
@@ -17,7 +17,7 @@ By the end of this Elective you can run Claude Code inside VS Code or a JetBrain
The terminal isn't the only place Claude Code runs. Two editor integrations put it next to your code:
- The **VS Code extension** has its own chat panel and brings its own copy of Claude Code. In Manual mode, it shows each proposed edit side by side with the original and asks before applying it ([VS Code](https://code.claude.com/docs/en/vs-code)).
-- The **JetBrains plugin** runs the `claude` command in the IDE's terminal and opens its changes in the IDE's diff viewer ([JetBrains IDEs](https://code.claude.com/docs/en/jetbrains)).
+- The **JetBrains plugin** runs the `claude` command in the IDE's terminal and opens the edits it proposes in the IDE's diff viewer ([JetBrains IDEs](https://code.claude.com/docs/en/jetbrains)).
Either way, it's the same Claude Code: the same account, permission modes and CLAUDE.md.
@@ -25,36 +25,39 @@ Either way, it's the same Claude Code: the same account, permission modes and CL
In VS Code:
-1. Open the Extensions view with `Cmd+Shift+X` (Mac) or `Ctrl+Shift+X` (Windows and Linux), search for "Claude Code", and click **Install**.
-2. Open `src/config.js`. Click the Spark icon at the top right of the editor to open Claude Code, and sign in if it asks.
+1. Open the Extensions view with `Cmd+Shift+X` (Mac) or `Ctrl+Shift+X` (Windows and Linux), search for "Claude Code", and click **Install**. The extension doesn't work in Restricted Mode, so if VS Code shows a Restricted Mode banner or asks whether to trust the folder, trust it: this copy is your own code ([Workspace Trust](https://code.visualstudio.com/docs/editing/workspaces/workspace-trust)).
+2. Open `src/config.js`. Click the Spark icon at the top right of the editor to open Claude Code, and sign in if it asks. No icon? Click `✻ Claude Code` in the status bar at the bottom right instead.
3. Select the body of `parseConfig` and press `Option+K` (Mac) or `Alt+K` (Windows and Linux). The prompt box gets a reference with the file path and line numbers, such as `@src/config.js#7-17`. Ask:
```text
What happens if linkcheck.json holds an array instead of an object?
```
-4. Switch the mode at the bottom of the prompt box to Manual, then ask for a small edit, such as a comment above `parseConfig`. The edit opens side by side with the original, and Claude asks for permission. Reject it.
+4. Switch the mode at the bottom of the prompt box to Manual, then ask for a small edit, such as a comment above `parseConfig`. The edit opens side by side with the original, and Claude asks for permission in the chat panel. Choose **No** there ([Configure permissions](https://code.claude.com/docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt)). The **Reject this change** buttons inside the diff only revert one change in the proposal; they don't finish the review.
In a JetBrains IDE:
1. Install the [Claude Code plugin](https://plugins.jetbrains.com/plugin/27310-claude-code-beta-) from the JetBrains Marketplace and restart the IDE.
-2. Press `Cmd+Esc` (Mac) or `Ctrl+Esc` (Windows and Linux) to start Claude Code in the IDE's terminal.
-3. Ask the same question and the same small edit: the change opens in the IDE's diff viewer.
+2. Click the Claude Code button in the IDE, or press `Cmd+Esc` (Mac) or `Ctrl+Esc` (Windows and Linux), to start Claude Code in the IDE's terminal. If nothing happens, open the IDE's terminal and run `claude`: started there, it connects to the IDE on its own. If the IDE shows "Cannot launch Claude Code", it can't find `claude` on your `PATH`: set the full path to `claude` under **Settings** > **Tools** > **Claude Code \[Beta]** > **Claude command** ([plugin settings](https://code.claude.com/docs/en/jetbrains#general-settings)).
+3. Open `src/config.js`, select the body of `parseConfig`, and press `Cmd+Option+K` (Mac) or `Alt+Ctrl+K` (Windows and Linux). The prompt gets a reference such as `@src/config.js#L7-17`. Ask the same question.
+4. Press `Shift+Tab` until the status bar under the prompt reads `⏸ manual mode on` ([Choose a permission mode](https://code.claude.com/docs/en/permission-modes#switch-permission-modes)). On native Windows, if `Shift+Tab` does nothing, press `Alt+M` instead ([Interactive mode](https://code.claude.com/docs/en/interactive-mode)). Then ask for the same small edit: it opens in the IDE's diff viewer, and Claude asks for permission in the terminal. Choose **No**.
## Your turn
1. Install the extension or the plugin for the editor you use.
-2. Open `src/links.js`, select `findLinks`, and ask what kinds of links it finds, with the selection attached.
-3. In Manual mode, ask for a small edit and reject it in the diff view.
+2. Open `src/links.js`, select the whole `findLinks` function, and press the reference shortcut: `Option+K` (Mac) or `Alt+K` (Windows and Linux) in VS Code, `Cmd+Option+K` (Mac) or `Alt+Ctrl+K` (Windows and Linux) in JetBrains. Then ask what kinds of links it finds.
+3. Switch to Manual mode as in the Worked example, ask for a small edit, and look it over in the diff view. Then choose **No** at Claude's permission prompt: in the chat panel in VS Code, in the terminal in JetBrains.
## Check
-You are done when all of these are true:
+This Elective has no `npm run check`: tick each item yourself. You are done when all of these are true:
-- [ ] The integration is installed. VS Code: `code --list-extensions` lists `anthropic.claude-code`. JetBrains: the plugin shows under **Settings** > **Plugins** > **Installed**.
+- [ ] The integration is installed. VS Code: the Extensions view (`Cmd+Shift+X` or `Ctrl+Shift+X`) shows Claude Code as installed. JetBrains: the plugin shows under **Settings** > **Plugins** > **Installed**.
- [ ] `git diff` prints nothing, because you rejected the edit.
- [ ] Self-check (not tested): you asked a question with a reference to the lines you had selected.
+If `git diff` shows the edit, it was applied: the session wasn't in Manual mode, or you approved it. Discard it with `git restore <file>`, using the file `git diff` names. Then switch to Manual, ask for the edit again, and choose **No**.
+
## Go further
- [Desktop quickstart](https://code.claude.com/docs/en/desktop-quickstart): Claude Code in the Claude desktop app.
@@ -62,6 +65,6 @@ You are done when all of these are true:
---
-<sub>Sources: [VS Code](https://code.claude.com/docs/en/vs-code) · [JetBrains IDEs](https://code.claude.com/docs/en/jetbrains)</sub>
+<sub>Sources: [VS Code](https://code.claude.com/docs/en/vs-code) · [JetBrains IDEs](https://code.claude.com/docs/en/jetbrains) · [Configure permissions](https://code.claude.com/docs/en/permissions) · [Choose a permission mode](https://code.claude.com/docs/en/permission-modes) · [Interactive mode](https://code.claude.com/docs/en/interactive-mode) · [Workspace Trust](https://code.visualstudio.com/docs/editing/workspaces/workspace-trust)</sub>
<sub>Back to the [Beginner index](../README.md) · Topic: [Memory and context](../../topics/memory-and-context.md) · [Stuck on this lesson?](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=lesson-feedback.yml&lesson=b-ide)</sub>
diff --git a/docs/beginner/electives/screenshots-and-images.md b/docs/beginner/electives/screenshots-and-images.md
index b3dd4c9..2c757e1 100644
--- a/docs/beginner/electives/screenshots-and-images.md
+++ b/docs/beginner/electives/screenshots-and-images.md
@@ -11,12 +11,15 @@ By the end of this Elective you can add a screenshot or an image to a conversati
- Your copy of the practice template with no uncommitted changes, and your system's screenshot tool.
- Usage: light.
+> [!NOTE]
+> In a Codespace, Claude Code runs inside the codespace, not on your computer ([Development containers](https://code.claude.com/docs/en/devcontainer)), so give it screenshots as files there. Save each screenshot on your computer, rename it to the name this page uses (`shot.png`, then `test-summary.png`), and drag it from your computer's file manager onto the `.practice` folder in the codespace's Explorer ([GitHub Codespaces](https://code.visualstudio.com/docs/remote/codespaces#_known-limitations-and-adaptations)). Where the Worked example says to paste, ask with its path instead, such as `Look at this image: .practice/shot.png`. In Your turn, skip the `mv` line.
+
## The idea
Some things are faster to show than to describe: an error on screen, a layout, a diagram. Claude Code reads images, and you can add one to the conversation in three ways ([Common workflows](https://code.claude.com/docs/en/common-workflows#work-with-images)):
- drag and drop the image into the Claude Code window;
-- copy the image and paste it with `Ctrl+V` (`Alt+V` on Windows and WSL);
+- copy the image and paste it with `Ctrl+V` (`Cmd+V` also works in iTerm2; `Alt+V` on Windows and WSL) ([Interactive mode](https://code.claude.com/docs/en/interactive-mode#general-controls));
- give its path in your prompt, such as "Look at this image: /path/to/shot.png".
## Worked example
@@ -28,28 +31,42 @@ Some things are faster to show than to describe: an error on screen, a layout, a
```
It prints the broken link in `guide.md`, then `1 broken link(s)`.
-2. Take a screenshot of that output and copy it.
-3. Start `claude`, paste the image, and ask:
+2. Take a screenshot of that output and copy it to the clipboard. On a Mac, press `Ctrl` as well as the usual keys, such as `Ctrl+Shift+Cmd+4`: without it, macOS saves the screenshot as a file, on your desktop by default ([Take a screenshot on Mac](https://support.apple.com/en-us/102646)).
+3. Start `claude` and paste the image. An `[Image #1]` chip appears in the prompt box ([Interactive mode](https://code.claude.com/docs/en/interactive-mode#general-controls)). If no chip appears, no image was added: drag the screenshot file into the Claude Code window, or give its path as in Your turn. Then ask:
```text
This is the link checker's output. Change the last line so it also says how many Markdown files were checked, like "1 broken link(s) in 2 files".
```
-4. Review the plan or the edit, approve it, and run the command again. The last line now names the number of files.
-5. Run `git diff` to see the change, then keep it or undo it with `git restore src`.
+4. Approve the edit if Claude asks. Then, in a second terminal in the same folder, run `npm run linkcheck -- samples` again. The last line now names the number of files.
+5. In the second terminal, run `git diff` to see the change. Then set the example's change aside so Your turn starts clean:
+
+ ```bash
+ git stash push --include-untracked -m b-images-example
+ ```
+
+ `git status` then reads `nothing to commit, working tree clean`.
## Your turn
-1. Run `npm test`, take a screenshot of the summary at the end, and save it as a file.
-2. Start `claude` and ask about it by path: `Look at this image: <path>. What does each line of this summary mean?`
-3. Ask for a small change based on the image, such as a clearer test name, and check it with `git diff`.
+1. In the second terminal, run `npm test` and take a screenshot of the end of its output: the last few test names and the summary under them. Save it as a file, then move it into your practice copy's `.practice/` folder. Git ignores that folder, so the image never shows up as a change:
+
+ ```bash
+ mv "<your screenshot file>" .practice/test-summary.png
+ ```
+
+ **WSL:** Windows saves the file on its own drive, which WSL reaches under `/mnt/c` ([Working across file systems](https://learn.microsoft.com/en-us/windows/wsl/filesystems)): `C:\Users\<user name>\shot.png` is `/mnt/c/Users/<user name>/shot.png`.
+2. In Claude Code (start `claude` if it isn't running), ask about it by path: `Look at this image: .practice/test-summary.png. What does each line of this summary mean?`
+3. Ask for a small change based on the image, such as a clearer name for one of the tests it shows, and approve the edit if Claude asks. Check it with `git diff` in the second terminal.
## Check
-You are done when all of these are true:
+This Elective has no `npm run check`: tick each item yourself. You are done when all of these are true:
- [ ] `git diff` shows the change you asked for from an image.
-- [ ] Self-check (not tested): you added an image in two ways, by pasting and by path.
+- [ ] Self-check (not tested): you added one image by pasting or dragging and another by path (in a Codespace, both by path).
+
+When you're done, set your change aside so the next lesson starts clean: `git stash push --include-untracked -m b-images`. `git status` then reads `nothing to commit, working tree clean`.
## Watch out
@@ -61,6 +78,6 @@ You are done when all of these are true:
---
-<sub>Sources: [Common workflows](https://code.claude.com/docs/en/common-workflows)</sub>
+<sub>Sources: [Common workflows](https://code.claude.com/docs/en/common-workflows) · [Interactive mode](https://code.claude.com/docs/en/interactive-mode) · [Development containers](https://code.claude.com/docs/en/devcontainer) · [GitHub Codespaces](https://code.visualstudio.com/docs/remote/codespaces) · [Take a screenshot on Mac](https://support.apple.com/en-us/102646) · [Working across file systems](https://learn.microsoft.com/en-us/windows/wsl/filesystems)</sub>
<sub>Back to the [Beginner index](../README.md) · Topic: [Memory and context](../../topics/memory-and-context.md) · [Stuck on this lesson?](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=lesson-feedback.yml&lesson=b-images)</sub>