docs: sync to Claude Code v2.1.257 (#180)

* docs: sync to Claude Code v2.1.257

Audit against Claude Code v2.1.257 (repo baseline was v2.1.245, 12 releases
behind). Facts verified against the official docs and cross-checked against
the locally installed 2.1.257 binary.

Critical (P0):
- lesson-quiz L06 Q9 asked how many hook events exist, offering 16/25/31/40.
  With the real answer now 33, no option was correct. Option C 31 -> 33;
  answer letter unchanged.
- 03-skills taught SKILL.md `name`/`description` as required. Official docs
  now state all frontmatter fields are optional and `name` defaults to the
  directory name. Corrected in all five languages.

Hook events 31 -> 33 (PreModelSwitch/PostModelSwitch, v2.1.251) across 30
occurrences in 22 files, including three that read 25. Delta proved by
set-diff against the official event table: no phantom events. Both events
added to the 06-hooks tables with matcher, blocking behavior and 30s timeout,
plus detailed per-event sections.

CLI corrections verified against the binary:
- `claude plugin tag` takes a path, not a version
- `claude plugin init` / `validate` require their arguments
- `plugin init` scaffolds at ~/.claude/skills/<name>/, not project-local
- `--channels` entries must be tagged plugin:<name>@<marketplace>
- `--remote` is a deprecated alias for `--cloud`
- no `claude remote-control` subcommand exists, only the --remote-control flag

Also: CATALOG summary-table totals recomputed in all five languages (column 4
is a derived total, so the count change invalidated it); stale Opus 4.6/4.7
rosters aligned to canonical; self-assessment Advanced Features rescored 0-3
to stop a real gap being graded as mastery; 9 dangling quiz Review pointers
repaired; new features documented (--restricted, Fable 5.1,
experimental.cacheTtl, CLAUDE_CODE_SUBAGENT_MODEL_FORCE).

Deliberately out of scope: pre-existing translation staleness whose fix is
translation authorship rather than correction (ja/uk April-2026 root-doc
bodies, zh stubs, vi/README stub, translated CATALOG "New Features").

Claude-Session: https://claude.ai/code/session_01128xfEd8W7c2cMRw6N7uiF

* fix(hooks): complete the 31 → 33 hook-event propagation across all languages

The v2.1.257 sync bumped the hook-event count in the lesson and catalog
summaries but left 14 files still asserting 31, four of which the same
commit restamped 2.1.257. It also bumped the prose count in
claude_concepts_guide.md without adding the two rows, making that file
contradict itself where it had been internally consistent before.

Adds PreModelSwitch and PostModelSwitch (v2.1.251) everywhere an
exhaustive enumeration exists, and corrects the count wherever a list is
deliberately partial:

- README.md / INDEX.md in en, ja, zh, uk and vi/INDEX.md — count 31 → 33
  and both events added to the lifecycle group
- resources.md in all five languages — count only; these lists end in
  "and more" and are partial by design
- claude_concepts_guide.md — the two missing table rows

Also brings every hook-event table up to the 33 its own summary row
claims. The English CATALOG.md listed 29; the translated catalogs listed
25 and the ja/uk concept guides 27 and 28. Completing them required
translating six events that had never reached the mirrors: Setup,
UserPromptExpansion, PermissionDenied, PostToolBatch, MessageDisplay and
DirectoryAdded.

Summary-table arithmetic is untouched — those columns count example
scripts, not events.

Verified: no stale count survives outside CHANGELOG history, every
exhaustive enumeration lists exactly 33, and pre-commit passes 23/23.

Claude-Session: https://claude.ai/code/session_01UXmqJZNk1BR4uerJA85NiW
This commit is contained in:
Luong NGUYEN
2026-09-02 10:35:08 +02:00
committed by GitHub
parent 28149a85fc
commit 1e16914a8d
61 changed files with 569 additions and 298 deletions
+9 -8
View File
@@ -58,7 +58,7 @@ sequenceDiagram
Tools-->>Claude: Plugin installed ✅
```
> **No marketplace required (v2.1.157+)**: Plugins placed in `.claude/skills` directories now auto-load without a marketplace. Scaffold a new one with `claude plugin init <name>`.
> **No marketplace required (v2.1.157+)**: Plugins placed in `.claude/skills` directories now auto-load without a marketplace. Scaffold a new one with `claude plugin init <name>`, which creates it at `~/.claude/skills/<name>/` (user-global) and auto-loads it in the next session as `<name>@skills-dir`.
## Plugin Types & Distribution
@@ -799,12 +799,12 @@ claude plugin update <name> # Update installed plugin to latest
claude plugin list # List installed plugins
claude plugin enable <name> # Enable a disabled plugin
claude plugin disable <name> # Disable a plugin
claude plugin validate # Validate plugin structure
claude plugin tag <version> # Create a release git tag with version validation (v2.1.118+)
claude plugin validate <path> # Validate the plugin structure at <path>
claude plugin tag [path] # Create a {name}--v{version} release git tag (v2.1.118+)
claude plugin prune # Remove orphaned auto-installed plugin dependencies (v2.1.121+)
claude plugin uninstall <name> --prune # Uninstall and cascade-clean orphaned dependencies (v2.1.121+)
claude plugin details <name> # Show inventory + projected per-turn token cost (v2.1.139+)
claude plugin init # Scaffold a new plugin (alias: claude plugin new)
claude plugin init <name> # Scaffold a new plugin (alias: claude plugin new)
```
**Aliases**: `claude plugin new` for `init`, `remove` / `rm` for `uninstall`, `ls` for `list`, and `autoremove` for `prune`.
@@ -822,7 +822,7 @@ claude plugin init # Scaffold a new plugin (alias: cla
| `plugin tag` | `--dry-run` | Print what would be tagged without creating the tag |
| `plugin validate` | `--strict` | Treat warnings as errors |
Example: `claude plugin tag v0.3.0` validates the version format, creates the matching git tag, and is the recommended way to cut plugin releases for distribution.
Example: `claude plugin tag ./my-plugin` takes a **path** to the plugin (not a version string). It creates a `{name}--v{version}` git tag derived from `plugin.json`, validating that `plugin.json` and any enclosing marketplace entry agree, and is the recommended way to cut plugin releases for distribution.
`claude plugin prune` is useful after installing or uninstalling marketplace plugins that pulled in their own dependencies — it removes any auto-installed plugins whose parent plugin has since been removed. `plugin uninstall --prune` does the same cascade in a single step.
@@ -1040,7 +1040,7 @@ This ensures that plugins cannot escalate privileges or modify the host environm
2. Write `.claude-plugin/plugin.json` manifest
3. Create `README.md` with documentation
4. Test locally with `claude --plugin-dir ./my-plugin`
5. Tag the release with `claude plugin tag v0.3.0` (v2.1.118+) — validates the version string and creates the matching git tag
5. Tag the release with `claude plugin tag ./my-plugin` (v2.1.118+) — takes the plugin **path** and creates a `{name}--v{version}` git tag derived from `plugin.json`
6. Submit to plugin marketplace
7. Get reviewed and approved
8. Published on marketplace
@@ -1268,10 +1268,11 @@ The following Claude Code features work together with plugins:
---
**Last Updated**: August 25, 2026
**Claude Code Version**: 2.1.245
**Last Updated**: September 2, 2026
**Claude Code Version**: 2.1.257
**Sources**:
- https://code.claude.com/docs/en/plugins
- https://code.claude.com/docs/en/plugins-reference
- https://code.claude.com/docs/en/changelog#2-1-172
- https://code.claude.com/docs/en/changelog
- https://code.claude.com/docs/en/commands