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.
JavaScript agent-skillsagentic-codingai-agentsanthropicanthropic-claudebest-practicesclaudeclaude-aiclaude-codeclaude-code-guideclaude-code-hooksclaude-code-pluginsclaude-code-skillsclaude-code-tutorialclaude-code-workflowsguidelearn-claude-codemcpsubagentstutorial
docs: add agent rules, a full contribution guide and a changelog (#48)
Wesam Abousaid8a9b127c0308
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERSnew file mode 100644index 0000000..edc6428--- /dev/null+++ b/.github/CODEOWNERS@@ -0,0 +1 @@+* @wesammustafadiff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.mdindex 07269e7..4ba3659 100644--- a/.github/PULL_REQUEST_TEMPLATE.md+++ b/.github/PULL_REQUEST_TEMPLATE.md@@ -1,10 +1,37 @@## What this changes-<!-- One or two sentences. -->+<!-- One or two sentences on what changed and why. If two sources disagreed, name both and say what you kept. -->-## Checklist (see [CONTRIBUTING.md](../CONTRIBUTING.md))+## Checklist-- [ ] Date-sensitive claims are anchored to a version (`v2.1.x`) or full date, with a source link-- [ ] Renamed/removed headings keep an `<a id="old-slug"></a>` compatibility anchor-- [ ] New skills are tested locally (`claude` → `/your-skill`) and documented in `docs/skills.md`-- [ ] Tables used over walls of bullets; no marketing language+Tick each item that applies, or write "n/a" after it. The full rules are in [CONTRIBUTING.md](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/blob/main/CONTRIBUTING.md).++- [ ] Facts that can go stale, such as versions, dates, prices, limits, model names, command or setting names, stability labels and counts, link their Tier 1 source inline at first mention on each page. Date-sensitive ones name a version (`v2.1.x`) or a full date. See [Sources and citations](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/blob/main/CONTRIBUTING.md#sources-and-citations).+- [ ] No unsourced numbers: every number, other than a lesson's time estimate, has a dated, linked source, or it is cut.+- [ ] Renamed or removed headings keep an `<a id="old-slug"></a>` compatibility anchor.+- [ ] Any new listing (an external tool, MCP server, skill, plugin, course or article for readers to use) links the accepted resource suggestion issue, or the content-review PR, that approved it: #___. No issue yet? [Suggest the resource](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=suggest-resource.yml) instead. See [Listing policy](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/blob/main/CONTRIBUTING.md#listing-policy).+- [ ] Tested in Claude Code vX.Y.Z on <OS>, or "smoke test only". Required when this PR touches `examples/` or `.claude/`.+- [ ] Captures are taken in the practice template, cropped, scrubbed of personal details and captioned with the version and date. See [Diagrams and images](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/blob/main/CONTRIBUTING.md#diagrams-and-images).+- [ ] Text in new diagrams and images reaches 4.5:1 contrast in GitHub's light and dark themes, and other marks 3:1.+- [ ] I have personally verified any AI-assisted content in this PR.++## Claim table++<!-- Every volatile claim this PR adds or changes. A second, independent pass fills the Result column by trying to refute each claim against its Tier 1 source: a separate agent for agent-made PRs, the reviewer for human ones. Write "No volatile claims changed" if there are none. -->++| Claim | Tier 1 source | Result |+|---|---|---|+| | | |++## Dry-run++<!-- Required on PRs that touch a lesson under docs/<level>/ or an example a core lesson or capstone uses; otherwise write "n/a". Run in a clean configuration at the baseline in CHANGELOG.md, as described in CONTRIBUTING.md#pull-requests. -->++- `claude --version` at the start:+- `claude --version` at the end:+- OS:+- Configuration: a fresh `CLAUDE_CONFIG_DIR` whose `settings.json` turns off synced skills, synced plugins and claude.ai connectors, or a dedicated test account+- `/skills` output:+- `/mcp` output:+- Steps run:+- Check output:diff --git a/AGENTS.md b/AGENTS.mdnew file mode 100644index 0000000..83a5467--- /dev/null+++ b/AGENTS.md@@ -0,0 +1,48 @@+# Rules for agents editing this guide++These rules apply when you edit this guide, a Markdown guide to learning Claude Code. If the user is learning Claude Code with this repo (running or changing its examples, asking questions), they do not apply: just help them. For anything this file does not cover (where to report problems, AI-assisted contributions, file layout, adding a skill), read [CONTRIBUTING.md](CONTRIBUTING.md), the full contributor policy this file digests.++## Verify every volatile claim++A volatile claim is anything that can go stale: a version or date; a price, plan availability, or usage or rate limit; a model name, model ID or default; the name or behavior of a command, flag, setting, environment variable, hook event, tool or frontmatter field; a stability label (copied word for word from Tier 1); any count or statistic; or a third-party status fact (owner, license, archived).++Before you write or change one, fetch the Tier 1 source for its domain:++| Claim domain | Tier 1 source |+|---|---|+| Claude Code behavior: commands, flags, settings, hook events, stability labels | code.claude.com/docs: find the page in https://code.claude.com/docs/llms.txt and fetch it with a `.md` suffix |+| When something shipped, versions, release channels | https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md (search the raw file, https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md, for the version or feature rather than reading it whole), and `npm view @anthropic-ai/claude-code dist-tags` for `latest` and `stable` |+| Models, model IDs, API limits | https://platform.claude.com/docs |+| Plan prices and plan features | https://claude.com/pricing and the plan articles on https://support.claude.com |+| API prices | https://platform.claude.com/docs/en/about-claude/pricing |+| MCP protocol | https://modelcontextprotocol.io |+| GitHub behavior | https://docs.github.com |+| A third-party tool's install and usage | That tool's own repo or docs |++- Tier 2 is any other first-party source: support.claude.com, anthropic.com news and engineering posts, claude.com/blog, Claude Academy (academy.claude.com), first-party repo READMEs and the official plugin `marketplace.json`. Tier 3 is everything else: attribute it in the sentence, and never use it as the only source for how Claude Code behaves.+- Verify against the frozen baseline: the `stable` version named in the Unreleased entry of [CHANGELOG.md](CHANGELOG.md).+- Write only facts you confirmed on a source you fetched. Leave out anything you could not confirm, and list it for the user.+- Link the Tier 1 page inline at a claim's first mention on each page, not at every repeat. Give every page a one-line `Sources:` footer that lists every page it cites (on a lesson, the navigation links follow it), and update it whenever you add or remove a citation.+- Conflicts: the domain's Tier 1 source wins; within a tier, the more specific page wins, then the newer or version-anchored one; the docs win on current behavior, the CHANGELOG on when it changed. If still unresolved, write only what both support or leave it out, and record the conflict in the PR description.+- Never write prices, promos, plan limits, retirement dates, model spec tables or "as of" prose. Every other number, apart from the guide's own metadata such as a lesson's time estimate, needs a dated, linked source, or it is cut: [CONTRIBUTING.md#numbers-benchmarks-and-estimates](CONTRIBUTING.md#numbers-benchmarks-and-estimates).+- Teach only behavior a Tier 1 or Tier 2 source documents. If a lesson cannot work without undocumented behavior, stop and ask the maintainer; it goes in only with their sign-off.++## Pull requests++- One change per PR. Fill in the PR template. For its claim table, start a separate agent that tries to refute each changed claim against Tier 1, and copy that agent's results into the table; never fill the Result column yourself. Leave the box "I have personally verified any AI-assisted content in this PR" for the user to tick.+- Lesson PRs, and example PRs whose example a core lesson or capstone uses, record a dry-run in a clean configuration: [CONTRIBUTING.md#pull-requests](CONTRIBUTING.md#pull-requests).++## Listings++A listing is an external tool, MCP server, skill, plugin, course or article the guide points readers to as something to use or read. Listing changes have been frozen since 2026-10-04 while the guide is reworked; [CONTRIBUTING.md#listing-policy](CONTRIBUTING.md#listing-policy) says whether the freeze still holds, and has the full bar, labels, section line, security caveat and form. Add a listing only when the user links the accepted resource suggestion issue, or the content-review PR, that approved it; otherwise point them to the [Suggest a resource form](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=suggest-resource.yml).++The bar in brief: to add any other Vendor or Community item, a named lesson must need it; it needs a public repo with an OSI-approved license (CC BY, CC BY-SA or CC0 for docs-only resources), a default-branch commit in the last 90 days, and at least 1,000 GitHub stars, 1,000 weekly npm or PyPI downloads, or 10,000 marketplace installs on a stated date; nothing it says about Claude Code may contradict Tier 1; and its core function must not depend on a proprietary hosted service unless it is a vendor's own tool for its own product, labelled `needs a <vendor> account`. At review, remove an item that is archived or deprecated upstream, whose canonical URL or repo returns 404, that has no default-branch commit in 12 months, that has under 100 stars and under 1,000 weekly downloads with no Anthropic marketplace listing, or that contradicts Tier 1. Anthropic and MCP-project items (including the MCP reference servers, labelled Vendor) need only a lesson or reference page that uses them, a live URL and no "not maintained" or "not official" disclaimer.++## Editorial rules++- Renaming or removing a heading: put `<a id="old-slug"></a>` on the line above the new heading so links to the old slug keep working, then run the heading check in [CONTRIBUTING.md#anchor-compatibility](CONTRIBUTING.md#anchor-compatibility). Headings carry no dates, versions, model names, "new" or year words, stability labels or emoji.+- Anchor date-sensitive claims to a version (`v2.1.x`) or a full date. Hedge third-party estimates and attribute them in the sentence.+- Prefer lists or stacked blocks to tables wider than three short columns. GitHub's file view joins consecutive lines, so end a line with a backslash where a paragraph needs a line break.+- In prose you write, use a comma, colon, parentheses or a new sentence where an em dash (U+2014) would go. Em dashes are fine inside quotations, identifiers and filenames.+- No emoji in headings, list markers, callouts or lesson text. Callouts are GitHub alerts; diagrams are Mermaid with `accTitle` and `accDescr`; terminal state is text, not a screenshot.+- Before you write a new page, read [CONTRIBUTING.md#doc-style-guide](CONTRIBUTING.md#doc-style-guide): the lesson anatomy, callouts, images and headings.diff --git a/CHANGELOG.md b/CHANGELOG.mdnew file mode 100644index 0000000..ddb9036--- /dev/null+++ b/CHANGELOG.md@@ -0,0 +1,15 @@+# Changelog++Editions of this guide, newest first. An edition is tagged `vYYYY.MM`, and a correction between editions `vYYYY.MM.N`. Each edition stays readable at its tag.++## Unreleased++Baseline: Claude Code v2.1.285 (stable), frozen on 2026-10-05.++Every change in the next edition is verified against this version, the `stable` dist-tag of [`@anthropic-ai/claude-code`](https://www.npmjs.com/package/@anthropic-ai/claude-code?activeTab=versions) on 2026-10-05. It stays frozen until the edition ships, unless a later `stable` release removes, renames or changes the default of something a lesson teaches.++### Added++- A listing policy in [CONTRIBUTING.md](CONTRIBUTING.md#listing-policy) and a form to suggest a resource.+- Agent rules in [AGENTS.md](AGENTS.md), which a new [CLAUDE.md](CLAUDE.md) imports.+- A rewritten [CONTRIBUTING.md](CONTRIBUTING.md), a pull request template with a claim table and a dry-run section, and a CODEOWNERS file.diff --git a/CLAUDE.md b/CLAUDE.mdnew file mode 100644index 0000000..7b14698--- /dev/null+++ b/CLAUDE.md@@ -0,0 +1,6 @@++## Claude Code notes++- When you edit this guide, load the bundled `/claude-api` skill before you state a model fact, then confirm the fact on its Tier 1 source from the table in `AGENTS.md`. The guide states no prices or plan limits.+- This repo's example hook, when `.claude/settings.json` registers it, can run in your session with the user's full permissions: `.claude/hooks/notification.py` speaks a message aloud when Claude Code needs input, using the ElevenLabs or OpenAI API when those keys are in `.env` or the shell environment. Never commit `.env`, and pass `--settings '{"disableAllHooks": true}'` when you script `claude -p` in this clone ([SECURITY.md](SECURITY.md)).diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 826f335..ba535f0 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -4,9 +4,111 @@ Thanks for your interest in improving this guide. This is a learning resource## Ways to contribute-- **Spot something stale or wrong?** Open an issue with the section name and the problem.-- **Want to suggest a third-party tool, MCP server, skill, plugin, course or article?** Use the [Suggest a resource form](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=suggest-resource.yml). Unsolicited pull requests that add listings are closed; see the [Listing policy](#listing-policy).-- **Want to expand a thin section?** SDLC walkthroughs, new workflow recipes, and real-world `.claude/` examples are all high-value.+| You want to | Do this |+|---|---|+| Report a stale or wrong fact | Open a [stale-content issue](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=stale-content.yml) with a link to a source that shows the current fact. |+| Report a broken link, script or example | Open a [bug report](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=bug.yml). |+| Suggest a third-party tool, MCP server, skill, plugin, course or article | Use the [Suggest a resource form](https://github.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/issues/new?template=suggest-resource.yml). Unsolicited pull requests that add listings are closed; see the [Listing policy](#listing-policy). |+| Improve an explanation or fix a fact | Open a pull request. Follow [Sources and citations](#sources-and-citations), [Pull requests](#pull-requests) and the [Doc style guide](#doc-style-guide). |+| Expand a thin section | Open a pull request. SDLC walkthroughs, new workflow recipes, and copy-ready examples for a lesson (see [Adding a skill](#adding-a-skill)) are all high-value. |++### While the guide is reworked++The guide is being reworked into lessons in three levels.++- Fixes to content the rework keeps are welcome and reviewed as usual.+- A pull request that changes content scheduled for removal is closed with thanks and the one-line reason for the cut.+- Pull requests that add listings are closed under the [Listing policy](#listing-policy).+- Stale-content issues get a first response within 7 days: a correction, or the Tier 1 source that settles it.++## Sources and citations++### Which source counts++Each kind of claim has one **Tier 1** source. It is the authoritative source for that kind of claim.++| Claim | Tier 1 source |+|---|---|+| Claude Code behavior: commands, flags, settings, hook events, stability labels | [code.claude.com/docs](https://code.claude.com/docs) |+| When something shipped, versions, release channels | The [anthropics/claude-code CHANGELOG](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md); the npm `latest` and `stable` dist-tags of `@anthropic-ai/claude-code` |+| Models, model IDs, API limits | [platform.claude.com docs](https://platform.claude.com/docs) |+| Plan prices and plan features | [claude.com/pricing](https://claude.com/pricing) and the plan support articles on [support.claude.com](https://support.claude.com) |+| API prices | [platform.claude.com pricing](https://platform.claude.com/docs/en/about-claude/pricing) |+| MCP protocol | [modelcontextprotocol.io](https://modelcontextprotocol.io) |+| GitHub behavior | [docs.github.com](https://docs.github.com) |+| A third-party tool's install and usage | That tool's own repo or docs |++- **Tier 2** is any other first-party source: support.claude.com, anthropic.com news and engineering posts, claude.com/blog, [Claude Academy](https://academy.claude.com), first-party repo READMEs, and the official plugin [`marketplace.json`](https://github.com/anthropics/claude-plugins-official/blob/main/.claude-plugin/marketplace.json).+- **Tier 3** is everything else. Attribute it in the sentence, and never use it as the only source for how Claude Code behaves.++### When sources disagree++1. The Tier 1 source for that kind of claim wins.+2. Within one tier, the more specific page beats the general one, then the newer or version-anchored page beats the older one.+3. The docs win on current behavior; the CHANGELOG wins on when something changed.+4. If that does not settle it, state only what both sources support, or leave the claim out. Never pick a side silently: record the conflict in the PR description.++Two open conflicts, recorded on 2026-10-05:++- The [setup page](https://code.claude.com/docs/en/setup) says the npm package requires "Node.js 22 or later"; the support article [Your first day in Claude Code](https://support.claude.com/en/articles/14552382-your-first-day-in-claude-code) says "npm (Node 18+)". The setup page wins: it is Tier 1, the article is Tier 2.+- The [output styles docs](https://code.claude.com/docs/en/output-styles) list Learning as a built-in style; the official `marketplace.json` calls it "the unshipped Learning output style". The docs win for the same reason.++### What needs a citation++A **volatile claim** is a statement that can go stale. Every volatile claim needs a source:++- a version or a date+- a price, plan availability, or a usage or rate limit+- a model name, model ID or default+- the name or behavior of a command, flag, setting, environment variable, hook event, tool or frontmatter field+- a stability label (preview, beta, research preview, deprecated), copied word for word from the Tier 1 source+- any count or statistic+- a third-party status fact: owner, license, archived++Mental models, analogies, the guide's own advice, and how-to steps whose commands are already cited on the same page need no citation.++### How to cite++- Link the Tier 1 page inline at the first mention of each volatile claim on a page, not at every repeat.+- Give each page a one-line `Sources:` footer that lists the pages it relies on. It ends the page, except on a lesson, where the navigation links follow it.+- Anchor date-sensitive claims to a version (`v2.1.x`) or a full date.+- Do not add access dates inline.++```markdown+Set `disable-model-invocation: true` to stop Claude from loading a skill on its own ([Skills](https://code.claude.com/docs/en/skills#control-who-invokes-a-skill)).++Sources: [Skills](https://code.claude.com/docs/en/skills), [Permissions](https://code.claude.com/docs/en/permissions)+```++### What the guide does not carry++- No prices, promos, plan limits, retirement dates, model spec tables or "as of" prose. A page's stamp carries the date for everything on it. Any other figure a lesson truly needs is written with the full date in the sentence (`on <full date>, ...`) plus its link.+- Stability labels are quoted word for word in a `> [!NOTE]` alert under the heading, never in the heading text.+- A future date is rare. It gets a full date, a Tier 1 link, and an expiry marker after the sentence: `<!-- expires: YYYY-MM-DD -->`.++### The stamp++Lessons, Electives, capstones, level indexes, topic indexes and reference pages that are not stubs carry a stamp as the last field of the header line under their H1:++```text+Verified against Claude Code vX.Y.Z (stable) on YYYY-MM-DD+```++It certifies that on that date every volatile claim on the page was checked against its Tier 1 source at that `stable` version, and that the page's exercise and check, if any, were dry-run there. It does not certify third-party items beyond the [listing bar](#the-listing-bar), or behavior on other release channels and surfaces. The README, the community files, stubs and pages from the previous edition carry no stamp.++### Numbers, benchmarks and estimates++| Kind | Rule |+|---|---|+| Any number | No number without a dated, linked source. Cut unsourced numbers, or reword the sentence without them. The guide's own metadata, such as a lesson's time estimate, needs no source. |+| Third-party adoption counts (stars, downloads, installs) | Keep them out of the guide's text; they belong in the resource suggestion issue that reviewed the item. Exception: an ecosystem figure a lesson needs, written with the full date in the sentence (`on <full date>, ...`) plus its link, never `as of`. The README's own star badge is fine. |+| Vendor benchmarks | Always attribute them in the sentence ("Anthropic reports ...") and link them. |+| Third-party plan-limit estimates | Cut them and link the official plan pages instead: [What is the Pro plan?](https://support.claude.com/en/articles/8325606-what-is-the-pro-plan), [What is the Max plan?](https://support.claude.com/en/articles/11049741-what-is-the-max-plan), [Use Claude Code with your Pro or Max plan](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan). |+| Author heuristics | Reword them as advice with no invented precision: "usually the fix is upstream", not "~80% of the time". |++### Undocumented behavior++The guide does not teach behavior that no Tier 1 or Tier 2 source documents. If a lesson cannot work without it, raise it with the maintainer; it goes in only with the maintainer's sign-off.<a id="adding-an-mcp-server-walkthrough"></a>## Listing policy@@ -64,69 +166,137 @@ The guide does not security-audit listings.- Suggestions that clear the bar wait for the next content review. Nothing merges ad hoc.- Suggesting your own project is allowed. Disclose your affiliation; the same bar applies.+## AI-assisted contributions++AI-assisted contributions are allowed, and you do not need to disclose them. You own every claim you submit, the same citation rules apply, and pull requests with claims that cannot be verified are closed, whoever or whatever wrote them.++## Pull requests++Each pull request carries one change. Fill in every section of the [pull request template](.github/PULL_REQUEST_TEMPLATE.md) that applies.++- **Baseline.** Changes are verified against one `stable` Claude Code version, named in the Unreleased entry of [CHANGELOG.md](CHANGELOG.md) and frozen while an edition is built. A later `stable` release is pulled in early only when it removes, renames or changes the default of something a lesson teaches, as its own pull request. Before an edition ships, a final pass verifies every stamped page at the then-current `stable` and re-stamps it.+- **Claim table.** Every volatile claim added or changed links its Tier 1 source. The description holds a claim table (claim, source, result), filled by a second, independent pass that tried to refute each claim against Tier 1: a separate agent for agent-made pull requests, the reviewer for human ones.+- **Tested field.** A pull request that touches `examples/` or `.claude/` states `Tested in Claude Code vX.Y.Z on <OS>`, or "smoke test only" if the change was not run in a session.+- **Dry-run.** Lesson pull requests, and example pull requests whose example a core lesson or capstone uses, record a dry-run of each exercise and check at the baseline, in a clean configuration:+ 1. Install the baseline version with `curl -fsSL https://claude.ai/install.sh | bash -s <version>` ([Advanced setup](https://code.claude.com/docs/en/setup)).+ 2. After the install, export `DISABLE_UPDATES=1` in the dry-run shell. A native install keeps updating itself in the background ([Advanced setup](https://code.claude.com/docs/en/setup#auto-updates)), and this variable blocks every update path ([Environment variables](https://code.claude.com/docs/en/env-vars)).+ 3. Point `CLAUDE_CONFIG_DIR` at a fresh folder whose only file is a `settings.json` holding `{"syncClaudeAiSkills": false, "syncClaudeAiPlugins": false, "disableClaudeAiConnectors": true}`, or use a dedicated test account with the same settings ([Settings](https://code.claude.com/docs/en/settings)). An empty config folder alone still loads the synced skills, plugins and connectors of the claude.ai account you sign in with.+ 4. Record `claude --version` at the start and at the end (a run whose two versions differ does not count), the `/skills` and `/mcp` output, the OS, the steps run and the check output, in the template's dry-run section.+- **Images.** Capture hygiene and contrast ([Diagrams and images](#diagrams-and-images)) are review items in the template, because CI cannot judge them.+- **Review.** The maintainer reviews and merges every pull request ([CODEOWNERS](.github/CODEOWNERS)).+## Doc style guide+The guide is moving to lessons in three levels: Beginner, Intermediate and Advanced. New pages follow these rules. Pages from the previous edition are brought in line when they are rewritten.++### Lessons++A lesson takes 10 to 20 minutes and moves the reader one step toward one can-do statement of its level. Every lesson has this shape, in this order:++1. An H1 with the lesson title, as the first line.+2. One `<sub>` header line under it: the level in bold, the position ("Lesson N of M"), "about N minutes", Needs (links to earlier lessons), and [the stamp](#the-stamp).+3. Six fixed slots, with these exact headings, so every lesson has the same anchors:+ - **Goal:** one sentence, "By the end of this lesson you can ...".+ - **You need:** earlier lessons, the environment, and where to practice. A variant callout (native Windows, a plan difference) goes here, at most one per variant.+ - **The idea:** the working model in about 150 words at most, plus the lesson's one optional diagram.+ - **Worked example:** numbered steps on a realistic task, with real commands and the observable state after each step.+ - **Your turn:** the exercise. Beginner repeats the example with exact steps; Intermediate finishes or fixes a partial file; Advanced gets a brief and acceptance criteria.+ - **Check:** a task list of observable criteria, with any ready-made test it needs; then the `npm run check -- <id>` line where a check exists (core lessons and capstones, not Electives); then at most one "if not" diagnosis per tested item.+4. Optional slots: **Watch out** (at most 3 bullets: safety, then cost, then gotchas) and **Go further** (at most 3 links).+5. A footer: the `Sources:` line; previous, level index and next; one `Topic:` link; and "Stuck on this lesson?".++Checks test state a script can read: git state, files, exit codes and settings files, never the wording of Claude's reply. Session-only views, such as the status bar or the `/hooks` and `/context` listings, belong in the Worked example, or in the Check's one self-check item, which is marked as not tested. A state that exists only for a moment, such as a plan before you approve it, is saved by the reader to a file under `.practice/`, which the check reads. Model-written text in an example is marked as illustrative ("your wording will differ").++Beginner lesson bodies carry no version numbers, prices or stability labels, and at most one caveat, about safety. Intermediate lessons carry at most two caveats, and Advanced lessons at most three.++### Callouts++Callouts are GitHub alerts, at most two per lesson, each with one meaning:++- `> [!NOTE]` for a variant, or a stability label quoted word for word;+- `> [!WARNING]` for safety: secrets, permissions, code that runs with your rights;+- `> [!CAUTION]` for anything irreversible;+- `> [!TIP]` for an optional shortcut.++`[!IMPORTANT]` is not used. Cost notes and gotchas go in the Watch out slot as plain bullets. No emoji in headings, list markers, callouts or lesson text. Quote the product's own interface symbols inside code formatting, for example `⏸ plan mode on`.++### Diagrams and images++- Diagrams are Mermaid, with `accTitle:` and `accDescr:` lines. The sentence before the diagram states its takeaway in words.+- Terminal state that the docs give as text is shown as text in a code block, not as a screenshot.+- A screen capture is allowed only when recognizing the real interface is the point and text cannot show it: at most three across the Beginner level. Each is taken in the practice template, cropped to the relevant interface (no startup banner, no Anthropic logo), scrubbed of personal paths, usernames, account emails, org names and tokens, given a 1px border, and captioned `Claude Code vX.Y.Z (stable), YYYY-MM-DD`.+- Every image has alt text that says what the reader should learn from it, not "screenshot" and not a repeat of the caption.+- Text in a diagram or image reaches 4.5:1 contrast in GitHub's light and dark themes; other marks reach 3:1.+- No third-party images (logos, icons, slides, product screenshots), no animation and no embedded video.+- New images go under `assets/`: `assets/brand/` for the guide's identity and `assets/lessons/<lesson-id>/` for captures. Names are kebab-case, and paths are explicit and relative. Budget: an SVG up to 50 KB, a capture up to 200 KB. Every image that is not a capture ships its editable source beside it. Hand-drawn SVG is for the guide's identity pieces only.++### Headings++- Headings carry no dates, versions, model names, "new" or year words, stability labels or emoji.+- A renamed heading keeps its old slug as an `<a id>` on the line above it ([Anchor compatibility](#anchor-compatibility)). No duplicate ids within a page, and no `{#custom-id}` syntax.++### Writing+**Do:**-- **Mental model first.** Open every concept with a one-line analogy or "think of it as…" before any bullets.-- **Practical example next.** A code block, command, or config snippet the reader can act on within 60 seconds.-- **Tables over walls of bullets** when content is comparable across rows.-- **Read-time markers** on long pages (e.g., `*~5 min read*`).-- **Semantic emojis only.** Keep a small set as visual markers (🚀 ⚡ 🧠 for navigation; ⚠️ for warnings; 💡 for tips). Don't sprinkle decorative emojis across headings — they break GitHub anchor slugs.+- Lead with what the reader does and what they see.+- Use a table when rows are comparable, but prefer lists or stacked blocks to tables wider than three short columns.+- End a line with a backslash where a paragraph needs a line break: GitHub's file view joins consecutive lines ([Line breaks](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#line-breaks)).+- Use relative `.md` links and explicit relative image paths. No front matter.+- Anchor date-sensitive claims to a version (`v2.1.x`) or a full date.+- Hedge and attribute third-party estimates in the sentence that states them.**Don't:**-- "In this section we will explore…", "as we mentioned earlier…", "it's worth noting that…" — cut filler phrases.-- Marketing language. "The ultimate guide to mastering…" reads as hype; lead with what the reader actually gets.-- Multi-paragraph docstrings. One short line max in code samples.+- Filler such as "In this section we will explore", "as we mentioned earlier" or "it's worth noting that". Cut it.+- Marketing language. "The ultimate guide to mastering..." reads as hype; lead with what the reader actually gets.+- Multi-paragraph docstrings. One short line at most in code samples.+- Em dashes in new prose. Keep them only inside quotations, identifiers and filenames.+- Claims about features you have not verified.## File layout-```-README.md # Tutorial / landing page (~850 lines; long-form sections belong in docs/)-docs/- skills.md # Full Skills guide- reference/- commands.md # Slash command cheatsheet- models.md # Model specs and pricing- effort-levels.md # Reasoning effort guide- faq.md # Consolidated Q&A- changelog.md # Updates & deprecations- further-reading.md # External links-mcp-servers/ # Per-server walkthroughs-specialized-agents/ # Role descriptions + system prompts + canvas flowcharts-.claude/ # Working example of a project-level Claude Code setup-Images/ # Diagrams and screenshots-```--When adding a topic that grows past ~400 lines, lift it into its own `docs/*.md` and replace the README section with a topic card + link.+The folder layout changes while the guide is reworked into three levels, so this file does not list it yet. For examples, see [Adding a skill](#adding-a-skill).## Anchor compatibility-The README has a stable URL fragment per section (e.g., `#claude-skills`, `#hooks`). When you rename or remove a heading:+The README and the `docs/` pages have a stable URL fragment per section (e.g., `#claude-skills`, `#hooks`). When you rename or remove a heading:1. Add an invisible HTML anchor that preserves the old slug:```html<a id="old-slug-here"></a>### New Heading```-2. Run the diff before merging:+2. Run the diff before merging, with `f` set to the file you changed:```bash- diff <(git show main:README.md | grep -oE '^#{1,4} ' | sort -u) \- <(grep -oE '^#{1,4} ' README.md | sort -u)+ f=README.md+ diff <(git show origin/main:"$f" | awk '/^ *```/{c=!c} !c && /^#+ /' | sort) \+ <(awk '/^ *```/{c=!c} !c && /^#+ /' "$f" | sort)```+ It compares the heading lines outside code blocks. No output means no heading changed. Each line marked `<` is an old heading that needs an anchor from step 1.This keeps inbound links from social posts working even after restructures.## Adding a skill-Skills live in [`.claude/commands/`](.claude/commands). To add one:+Learner examples go under `examples/<level>/<NN-lesson>/` (an Elective's under `examples/<level>/electives/<name>/`), in the folder of the lesson that uses them. Each folder mirrors the project layout, but nothing in it may sit at a path Claude Code discovers on its own: use `dot-claude/` for `.claude/`, `dot-mcp.json` for `.mcp.json`, and `CLAUDE.example.md` and `AGENTS.example.md` for `CLAUDE.md` and `AGENTS.md`. A skill goes in `dot-claude/skills/<name>/SKILL.md`, which means "copy to `.claude/skills/<name>/SKILL.md` in your project", where Claude Code loads project skills. A real `.claude/` folder there would not stay inert: Claude Code loads skills from a nested `.claude/skills/` once Claude works on files in that folder ([Skills](https://code.claude.com/docs/en/skills#where-skills-live)).++Every executable example (hook, script, workflow, settings snippet, skill with `allowed-tools`, plugin) meets this safety contract:-1. Create `.claude/commands/your-skill.md` with the [skill file format](docs/skills.md#skill-file-requirements).-2. Test it locally: `claude` → `/your-skill`.-3. Document it in [`docs/skills.md` → Available skills reference](docs/skills.md#available-skills-reference).-4. Open a PR with the skill file, the doc update, and a one-line entry in the README's [Skills section](README.md#claude-skills) if the skill is a marquee addition.+1. **Copy to use.** It runs only after a Learner copies it into their own project.+2. **Local only.** No network calls, third-party APIs or keys. The one exception is the MCP lesson's server, named in that lesson and installed at a pinned version.+3. **No capture.** Nothing copies transcripts or logs tool input or output. An example that must log keeps the log bounded, in an ignored folder, and says so in its header.+4. **Least privilege.** A settings snippet has narrow allow rules, never `Write`, `Edit` or broad `Bash(x:*)` entries, and a `Read` deny rule for `.env`. Grant a skill's `allowed-tools` sparingly: Claude Code applies a project skill's `allowed-tools` even in a `-p` run in a folder you've never trusted ([Skills](https://code.claude.com/docs/en/skills#pre-approve-tools-for-a-skill)).+5. **Header block.** Every file and every example README says what it does, when it runs (event and matcher), its side effects, requirements and platforms, how to turn it off or remove it, and its test line: `Tested in Claude Code vX.Y.Z (stable) on <OS>, YYYY-MM-DD` or `Not yet tested in a session at this edition's version`.+6. **Platform.** A POSIX shell (macOS, Linux, WSL2). Dependencies are limited to bash, jq, python3's standard library and git, apart from rule 2's MCP server. No `uv`, no pip packages, no `.env` loading.+7. **Smoke test.** It ships a test that runs without Claude: hooks get sample JSON piped in, with exit codes and output asserted; settings snippets parse as JSON; skills and agents have valid frontmatter.++Report a security problem in an example as [SECURITY.md](SECURITY.md) describes.++The root `.claude/` is reserved for maintainer tooling. Do not add skills or other examples there.## LicenseBy contributing, you agree your contributions are licensed under the MIT license (see [`LICENSE`](LICENSE)).++Sources: [Extend Claude with skills](https://code.claude.com/docs/en/skills), [Advanced setup](https://code.claude.com/docs/en/setup), [Environment variables](https://code.claude.com/docs/en/env-vars), [Settings](https://code.claude.com/docs/en/settings), [Output styles](https://code.claude.com/docs/en/output-styles), [Your first day in Claude Code](https://support.claude.com/en/articles/14552382-your-first-day-in-claude-code), [The MCP Registry](https://modelcontextprotocol.io/registry/about), [official plugin `marketplace.json`](https://github.com/anthropics/claude-plugins-official/blob/main/.claude-plugin/marketplace.json), [Basic writing and formatting syntax](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)