mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-09-17 13:02:14 +02:00
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:
@@ -3,7 +3,7 @@ name: lesson-quiz
|
||||
description: "Test a learner on a single Claude Code tutorial lesson (01-10) with 10 questions, scoring answers and flagging weak spots. Use before, during, or after a lesson. Don't use for whole-tutorial assessment or explaining a topic instead of testing it."
|
||||
effort: high
|
||||
metadata:
|
||||
version: 1.2.0
|
||||
version: 1.3.0
|
||||
author: Luong NGUYEN
|
||||
---
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
- **Options**: A) Use `${args}` | B) Use `$ARGUMENTS` | C) Use `$@` | D) Use `$INPUT`
|
||||
- **Correct**: B
|
||||
- **Explanation**: `$ARGUMENTS` captures all text after the command name. For positional args, use `$0`, `$1`, etc.
|
||||
- **Review**: Argument handling section
|
||||
- **Review**: Arguments
|
||||
|
||||
### Q3
|
||||
- **Category**: conceptual
|
||||
@@ -36,7 +36,7 @@
|
||||
- **Options**: A) Use `$(command)` syntax | B) Use `!`command`` (backtick with !) syntax | C) Use `@shell:command` syntax | D) Use `{command}` syntax
|
||||
- **Correct**: B
|
||||
- **Explanation**: The `!`command`` syntax runs a shell command and injects its output into the skill prompt before Claude sees it.
|
||||
- **Review**: Dynamic context injection section
|
||||
- **Review**: Dynamic Context with Shell Commands
|
||||
|
||||
### Q5
|
||||
- **Category**: conceptual
|
||||
@@ -76,7 +76,7 @@
|
||||
- **Options**: A) `tools: [Read, Grep]` | B) `allowed-tools: [Read, Grep]` | C) `permissions: [Read, Grep]` | D) `restrict-tools: [Read, Grep]`
|
||||
- **Correct**: B
|
||||
- **Explanation**: The `allowed-tools` field in SKILL.md frontmatter scopes which tools the command can invoke.
|
||||
- **Review**: Frontmatter fields reference
|
||||
- **Review**: Frontmatter Reference
|
||||
|
||||
### Q10
|
||||
- **Category**: conceptual
|
||||
@@ -136,7 +136,7 @@
|
||||
- **Options**: A) `~/.claude/CLAUDE.md` | B) `CLAUDE.local.md` | C) `.claude/rules/personal.md` | D) `.claude/memory/personal.md`
|
||||
- **Correct**: B
|
||||
- **Explanation**: `CLAUDE.local.md` in the project root is for personal project-specific preferences. It should be git-ignored.
|
||||
- **Review**: Memory locations comparison
|
||||
- **Review**: Memory Locations Table
|
||||
|
||||
### Q7
|
||||
- **Category**: conceptual
|
||||
@@ -180,7 +180,7 @@
|
||||
- **Options**: A) Metadata, instructions, resources | B) Name, body, attachments | C) Header, content, scripts | D) Summary, details, data
|
||||
- **Correct**: A
|
||||
- **Explanation**: Level 1: Metadata (~100 tokens, always loaded), Level 2: SKILL.md body (<5k tokens, loaded on trigger), Level 3: Bundled resources (scripts/references/assets, loaded on demand).
|
||||
- **Review**: Progressive disclosure architecture section
|
||||
- **Review**: How Skills Work: Progressive Disclosure
|
||||
|
||||
### Q2
|
||||
- **Category**: practical
|
||||
@@ -235,7 +235,7 @@
|
||||
- **Question**: What characters are allowed in the `name` field of a skill's frontmatter?
|
||||
- **Options**: A) Any characters | B) Lowercase letters, numbers, and hyphens only (max 64 chars) | C) Letters and underscores | D) Alphanumeric only
|
||||
- **Correct**: B
|
||||
- **Explanation**: The name must be kebab-case (lowercase, hyphens), max 64 characters, and cannot contain "anthropic" or "claude".
|
||||
- **Explanation**: The name must be kebab-case (lowercase, hyphens), max 64 characters, and cannot contain "anthropic" or "claude". `name` is itself optional — if omitted it defaults to the skill's directory name — but when supplied it must follow these rules.
|
||||
- **Review**: SKILL.md format section
|
||||
|
||||
### Q9
|
||||
@@ -244,7 +244,7 @@
|
||||
- **Options**: A) User > Project > Enterprise | B) Enterprise > Personal > Project (plugin uses namespace) | C) Project > User > Enterprise | D) Alphabetical order
|
||||
- **Correct**: B
|
||||
- **Explanation**: Priority order is: Enterprise > Personal > Project. Plugin skills use a namespace (plugin-name:skill) so they don't conflict.
|
||||
- **Review**: Skill types and locations section
|
||||
- **Review**: Skill Types & Locations
|
||||
|
||||
### Q10
|
||||
- **Category**: practical
|
||||
@@ -252,7 +252,7 @@
|
||||
- **Options**: A) Set `user-invocable: false` | B) Set `disable-model-invocation: true` | C) Remove the description field | D) Set `auto-invoke: false`
|
||||
- **Correct**: B
|
||||
- **Explanation**: `disable-model-invocation: true` prevents Claude from auto-invoking but keeps the skill available in the user's `/` menu for manual use.
|
||||
- **Review**: Controlling invocation section
|
||||
- **Review**: Controlling Skill Invocation
|
||||
|
||||
---
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
- **Question**: What is the priority order for agent definitions?
|
||||
- **Options**: A) Project > User > CLI | B) CLI > Project > User | C) User > Project > CLI | D) They all have equal priority
|
||||
- **Correct**: B
|
||||
- **Explanation**: CLI-defined agents (`--agents` flag) override Project-level (`.claude/agents/`), which override User-level (`~/.claude/agents/`).
|
||||
- **Explanation**: Full order is managed settings > `--agents` flag > project (`.claude/agents/`) > user (`~/.claude/agents/`) > plugin. Of the options listed, CLI > Project > User is the correct relative ordering.
|
||||
- **Review**: File locations section
|
||||
|
||||
### Q3
|
||||
@@ -448,7 +448,7 @@
|
||||
- **Options**: A) `tool_name` and `tool_output` | B) `session_id`, `tool_name`, `tool_input`, `hook_event_name`, `cwd`, and more | C) Only `tool_name` | D) The full conversation history
|
||||
- **Correct**: B
|
||||
- **Explanation**: Hooks receive a JSON object on stdin with: session_id, transcript_path, hook_event_name, tool_name, tool_input, tool_use_id, cwd, and permission_mode.
|
||||
- **Review**: JSON input structure section
|
||||
- **Review**: JSON Input (via stdin)
|
||||
|
||||
### Q4
|
||||
- **Category**: practical
|
||||
@@ -493,9 +493,9 @@
|
||||
### Q9
|
||||
- **Category**: conceptual
|
||||
- **Question**: How many hook events does Claude Code support in total?
|
||||
- **Options**: A) 16 | B) 25 | C) 31 | D) 40
|
||||
- **Options**: A) 16 | B) 25 | C) 33 | D) 40
|
||||
- **Correct**: C
|
||||
- **Explanation**: Claude Code supports 31 hook events. They fall into four groups: session lifecycle (`SessionStart`, `Setup`, `SessionEnd`), prompt and message handling (`UserPromptSubmit`, `UserPromptExpansion`, `MessageDisplay`), tool use and permissions (`PreToolUse`, `PostToolUse`, `PermissionRequest`, ...), and agent, task, and environment coordination (`SubagentStart`, `TaskCreated`, `CwdChanged`, `WorktreeCreate`, ...). See the full event table in the lesson.
|
||||
- **Explanation**: Claude Code supports 33 hook events. They fall into four groups: session lifecycle (`SessionStart`, `Setup`, `SessionEnd`), prompt and message handling (`UserPromptSubmit`, `UserPromptExpansion`, `MessageDisplay`), tool use and permissions (`PreToolUse`, `PostToolUse`, `PermissionRequest`, …), and agent, task, and environment coordination (`SubagentStart`, `TaskCreated`, `CwdChanged`, `WorktreeCreate`, `PreModelSwitch`, `PostModelSwitch`, …).
|
||||
- **Review**: Hook events table
|
||||
|
||||
### Q10
|
||||
@@ -515,7 +515,7 @@
|
||||
- **Question**: What is the core manifest file for a plugin and where does it live?
|
||||
- **Options**: A) `plugin.yaml` in the root directory | B) `.claude-plugin/plugin.json` | C) `package.json` with a "claude" key | D) `.claude/plugin.md`
|
||||
- **Correct**: B
|
||||
- **Explanation**: The plugin manifest lives at `.claude-plugin/plugin.json` with required fields: name, description, version, author.
|
||||
- **Explanation**: The plugin manifest lives at `.claude-plugin/plugin.json`. Only `name` (kebab-case identifier) is required; `description`, `version`, `author`, `homepage`, `repository` and `license` are optional metadata.
|
||||
- **Review**: Plugin definition structure section
|
||||
|
||||
### Q2
|
||||
@@ -580,7 +580,7 @@
|
||||
- **Options**: A) Plugins are faster | B) Single-command install, versioned, marketplace distribution, bundles everything together | C) Plugins have more permissions | D) Plugins work offline
|
||||
- **Correct**: B
|
||||
- **Explanation**: Plugins package multiple components into one installable unit with versioning, marketplace distribution, and automatic updates — vs. manual setup of standalone components.
|
||||
- **Review**: Standalone vs Plugin comparison section
|
||||
- **Review**: Standalone vs Plugin Approach
|
||||
|
||||
### Q10
|
||||
- **Category**: practical
|
||||
@@ -588,7 +588,7 @@
|
||||
- **Options**: A) `.claude-plugin/hooks.json` | B) `hooks/hooks.json` | C) `plugin.json` hooks section | D) `.claude/settings.json`
|
||||
- **Correct**: B
|
||||
- **Explanation**: Plugin hooks are configured in `hooks/hooks.json` within the plugin directory structure.
|
||||
- **Review**: Plugin hooks section
|
||||
- **Review**: Plugin Structure Example
|
||||
|
||||
---
|
||||
|
||||
@@ -623,7 +623,7 @@
|
||||
- **Question**: You used `rm -rf temp/` via Bash in Claude Code, then want to rewind. Will the checkpoint restore those files?
|
||||
- **Options**: A) Yes, checkpoints capture everything | B) No, Bash filesystem operations (rm, mv, cp) are not tracked by checkpoints | C) Only if you used the Edit tool instead | D) Only if autoCheckpoint was enabled
|
||||
- **Correct**: B
|
||||
- **Explanation**: Checkpoints only track file changes made by Claude's tools (Write, Edit). Bash commands like rm, mv, cp operate outside checkpoint tracking.
|
||||
- **Explanation**: Checkpoints track file changes made by Claude's own Write/Edit tools in the main thread. Bash commands (rm, mv, cp), subagent edits (except a foreground `context: fork` skill), edits made outside Claude Code, and symlinked/hardlinked paths are all outside checkpoint tracking.
|
||||
- **Review**: Limitations section
|
||||
|
||||
### Q5
|
||||
@@ -724,7 +724,7 @@
|
||||
- **Options**: A) `claude --ci --json --limit 3` | B) `claude -p --output-format json --max-turns 3 "review code"` | C) `claude --pipeline --format json` | D) `claude run --json --turns 3`
|
||||
- **Correct**: B
|
||||
- **Explanation**: Print mode (`-p`) with `--output-format json` and `--max-turns` is the standard CI/CD integration pattern.
|
||||
- **Review**: Headless/Print Mode section
|
||||
- **Review**: Headless Mode
|
||||
|
||||
### Q7
|
||||
- **Category**: conceptual
|
||||
@@ -792,7 +792,7 @@
|
||||
- **Options**: A) Just use `--output-format json` | B) Use `--output-format json --json-schema '{"type":"object",...}'` | C) Use `--strict-json` flag | D) JSON output is always schema-valid
|
||||
- **Correct**: B
|
||||
- **Explanation**: `--output-format json` alone produces best-effort JSON. Adding `--json-schema` with a JSON Schema definition guarantees the output matches the schema.
|
||||
- **Review**: Output and format section
|
||||
- **Review**: Output & Format
|
||||
|
||||
### Q5
|
||||
- **Category**: conceptual
|
||||
@@ -808,14 +808,14 @@
|
||||
- **Options**: A) `claude --read-only "audit code"` | B) `claude --permission-mode plan --tools "Read,Grep,Glob" "audit code"` | C) `claude --safe-mode "audit code"` | D) `claude --no-write "audit code"`
|
||||
- **Correct**: B
|
||||
- **Explanation**: Combine `--permission-mode plan` (read-only analysis) with `--tools` (allowlist of specific tools) to restrict Claude to only read operations.
|
||||
- **Review**: Tool and permission management section
|
||||
- **Review**: Tool & Permission Management
|
||||
|
||||
### Q7
|
||||
- **Category**: conceptual
|
||||
- **Question**: What is the agent definition priority order?
|
||||
- **Options**: A) Project > User > CLI | B) CLI > Project > User | C) User > CLI > Project | D) All are equal priority
|
||||
- **Correct**: B
|
||||
- **Explanation**: CLI-defined agents (--agents flag) have highest priority, then Project-level (.claude/agents/), then User-level (~/.claude/agents/).
|
||||
- **Explanation**: Full order is managed settings > `--agents` flag > project (`.claude/agents/`) > user (`~/.claude/agents/`) > plugin. Of the options listed, CLI > Project > User is the correct relative ordering.
|
||||
- **Review**: Agents configuration section
|
||||
|
||||
### Q8
|
||||
@@ -844,8 +844,8 @@
|
||||
|
||||
---
|
||||
|
||||
**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/hooks
|
||||
- https://code.claude.com/docs/en/skills
|
||||
|
||||
@@ -49,7 +49,7 @@ The output format for Step 5 ("Score and Present Results"). Fill the bracketed p
|
||||
|
||||
---
|
||||
|
||||
**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/overview
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: self-assessment
|
||||
version: 2.4.0
|
||||
version: 2.5.0
|
||||
description: Comprehensive Claude Code self-assessment and learning path advisor. Runs a multi-category quiz covering 10 feature areas, produces a detailed skill profile with per-topic scores, identifies specific gaps, and generates a personalized learning path with prioritized next steps. Use when asked to "assess my level", "take the quiz", "find my level", "where should I start", "what should I learn next", "check my skills", "skill check", or "level up".
|
||||
---
|
||||
|
||||
@@ -112,11 +112,11 @@ Options:
|
||||
1. "Used checkpoints for safe experimentation" — Created checkpoints, used Esc+Esc or /rewind, restored code and/or conversation, or used either Summarize option (summarize from here / summarize up to here)
|
||||
2. "Used planning mode or extended thinking" — Activated planning via /plan, Shift+Tab, or --permission-mode plan; toggled extended thinking with Alt+T/Option+T
|
||||
3. "Configured permission modes" — Used any of the six modes — manual (renamed from default in v2.1.200), acceptEdits, plan, auto, dontAsk, or bypassPermissions — via CLI flags, keyboard shortcuts, or settings
|
||||
4. "Used remote/desktop/web features" — Used `claude remote-control`, `claude --remote`, `/teleport`, `/desktop`, or worktrees with `claude -w`
|
||||
4. "Used remote/desktop/web features" — Used `claude --remote-control`, `claude --cloud`, `/teleport`, `/desktop`, or worktrees with `claude -w`
|
||||
|
||||
**Scoring for Round 4:**
|
||||
- Option 1 maps to **Checkpoints** (0-1 point)
|
||||
- Options 2-4 map to **Advanced Features** (0-3 points, cap at 2)
|
||||
- Options 2-4 map to **Advanced Features** (0-3 points)
|
||||
|
||||
---
|
||||
|
||||
@@ -174,14 +174,14 @@ You checked **N/8** items.
|
||||
|
||||
#### 3B: For Deep Assessment
|
||||
|
||||
Calculate per-topic scores from the 5 rounds. Each topic gets 0-2 points. Then present:
|
||||
Calculate per-topic scores from the 5 rounds. Each topic gets 0-2 points, except Advanced Features (0-3) and Checkpoints (0-1). Then present:
|
||||
|
||||
```markdown
|
||||
## Claude Code Skill Assessment Results
|
||||
|
||||
### Overall Level: [Level 1 / Level 2 / Level 3]
|
||||
|
||||
**Total Score: N/19 points**
|
||||
**Total Score: N/20 points**
|
||||
|
||||
[One-line motivational summary]
|
||||
|
||||
@@ -196,7 +196,7 @@ Calculate per-topic scores from the 5 rounds. Each topic gets 0-2 points. Then p
|
||||
| MCP | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| Subagents | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| Checkpoints | N/1 | [None/Proficient] | [Learn/Mastered] |
|
||||
| Advanced Features | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| Advanced Features | N/3 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| Plugins | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| CLI | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
|
||||
@@ -219,7 +219,7 @@ Calculate per-topic scores from the 5 rounds. Each topic gets 0-2 points. Then p
|
||||
**Overall level calculation for Deep Assessment:**
|
||||
- 0-6 total points = Level 1: Beginner
|
||||
- 7-13 total points = Level 2: Intermediate
|
||||
- 14-19 total points = Level 3: Advanced
|
||||
- 14-20 total points = Level 3: Advanced
|
||||
|
||||
---
|
||||
|
||||
@@ -317,7 +317,7 @@ Use these specific recommendations when a topic is a gap:
|
||||
- Done when: A hook blocks dangerous commands before execution
|
||||
|
||||
**Hooks (score 1 — review)**:
|
||||
- Focus on: All 31 hook events (including PostToolUseFailure, StopFailure, TaskCreated, CwdChanged, FileChanged, PostCompact, Elicitation, ElicitationResult, Setup, UserPromptExpansion, MessageDisplay), 5 hook types (command, http, mcp_tool, prompt, agent — agent hooks are experimental and may change), component-scoped hooks in SKILL.md frontmatter, HTTP hooks with allowedEnvVars, `CLAUDE_ENV_FILE` for SessionStart/CwdChanged/FileChanged
|
||||
- Focus on: All 33 hook events (including PostToolUseFailure, StopFailure, TaskCreated, CwdChanged, FileChanged, PostCompact, Elicitation, ElicitationResult, Setup, UserPromptExpansion, MessageDisplay, PreModelSwitch, PostModelSwitch — the last two added in v2.1.251), 5 hook types (command, http, mcp_tool, prompt, agent — agent hooks are experimental and may change), component-scoped hooks in SKILL.md frontmatter, HTTP hooks with allowedEnvVars, `CLAUDE_ENV_FILE` for SessionStart/CwdChanged/FileChanged
|
||||
- Done when: You can create a prompt-based Stop hook and a component-scoped hook in a skill
|
||||
|
||||
**MCP (score 0)**:
|
||||
@@ -342,7 +342,7 @@ Use these specific recommendations when a topic is a gap:
|
||||
|
||||
**Checkpoints (score 0)**:
|
||||
- Tutorial: [08-checkpoints/](../../../08-checkpoints/)
|
||||
- Focus on: Esc+Esc and /rewind access, 6 rewind options (restore code and conversation, restore conversation, restore code, summarize from here, summarize up to here, never mind), limitations (bash filesystem ops not tracked)
|
||||
- Focus on: Esc+Esc and /rewind access, 6 rewind options (restore code and conversation, restore conversation, restore code, summarize from here, summarize up to here, never mind), limitations — bash filesystem ops, subagent edits (except a foreground `context: fork` skill), edits made outside Claude Code, and symlinked/hardlinked paths are all untracked
|
||||
- Key exercise: Make experimental changes, then rewind to restore
|
||||
- Done when: You can confidently experiment knowing you can rewind
|
||||
|
||||
@@ -353,7 +353,7 @@ Use these specific recommendations when a topic is a gap:
|
||||
- Done when: You can switch between planning and implementation modes fluently
|
||||
|
||||
**Advanced Features (score 1 — review)**:
|
||||
- Focus on: Remote control (`claude remote-control`), web sessions (`claude --remote`), desktop handoff (`/desktop`), worktrees (`claude -w`), task lists (Ctrl+T), managed settings for enterprise
|
||||
- Focus on: Remote control (`claude --remote-control`, alias `--rc`), web sessions (`claude --cloud`; `--remote` is a deprecated alias), desktop handoff (`/desktop`), worktrees (`claude -w`), task lists (Ctrl+T), managed settings for enterprise
|
||||
- Done when: You can hand off sessions between CLI, web, and desktop
|
||||
|
||||
**Plugins (score 0)**:
|
||||
|
||||
@@ -50,9 +50,9 @@ Options:
|
||||
1. "Used checkpoints for safe experimentation" — Created checkpoints, used Esc+Esc or /rewind, restored code and/or conversation, or used either Summarize option (summarize from here / summarize up to here)
|
||||
2. "Used planning mode or extended thinking" — Activated planning via /plan, Shift+Tab, or --permission-mode plan; toggled extended thinking with Alt+T/Option+T
|
||||
3. "Configured permission modes" — Used any of the six modes — manual (renamed from default in v2.1.200), acceptEdits, plan, auto, dontAsk, or bypassPermissions — via CLI flags, keyboard shortcuts, or settings
|
||||
4. "Used remote/desktop/web features" — Used `claude remote-control`, `claude --remote`, `/teleport`, `/desktop`, or worktrees with `claude -w`
|
||||
4. "Used remote/desktop/web features" — Used `claude --remote-control`, `claude --cloud`, `/teleport`, `/desktop`, or worktrees with `claude -w`
|
||||
|
||||
**Scoring:** Option 1 → **Checkpoints** (0-1); Options 2-4 → **Advanced Features** (0-3, cap at 2)
|
||||
**Scoring:** Option 1 → **Checkpoints** (0-1); Options 2-4 → **Advanced Features** (0-3)
|
||||
|
||||
---
|
||||
|
||||
@@ -69,8 +69,8 @@ Options:
|
||||
|
||||
---
|
||||
|
||||
**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/memory
|
||||
- https://code.claude.com/docs/en/sub-agents
|
||||
|
||||
@@ -42,7 +42,7 @@ You checked **N/8** items.
|
||||
|
||||
### Overall Level: [Level 1 / Level 2 / Level 3]
|
||||
|
||||
**Total Score: N/19 points**
|
||||
**Total Score: N/20 points**
|
||||
|
||||
[One-line motivational summary]
|
||||
|
||||
@@ -57,7 +57,7 @@ You checked **N/8** items.
|
||||
| MCP | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| Subagents | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| Checkpoints | N/1 | [None/Proficient] | [Learn/Mastered] |
|
||||
| Advanced Features | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| Advanced Features | N/3 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| Plugins | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
| CLI | N/2 | [None/Basic/Proficient] | [Learn/Review/Mastered] |
|
||||
|
||||
@@ -113,7 +113,7 @@ Based on your gaps, try these real-world exercises to solidify your learning:
|
||||
|
||||
---
|
||||
|
||||
**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/overview
|
||||
|
||||
@@ -39,7 +39,7 @@ Use these specific recommendations when a topic is a gap. Paths are relative to
|
||||
- Done when: A hook blocks dangerous commands before execution
|
||||
|
||||
**Hooks (score 1 — review)**:
|
||||
- Focus on: All 31 hook events (including PostToolUseFailure, StopFailure, TaskCreated, CwdChanged, FileChanged, PostCompact, Elicitation, ElicitationResult, Setup, UserPromptExpansion, MessageDisplay), 5 hook types (command, http, mcp_tool, prompt, agent — agent hooks are experimental and may change), component-scoped hooks in SKILL.md frontmatter, HTTP hooks with allowedEnvVars, `CLAUDE_ENV_FILE` for SessionStart/CwdChanged/FileChanged
|
||||
- Focus on: All 33 hook events (including PostToolUseFailure, StopFailure, TaskCreated, CwdChanged, FileChanged, PostCompact, Elicitation, ElicitationResult, Setup, UserPromptExpansion, MessageDisplay, PreModelSwitch, PostModelSwitch — the last two added in v2.1.251), 5 hook types (command, http, mcp_tool, prompt, agent — agent hooks are experimental and may change), component-scoped hooks in SKILL.md frontmatter, HTTP hooks with allowedEnvVars, `CLAUDE_ENV_FILE` for SessionStart/CwdChanged/FileChanged
|
||||
- Done when: You can create a prompt-based Stop hook and a component-scoped hook in a skill
|
||||
|
||||
**MCP (score 0)**:
|
||||
@@ -64,7 +64,7 @@ Use these specific recommendations when a topic is a gap. Paths are relative to
|
||||
|
||||
**Checkpoints (score 0)**:
|
||||
- Tutorial: [08-checkpoints/](../../../../08-checkpoints/)
|
||||
- Focus on: Esc+Esc and /rewind access, 6 rewind options (restore code and conversation, restore conversation, restore code, summarize from here, summarize up to here, never mind), limitations (bash filesystem ops not tracked)
|
||||
- Focus on: Esc+Esc and /rewind access, 6 rewind options (restore code and conversation, restore conversation, restore code, summarize from here, summarize up to here, never mind), limitations — bash filesystem ops, subagent edits (except a foreground `context: fork` skill), edits made outside Claude Code, and symlinked/hardlinked paths are all untracked
|
||||
- Key exercise: Make experimental changes, then rewind to restore
|
||||
- Done when: You can confidently experiment knowing you can rewind
|
||||
|
||||
@@ -75,7 +75,7 @@ Use these specific recommendations when a topic is a gap. Paths are relative to
|
||||
- Done when: You can switch between planning and implementation modes fluently
|
||||
|
||||
**Advanced Features (score 1 — review)**:
|
||||
- Focus on: Remote control (`claude remote-control`), web sessions (`claude --remote`), desktop handoff (`/desktop`), worktrees (`claude -w`), task lists (Ctrl+T), managed settings for enterprise
|
||||
- Focus on: Remote control (`claude --remote-control`, alias `--rc`), web sessions (`claude --cloud`; `--remote` is a deprecated alias), desktop handoff (`/desktop`), worktrees (`claude -w`), task lists (Ctrl+T), managed settings for enterprise
|
||||
- Done when: You can hand off sessions between CLI, web, and desktop
|
||||
|
||||
**Plugins (score 0)**:
|
||||
@@ -100,8 +100,8 @@ Use these specific recommendations when a topic is a gap. Paths are relative to
|
||||
|
||||
---
|
||||
|
||||
**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/hooks
|
||||
- https://code.claude.com/docs/en/memory
|
||||
|
||||
+7
-5
@@ -138,10 +138,12 @@ Provide clear, step-by-step guidance for Claude.
|
||||
Show concrete examples of using this Skill.
|
||||
```
|
||||
|
||||
### Required Fields
|
||||
### Recommended Fields
|
||||
|
||||
- **name**: lowercase letters, numbers, hyphens only (max 64 characters). Cannot contain "anthropic" or "claude".
|
||||
- **description**: what the Skill does AND when to use it. The combined `description` + `when_to_use` text is truncated at **1,536 characters** in the skill listing (configurable via `skillListingMaxDescChars`). This is critical for Claude to know when to activate the skill.
|
||||
- **description** (recommended): what the Skill does AND when to use it. If omitted, Claude Code uses the first paragraph of markdown content. The combined `description` + `when_to_use` text is truncated at **1,536 characters** in the skill listing (configurable via `skillListingMaxDescChars`). This is what Claude matches on to decide when to activate the skill.
|
||||
- **name** (optional): defaults to the skill's **directory name**. When supplied, it sets the display name — lowercase letters, numbers, hyphens only (max 64 characters), and cannot contain "anthropic" or "claude". For plugin skills, `name` also sets the last segment of the command.
|
||||
|
||||
All SKILL.md frontmatter fields are optional; `description` is the only one that is recommended.
|
||||
|
||||
### Optional Frontmatter Fields
|
||||
|
||||
@@ -895,8 +897,8 @@ Once you start building skills seriously, two things become essential: a library
|
||||
|
||||
---
|
||||
|
||||
**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/skills
|
||||
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
|
||||
|
||||
+16
-2
@@ -108,6 +108,8 @@ background: false # Optional - run as background task
|
||||
effort: high # Optional - reasoning effort (low, medium, high, xhigh, max)
|
||||
isolation: worktree # Optional - git worktree isolation
|
||||
initialPrompt: "Start by analyzing the codebase" # Optional - auto-submitted first turn
|
||||
experimental: # Optional - experimental settings block
|
||||
cacheTtl: "1h" # Cache TTL for this subagent: "5m" or "1h" (v2.1.248+)
|
||||
hooks: # Optional - component-scoped hooks
|
||||
PreToolUse:
|
||||
- matcher: "Bash"
|
||||
@@ -141,6 +143,18 @@ to solving problems.
|
||||
| `isolation` | No | Set to `worktree` to give the subagent its own git worktree |
|
||||
| `initialPrompt` | No | Auto-submitted first turn when the subagent runs as the main agent |
|
||||
| `color` | No | Display color for the subagent in the task list and transcript. Accepts `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan` |
|
||||
| `experimental` | No | Experimental settings block (v2.1.248+). `experimental.cacheTtl` sets the cache TTL for this subagent — `"5m"` or `"1h"` |
|
||||
|
||||
#### Subagent Model Environment Variables
|
||||
|
||||
Two environment variables affect which model a subagent runs on:
|
||||
|
||||
| Variable | Version | Description |
|
||||
|----------|---------|-------------|
|
||||
| `CLAUDE_CODE_SUBAGENT_MODEL` | — | Sets the model used for subagents |
|
||||
| `CLAUDE_CODE_SUBAGENT_MODEL_FORCE` | v2.1.257+ | Set to `1` to force the subagent model over a subagent's frontmatter `model:` |
|
||||
|
||||
> **Precedence changed in v2.1.251**: before that release, `CLAUDE_CODE_SUBAGENT_MODEL` came first and overrode agent frontmatter — including `model: inherit`. From v2.1.251 on, a subagent's own `model:` frontmatter wins. Set `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1` (v2.1.257+) when you want the environment variable to override frontmatter again, for example to pin an entire evaluation run to one model.
|
||||
|
||||
### Main-Thread Agent Frontmatter Honoring (v2.1.117+/v2.1.119+)
|
||||
|
||||
@@ -1316,8 +1330,8 @@ See the OpenTelemetry section in [Advanced Features → Telemetry](../09-advance
|
||||
|
||||
---
|
||||
|
||||
**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/sub-agents
|
||||
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
|
||||
|
||||
+96
-4
@@ -243,7 +243,7 @@ Subagent-based verification hooks that spawn a dedicated agent to evaluate condi
|
||||
|
||||
## Hook Events
|
||||
|
||||
Claude Code supports **31 hook events**:
|
||||
Claude Code supports **33 hook events**:
|
||||
|
||||
| Event | When Triggered | Matcher Input | Can Block | Common Use |
|
||||
|-------|---------------|---------------|-----------|------------|
|
||||
@@ -252,7 +252,7 @@ Claude Code supports **31 hook events**:
|
||||
| **InstructionsLoaded** | After CLAUDE.md or rules file loaded | (none) | No | Modify/filter instructions |
|
||||
| **UserPromptSubmit** | User submits prompt | (none) | Yes | Validate prompts |
|
||||
| **UserPromptExpansion** | User prompt is expanded (e.g., `@` mentions, slash commands resolved) | (none) | Yes | Transform or inspect expanded prompt |
|
||||
| **PreToolUse** | Before tool execution | Tool name | Yes (allow/deny/ask) | Validate, modify inputs |
|
||||
| **PreToolUse** | Before tool execution | Tool name | Yes (allow/deny/ask/defer) | Validate, modify inputs |
|
||||
| **PermissionRequest** | Permission dialog shown | Tool name | Yes | Auto-approve/deny |
|
||||
| **PermissionDenied** | User denies a permission prompt | Tool name | No | Logging, analytics, policy enforcement |
|
||||
| **PostToolUse** | After tool succeeds | Tool name | No | Add context, feedback |
|
||||
@@ -273,12 +273,16 @@ Claude Code supports **31 hook events**:
|
||||
| **FileChanged** | Watched file changes | (none) | No | File monitoring, rebuild |
|
||||
| **PreCompact** | Before context compaction | manual/auto | No | Pre-compact actions |
|
||||
| **PostCompact** | After compaction completes | (none) | No | Post-compact actions |
|
||||
| **PreModelSwitch** | Before Claude Code applies a requested model switch | Canonical name of the model being switched to (from `to_model`) | Yes | Gate or veto model changes |
|
||||
| **PostModelSwitch** | After the session's model changes, including changes Claude Code makes itself (such as restoring the model on resume) | Canonical name of the model switched to (from `to_model`) | No | Log or react to model changes |
|
||||
| **WorktreeCreate** | Worktree being created | (none) | Yes (path return) | Worktree initialization |
|
||||
| **WorktreeRemove** | Worktree being removed | (none) | No | Worktree cleanup |
|
||||
| **Elicitation** | MCP server requests user input | (none) | Yes | Input validation |
|
||||
| **ElicitationResult** | User responds to elicitation | (none) | Yes | Response processing |
|
||||
| **SessionEnd** | Session terminates | (none) | No | Cleanup, final logging |
|
||||
|
||||
`PreModelSwitch` and `PostModelSwitch` require v2.1.251 or later. Both receive `from_model` and `to_model`; the matcher is evaluated against the canonical name derived from `to_model` (e.g. `claude-opus-5`, `.*opus.*`). Their `command`, `http`, and `mcp_tool` timeout default is lowered to 30 seconds.
|
||||
|
||||
> **`TaskCreated` and `TaskCompleted` need the todo tools enabled (v2.1.233).** These two
|
||||
> events fire from the todo/task-tracking tools (`TaskCreate`/`Get`/`Update`/`List`,
|
||||
> `TodoWrite`), which are **no longer available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5,
|
||||
@@ -538,6 +542,92 @@ Updated matchers for notification events:
|
||||
- `agent_needs_input` - Background agent needs input (v2.1.198)
|
||||
- `agent_completed` - Background agent finished (v2.1.198)
|
||||
|
||||
### PreModelSwitch
|
||||
|
||||
Runs **before** Claude Code applies a requested model switch — for example when you run `/model`, or when a component asks for a different model. Requires v2.1.251 or later.
|
||||
|
||||
**Matchers:** the canonical name of the model being switched to, derived from `to_model`. Match an exact model (`claude-opus-5`) or a family with a regex (`.*opus.*`).
|
||||
|
||||
**Input fields:** in addition to the common fields, the hook receives `from_model` (the model in use before the switch) and `to_model` (the model requested).
|
||||
|
||||
**Can block:** yes. Exit code `2` blocks the switch and shows stderr as an error, so the session keeps its current model. Use this to gate or veto model changes — for example, to keep a cost-sensitive project off the most expensive model.
|
||||
|
||||
**Timeout:** this event lowers the `command`, `http`, and `mcp_tool` default timeout to 30 seconds.
|
||||
|
||||
**Configuration:**
|
||||
```json
|
||||
{
|
||||
"hooks": {
|
||||
"PreModelSwitch": [
|
||||
{
|
||||
"matcher": ".*opus.*",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/gate-model-switch.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# gate-model-switch.sh - refuse a switch to Opus on this project
|
||||
input=$(cat)
|
||||
to_model=$(echo "$input" | jq -r '.to_model')
|
||||
|
||||
if [[ "$to_model" == *opus* ]]; then
|
||||
echo "This project is budgeted for Sonnet; staying on the current model." >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
exit 0
|
||||
```
|
||||
|
||||
### PostModelSwitch
|
||||
|
||||
Runs **after** the session's model has changed. It also fires for changes Claude Code makes itself — such as restoring the previously selected model when you resume a session — not only for switches you request. Requires v2.1.251 or later.
|
||||
|
||||
**Matchers:** same as `PreModelSwitch` — the canonical name derived from `to_model`.
|
||||
|
||||
**Input fields:** `from_model` and `to_model`, alongside the common fields.
|
||||
|
||||
**Can block:** no. The switch has already happened; the hook can only observe and react.
|
||||
|
||||
**Timeout:** this event lowers the `command`, `http`, and `mcp_tool` default timeout to 30 seconds.
|
||||
|
||||
**Configuration:**
|
||||
```json
|
||||
{
|
||||
"hooks": {
|
||||
"PostModelSwitch": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/log-model-switch.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# log-model-switch.sh - append every model change to a session log
|
||||
input=$(cat)
|
||||
from=$(echo "$input" | jq -r '.from_model')
|
||||
to=$(echo "$input" | jq -r '.to_model')
|
||||
|
||||
echo "$(date -Iseconds) $from -> $to" >> ~/.claude/model-switches.log
|
||||
exit 0
|
||||
```
|
||||
|
||||
## Component-Scoped Hooks
|
||||
|
||||
Hooks can be attached to specific components (skills, agents, commands) in their frontmatter:
|
||||
@@ -679,6 +769,8 @@ All hooks receive JSON input via stdin:
|
||||
|
||||
> **`retry` (PermissionDenied)**: Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call.
|
||||
|
||||
> **Deprecated `PreToolUse` decision form**: For `PreToolUse`, the top-level `decision` and `reason` fields are **deprecated** — use `hookSpecificOutput.permissionDecision` (`allow` / `deny` / `ask` / `defer`) and `permissionDecisionReason` instead. Precedence among decisions is `deny` > `defer` > `ask` > `allow`. Note also that `suppressOutput` is accepted but **has no effect**.
|
||||
|
||||
#### `terminalSequence` (v2.1.141)
|
||||
|
||||
Hooks can emit raw OSC (operating system command) escape sequences by setting `terminalSequence` in the JSON output. The host writes the sequence to its controlling terminal when the hook returns — useful for desktop notifications, window-title updates, and terminal bells without requiring a TTY of your own.
|
||||
@@ -1534,8 +1626,8 @@ Edit `~/.claude/settings.json` or `.claude/settings.json` with the hook configur
|
||||
|
||||
---
|
||||
|
||||
**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/hooks
|
||||
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
|
||||
|
||||
@@ -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
|
||||
|
||||
+35
-10
@@ -54,10 +54,10 @@ The older JavaScript bundle is still produced for Windows and for environments t
|
||||
| `claude agents` | Open the **Agent View** (Research Preview, v2.1.139+) — multi-session manager listing every Claude Code session with its status. See [Agent View](#agent-view-claude-agents-v21139) below. | `claude agents` |
|
||||
| `claude auto-mode defaults` | Print auto mode default rules as JSON | `claude auto-mode defaults` |
|
||||
| `claude auto-mode reset` | Restore default auto-mode configuration, with a confirmation prompt (`--yes` to skip) (v2.1.212) | `claude auto-mode reset --yes` |
|
||||
| `claude remote-control` | Start Remote Control server | `claude remote-control` |
|
||||
| `claude --remote-control [name]` | Start Remote Control (a flag, not a subcommand; alias `--rc`) | `claude --rc` |
|
||||
| `claude plugin` | Manage plugins (install, enable, disable) | `claude plugin install my-plugin` |
|
||||
| `claude plugin init <name>` | Scaffold a new plugin in `.claude/skills` — auto-loads with no marketplace required (v2.1.157+) | `claude plugin init my-plugin` |
|
||||
| `claude plugin tag <version>` | Create a release git tag for a plugin with version validation (v2.1.118+) | `claude plugin tag v0.3.0` |
|
||||
| `claude plugin init <name>` | Scaffold a new plugin at `~/.claude/skills/<name>/` (user-global) — auto-loads in the next session as `<name>@skills-dir`, no marketplace required (v2.1.157+) | `claude plugin init my-plugin` |
|
||||
| `claude plugin tag [path]` | Create a `{name}--v{version}` release git tag for the plugin at `[path]`, validating that `plugin.json` and any enclosing marketplace entry agree (v2.1.118+) | `claude plugin tag ./my-plugin` |
|
||||
| `claude install [version]` | Install a specific native-binary version. Accepts `stable`, `latest`, or an explicit version string | `claude install 2.1.131` |
|
||||
| `claude project purge [path]` | Delete all local Claude Code state for a project (transcripts, tasks, debug logs, file-edit history, prompt history, and `~/.claude.json` entry). Omit `[path]` for an interactive picker. Flags: `--dry-run` to preview, `-y/--yes` to skip confirmation, `-i/--interactive` to confirm each item, `--all` for every project (v2.1.126+) | `claude project purge ~/work/repo --dry-run` |
|
||||
| `claude plugin prune` | Remove orphaned auto-installed plugin dependencies (parent plugin gone). `plugin uninstall --prune` does the same cascade after uninstalling a target (v2.1.121+) | `claude plugin prune` |
|
||||
@@ -78,14 +78,16 @@ The older JavaScript bundle is still produced for Windows and for environments t
|
||||
| `-w, --worktree` | Start in isolated git worktree. Accepts a GitLab merge-request URL as well as a GitHub PR URL since v2.1.233 | `claude -w` |
|
||||
| `-n, --name` | Session display name | `claude -n "auth-refactor"` |
|
||||
| `--from-pr <url-or-number>` | Resume sessions linked to a pull/merge request. Accepts GitHub (cloud + Enterprise), GitLab MR, and Bitbucket PR URLs since v2.1.119; previously GitHub.com only | `claude --from-pr 42` or `claude --from-pr https://gitlab.example.com/org/repo/-/merge_requests/17` |
|
||||
| `--remote "task"` | Create web session on claude.ai | `claude --remote "implement API"` |
|
||||
| `--cloud [description\|session_id\|url]` | Create a cloud session on claude.ai with the given description, or attach to an existing one by session ID or claude.ai/code URL | `claude --cloud "implement API"` |
|
||||
| `--remote "task"` | **Deprecated alias for `--cloud`**, including the existing-session form. Use `--cloud` instead | `claude --remote "implement API"` |
|
||||
| `--remote-control, --rc` | Interactive session with Remote Control | `claude --rc` |
|
||||
| `--teleport` | Resume a web session locally. Bare form opens a picker of your web sessions; the v2.1.223 changelog also shows a `claude --teleport <session id>` form, which the CLI reference does not document. Requires a claude.ai subscription | `claude --teleport` |
|
||||
| `--teleport [session]` | Resume a web session locally. Bare form opens a picker of your web sessions; pass a session ID to resume that session directly. Requires a claude.ai subscription | `claude --teleport` |
|
||||
| `--teammate-mode` | Agent team display mode | `claude --teammate-mode tmux` |
|
||||
| `--bare` | Minimal mode (skip hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` |
|
||||
| `--safe-mode` | Start with all customizations disabled (CLAUDE.md, plugins, skills, hooks, MCP) to isolate config problems; also `CLAUDE_CODE_SAFE_MODE=1` (v2.1.169) | `claude --safe-mode` |
|
||||
| `--restricted` | Lock the session down for untrusted or shared use: removes the built-in command- and code-running tools and WebFetch, ignores user/project/local settings, confines file tools to the working directories, and refuses `bypassPermissions` and cloud sessions. Also `CLAUDE_CODE_RESTRICTED=1` (v2.1.248+) | `claude --restricted -p "summarize this repo"` |
|
||||
| `--permission-mode auto` | Start in auto permission mode (replaces the removed `--enable-auto-mode` flag, gone since v2.1.111) | `claude --permission-mode auto` |
|
||||
| `--channels` | Subscribe to MCP channel plugins | `claude --channels discord,telegram` |
|
||||
| `--channels` | Subscribe to MCP channel plugins. Entries must be tagged `plugin:<name>@<marketplace>`; bare names are rejected | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--chrome` / `--no-chrome` | Enable/disable Chrome browser integration | `claude --chrome` |
|
||||
| `--effort` | Set thinking effort level | `claude --effort high` |
|
||||
| `--init` / `--init-only` | Run initialization hooks | `claude --init` |
|
||||
@@ -94,6 +96,26 @@ The older JavaScript bundle is still produced for Windows and for environments t
|
||||
| `--no-session-persistence` | Disable session saving (print mode) | `claude -p --no-session-persistence "query"` |
|
||||
| `--exclude-dynamic-system-prompt-sections` | Exclude dynamic sections from the system prompt for better prompt cache hit rates | `claude -p --exclude-dynamic-system-prompt-sections "query"` |
|
||||
|
||||
### Restricted Mode (`--restricted`, v2.1.248+)
|
||||
|
||||
`--restricted` (or `CLAUDE_CODE_RESTRICTED=1`) is for running `claude` on behalf of someone whose input you do not control — an evaluation harness on a shared machine, a CI job triggered by an outside contributor, a demo box. It applies all of the following:
|
||||
|
||||
- **Removes the tools that run commands or code** — Bash, PowerShell, and the REPL — plus WebFetch, unless `--tools` explicitly names them.
|
||||
- **Ignores user, project, and local settings files.** Managed settings and an explicit `--settings` file still apply, so an administrator keeps control while a checked-in `.claude/settings.json` cannot widen the sandbox.
|
||||
- **Confines the file tools to the working directories**, so reads and writes cannot escape the paths you started in.
|
||||
- **Refuses `bypassPermissions`**, whichever way it is requested.
|
||||
- **Refuses to create cloud sessions**, so a restricted run cannot push work off the machine.
|
||||
|
||||
```bash
|
||||
# Evaluation harness: no shell, no network fetches, no settings inheritance
|
||||
claude --restricted -p "summarize the architecture of this repo"
|
||||
|
||||
# Same lockdown, but deliberately re-enable one tool
|
||||
claude --restricted --tools WebFetch -p "check the linked RFC"
|
||||
```
|
||||
|
||||
> **Note**: `--restricted` is a coarser lock than `--permission-mode`. It removes tools outright rather than prompting for them, so a restricted session cannot be widened from inside the session.
|
||||
|
||||
### Interactive vs Print Mode
|
||||
|
||||
```mermaid
|
||||
@@ -285,7 +307,7 @@ claude --settings '{"model":"opus","verbose":true}' "complex task"
|
||||
|------|-------------|---------|
|
||||
| `--mcp-config` | Load MCP servers from JSON | `claude --mcp-config ./mcp.json` |
|
||||
| `--strict-mcp-config` | Only use specified MCP config | `claude --strict-mcp-config --mcp-config ./mcp.json` |
|
||||
| `--channels` | Subscribe to MCP channel plugins | `claude --channels discord,telegram` |
|
||||
| `--channels` | Subscribe to MCP channel plugins. Entries must be tagged `plugin:<name>@<marketplace>`; bare names are rejected | `claude --channels plugin:discord@my-marketplace` |
|
||||
|
||||
### MCP Examples
|
||||
|
||||
@@ -369,7 +391,7 @@ claude project purge --all --interactive
|
||||
| `--plugin-dir` | Load plugins from directory (repeatable) | `claude --plugin-dir ./my-plugin` |
|
||||
| `--effort` | Set thinking effort level | `claude --effort high` |
|
||||
| `--bare` | Minimal mode (skip hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` |
|
||||
| `--channels` | Subscribe to MCP channel plugins | `claude --channels discord` |
|
||||
| `--channels` | Subscribe to MCP channel plugins (tagged `plugin:<name>@<marketplace>`) | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--tmux` | Create tmux session for worktree | `claude --tmux` |
|
||||
| `--fork-session` | Create new session ID when resuming | `claude --resume abc --fork-session` |
|
||||
| `--max-budget-usd` | Maximum spend (print mode); also halts background subagents when hit (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` |
|
||||
@@ -769,6 +791,7 @@ Claude Code supports multiple models with different capabilities:
|
||||
| Opus 4.8 | `claude-opus-4-8` | 1M tokens | Previous flagship Opus, still selectable; adaptive effort levels `low → max`; default effort `high` (v2.1.154) |
|
||||
| Sonnet 4.6 | `claude-sonnet-4-6` | 1M tokens | Balanced speed and capability; default effort for Pro/Max subscribers raised from `medium` to `high` in v2.1.117 |
|
||||
| Haiku 4.5 | `claude-haiku-4-5` | 200K tokens | Fastest, best for quick tasks; no effort levels |
|
||||
| Fable 5.1 | `claude-fable-5-1` | — | Current Fable model; the `fable` alias resolves to it (v2.1.257) |
|
||||
| Fable 5 | `claude-fable-5` | — | Mythos-class model, made safe for general use (v2.1.170) |
|
||||
|
||||
### Model Selection
|
||||
@@ -786,6 +809,8 @@ claude --model opusplan "design and implement the API"
|
||||
/fast
|
||||
```
|
||||
|
||||
> **Fable 5.1 and the `fable` alias (v2.1.257)**: Fable 5.1 (`claude-fable-5-1`) ships in **v2.1.257**, and the `fable` alias now resolves to it rather than to Fable 5. The official model-config page says Fable 5.1 "requires Claude Code v2.1.255 or later", but 2.1.255 was never published — v2.1.257 is the first release users can actually install it with. On a Claude apps gateway, `fable` and `best` still resolve to **Fable 5**; pick 5.1 explicitly in `/model` there.
|
||||
|
||||
> **Fast Mode runs on Opus 5 and Opus 4.8 (v2.1.219)**: As of v2.1.219, `/fast` applies to **Opus 5 and Opus 4.8** — Opus 4.7 was removed from fast mode. Opus 5's fast mode is billed at $10/$50 per Mtok. Fast mode first moved to Opus 4.8 in v2.1.154 (about 2× the standard rate for ~2.5× the output speed), having flipped from Opus 4.6 to Opus 4.7 in v2.1.142. The `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE` env var was **deprecated in v2.1.154 and removed on 2026-06-01**; fast mode is no longer available on Opus 4.6 — select Opus 5 or Opus 4.8 instead.
|
||||
|
||||
### Effort Levels (Opus 5 / Sonnet 5 / Opus 4.8 / Opus 4.7)
|
||||
@@ -1022,8 +1047,8 @@ claude -p --output-format json "query"
|
||||
|
||||
---
|
||||
|
||||
**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/cli-reference
|
||||
- https://code.claude.com/docs/en/env-vars
|
||||
|
||||
+12
-6
@@ -20,9 +20,9 @@
|
||||
| **Skills** | 10 bundled | 6 | 16 | [03-skills/](03-skills/) |
|
||||
| **Plugins** | - | 3 | 3 | [07-plugins/](07-plugins/) |
|
||||
| **MCP Servers** | 1 | 4 | 5 | [05-mcp/](05-mcp/) |
|
||||
| **Hooks** | 31 events | 11 | 42 | [06-hooks/](06-hooks/) |
|
||||
| **Hooks** | 33 events | 11 | 44 | [06-hooks/](06-hooks/) |
|
||||
| **Memory** | 7 types | 3 | 10 | [02-memory/](02-memory/) |
|
||||
| **Total** | **115** | **44** | **159** | |
|
||||
| **Total** | **117** | **44** | **161** | |
|
||||
|
||||
---
|
||||
|
||||
@@ -291,7 +291,7 @@ Bundled collections of commands, agents, MCP servers, and hooks.
|
||||
/plugin list # List installed plugins
|
||||
/plugin install <name> # Install plugin
|
||||
/plugin remove <name> # Remove plugin
|
||||
/plugin update <name> # Update plugin
|
||||
claude plugin update <name> # Update a plugin (CLI; the /plugin update slash form is referenced in prose but not in the command reference)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -361,6 +361,7 @@ Event-driven automation that executes shell commands on Claude Code events.
|
||||
| `PostToolUseFailure` | Tool execution fails | After tool error | Error handling, logging |
|
||||
| `PostToolBatch` | After a batch of tool uses completes | End of a tool batch | Aggregate reporting, batched validation |
|
||||
| `Notification` | Notification sent | Claude sends notification | External alerts |
|
||||
| `MessageDisplay` | Assistant message text is displayed | While the message renders | Transform or hide displayed text |
|
||||
| `SubagentStart` | Subagent spawned | Subagent task starts | Initialize subagent context |
|
||||
| `SubagentStop` | Subagent finishes | Subagent task complete | Chain actions |
|
||||
| `Stop` | Claude finishes responding | Response complete | Cleanup, reporting |
|
||||
@@ -370,9 +371,12 @@ Event-driven automation that executes shell commands on Claude Code events.
|
||||
| `TaskCreated` | Task created via TaskCreate (only fires when the todo tools are enabled — see [Hooks](06-hooks/README.md#hook-events)) | New task created | Task tracking, logging |
|
||||
| `ConfigChange` | Configuration updated | Settings modified | React to config changes |
|
||||
| `CwdChanged` | Working directory changes | Directory changed | Directory-specific setup |
|
||||
| `DirectoryAdded` | New working directory registered mid-session | `/add-dir` or SDK `register_repo_root` | Set up tooling for the new directory |
|
||||
| `FileChanged` | Watched file changes | File modified | File monitoring, rebuild |
|
||||
| `PreCompact` | Before compact operation | Context compression | State preservation |
|
||||
| `PostCompact` | After compaction completes | Compaction done | Post-compact actions |
|
||||
| `PreModelSwitch` | Before a requested model switch is applied | Model switch requested | Gate or veto model changes |
|
||||
| `PostModelSwitch` | After the session's model changes | Model switch completed | Log or react to model changes |
|
||||
| `WorktreeCreate` | Worktree being created | Git worktree created | Setup worktree environment |
|
||||
| `WorktreeRemove` | Worktree being removed | Git worktree removed | Cleanup worktree resources |
|
||||
| `Elicitation` | MCP server requests input | MCP elicitation | Input validation |
|
||||
@@ -507,6 +511,7 @@ cp 02-memory/personal-CLAUDE.md ~/.claude/CLAUDE.md
|
||||
| **`/design`** | Design canvas — a multi-artboard visual design (UI mockups, screen flows, landing pages, posters) built on artifacts and refined visually rather than in code. Research preview; requires v2.1.233+; Pro/Max/Team/Enterprise | Run `/design` in the CLI or the Desktop app. See [Slash Commands](01-slash-commands/README.md) |
|
||||
| **`notify_when_idle`** | Cross-session `SendMessage` input that asks another session on the same machine to send one notice when it next goes idle — opt-in, one-shot, no polling (v2.1.236). Related: `ListAgents` reports the session's own name and lists live teammates, and Windows gained cross-session messaging (v2.1.239) | Pass `notify_when_idle` to `SendMessage`. See [Advanced Features](09-advanced-features/README.md#cross-session-messaging) |
|
||||
| **Plugin manifest fields** | `plugin.json` accepts `workflows`, `channels`, `dependencies` (semver), `outputStyles`, `keywords`, `metadata`, `lspServers`, and `experimental.themes` / `experimental.monitors`. CLI gained `claude plugin new`, `remove`/`rm`, `prune`/`autoremove`, and the flags `--with`, `-f`/`--force`, `--available`, `--push`, `--dry-run` | See [Plugins](07-plugins/README.md) |
|
||||
| **Restricted Mode** | Removes the built-in tools that run commands or code (Bash, PowerShell, REPL) and WebFetch unless `--tools` names them; ignores user, project, and local settings (managed settings and `--settings` still apply); confines file tools to the working directories; refuses `bypassPermissions`; and refuses to create cloud sessions (v2.1.248+) | `claude --restricted`, or `CLAUDE_CODE_RESTRICTED=1`. See [CLI](10-cli/README.md) |
|
||||
|
||||
---
|
||||
|
||||
@@ -566,8 +571,8 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
|
||||
---
|
||||
|
||||
**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/sub-agents
|
||||
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
|
||||
@@ -586,4 +591,5 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
- https://code.claude.com/docs/en/plugin-marketplaces
|
||||
- https://code.claude.com/docs/en/discover-plugins
|
||||
- https://code.claude.com/docs/en/settings
|
||||
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
- https://code.claude.com/docs/en/plugins-reference
|
||||
**Compatible Models**: Claude Fable 5.1, Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -224,11 +224,11 @@ Event-driven automation scripts that execute automatically.
|
||||
|
||||
**Hook Types** (5): `command`, `http`, `prompt`, `mcp_tool`, `agent` — how a hook runs.
|
||||
|
||||
**Hook Events** (31, in 4 categories) — when it runs:
|
||||
**Hook Events** (33, in 4 categories) — when it runs:
|
||||
- Tool Hooks: PreToolUse, PostToolUse, PostToolUseFailure, PostToolBatch, PermissionRequest, PermissionDenied
|
||||
- Session Hooks: SessionStart, Setup, SessionEnd, Stop, StopFailure, SubagentStart, SubagentStop
|
||||
- Task Hooks: UserPromptSubmit, UserPromptExpansion, MessageDisplay, TaskCompleted, TaskCreated, TeammateIdle (TaskCompleted/TaskCreated only fire when the todo tools are enabled — off by default on Opus 4.8, Sonnet 5, Fable 5, Mythos 5 and newer)
|
||||
- Lifecycle Hooks: ConfigChange, CwdChanged, DirectoryAdded, FileChanged, PreCompact, PostCompact, WorktreeCreate, WorktreeRemove, Notification, InstructionsLoaded, Elicitation, ElicitationResult
|
||||
- Lifecycle Hooks: ConfigChange, CwdChanged, DirectoryAdded, FileChanged, PreCompact, PostCompact, PreModelSwitch, PostModelSwitch, WorktreeCreate, WorktreeRemove, Notification, InstructionsLoaded, Elicitation, ElicitationResult
|
||||
|
||||
---
|
||||
|
||||
|
||||
+5
-5
@@ -102,7 +102,7 @@ graph TD
|
||||
| **3** | [Checkpoints](08-checkpoints/) | ⭐⭐ Intermediate | 45 min | Level 1 | Session management | Safe exploration | Experimentation, recovery |
|
||||
| **4** | [CLI Basics](10-cli/) | ⭐⭐ Beginner+ | 30 min | Level 1 | None | Core CLI usage | Interactive & print mode |
|
||||
| **5** | [Skills](03-skills/) | ⭐⭐ Intermediate | 1 hour | Level 2 | Slash Commands | Automatic expertise | Reusable capabilities, consistency |
|
||||
| **6** | [Hooks](06-hooks/) | ⭐⭐ Intermediate | 1 hour | Level 2 | Tools, Commands | Workflow automation (31 events, 5 types) | Validation, quality gates |
|
||||
| **6** | [Hooks](06-hooks/) | ⭐⭐ Intermediate | 1 hour | Level 2 | Tools, Commands | Workflow automation (33 events, 5 types) | Validation, quality gates |
|
||||
| **7** | [MCP](05-mcp/) | ⭐⭐⭐ Intermediate+ | 1 hour | Level 2 | Configuration | Live data access | Real-time integration, APIs |
|
||||
| **8** | [Subagents](04-subagents/) | ⭐⭐⭐ Intermediate+ | 1.5 hours | Level 2 | Memory, Commands | Complex task handling (6 built-in including Bash) | Delegation, specialized expertise |
|
||||
| **9** | [Advanced Features](09-advanced-features/) | ⭐⭐⭐⭐⭐ Advanced | 2-3 hours | Level 3 | All previous | Power user tools | Planning, Auto Mode, Channels, Voice Dictation, permissions |
|
||||
@@ -235,7 +235,7 @@ Before starting Level 2, make sure you're comfortable with these Level 1 concept
|
||||
|
||||
#### What You'll Achieve
|
||||
✅ Auto-invoke specialized capabilities with YAML frontmatter (including `effort` and `shell` fields)
|
||||
✅ Set up event-driven automation across 31 hook events
|
||||
✅ Set up event-driven automation across 33 hook events
|
||||
✅ Use all 5 hook types (command, http, mcp_tool, prompt, agent)
|
||||
✅ Enforce code quality standards
|
||||
✅ Create custom hooks for your workflow
|
||||
@@ -740,8 +740,8 @@ Once you've completed all milestones:
|
||||
|
||||
---
|
||||
|
||||
**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/overview
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
@@ -749,7 +749,7 @@ Once you've completed all milestones:
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.144
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.145
|
||||
- https://code.claude.com/docs/en/model-config
|
||||
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
**Compatible Models**: Claude Fable 5.1, Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
**Maintained by**: Claude How-To Contributors
|
||||
**License**: Educational purposes, free to use and adapt
|
||||
|
||||
|
||||
+12
-8
@@ -119,7 +119,7 @@ claude -r "session" # Resume session by name/ID
|
||||
| **Skills** | `.claude/skills/*/SKILL.md` | Auto-invoked |
|
||||
| **Subagents** | `.claude/agents/*.md` | Auto-delegated |
|
||||
| **MCP** | `.mcp.json` (project) or `~/.claude.json` (user) | `/mcp__server__action` |
|
||||
| **Hooks (31 events)** | `~/.claude/hooks/*.sh` | Event-triggered (5 types) |
|
||||
| **Hooks (33 events)** | `~/.claude/hooks/*.sh` | Event-triggered (5 types) |
|
||||
| **Plugins** | Via `/plugin install` | Bundles all |
|
||||
| **Checkpoints** | Built-in | `Esc+Esc` or `/rewind` |
|
||||
| **Planning Mode** | Built-in | `/plan <task>` |
|
||||
@@ -190,7 +190,7 @@ vim CLAUDE.md
|
||||
|
||||
### Automation & Hooks
|
||||
```bash
|
||||
# Install hooks (31 events, 5 types: command, http, mcp_tool, prompt, agent)
|
||||
# Install hooks (33 events, 5 types: command, http, mcp_tool, prompt, agent)
|
||||
mkdir -p ~/.claude/hooks
|
||||
cp 06-hooks/*.sh ~/.claude/hooks/
|
||||
chmod +x ~/.claude/hooks/*.sh
|
||||
@@ -392,7 +392,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Voice Dictation** | Speak commands and context to Claude | `/voice` command |
|
||||
| **Output Styles** | Change Claude's role, tone, and default response format | `/config` → Output style, or `outputStyle` setting. Built-ins: Default, Proactive, Explanatory, Learning, Concise |
|
||||
| **Status Line** | Custom bottom-of-session status from a command | `/statusline`, or `statusLine` setting; receives session/model/cost/context JSON on stdin |
|
||||
| **Hooks (31 events)** | Expanded hook system with 5 types | command, http, mcp_tool, prompt, agent hook types |
|
||||
| **Hooks (33 events)** | Expanded hook system with 5 types | command, http, mcp_tool, prompt, agent hook types |
|
||||
| **MCP Elicitation** | MCP servers can request user input at runtime | Auto-prompted when server needs clarification |
|
||||
| **Plugin LSP** | Language Server Protocol support for plugins | `userConfig`, `${CLAUDE_PLUGIN_DATA}` variable |
|
||||
| **Remote Control** | Control Claude Code via WebSocket API | `claude --remote` for external integrations |
|
||||
@@ -401,7 +401,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Task List** | Manage background tasks | `/task list`, `/task status <id>` |
|
||||
| **Auto Memory** | Automatic memory saving from conversations | Claude auto-saves key context to CLAUDE.md |
|
||||
| **Git Worktrees** | Isolated workspaces for parallel development | `/worktree` to create isolated workspace |
|
||||
| **Model Selection** | Switch between Opus 5, Sonnet 5, Sonnet 4.6, Opus 4.8, and Haiku 4.5 | `/model` — since v2.1.153 the choice is saved as the default for new sessions; press `s` for session-only |
|
||||
| **Model Selection** | Switch between Fable 5.1, Fable 5, Opus 5, Sonnet 5, Sonnet 4.6, Opus 4.8, and Haiku 4.5 | `/model` — since v2.1.153 the choice is saved as the default for new sessions; press `s` for session-only |
|
||||
| **Agent Teams** | Coordinate multiple agents on tasks | Enable with `CLAUDE_AGENT_TEAMS=1` env var |
|
||||
| **Dynamic Workflows** *(v2.1.154)* | Deterministic multi-agent orchestration; since v2.1.219 the default size guideline is medium (aim for fewer than 15 agents) | `/workflows` to view runs; ask Claude to create one; change the size via **Dynamic workflow size** in `/config` |
|
||||
| **Scheduled Tasks** | Recurring tasks with `/loop` | `/loop 5m /command` or CronCreate tool |
|
||||
@@ -414,6 +414,9 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Subagent Output Scanning** *(v2.1.210+)* | Scans subagent reports for prompt-injection patterns and neutralizes them | On by default, no opt-out |
|
||||
| **WebSearch Cap and Subagent Fan-Out Limits** *(v2.1.212, extended v2.1.219)* | 200 WebSearch calls per session; concurrent-subagent cap (default 20) added in v2.1.217; since v2.1.219 subagents can spawn nested subagents up to **depth 3 by default** (v2.1.217 had disabled nesting). The 200-subagent-per-session spawn cap was **removed in v2.1.224** — there is no longer any limit on total subagents per session | `CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION` (default 200; `/clear` resets), `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` (default 20), `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` (default 3; set 1 to disable) |
|
||||
| **Screen Reader Mode** *(v2.1.208)* | Plain-text rendering mode for screen readers | `--ax-screen-reader` flag, `CLAUDE_AX_SCREEN_READER=1`, or `"axScreenReader": true` in settings |
|
||||
| **Restricted Mode** *(v2.1.248+)* | Drops the built-in tools that run commands or code (Bash, PowerShell, REPL) and WebFetch unless `--tools` names them; ignores user, project, and local settings (managed settings and `--settings` still apply); confines file tools to the working directories; refuses `bypassPermissions` and cloud sessions | `claude --restricted`, or `CLAUDE_CODE_RESTRICTED=1` |
|
||||
| **Subagent Cache TTL** *(v2.1.248+)* | `experimental.cacheTtl` agent-frontmatter field sets how long the subagent's prompt cache lives | Add `experimental:` with `cacheTtl: "5m"` (or `"1h"`) to the agent's frontmatter. See [Subagents](04-subagents/README.md) |
|
||||
| **Forced Subagent Model** *(v2.1.257+)* | `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1` makes `CLAUDE_CODE_SUBAGENT_MODEL` override agent frontmatter. Since v2.1.251 the env var no longer wins by default — frontmatter (including `model: inherit`) takes precedence unless this is set | `CLAUDE_CODE_SUBAGENT_MODEL=sonnet CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1 claude` |
|
||||
|
||||
---
|
||||
|
||||
@@ -455,7 +458,7 @@ echo $GITHUB_TOKEN
|
||||
| Auto workflow | Skill | `03-skills/code-review-specialist/` |
|
||||
| Specialized task | Subagent | `04-subagents/code-reviewer.md` |
|
||||
| External data | MCP (+ Elicitation) | `05-mcp/github-mcp.json` |
|
||||
| Event automation | Hook (31 events, 5 types) | `06-hooks/pre-commit.sh` |
|
||||
| Event automation | Hook (33 events, 5 types) | `06-hooks/pre-commit.sh` |
|
||||
| Complete solution | Plugin (+ LSP support) | `07-plugins/pr-review/` |
|
||||
| Safe experiment | Checkpoint | `08-checkpoints/checkpoint-examples.md` |
|
||||
| Fully autonomous | Auto Mode | `--permission-mode auto` or `Shift+Tab` |
|
||||
@@ -516,8 +519,8 @@ Getting started checklist:
|
||||
|
||||
---
|
||||
|
||||
**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/changelog
|
||||
- https://code.claude.com/docs/en/cli-reference
|
||||
@@ -525,4 +528,5 @@ Getting started checklist:
|
||||
- https://code.claude.com/docs/en/sub-agents
|
||||
- https://code.claude.com/docs/en/model-config
|
||||
- https://code.claude.com/docs/en/settings
|
||||
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
**Compatible Models**: Claude Fable 5.1, Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
[](https://github.com/luongnv89/claude-howto/stargazers)
|
||||
[](https://github.com/luongnv89/claude-howto/network/members)
|
||||
[](LICENSE)
|
||||
[](CHANGELOG.md)
|
||||
[](CHANGELOG.md)
|
||||
[](https://code.claude.com)
|
||||
|
||||
🌐 **Language / Ngôn ngữ / 语言 / Мова:** [English](README.md) | [Tiếng Việt](vi/README.md) | [中文](zh/README.md) | [Українська](uk/README.md) | [日本語](ja/README.md)
|
||||
@@ -102,7 +102,7 @@ Run `/lesson-quiz [topic]` after each module. The quiz pinpoints what you missed
|
||||
|
||||
- **GitHub stars** from developers who use Claude Code daily
|
||||
- **Forks** from teams adapting this guide for their own workflows
|
||||
- **Actively maintained** — synced with every Claude Code release (latest: v2.1.245, August 2026)
|
||||
- **Actively maintained** — synced with every Claude Code release (latest: v2.1.257, September 2026)
|
||||
- **Community-driven** — contributions from developers who share their real-world configurations
|
||||
|
||||
[](https://star-history.com/#luongnv89/claude-howto&Date)
|
||||
@@ -201,7 +201,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
Yes. MIT licensed, free forever. Use it in personal projects, at work, in your team — no restrictions beyond including the license notice.
|
||||
|
||||
**Is this maintained?**
|
||||
Actively. The guide is synced with every Claude Code release. Current version: v2.1.245 (August 2026), compatible with Claude Code 2.1+.
|
||||
Actively. The guide is synced with every Claude Code release. Current version: v2.1.257 (September 2026), compatible with Claude Code 2.1+.
|
||||
|
||||
**How is this different from the official docs?**
|
||||
The official docs are a feature reference. This guide is a tutorial with diagrams, production-ready templates, and a progressive learning path. They complement each other — start here to learn, reference the docs when you need specifics.
|
||||
@@ -210,7 +210,7 @@ The official docs are a feature reference. This guide is a tutorial with diagram
|
||||
11-13 hours for the full path. But you'll get immediate value in 15 minutes — just copy a slash command template and try it.
|
||||
|
||||
**Can I use this with Claude Sonnet / Haiku / Opus?**
|
||||
Yes. All templates work with Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, and Claude Haiku 4.5.
|
||||
Yes. All templates work with Claude Fable 5.1, Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, and Claude Haiku 4.5.
|
||||
|
||||
**Can I contribute?**
|
||||
Absolutely. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. We welcome new examples, bug fixes, documentation improvements, and community templates.
|
||||
@@ -484,11 +484,11 @@ Configure hooks in `~/.claude/settings.json`:
|
||||
|
||||
**Hook Types** (5): `command`, `http`, `prompt`, `mcp_tool`, `agent` — how a hook runs.
|
||||
|
||||
**Hook Events** (31, in 4 categories) — when it runs:
|
||||
**Hook Events** (33, in 4 categories) — when it runs:
|
||||
- **Tool Hooks**: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PostToolBatch`, `PermissionRequest`, `PermissionDenied`
|
||||
- **Session Hooks**: `SessionStart`, `Setup`, `SessionEnd`, `Stop`, `StopFailure`, `SubagentStart`, `SubagentStop`
|
||||
- **Task Hooks**: `UserPromptSubmit`, `UserPromptExpansion`, `MessageDisplay`, `TaskCompleted`, `TaskCreated`, `TeammateIdle` — `TaskCompleted` and `TaskCreated` only fire when the todo tools are enabled, which is off by default on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and newer models (`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` restores them)
|
||||
- **Lifecycle Hooks**: `ConfigChange`, `CwdChanged`, `DirectoryAdded`, `FileChanged`, `PreCompact`, `PostCompact`, `WorktreeCreate`, `WorktreeRemove`, `Notification`, `InstructionsLoaded`, `Elicitation`, `ElicitationResult`
|
||||
- **Lifecycle Hooks**: `ConfigChange`, `CwdChanged`, `DirectoryAdded`, `FileChanged`, `PreCompact`, `PostCompact`, `PreModelSwitch`, `PostModelSwitch`, `WorktreeCreate`, `WorktreeRemove`, `Notification`, `InstructionsLoaded`, `Elicitation`, `ElicitationResult`
|
||||
|
||||
</details>
|
||||
|
||||
@@ -873,8 +873,8 @@ MIT License - see [LICENSE](LICENSE). Free to use, modify, and distribute. The o
|
||||
|
||||
---
|
||||
|
||||
**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/hooks
|
||||
- https://code.claude.com/docs/en/overview
|
||||
@@ -885,4 +885,4 @@ MIT License - see [LICENSE](LICENSE). Free to use, modify, and distribute. The o
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.154
|
||||
- https://code.claude.com/docs/en/model-config
|
||||
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
|
||||
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
**Compatible Models**: Claude Fable 5.1, Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -1132,7 +1132,7 @@ Hooks are event-driven shell commands that execute automatically in response to
|
||||
|
||||
### Hook Events
|
||||
|
||||
Claude Code supports **31 hook events** across five hook types (command, http, mcp_tool, prompt, agent):
|
||||
Claude Code supports **33 hook events** across five hook types (command, http, mcp_tool, prompt, agent):
|
||||
|
||||
| Hook Event | Trigger | Use Cases |
|
||||
|------------|---------|-----------|
|
||||
@@ -1162,6 +1162,8 @@ Claude Code supports **31 hook events** across five hook types (command, http, m
|
||||
| **FileChanged** | Watched file changes | File monitoring, rebuild triggers |
|
||||
| **PreCompact** | Before context compaction | State preservation |
|
||||
| **PostCompact** | After compaction completes | Post-compact actions |
|
||||
| **PreModelSwitch** | Before a requested model switch is applied | Gate or veto model changes |
|
||||
| **PostModelSwitch** | After the session's model changes | Log or react to model changes |
|
||||
| **WorktreeCreate** | Worktree being created | Environment setup, dependency install |
|
||||
| **WorktreeRemove** | Worktree being removed | Cleanup, resource deallocation |
|
||||
| **Elicitation** | MCP server requests user input | Input validation |
|
||||
@@ -1472,12 +1474,12 @@ Claude Code supports the following models with adaptive reasoning effort:
|
||||
- [Anthropic Cookbook](https://github.com/anthropics/anthropic-cookbook)
|
||||
|
||||
---
|
||||
**Last Updated**: August 15, 2026
|
||||
**Claude Code Version**: 2.1.233
|
||||
**Last Updated**: September 2, 2026
|
||||
**Claude Code Version**: 2.1.257
|
||||
**Sources**:
|
||||
- https://www.anthropic.com/news/claude-sonnet-5
|
||||
- https://code.claude.com/docs/en/cli-reference
|
||||
- https://code.claude.com/docs/en/model-config
|
||||
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
**Compatible Models**: Claude Fable 5.1, Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -137,10 +137,12 @@ Provide clear, step-by-step guidance for Claude.
|
||||
Show concrete examples of using this Skill.
|
||||
```
|
||||
|
||||
### 必須フィールド
|
||||
### 推奨フィールド
|
||||
|
||||
- **name**: 小文字、数字、ハイフンのみ(最大 64 文字)。"anthropic" や "claude" を含めることはできない。
|
||||
- **description**: スキルが何をするかと、いつ使うか。`description` と `when_to_use` を合わせたテキストはスキル一覧で **1,536 文字**で切り詰められる(`skillListingMaxDescChars` で変更可能)。Claude がスキルを発火させるべきタイミングを判断する上で重要である。
|
||||
- **description**(推奨): スキルが何をするかと、いつ使うか。省略した場合、Claude Code は markdown 本文の最初の段落を使用する。`description` と `when_to_use` を合わせたテキストはスキル一覧で **1,536 文字**で切り詰められる(`skillListingMaxDescChars` で変更可能)。Claude がスキルを発火させるべきタイミングを判断する際に照合するのはこのテキストである。
|
||||
- **name**(任意): 既定ではスキルの**ディレクトリ名**が使われる。指定した場合は表示名となり、小文字・数字・ハイフンのみ(最大 64 文字)で、"anthropic" や "claude" を含めることはできない。プラグインのスキルでは、`name` はコマンドの最後のセグメントも決定する。
|
||||
|
||||
SKILL.md のフロントマターのフィールドはすべて任意であり、推奨されるのは `description` だけである。
|
||||
|
||||
### オプションのフロントマターフィールド
|
||||
|
||||
@@ -824,10 +826,10 @@ chmod +x ~/.claude/skills/my-skill/scripts/*.py
|
||||
- [フックガイド](../06-hooks/) - イベント駆動の自動化
|
||||
|
||||
---
|
||||
**最終更新**: 2026 年 8 月 25 日
|
||||
**Claude Code バージョン**: 2.1.245
|
||||
**最終更新**: 2026 年 9 月 2 日
|
||||
**Claude Code バージョン**: 2.1.257
|
||||
**情報源**:
|
||||
- https://code.claude.com/docs/en/skills
|
||||
- https://code.claude.com/docs/en/settings
|
||||
- https://code.claude.com/docs/en/changelog
|
||||
**対応モデル**: Claude Sonnet 4.6, Claude Opus 4.7, Claude Haiku 4.5
|
||||
**対応モデル**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -187,7 +187,7 @@ LLM はプロンプトを評価し、構造化された判定を返す(詳細
|
||||
|
||||
## フックイベント
|
||||
|
||||
Claude Code は **31 種類のフックイベント** をサポートする。
|
||||
Claude Code は **33 種類のフックイベント** をサポートする。
|
||||
|
||||
| イベント | 発火タイミング | マッチャー入力 | ブロック可否 | 用途例 |
|
||||
|----------|---------------|---------------|-------------|--------|
|
||||
@@ -217,6 +217,8 @@ Claude Code は **31 種類のフックイベント** をサポートする。
|
||||
| **FileChanged** | 監視ファイル変更 | (なし) | 不可 | ファイル監視、再ビルド |
|
||||
| **PreCompact** | コンテキスト圧縮前 | manual/auto | 不可 | 圧縮前の処理 |
|
||||
| **PostCompact** | 圧縮完了後 | (なし) | 不可 | 圧縮後の処理 |
|
||||
| **PreModelSwitch** | 要求されたモデル切り替えを Claude Code が適用する前 | 切り替え先モデルの正式名(`to_model` から導出) | 可 | モデル変更の制御・拒否 |
|
||||
| **PostModelSwitch** | セッションのモデルが変更された後(再開時のモデル復元など、Claude Code 自身による変更を含む) | 切り替え先モデルの正式名(`to_model` から導出) | 不可 | モデル変更のロギング・追随処理 |
|
||||
| **WorktreeCreate** | ワークツリー作成中 | (なし) | 可(パス返却) | ワークツリー初期化 |
|
||||
| **WorktreeRemove** | ワークツリー削除中 | (なし) | 不可 | ワークツリークリーンアップ |
|
||||
| **Elicitation** | MCP サーバーがユーザー入力を要求 | (なし) | 可 | 入力検証 |
|
||||
@@ -1379,11 +1381,11 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
|
||||
---
|
||||
|
||||
**最終更新:** 2026 年 8 月 25 日
|
||||
**Claude Code バージョン:** 2.1.245
|
||||
**最終更新:** 2026 年 9 月 2 日
|
||||
**Claude Code バージョン:** 2.1.257
|
||||
**情報源:**
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
- https://code.claude.com/docs/en/changelog
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.118
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.119
|
||||
**対応モデル:** Claude Sonnet 4.6、Claude Opus 4.7、Claude Haiku 4.5
|
||||
**対応モデル:** Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5
|
||||
|
||||
@@ -666,11 +666,11 @@ 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 tag v0.3.0` はバージョン形式を検証し、対応する git タグを作成する。配布用にプラグインをリリースする際の推奨手順である。
|
||||
例:`claude plugin tag ./my-plugin` は引数にバージョン文字列ではなく**パス**を取る。`plugin.json` から導出した `{name}--v{version}` の git タグを作成し、その際 `plugin.json` と(存在すれば)マーケットプレイスのエントリが一致しているか検証する。配布用にプラグインをリリースする際の推奨手順である。
|
||||
|
||||
## インストール方法
|
||||
|
||||
@@ -830,7 +830,7 @@ claude --plugin-dir ./my-plugin --plugin-dir ./another-plugin
|
||||
2. `.claude-plugin/plugin.json` マニフェストを記述
|
||||
3. ドキュメント用の `README.md` を作成
|
||||
4. `claude --plugin-dir ./my-plugin` でローカルテスト
|
||||
5. `claude plugin tag v0.3.0`(v2.1.118 以降)でリリースタグを作成 — バージョン文字列を検証し、対応する git タグを作成
|
||||
5. `claude plugin tag ./my-plugin`(v2.1.118 以降)でリリースタグを作成 — プラグインの**パス**を渡すと、`plugin.json` から導出した `{name}--v{version}` の git タグを作成
|
||||
6. プラグインマーケットプレイスへ提出
|
||||
7. レビューと承認を受ける
|
||||
8. マーケットプレイスで公開
|
||||
@@ -1058,14 +1058,15 @@ claude plugin update plugin-name
|
||||
|
||||
---
|
||||
|
||||
**最終更新**: 2026 年 8 月 19 日
|
||||
**Claude Code バージョン**: 2.1.235
|
||||
**最終更新**: 2026 年 9 月 2 日
|
||||
**Claude Code バージョン**: 2.1.257
|
||||
**出典**:
|
||||
- https://code.claude.com/docs/en/discover-plugins
|
||||
- https://code.claude.com/docs/en/plugins-reference
|
||||
- https://code.claude.com/docs/en/settings
|
||||
- https://code.claude.com/docs/en/plugins
|
||||
- https://code.claude.com/docs/en/plugin-marketplaces
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.117
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.118
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.119
|
||||
**対応モデル**: Claude Sonnet 4.6、Claude Opus 4.7、Claude Haiku 4.5
|
||||
**対応モデル**: Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5
|
||||
|
||||
+10
-9
@@ -57,9 +57,9 @@ graph TD
|
||||
| `claude mcp serve` | Claude Code を MCP サーバーとして起動 | `claude mcp serve` |
|
||||
| `claude agents` | 設定済みのサブエージェントを一覧表示 | `claude agents` |
|
||||
| `claude auto-mode defaults` | 自動モードのデフォルトルールを JSON で出力 | `claude auto-mode defaults` |
|
||||
| `claude remote-control` | リモートコントロールサーバーを起動 | `claude remote-control` |
|
||||
| `claude --remote-control [name]` | リモートコントロールを起動(サブコマンドではなくフラグ。エイリアス `--rc`) | `claude --rc` |
|
||||
| `claude plugin` | プラグインを管理(インストール・有効化・無効化) | `claude plugin install my-plugin` |
|
||||
| `claude plugin tag <version>` | バージョン検証付きでプラグインのリリース git タグを作成(v2.1.118+) | `claude plugin tag v0.3.0` |
|
||||
| `claude plugin tag [path]` | `[path]` のプラグインに対し `{name}--v{version}` のリリース git タグを作成。`plugin.json` と(存在すれば)マーケットプレイスのエントリが一致しているか検証する(v2.1.118+) | `claude plugin tag ./my-plugin` |
|
||||
| `claude install [version]` | 指定したネイティブバイナリのバージョンをインストール。`stable`、`latest`、明示的なバージョン文字列を受け付ける | `claude install 2.1.119` |
|
||||
| `claude auth login` | ログイン(`--email`、`--sso` をサポート) | `claude auth login --email user@example.com` |
|
||||
| `claude auth logout` | 現在のアカウントからログアウト | `claude auth logout` |
|
||||
@@ -76,13 +76,14 @@ graph TD
|
||||
| `-w, --worktree` | 隔離された git ワークツリーで起動 | `claude -w` |
|
||||
| `-n, --name` | セッションの表示名 | `claude -n "auth-refactor"` |
|
||||
| `--from-pr <url-or-number>` | プル/マージリクエストに紐づくセッションを再開する。v2.1.119 以降は GitHub(クラウド + Enterprise)、GitLab MR、Bitbucket PR の URL を受け付ける(以前は GitHub.com のみ) | `claude --from-pr 42` または `claude --from-pr https://gitlab.example.com/org/repo/-/merge_requests/17` |
|
||||
| `--remote "task"` | claude.ai 上に web セッションを作成 | `claude --remote "implement API"` |
|
||||
| `--cloud [description\|session_id\|url]` | 指定した説明で claude.ai 上にクラウドセッションを作成、またはセッション ID か claude.ai/code の URL で既存セッションに接続 | `claude --cloud "implement API"` |
|
||||
| `--remote "task"` | **`--cloud` の非推奨エイリアス**(既存セッションに接続する形式も含む)。`--cloud` を使うこと | `claude --remote "implement API"` |
|
||||
| `--remote-control, --rc` | リモートコントロール付きの対話セッション | `claude --rc` |
|
||||
| `--teleport` | web セッションをローカルで再開 | `claude --teleport` |
|
||||
| `--teammate-mode` | エージェントチームの表示モード | `claude --teammate-mode tmux` |
|
||||
| `--bare` | 最小モード(フック、スキル、プラグイン、MCP、自動メモリ、CLAUDE.md をスキップ) | `claude --bare` |
|
||||
| `--enable-auto-mode` | 自動権限モードを解禁(Opus 4.7 の Max 加入者には不要) | `claude --enable-auto-mode` |
|
||||
| `--channels` | MCP チャンネルプラグインを購読 | `claude --channels discord,telegram` |
|
||||
| `--channels` | MCP チャンネルプラグインを購読。各エントリは `plugin:<name>@<marketplace>` の形式でタグ付けする必要があり、名前のみの指定は拒否される | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--chrome` / `--no-chrome` | Chrome ブラウザ統合を有効化/無効化 | `claude --chrome` |
|
||||
| `--effort` | 思考労力レベルを設定 | `claude --effort high` |
|
||||
| `--init` / `--init-only` | 初期化フックを実行 | `claude --init` |
|
||||
@@ -269,7 +270,7 @@ claude --settings '{"model":"opus","verbose":true}' "complex task"
|
||||
|------|------|-----|
|
||||
| `--mcp-config` | JSON から MCP サーバーを読み込む | `claude --mcp-config ./mcp.json` |
|
||||
| `--strict-mcp-config` | 指定した MCP 設定のみを使う | `claude --strict-mcp-config --mcp-config ./mcp.json` |
|
||||
| `--channels` | MCP チャンネルプラグインを購読 | `claude --channels discord,telegram` |
|
||||
| `--channels` | MCP チャンネルプラグインを購読。各エントリは `plugin:<name>@<marketplace>` の形式でタグ付けする必要があり、名前のみの指定は拒否される | `claude --channels plugin:discord@my-marketplace` |
|
||||
|
||||
### MCP の例
|
||||
|
||||
@@ -339,7 +340,7 @@ claude -r "feature-auth" --fork-session "test with different architecture"
|
||||
| `--enable-auto-mode` | 自動権限モードを解禁 | `claude --enable-auto-mode` |
|
||||
| `--effort` | 思考労力レベルを設定 | `claude --effort high` |
|
||||
| `--bare` | 最小モード(フック、スキル、プラグイン、MCP、自動メモリ、CLAUDE.md をスキップ) | `claude --bare` |
|
||||
| `--channels` | MCP チャンネルプラグインを購読 | `claude --channels discord` |
|
||||
| `--channels` | MCP チャンネルプラグインを購読(`plugin:<name>@<marketplace>` 形式でタグ付け) | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--tmux` | ワークツリー用に tmux セッションを作成 | `claude --tmux` |
|
||||
| `--fork-session` | 再開時に新しいセッション ID を作成 | `claude --resume abc --fork-session` |
|
||||
| `--max-budget-usd` | 最大支出額(プリントモード)。上限に達するとバックグラウンドのサブエージェントも停止する (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` |
|
||||
@@ -872,8 +873,8 @@ claude -p --output-format json "query"
|
||||
|
||||
---
|
||||
|
||||
**最終更新**: 2026 年 4 月 24 日
|
||||
**Claude Code バージョン**: 2.1.119
|
||||
**最終更新**: 2026 年 9 月 2 日
|
||||
**Claude Code バージョン**: 2.1.257
|
||||
**出典**:
|
||||
- https://code.claude.com/docs/en/cli-reference
|
||||
- https://code.claude.com/docs/en/settings
|
||||
@@ -884,4 +885,4 @@ claude -p --output-format json "query"
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.117
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.118
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.119
|
||||
**対応モデル**: Claude Sonnet 4.6、Claude Opus 4.7、Claude Haiku 4.5
|
||||
**対応モデル**: Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5
|
||||
|
||||
+16
-6
@@ -24,9 +24,9 @@
|
||||
| **スキル** | バンドル 10 | 6 | 16 | [03-skills/](03-skills/) |
|
||||
| **プラグイン** | - | 3 | 3 | [07-plugins/](07-plugins/) |
|
||||
| **MCP サーバ** | 1 | 4 | 5 | [05-mcp/](05-mcp/) |
|
||||
| **フック** | 31 イベント | 9 | 40 | [06-hooks/](06-hooks/) |
|
||||
| **フック** | 33 イベント | 9 | 42 | [06-hooks/](06-hooks/) |
|
||||
| **メモリ** | 7 種類 | 3 | 10 | [02-memory/](02-memory/) |
|
||||
| **合計** | **115** | **42** | **157** | |
|
||||
| **合計** | **117** | **42** | **159** | |
|
||||
|
||||
---
|
||||
|
||||
@@ -284,7 +284,7 @@ cp -r 03-skills/* ~/.claude/skills/
|
||||
/plugin list # インストール済みプラグイン一覧
|
||||
/plugin install <name> # プラグインをインストール
|
||||
/plugin remove <name> # プラグインを削除
|
||||
/plugin update <name> # プラグインを更新
|
||||
claude plugin update <name> # プラグインを更新(CLI。/plugin update というスラッシュ形式は説明文中で言及されるが、コマンドリファレンスには存在しない)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -343,13 +343,18 @@ Claude Code のイベントでシェルコマンドを自動実行するイベ
|
||||
| イベント | 説明 | 発火タイミング | ユースケース |
|
||||
|-------|-------------|----------------|-----------|
|
||||
| `SessionStart` | セッション開始・再開 | セッション初期化時 | セットアップタスク |
|
||||
| `Setup` | 初期環境セットアップ(セッションごとに 1 回) | 初回セッション起動時 | ツール準備、依存関係インストール |
|
||||
| `InstructionsLoaded` | 指示読み込み完了 | CLAUDE.md またはルールファイルの読込時 | カスタム指示の処理 |
|
||||
| `UserPromptSubmit` | プロンプト処理前 | ユーザーがメッセージ送信時 | 入力検証 |
|
||||
| `UserPromptExpansion` | プロンプト展開(@メンション、スラッシュコマンド解決) | 展開後、送信前 | 展開後プロンプトの変換・検査 |
|
||||
| `PreToolUse` | ツール実行前 | 任意のツールが走る前 | 検証、ログ |
|
||||
| `PermissionRequest` | 権限ダイアログ表示 | 機微な操作の前 | カスタム承認フロー |
|
||||
| `PermissionDenied` | ユーザーが権限要求を拒否 | 権限拒否後 | ログ、分析、ポリシー適用 |
|
||||
| `PostToolUse` | ツール成功後 | 任意のツール完了後 | 整形、通知 |
|
||||
| `PostToolUseFailure` | ツール実行失敗 | ツールエラー後 | エラー処理、ログ |
|
||||
| `PostToolBatch` | ツール実行バッチの完了後 | ツールバッチ終了時 | 集約レポート、バッチ検証 |
|
||||
| `Notification` | 通知送信 | Claude が通知送信時 | 外部アラート |
|
||||
| `MessageDisplay` | アシスタントのメッセージ表示時 | メッセージ描画中 | 表示テキストの変換・非表示 |
|
||||
| `SubagentStart` | サブエージェント生成 | サブエージェントタスク開始時 | サブエージェントコンテキスト初期化 |
|
||||
| `SubagentStop` | サブエージェント終了 | サブエージェントタスク完了時 | アクション連鎖 |
|
||||
| `Stop` | Claude が応答完了 | 応答完了時 | 後処理、レポート |
|
||||
@@ -359,9 +364,12 @@ Claude Code のイベントでシェルコマンドを自動実行するイベ
|
||||
| `TaskCreated` | TaskCreate でタスク作成(todo ツールが有効なときのみ発火 — Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降ではデフォルト無効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | 新タスク作成時 | タスク追跡、ログ |
|
||||
| `ConfigChange` | 設定更新 | 設定変更時 | 設定変更への対応 |
|
||||
| `CwdChanged` | 作業ディレクトリ変更 | ディレクトリ変更時 | ディレクトリ別セットアップ |
|
||||
| `DirectoryAdded` | セッション中に作業ディレクトリが追加登録 | `/add-dir` または SDK `register_repo_root` | 新規ディレクトリ向けツール設定 |
|
||||
| `FileChanged` | 監視ファイルの変更 | ファイル変更時 | ファイル監視、再ビルド |
|
||||
| `PreCompact` | コンパクト操作前 | コンテキスト圧縮時 | 状態保全 |
|
||||
| `PostCompact` | コンパクト完了後 | コンパクト完了時 | コンパクト後アクション |
|
||||
| `PreModelSwitch` | モデル切り替えの適用前 | モデル切り替え要求時 | モデル変更のゲート・拒否 |
|
||||
| `PostModelSwitch` | セッションのモデル変更後 | モデル切り替え完了時 | モデル変更のログ・連動 |
|
||||
| `WorktreeCreate` | ワークツリー作成中 | Git ワークツリー作成時 | ワークツリー環境セットアップ |
|
||||
| `WorktreeRemove` | ワークツリー削除中 | Git ワークツリー削除時 | ワークツリーリソースのクリーンアップ |
|
||||
| `Elicitation` | MCP サーバが入力を要求 | MCP elicitation 発生時 | 入力検証 |
|
||||
@@ -532,11 +540,13 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
|
||||
---
|
||||
|
||||
**最終更新**:2026 年 8 月 25 日
|
||||
**Claude Code バージョン**:2.1.245
|
||||
**最終更新**:2026 年 9 月 2 日
|
||||
**Claude Code バージョン**:2.1.257
|
||||
**情報源**:
|
||||
- https://code.claude.com/docs/en/overview
|
||||
- https://code.claude.com/docs/en/commands
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.118
|
||||
**互換モデル**:Claude Sonnet 4.6、Claude Opus 4.7、Claude Haiku 4.5
|
||||
- https://code.claude.com/docs/en/plugins-reference
|
||||
- https://code.claude.com/docs/en/discover-plugins
|
||||
**互換モデル**:Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5
|
||||
|
||||
+2
-2
@@ -226,11 +226,11 @@ blog-draft/
|
||||
|
||||
**フックの種類**(5 種):`command`、`http`、`prompt`、`mcp_tool`、`agent` — フックの実行方式。
|
||||
|
||||
**フックイベント**(31 件、4 カテゴリ)— 実行タイミング:
|
||||
**フックイベント**(33 件、4 カテゴリ)— 実行タイミング:
|
||||
- ツール系フック:PreToolUse、PostToolUse、PostToolUseFailure、PostToolBatch、PermissionRequest、PermissionDenied
|
||||
- セッション系フック:SessionStart、Setup、SessionEnd、Stop、StopFailure、SubagentStart、SubagentStop
|
||||
- タスク系フック:UserPromptSubmit、UserPromptExpansion、MessageDisplay、TaskCompleted、TaskCreated、TeammateIdle(TaskCompleted と TaskCreated は todo ツールが有効なときのみ発火 — Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降ではデフォルト無効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活)
|
||||
- ライフサイクル系フック:ConfigChange、CwdChanged、DirectoryAdded、FileChanged、PreCompact、PostCompact、WorktreeCreate、WorktreeRemove、Notification、InstructionsLoaded、Elicitation、ElicitationResult
|
||||
- ライフサイクル系フック:ConfigChange、CwdChanged、DirectoryAdded、FileChanged、PreCompact、PostCompact、PreModelSwitch、PostModelSwitch、WorktreeCreate、WorktreeRemove、Notification、InstructionsLoaded、Elicitation、ElicitationResult
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ graph TD
|
||||
| **3** | [チェックポイント](08-checkpoints/) | ⭐⭐ 中級 | 45 分 | レベル 1 | セッション管理 | 安全な探索 | 実験、復旧 |
|
||||
| **4** | [CLI 基礎](10-cli/) | ⭐⭐ 初級+ | 30 分 | レベル 1 | なし | コア CLI の使い方 | 対話モード・印字モード |
|
||||
| **5** | [スキル](03-skills/) | ⭐⭐ 中級 | 1 時間 | レベル 2 | スラッシュコマンド | 自動的な専門性 | 再利用、一貫性 |
|
||||
| **6** | [フック](06-hooks/) | ⭐⭐ 中級 | 1 時間 | レベル 2 | ツール、コマンド | ワークフロー自動化(31 イベント、5 種類) | 検証、品質ゲート |
|
||||
| **6** | [フック](06-hooks/) | ⭐⭐ 中級 | 1 時間 | レベル 2 | ツール、コマンド | ワークフロー自動化(33 イベント、5 種類) | 検証、品質ゲート |
|
||||
| **7** | [MCP](05-mcp/) | ⭐⭐⭐ 中級+ | 1 時間 | レベル 2 | 設定 | ライブデータアクセス | リアルタイム連携、API |
|
||||
| **8** | [サブエージェント](04-subagents/) | ⭐⭐⭐ 中級+ | 1.5 時間 | レベル 2 | メモリ、コマンド | 複雑タスクの処理(Bash 含む組み込み 6 個) | 委譲、専門性 |
|
||||
| **9** | [高度な機能](09-advanced-features/) | ⭐⭐⭐⭐⭐ 上級 | 2〜3 時間 | レベル 3 | これまでの全機能 | パワーユーザー向けツール | プランニング、Auto Mode、チャンネル、音声入力、権限 |
|
||||
@@ -239,7 +239,7 @@ cat error.log | claude -p "explain this error"
|
||||
|
||||
#### 達成事項
|
||||
✅ YAML フロントマター(`effort` と `shell` フィールドを含む)で専門機能を自動起動
|
||||
✅ 31 個のフックイベントにまたがるイベント駆動自動化を構築
|
||||
✅ 33 個のフックイベントにまたがるイベント駆動自動化を構築
|
||||
✅ 5 種類のフック(command、http、mcp_tool、prompt、agent)を活用
|
||||
✅ コード品質基準を強制
|
||||
✅ ワークフロー向けカスタムフックを作成
|
||||
@@ -742,13 +742,13 @@ done
|
||||
|
||||
---
|
||||
|
||||
**最終更新**:2026 年 4 月 24 日
|
||||
**Claude Code バージョン**:2.1.119
|
||||
**最終更新**:2026 年 9 月 2 日
|
||||
**Claude Code バージョン**:2.1.257
|
||||
**情報源**:
|
||||
- https://code.claude.com/docs/en/overview
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.119
|
||||
**互換モデル**:Claude Sonnet 4.6、Claude Opus 4.7、Claude Haiku 4.5
|
||||
**互換モデル**:Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5
|
||||
**メンテナンス**:Claude How-To Contributors
|
||||
**ライセンス**:教育目的、自由に使用・改変可能
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ claude -r "session" # 名前 / ID でセッションを再開
|
||||
| **スキル** | `.claude/skills/*/SKILL.md` | 自動起動 |
|
||||
| **サブエージェント** | `.claude/agents/*.md` | 自動委譲 |
|
||||
| **MCP** | `.mcp.json` (プロジェクト) または `~/.claude.json` (ユーザー) | `/mcp__server__action` |
|
||||
| **フック (31 イベント)** | `~/.claude/hooks/*.sh` | イベントトリガー (5 種類) |
|
||||
| **フック (33 イベント)** | `~/.claude/hooks/*.sh` | イベントトリガー (5 種類) |
|
||||
| **プラグイン** | `/plugin install` 経由 | すべてをバンドル |
|
||||
| **チェックポイント** | 組み込み | `Esc+Esc` または `/rewind` |
|
||||
| **プランニングモード** | 組み込み | `/plan <task>` |
|
||||
@@ -193,7 +193,7 @@ vim CLAUDE.md
|
||||
|
||||
### 自動化とフック
|
||||
```bash
|
||||
# フックをインストール (31 イベント、5 種類: command, http, mcp_tool, prompt, agent)
|
||||
# フックをインストール (33 イベント、5 種類: command, http, mcp_tool, prompt, agent)
|
||||
mkdir -p ~/.claude/hooks
|
||||
cp 06-hooks/*.sh ~/.claude/hooks/
|
||||
chmod +x ~/.claude/hooks/*.sh
|
||||
@@ -393,7 +393,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Auto Mode** | バックグラウンド分類器による完全自律動作 | `--enable-auto-mode` フラグ、`Shift+Tab` でモード切替 |
|
||||
| **チャンネル** | Discord と Telegram 統合 | `--channels` フラグ、Discord / Telegram ボット |
|
||||
| **音声入力** | コマンドとコンテキストを Claude に音声で伝える | `/voice` コマンド |
|
||||
| **フック (31 イベント)** | 5 種類に拡張されたフックシステム | command、http、mcp_tool、prompt、agent の各フック種別 |
|
||||
| **フック (33 イベント)** | 5 種類に拡張されたフックシステム | command、http、mcp_tool、prompt、agent の各フック種別 |
|
||||
| **MCP Elicitation** | MCP サーバが実行時にユーザー入力を要求できる | サーバが要明確化なら自動プロンプト |
|
||||
| **Plugin LSP** | プラグインの Language Server Protocol サポート | `userConfig`、`${CLAUDE_PLUGIN_DATA}` 変数 |
|
||||
| **リモートコントロール** | WebSocket API で Claude Code を制御 | 外部統合のための `claude --remote` |
|
||||
@@ -402,7 +402,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **タスクリスト** | バックグラウンドタスクの管理 | `/task list`、`/task status <id>` |
|
||||
| **Auto Memory** | 会話からの自動メモリ保存 | Claude が CLAUDE.md に主要コンテキストを自動保存 |
|
||||
| **Git ワークツリー** | 並列開発のための隔離ワークスペース | `/worktree` で隔離ワークスペースを作成 |
|
||||
| **モデル選択** | Sonnet 4.6、Opus 4.7、Haiku 4.5 を切替 | `/model` または `--model` フラグ |
|
||||
| **モデル選択** | Fable 5.1、Fable 5、Opus 5、Sonnet 5、Sonnet 4.6、Opus 4.8、Haiku 4.5 を切替 | `/model` または `--model` フラグ |
|
||||
| **Agent Teams** | タスク上の複数エージェントを協調 | 環境変数 `CLAUDE_AGENT_TEAMS=1` で有効化 |
|
||||
| **スケジュールタスク** | `/loop` による反復タスク | `/loop 5m /command` または CronCreate ツール |
|
||||
| **Chrome 連携** | ブラウザ自動化 | `--chrome` フラグまたは `/chrome` コマンド |
|
||||
@@ -448,7 +448,7 @@ echo $GITHUB_TOKEN
|
||||
| 自動ワークフロー | スキル | `03-skills/code-review-specialist/` |
|
||||
| 専門タスク | サブエージェント | `04-subagents/code-reviewer.md` |
|
||||
| 外部データ | MCP(+ Elicitation) | `05-mcp/github-mcp.json` |
|
||||
| イベント自動化 | フック (31 イベント、5 種類) | `06-hooks/pre-commit.sh` |
|
||||
| イベント自動化 | フック (33 イベント、5 種類) | `06-hooks/pre-commit.sh` |
|
||||
| 完全ソリューション | プラグイン (+ LSP サポート) | `07-plugins/pr-review/` |
|
||||
| 安全な実験 | チェックポイント | `08-checkpoints/checkpoint-examples.md` |
|
||||
| 完全自律 | Auto Mode | `--enable-auto-mode` または `Shift+Tab` |
|
||||
@@ -509,11 +509,11 @@ A:もちろん。カスタマイズ用のテンプレートである。
|
||||
**このカード**:手元に置いてクイックリファレンスとして!
|
||||
|
||||
---
|
||||
**最終更新**:2026 年 4 月 24 日
|
||||
**Claude Code バージョン**:2.1.119
|
||||
**最終更新**:2026 年 9 月 2 日
|
||||
**Claude Code バージョン**:2.1.257
|
||||
**情報源**:
|
||||
- https://code.claude.com/docs/en/overview
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
- https://code.claude.com/docs/en/commands
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.119
|
||||
**互換モデル**:Claude Sonnet 4.6、Claude Opus 4.7、Claude Haiku 4.5
|
||||
**互換モデル**:Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5
|
||||
|
||||
+2
-2
@@ -488,11 +488,11 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
|
||||
**フックの種類**(5 種):`command`、`http`、`prompt`、`mcp_tool`、`agent` — フックの実行方式。
|
||||
|
||||
**フックイベント**(31 件、4 カテゴリ)— 実行タイミング:
|
||||
**フックイベント**(33 件、4 カテゴリ)— 実行タイミング:
|
||||
- **ツール系フック**:`PreToolUse`、`PostToolUse`、`PostToolUseFailure`、`PostToolBatch`、`PermissionRequest`、`PermissionDenied`
|
||||
- **セッション系フック**:`SessionStart`、`Setup`、`SessionEnd`、`Stop`、`StopFailure`、`SubagentStart`、`SubagentStop`
|
||||
- **タスク系フック**:`UserPromptSubmit`、`UserPromptExpansion`、`MessageDisplay`、`TaskCompleted`、`TaskCreated`、`TeammateIdle`(`TaskCompleted` と `TaskCreated` は todo ツールが有効なときのみ発火 — Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降ではデフォルト無効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活)
|
||||
- **ライフサイクル系フック**:`ConfigChange`、`CwdChanged`、`DirectoryAdded`、`FileChanged`、`PreCompact`、`PostCompact`、`WorktreeCreate`、`WorktreeRemove`、`Notification`、`InstructionsLoaded`、`Elicitation`、`ElicitationResult`
|
||||
- **ライフサイクル系フック**:`ConfigChange`、`CwdChanged`、`DirectoryAdded`、`FileChanged`、`PreCompact`、`PostCompact`、`PreModelSwitch`、`PostModelSwitch`、`WorktreeCreate`、`WorktreeRemove`、`Notification`、`InstructionsLoaded`、`Elicitation`、`ElicitationResult`
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@@ -2813,18 +2813,23 @@ graph TD
|
||||
|
||||
### フックイベント
|
||||
|
||||
Claude Code は 5 種類(command、http、mcp_tool、prompt、agent)にわたる **31 種類のフックイベント** をサポートする:
|
||||
Claude Code は 5 種類(command、http、mcp_tool、prompt、agent)にわたる **33 種類のフックイベント** をサポートする:
|
||||
|
||||
| フックイベント | トリガー | ユースケース |
|
||||
|------------|---------|-----------|
|
||||
| **SessionStart** | セッション開始 / 再開 / クリア / 圧縮時 | 環境構築、初期化 |
|
||||
| **Setup** | 初期環境セットアップ(セッションごとに 1 回) | ツール準備、依存関係インストール |
|
||||
| **InstructionsLoaded** | CLAUDE.md やルールファイル読み込み時 | 検証、変換、補強 |
|
||||
| **UserPromptSubmit** | ユーザーがプロンプト送信時 | 入力検証、プロンプトフィルタ |
|
||||
| **UserPromptExpansion** | プロンプト展開(@メンション、スラッシュコマンド解決) | 展開後プロンプトの変換・検査 |
|
||||
| **PreToolUse** | 任意のツール実行前 | 検証、承認ゲート、ログ |
|
||||
| **PermissionRequest** | 権限ダイアログ表示時 | 自動承認・拒否フロー |
|
||||
| **PermissionDenied** | ユーザーが権限要求を拒否 | ログ、分析、ポリシー適用 |
|
||||
| **PostToolUse** | ツール成功後 | 自動整形、通知、後処理 |
|
||||
| **PostToolUseFailure** | ツール実行失敗時 | エラー処理、ログ |
|
||||
| **PostToolBatch** | ツール実行バッチの完了後 | 集約レポート、バッチ検証 |
|
||||
| **Notification** | 通知送信時 | アラート、外部連携 |
|
||||
| **MessageDisplay** | アシスタントのメッセージ表示時 | 表示テキストの変換・非表示 |
|
||||
| **SubagentStart** | サブエージェント生成時 | コンテキスト注入、初期化 |
|
||||
| **SubagentStop** | サブエージェント終了時 | 結果検証、ログ |
|
||||
| **Stop** | Claude の応答完了時 | サマリー生成、後処理 |
|
||||
@@ -2834,9 +2839,12 @@ Claude Code は 5 種類(command、http、mcp_tool、prompt、agent)にわ
|
||||
| **TaskCreated** | TaskCreate でタスク作成時(todo ツールが有効なときのみ発火 — Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降ではデフォルト無効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | タスク追跡、ログ |
|
||||
| **ConfigChange** | 設定ファイル変更時 | 検証、伝播 |
|
||||
| **CwdChanged** | 作業ディレクトリ変更時 | ディレクトリ別セットアップ |
|
||||
| **DirectoryAdded** | セッション中に作業ディレクトリが追加登録 | 新規ディレクトリ向けツール設定 |
|
||||
| **FileChanged** | 監視対象ファイルの変更時 | ファイル監視、再ビルド |
|
||||
| **PreCompact** | コンテキスト圧縮直前 | 状態の保存 |
|
||||
| **PostCompact** | 圧縮完了後 | 圧縮後の処理 |
|
||||
| **PreModelSwitch** | モデル切り替えが適用される直前 | モデル変更のゲート・拒否 |
|
||||
| **PostModelSwitch** | セッションのモデルが変更された後 | モデル変更のログ・連動 |
|
||||
| **WorktreeCreate** | ワークツリー作成時 | 環境構築、依存関係インストール |
|
||||
| **WorktreeRemove** | ワークツリー削除時 | クリーンアップ、リソース解放 |
|
||||
| **Elicitation** | MCP サーバーがユーザー入力を要求時 | 入力検証 |
|
||||
@@ -3143,17 +3151,18 @@ Claude Code は推論努力を調整可能な 3 モデルをサポートする
|
||||
|
||||
---
|
||||
|
||||
*最終更新:2026 年 8 月 15 日*
|
||||
*対応:Claude Haiku 4.5、Sonnet 4.6、Opus 4.7*
|
||||
*最終更新:2026 年 9 月 2 日*
|
||||
*対応:Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5*
|
||||
*収録機能:フック、チェックポイント、プラニングモード、拡張思考、バックグラウンドタスク、権限モード(6 種)、ヘッドレスモード、セッション管理、Auto Memory、Agent Teams、定期タスク、Chrome 連携、Channels、音声入力、同梱スキル*
|
||||
|
||||
---
|
||||
**最終更新:** 2026 年 8 月 15 日
|
||||
**Claude Code バージョン:** 2.1.233
|
||||
**最終更新:** 2026 年 9 月 2 日
|
||||
**Claude Code バージョン:** 2.1.257
|
||||
**出典:**
|
||||
- https://code.claude.com/docs/en/overview
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
- https://www.anthropic.com/news/claude-opus-4-7
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.117
|
||||
- https://code.claude.com/docs/en/model-config
|
||||
|
||||
**対応モデル:** Claude Sonnet 4.6、Claude Opus 4.7、Claude Haiku 4.5
|
||||
**対応モデル:** Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5
|
||||
|
||||
+5
-4
@@ -245,7 +245,7 @@ graph TD
|
||||
| **Extended Thinking** | `Alt+T`/`Option+T` または `MAX_THINKING_TOKENS` 環境変数による深い推論の切り替え | [高度な機能](09-advanced-features/) |
|
||||
| **Permission Modes** | きめ細かい制御:default、acceptEdits、plan、auto、dontAsk、bypassPermissions | [高度な機能](09-advanced-features/) |
|
||||
| **7-Tier Memory** | Managed Policy、Project、Project Rules、User、User Rules、Local、Auto Memory | [メモリガイド](02-memory/) |
|
||||
| **Hook Events** | 31 イベント:PreToolUse、PostToolUse、PostToolUseFailure、Stop、StopFailure、SubagentStart、SubagentStop、Notification、Elicitation など | [フックガイド](06-hooks/) |
|
||||
| **Hook Events** | 33 イベント:PreToolUse、PostToolUse、PostToolUseFailure、Stop、StopFailure、SubagentStart、SubagentStop、Notification、Elicitation など | [フックガイド](06-hooks/) |
|
||||
| **Agent Teams** | 複雑なタスクで複数のエージェントを協調させる | [サブエージェントガイド](04-subagents/) |
|
||||
| **Scheduled Tasks** | `/loop` と cron ツールで定期タスクをセットアップ | [高度な機能](09-advanced-features/) |
|
||||
| **Chrome Integration** | ヘッドレス Chromium によるブラウザ自動化 | [高度な機能](09-advanced-features/) |
|
||||
@@ -253,10 +253,11 @@ graph TD
|
||||
| **Monitor Tool** | バックグラウンドコマンドの stdout ストリームを監視し、ポーリングではなくイベントに反応する(v2.1.98+) | [高度な機能](09-advanced-features/) |
|
||||
|
||||
---
|
||||
**Last Updated**: April 24, 2026
|
||||
**Claude Code Version**: 2.1.119
|
||||
**Last Updated**: September 2, 2026
|
||||
**Claude Code Version**: 2.1.257
|
||||
**Sources**:
|
||||
- https://code.claude.com/docs/en/overview
|
||||
- https://code.claude.com/docs/en/changelog
|
||||
- https://github.com/anthropics/claude-code/releases/tag/v2.1.119
|
||||
**Compatible Models**: Claude Sonnet 4.6, Claude Opus 4.7, Claude Haiku 4.5
|
||||
- https://code.claude.com/docs/en/model-config
|
||||
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@ These steps capture the core recommendations for smooth workflows with Claude Co
|
||||
| **Extended Thinking** | Deep reasoning toggle via `Alt+T`/`Option+T` or `MAX_THINKING_TOKENS` env var | [Advanced Features](09-advanced-features/) |
|
||||
| **Permission Modes** | Fine-grained control: manual (formerly default), acceptEdits, plan, auto, dontAsk, bypassPermissions | [Advanced Features](09-advanced-features/) |
|
||||
| **7-Tier Memory** | Managed Policy, Project, Project Rules, User, User Rules, Local, Auto Memory | [Memory Guide](02-memory/) |
|
||||
| **Hook Events** | 31 events: PreToolUse, PostToolUse, PostToolUseFailure, Stop, StopFailure, SubagentStart, SubagentStop, Notification, Elicitation, and more | [Hooks Guide](06-hooks/) |
|
||||
| **Hook Events** | 33 events: PreToolUse, PostToolUse, PostToolUseFailure, Stop, StopFailure, SubagentStart, SubagentStop, Notification, Elicitation, and more | [Hooks Guide](06-hooks/) |
|
||||
| **Agent Teams** | Coordinate multiple agents working together on complex tasks | [Subagents Guide](04-subagents/) |
|
||||
| **Scheduled Tasks** | Set up recurring tasks with `/loop` and cron tools | [Advanced Features](09-advanced-features/) |
|
||||
| **Chrome Integration** | Browser automation with headless Chromium | [Advanced Features](09-advanced-features/) |
|
||||
|
||||
@@ -137,10 +137,12 @@ Provide clear, step-by-step guidance for Claude.
|
||||
Show concrete examples of using this Skill.
|
||||
```
|
||||
|
||||
### Обов'язкові поля
|
||||
### Рекомендовані поля
|
||||
|
||||
- **name**: тільки малі літери, цифри, дефіси (макс. 64 символи). Не може містити "anthropic" або "claude".
|
||||
- **description**: що навичка робить І коли її використовувати. Об'єднаний текст `description` + `when_to_use` обрізається до **1 536 символів** у переліку навичок (налаштовується через `skillListingMaxDescChars`). Це критично для того, щоб Claude знав, коли активувати навичку.
|
||||
- **description** (рекомендовано): що навичка робить І коли її використовувати. Якщо поле пропущено, Claude Code бере перший абзац markdown-вмісту. Об'єднаний текст `description` + `when_to_use` обрізається до **1 536 символів** у переліку навичок (налаштовується через `skillListingMaxDescChars`). Саме за цим текстом Claude визначає, коли активувати навичку.
|
||||
- **name** (необов'язкове): за замовчуванням дорівнює **імені каталогу** навички. Якщо вказане, задає відображувану назву — тільки малі літери, цифри, дефіси (макс. 64 символи), не може містити "anthropic" або "claude". Для навичок у плагінах `name` також задає останній сегмент команди.
|
||||
|
||||
Усі поля фронтматера SKILL.md є необов'язковими; рекомендованим є лише `description`.
|
||||
|
||||
### Додаткові поля фронтматера
|
||||
|
||||
@@ -811,8 +813,8 @@ chmod +x ~/.claude/skills/my-skill/scripts/*.py
|
||||
- [Посібник хуків](../06-hooks/) — автоматизація за подіями
|
||||
|
||||
---
|
||||
**Останнє оновлення**: 25 серпня 2026
|
||||
**Версія Claude Code**: 2.1.245
|
||||
**Останнє оновлення**: 2 вересня 2026
|
||||
**Версія Claude Code**: 2.1.257
|
||||
**Джерела**:
|
||||
- https://code.claude.com/docs/en/skills
|
||||
**Сумісні моделі**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
|
||||
**Сумісні моделі**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -185,7 +185,7 @@ LLM оцінює промпт і повертає структуроване р
|
||||
|
||||
## Події хуків
|
||||
|
||||
Claude Code підтримує **31 подія хуків**:
|
||||
Claude Code підтримує **33 події хуків**:
|
||||
|
||||
| Подія | Коли спрацьовує | Вхід matcher | Може блокувати | Типове використання |
|
||||
|-------|----------------|-------------|----------------|---------------------|
|
||||
@@ -215,6 +215,8 @@ Claude Code підтримує **31 подія хуків**:
|
||||
| **FileChanged** | Зміна відстежуваного файлу | (немає) | Ні | Моніторинг файлів, перебудова |
|
||||
| **PreCompact** | Перед компакцією контексту | manual/auto | Ні | Дії перед компакцією |
|
||||
| **PostCompact** | Після завершення компакції | (немає) | Ні | Дії після компакції |
|
||||
| **PreModelSwitch** | Перед тим, як Claude Code застосує запитану зміну моделі | Канонічна назва моделі, на яку відбувається перехід (з `to_model`) | Так | Контроль або блокування зміни моделі |
|
||||
| **PostModelSwitch** | Після зміни моделі сесії, зокрема змін, які Claude Code робить сам (наприклад, відновлення моделі при відновленні сесії) | Канонічна назва моделі, на яку відбувся перехід (з `to_model`) | Ні | Логування або реакція на зміну моделі |
|
||||
| **WorktreeCreate** | Створення робочого дерева (worktree) | (немає) | Так (повернення шляху) | Ініціалізація worktree |
|
||||
| **WorktreeRemove** | Видалення робочого дерева | (немає) | Ні | Очищення worktree |
|
||||
| **Elicitation** | MCP-сервер запитує введення користувача | (немає) | Так | Валідація введення |
|
||||
@@ -1215,8 +1217,8 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
- **[Посібник з памʼяті](../02-memory/)** — конфігурація постійного контексту
|
||||
|
||||
---
|
||||
**Останнє оновлення**: 25 серпня 2026
|
||||
**Версія Claude Code**: 2.1.245
|
||||
**Останнє оновлення**: 2 вересня 2026
|
||||
**Версія Claude Code**: 2.1.257
|
||||
**Джерела**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
**Сумісні моделі**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
|
||||
**Сумісні моделі**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -613,7 +613,7 @@ claude plugin uninstall <n> # Видалити плагін
|
||||
claude plugin list # Список встановлених плагінів
|
||||
claude plugin enable <n> # Увімкнути вимкнений плагін
|
||||
claude plugin disable <n> # Вимкнути плагін
|
||||
claude plugin validate # Валідація структури плагіна
|
||||
claude plugin validate <path> # Валідація структури плагіна за шляхом <path>
|
||||
```
|
||||
|
||||
## Методи встановлення
|
||||
@@ -969,9 +969,10 @@ claude plugin update plugin-name
|
||||
- [Довідник системи хуків](../06-hooks/README.md)
|
||||
|
||||
---
|
||||
**Останнє оновлення**: 19 серпня 2026
|
||||
**Версія Claude Code**: 2.1.235
|
||||
**Останнє оновлення**: 2 вересня 2026
|
||||
**Версія Claude Code**: 2.1.257
|
||||
**Джерела**:
|
||||
- https://code.claude.com/docs/en/discover-plugins
|
||||
- https://code.claude.com/docs/en/plugins-reference
|
||||
- https://code.claude.com/docs/en/settings
|
||||
**Сумісні моделі**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
+11
-8
@@ -44,7 +44,7 @@ graph TD
|
||||
| `claude mcp serve` | Запуск Claude Code як MCP-сервера | `claude mcp serve` |
|
||||
| `claude agents` | Список усіх налаштованих субагентів | `claude agents` |
|
||||
| `claude auto-mode defaults` | Вивести стандартні правила auto mode як JSON | `claude auto-mode defaults` |
|
||||
| `claude remote-control` | Запуск сервера Remote Control | `claude remote-control` |
|
||||
| `claude --remote-control [name]` | Запуск Remote Control (це прапорець, а не підкоманда; аліас `--rc`) | `claude --rc` |
|
||||
| `claude plugin` | Управління плагінами (встановлення, увімкнення, вимкнення) | `claude plugin install my-plugin` |
|
||||
| `claude auth login` | Вхід (підтримує `--email`, `--sso`) | `claude auth login --email user@example.com` |
|
||||
| `claude auth logout` | Вихід з поточного облікового запису | `claude auth logout` |
|
||||
@@ -61,13 +61,14 @@ graph TD
|
||||
| `-w, --worktree` | Запуск в ізольованому git worktree (робочому дереві) | `claude -w` |
|
||||
| `-n, --name` | Відображувана назва сесії | `claude -n "auth-refactor"` |
|
||||
| `--from-pr <number>` | Відновити сесії, привʼязані до GitHub PR | `claude --from-pr 42` |
|
||||
| `--remote "task"` | Створити веб-сесію на claude.ai | `claude --remote "implement API"` |
|
||||
| `--cloud [description\|session_id\|url]` | Створити хмарну сесію на claude.ai із заданим описом або приєднатися до наявної за session ID чи URL claude.ai/code | `claude --cloud "implement API"` |
|
||||
| `--remote "task"` | **Застарілий аліас для `--cloud`**, включно з формою приєднання до наявної сесії. Використовуйте `--cloud` | `claude --remote "implement API"` |
|
||||
| `--remote-control, --rc` | Інтерактивна сесія з Remote Control | `claude --rc` |
|
||||
| `--teleport` | Відновити веб-сесію локально | `claude --teleport` |
|
||||
| `--teammate-mode` | Режим відображення Agent Teams | `claude --teammate-mode tmux` |
|
||||
| `--bare` | Мінімальний режим (без хуків, навичок, плагінів, MCP, auto memory, CLAUDE.md) | `claude --bare` |
|
||||
| `--enable-auto-mode` | Розблокувати auto permission mode | `claude --enable-auto-mode` |
|
||||
| `--channels` | Підписка на MCP channel plugins | `claude --channels discord,telegram` |
|
||||
| `--channels` | Підписка на MCP channel plugins. Кожен запис має бути позначений як `plugin:<name>@<marketplace>`; голі імена відхиляються | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--chrome` / `--no-chrome` | Увімкнути/вимкнути інтеграцію з браузером Chrome | `claude --chrome` |
|
||||
| `--effort` | Встановити рівень зусиль мислення | `claude --effort high` |
|
||||
| `--init` / `--init-only` | Запуск хуків ініціалізації | `claude --init` |
|
||||
@@ -247,7 +248,7 @@ claude --settings '{"model":"opus","verbose":true}' "complex task"
|
||||
|-----------|------|---------|
|
||||
| `--mcp-config` | Завантажити MCP-сервери з JSON | `claude --mcp-config ./mcp.json` |
|
||||
| `--strict-mcp-config` | Використовувати тільки вказану MCP-конфігурацію | `claude --strict-mcp-config --mcp-config ./mcp.json` |
|
||||
| `--channels` | Підписка на MCP channel plugins | `claude --channels discord,telegram` |
|
||||
| `--channels` | Підписка на MCP channel plugins. Кожен запис має бути позначений як `plugin:<name>@<marketplace>`; голі імена відхиляються | `claude --channels plugin:discord@my-marketplace` |
|
||||
|
||||
### Приклади MCP
|
||||
|
||||
@@ -317,7 +318,7 @@ claude -r "feature-auth" --fork-session "test with different architecture"
|
||||
| `--enable-auto-mode` | Розблокувати auto permission mode | `claude --enable-auto-mode` |
|
||||
| `--effort` | Встановити рівень зусиль мислення | `claude --effort high` |
|
||||
| `--bare` | Мінімальний режим (без хуків, навичок, плагінів, MCP, auto memory, CLAUDE.md) | `claude --bare` |
|
||||
| `--channels` | Підписка на MCP channel plugins | `claude --channels discord` |
|
||||
| `--channels` | Підписка на MCP channel plugins (позначені як `plugin:<name>@<marketplace>`) | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--tmux` | Створити tmux-сесію для worktree | `claude --tmux` |
|
||||
| `--fork-session` | Створити новий ID сесії при відновленні | `claude --resume abc --fork-session` |
|
||||
| `--max-budget-usd` | Максимальні витрати (print mode); також зупиняє фонові subagent-и при досягненні ліміту (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` |
|
||||
@@ -836,6 +837,8 @@ claude -p --output-format json "query"
|
||||
*Частина серії посібників [Claude How To](../)*
|
||||
|
||||
---
|
||||
**Останнє оновлення**: 9 квітня 2026
|
||||
**Версія Claude Code**: 2.1.97
|
||||
**Сумісні моделі**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
|
||||
**Останнє оновлення**: 2 вересня 2026
|
||||
**Версія Claude Code**: 2.1.257
|
||||
**Джерела**:
|
||||
- https://code.claude.com/docs/en/cli-reference
|
||||
**Сумісні моделі**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
+17
-7
@@ -24,9 +24,9 @@
|
||||
| **Навички (Skills)** | 10 вбудованих | 6 | 16 | [03-skills/](03-skills/) |
|
||||
| **Плагіни** | - | 3 | 3 | [07-plugins/](07-plugins/) |
|
||||
| **MCP-сервери** | 1 | 4 | 5 | [05-mcp/](05-mcp/) |
|
||||
| **Хуки** | 31 подія | 10 | 41 | [06-hooks/](06-hooks/) |
|
||||
| **Хуки** | 33 події | 10 | 43 | [06-hooks/](06-hooks/) |
|
||||
| **Пам'ять** | 7 типів | 3 | 10 | [02-memory/](02-memory/) |
|
||||
| **Разом** | **115** | **43** | **158** | |
|
||||
| **Разом** | **117** | **43** | **160** | |
|
||||
|
||||
---
|
||||
|
||||
@@ -278,9 +278,9 @@ cp -r 03-skills/* ~/.claude/skills/
|
||||
|
||||
```bash
|
||||
/plugin list # Список встановлених плагінів
|
||||
/plugin install <n> # Встановити плагін
|
||||
/plugin remove <n> # Видалити плагін
|
||||
/plugin update <n> # Оновити плагін
|
||||
/plugin install <name> # Встановити плагін
|
||||
/plugin remove <name> # Видалити плагін
|
||||
claude plugin update <name> # Оновити плагін (CLI; форма зі скісною рискою /plugin update згадується в тексті, але відсутня в довіднику команд)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -340,13 +340,18 @@ export GITHUB_TOKEN="your_token" && claude mcp add github -- npx -y @modelcontex
|
||||
| Подія | Опис | Коли спрацьовує | Сценарії |
|
||||
|-------|------|----------------|----------|
|
||||
| `SessionStart` | Початок/відновлення сесії | Ініціалізація сесії | Завдання налаштування |
|
||||
| `Setup` | Початкове налаштування середовища (один раз на сесію) | Перший запуск сесії | Підготовка інструментів, встановлення залежностей |
|
||||
| `InstructionsLoaded` | Інструкції завантажені | Завантажено CLAUDE.md або rules | Обробка кастомних інструкцій |
|
||||
| `UserPromptSubmit` | Перед обробкою промпту | Користувач надсилає повідомлення | Валідація вводу |
|
||||
| `UserPromptExpansion` | Промпт розгорнуто (@-згадки, слеш-команди) | Після розгортання, перед надсиланням | Перетворення чи перевірка розгорнутого промпту |
|
||||
| `PreToolUse` | Перед виконанням інструменту | Перед запуском будь-якого інструменту | Валідація, логування |
|
||||
| `PermissionRequest` | Діалог дозволу | Перед чутливими діями | Кастомні потоки схвалення |
|
||||
| `PermissionDenied` | Користувач відхилив запит дозволу | Після відмови в дозволі | Логування, аналітика, застосування політик |
|
||||
| `PostToolUse` | Після успішного виконання | Після завершення інструменту | Форматування, сповіщення |
|
||||
| `PostToolUseFailure` | Помилка виконання | Після помилки інструменту | Обробка помилок, логування |
|
||||
| `PostToolBatch` | Після завершення пакета викликів інструментів | Кінець пакета інструментів | Зведені звіти, пакетна валідація |
|
||||
| `Notification` | Надіслано сповіщення | Claude надсилає сповіщення | Зовнішні оповіщення |
|
||||
| `MessageDisplay` | Текст повідомлення асистента відображається | Під час рендерингу повідомлення | Перетворення або приховування тексту |
|
||||
| `SubagentStart` | Субагент запущений | Початок завдання субагента | Ініціалізація контексту |
|
||||
| `SubagentStop` | Субагент завершив | Завдання субагента виконано | Ланцюгові дії |
|
||||
| `Stop` | Claude завершив відповідь | Відповідь готова | Очищення, звітність |
|
||||
@@ -356,9 +361,12 @@ export GITHUB_TOKEN="your_token" && claude mcp add github -- npx -y @modelcontex
|
||||
| `TaskCreated` | Завдання створено через TaskCreate (спрацьовує лише коли увімкнені todo-інструменти — типово вимкнені на Opus 4.8, Sonnet 5, Fable 5, Mythos 5 і новіших; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Нове завдання створено | Відстеження, логування |
|
||||
| `ConfigChange` | Конфігурацію оновлено | Налаштування змінені | Реакція на зміни конфігурації |
|
||||
| `CwdChanged` | Робочий каталог змінився | Зміна каталогу | Налаштування для каталогу |
|
||||
| `DirectoryAdded` | Новий робочий каталог зареєстровано під час сесії | `/add-dir` або SDK `register_repo_root` | Налаштування інструментів для нового каталогу |
|
||||
| `FileChanged` | Відстежуваний файл змінився | Файл модифіковано | Моніторинг, перебудова |
|
||||
| `PreCompact` | Перед компактизацією | Стиснення контексту | Збереження стану |
|
||||
| `PostCompact` | Після компактизації | Компактизація завершена | Дії після стиснення |
|
||||
| `PreModelSwitch` | Перед застосуванням перемикання моделі | Запит на зміну моделі | Контроль або блокування зміни моделі |
|
||||
| `PostModelSwitch` | Після зміни моделі сесії | Перемикання завершено | Логування або реакція на зміну моделі |
|
||||
| `WorktreeCreate` | Створення worktree | Git worktree створено | Налаштування середовища |
|
||||
| `WorktreeRemove` | Видалення worktree | Git worktree видалено | Очищення ресурсів |
|
||||
| `Elicitation` | MCP-сервер запитує ввід | MCP-елісітація | Валідація вводу |
|
||||
@@ -524,8 +532,10 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
|
||||
---
|
||||
|
||||
**Останнє оновлення**: 15 серпня 2026
|
||||
**Версія Claude Code**: 2.1.233
|
||||
**Останнє оновлення**: 2 вересня 2026
|
||||
**Версія Claude Code**: 2.1.257
|
||||
**Джерела**:
|
||||
- https://code.claude.com/docs/en/commands
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
- https://code.claude.com/docs/en/plugins-reference
|
||||
- https://code.claude.com/docs/en/discover-plugins
|
||||
|
||||
+2
-2
@@ -233,12 +233,12 @@ blog-draft/
|
||||
|
||||
**Типи хуків** (5): `command`, `http`, `prompt`, `mcp_tool`, `agent` — як саме виконується хук.
|
||||
|
||||
**Події хуків** (31, у 4 категоріях) — коли він виконується:
|
||||
**Події хуків** (33, у 4 категоріях) — коли він виконується:
|
||||
|
||||
- Хуки інструментів: PreToolUse, PostToolUse, PostToolUseFailure, PostToolBatch, PermissionRequest, PermissionDenied
|
||||
- Хуки сесії: SessionStart, Setup, SessionEnd, Stop, StopFailure, SubagentStart, SubagentStop
|
||||
- Хуки завдань: UserPromptSubmit, UserPromptExpansion, MessageDisplay, TaskCompleted, TaskCreated, TeammateIdle (TaskCompleted/TaskCreated спрацьовують лише коли увімкнені todo-інструменти — типово вимкнені на Opus 4.8, Sonnet 5, Fable 5, Mythos 5 і новіших; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх)
|
||||
- Хуки життєвого циклу: ConfigChange, CwdChanged, DirectoryAdded, FileChanged, PreCompact, PostCompact, WorktreeCreate, WorktreeRemove, Notification, InstructionsLoaded, Elicitation, ElicitationResult
|
||||
- Хуки життєвого циклу: ConfigChange, CwdChanged, DirectoryAdded, FileChanged, PreCompact, PostCompact, PreModelSwitch, PostModelSwitch, WorktreeCreate, WorktreeRemove, Notification, InstructionsLoaded, Elicitation, ElicitationResult
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ graph TD
|
||||
| **3** | [Контрольні точки](08-checkpoints/) | ⭐⭐ Середній | 45 хв | Рівень 1 | Управління сесіями | Безпечне дослідження | Експериментування, відновлення |
|
||||
| **4** | [Основи CLI](10-cli/) | ⭐⭐ Початківець+ | 30 хв | Рівень 1 | Немає | Базове використання CLI | Інтерактивний та print mode |
|
||||
| **5** | [Навички](03-skills/) | ⭐⭐ Середній | 1 год | Рівень 2 | Слеш-команди | Автоматична експертиза | Повторювані можливості |
|
||||
| **6** | [Хуки](06-hooks/) | ⭐⭐ Середній | 1 год | Рівень 2 | Інструменти, Команди | Автоматизація процесів (31 подія, 5 типів) | Валідація, контроль якості |
|
||||
| **6** | [Хуки](06-hooks/) | ⭐⭐ Середній | 1 год | Рівень 2 | Інструменти, Команди | Автоматизація процесів (33 події, 5 типів) | Валідація, контроль якості |
|
||||
| **7** | [MCP](05-mcp/) | ⭐⭐⭐ Середній+ | 1 год | Рівень 2 | Конфігурація | Доступ до даних у реальному часі | Інтеграція, API |
|
||||
| **8** | [Субагенти](04-subagents/) | ⭐⭐⭐ Середній+ | 1.5 год | Рівень 2 | Пам'ять, Команди | Складні завдання (6 вбудованих) | Делегування, спеціалізація |
|
||||
| **9** | [Розширені функції](09-advanced-features/) | ⭐⭐⭐⭐⭐ Просунутий | 2-3 год | Рівень 3 | Усі попередні | Інструменти експерта | Планування, Auto Mode, канали |
|
||||
@@ -248,7 +248,7 @@ cat error.log | claude -p "explain this error"
|
||||
#### Що ви досягнете
|
||||
|
||||
✅ Автовиклик спеціалізованих можливостей з YAML-фронтматером (включно з полями `effort` та `shell`)
|
||||
✅ Налаштування автоматизації на основі подій через 31 подія хуків
|
||||
✅ Налаштування автоматизації на основі подій через 33 події хуків
|
||||
✅ Використання всіх 4 типів хуків (command, http, prompt, agent)
|
||||
✅ Забезпечення стандартів якості коду
|
||||
✅ Створення кастомних хуків для ваших процесів
|
||||
@@ -790,8 +790,10 @@ done
|
||||
|
||||
---
|
||||
|
||||
**Останнє оновлення**: 9 квітня 2026
|
||||
**Версія Claude Code**: 2.1.97
|
||||
**Останнє оновлення**: 2 вересня 2026
|
||||
**Версія Claude Code**: 2.1.257
|
||||
**Джерела**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
**Підтримується**: Контриб'ютори Claude How-To
|
||||
**Ліцензія**: Освітні цілі, вільне використання та адаптація
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ claude -r "session" # Відновити сесію за назвою/ID
|
||||
| **Навички** | `.claude/skills/*/SKILL.md` | Автовиклик |
|
||||
| **Субагенти** | `.claude/agents/*.md` | Автоделегування |
|
||||
| **MCP** | `.mcp.json` (проект) або `~/.claude.json` (користувач) | `/mcp__server__action` |
|
||||
| **Хуки (31 подія)** | `~/.claude/hooks/*.sh` | Тригер на подію (5 типів) |
|
||||
| **Хуки (33 події)** | `~/.claude/hooks/*.sh` | Тригер на подію (5 типів) |
|
||||
| **Плагіни** | Через `/plugin install` | Пакет всього |
|
||||
| **Контрольні точки** | Вбудовано | `Esc+Esc` або `/rewind` |
|
||||
| **Режим планування** | Вбудовано | `/plan <завдання>` |
|
||||
@@ -207,7 +207,7 @@ vim CLAUDE.md
|
||||
### Автоматизація та хуки
|
||||
|
||||
```bash
|
||||
# Встановити хуки (31 подія, 5 типів: command, http, mcp_tool, prompt, agent)
|
||||
# Встановити хуки (33 події, 5 типів: command, http, mcp_tool, prompt, agent)
|
||||
mkdir -p ~/.claude/hooks
|
||||
cp 06-hooks/*.sh ~/.claude/hooks/
|
||||
chmod +x ~/.claude/hooks/*.sh
|
||||
@@ -421,7 +421,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Auto Mode** | Повністю автономна робота з фоновим класифікатором | Прапорець `--enable-auto-mode`, `Shift+Tab` для зміни режимів |
|
||||
| **Канали** | Інтеграція з Discord та Telegram | Прапорець `--channels`, боти Discord/Telegram |
|
||||
| **Голосовий ввід** | Голосові команди та контекст для Claude | Команда `/voice` |
|
||||
| **Хуки (31 подія)** | Розширена система хуків з 5 типами | Типи: command, http, mcp_tool, prompt, agent |
|
||||
| **Хуки (33 події)** | Розширена система хуків з 5 типами | Типи: command, http, mcp_tool, prompt, agent |
|
||||
| **MCP Elicitation** | MCP-сервери можуть запитувати ввід під час виконання | Автозапит при потребі сервера |
|
||||
| **Plugin LSP** | Підтримка Language Server Protocol для плагінів | `userConfig`, змінна `${CLAUDE_PLUGIN_DATA}` |
|
||||
| **Віддалене керування** | Керування Claude Code через WebSocket API | `claude --remote` для зовнішніх інтеграцій |
|
||||
@@ -430,7 +430,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Список завдань** | Управління фоновими завданнями | `/task list`, `/task status <id>` |
|
||||
| **Автопам'ять** | Автоматичне збереження з розмов | Claude автозберігає контекст у CLAUDE.md |
|
||||
| **Git Worktrees** | Ізольовані робочі простори для паралельної розробки | `/worktree` для створення |
|
||||
| **Вибір моделі** | Перемикання між Sonnet 4.6 та Opus 4.6 | `/model` або прапорець `--model` |
|
||||
| **Вибір моделі** | Перемикання між Fable 5.1, Fable 5, Opus 5, Sonnet 5, Sonnet 4.6, Opus 4.8 та Haiku 4.5 | `/model` або прапорець `--model` |
|
||||
| **Команди агентів** | Координація кількох агентів | Увімкнути з `CLAUDE_AGENT_TEAMS=1` |
|
||||
| **Заплановані завдання** | Повторювані завдання з `/loop` | `/loop 5m /command` або CronCreate |
|
||||
| **Інтеграція з Chrome** | Автоматизація браузера | Прапорець `--chrome` або `/chrome` |
|
||||
@@ -479,7 +479,7 @@ echo $GITHUB_TOKEN
|
||||
| Автоматичний процес | Навичка | `03-skills/code-review-specialist/` |
|
||||
| Спеціалізоване завдання | Субагент | `04-subagents/code-reviewer.md` |
|
||||
| Зовнішні дані | MCP (+ Elicitation) | `05-mcp/github-mcp.json` |
|
||||
| Автоматизація подій | Хук (31 подія, 5 типів) | `06-hooks/pre-commit.sh` |
|
||||
| Автоматизація подій | Хук (33 події, 5 типів) | `06-hooks/pre-commit.sh` |
|
||||
| Комплексне рішення | Плагін (+ LSP) | `07-plugins/pr-review/` |
|
||||
| Безпечний експеримент | Контрольна точка | `08-checkpoints/checkpoint-examples.md` |
|
||||
| Повна автономія | Auto Mode | `--enable-auto-mode` або `Shift+Tab` |
|
||||
@@ -541,5 +541,7 @@ echo $GITHUB_TOKEN
|
||||
|
||||
---
|
||||
|
||||
**Останнє оновлення**: 9 квітня 2026
|
||||
**Версія Claude Code**: 2.1.97
|
||||
**Останнє оновлення**: 2 вересня 2026
|
||||
**Версія Claude Code**: 2.1.257
|
||||
**Джерела**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
|
||||
+7
-6
@@ -187,7 +187,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
11-13 годин для повного шляху. Але ви отримаєте цінність за 15 хвилин — просто скопіюйте шаблон слеш-команди та спробуйте.
|
||||
|
||||
**Чи працює це з Claude Sonnet / Haiku / Opus?**
|
||||
Так. Усі шаблони працюють з Claude Sonnet 4.6, Claude Opus 4.6 та Claude Haiku 4.5.
|
||||
Так. Усі шаблони працюють з Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5.
|
||||
|
||||
**Чи можна долучитися?**
|
||||
Звичайно. Див. [CONTRIBUTING.md](CONTRIBUTING.md) для настанов. Ми вітаємо нові приклади, виправлення, покращення документації та шаблони спільноти.
|
||||
@@ -440,11 +440,11 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
|
||||
**Типи хуків** (5): `command`, `http`, `prompt`, `mcp_tool`, `agent` — як саме виконується хук.
|
||||
|
||||
**Події хуків** (31, у 4 категоріях) — коли він виконується:
|
||||
**Події хуків** (33, у 4 категоріях) — коли він виконується:
|
||||
- **Хуки інструментів**: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PostToolBatch`, `PermissionRequest`, `PermissionDenied`
|
||||
- **Хуки сесій**: `SessionStart`, `Setup`, `SessionEnd`, `Stop`, `StopFailure`, `SubagentStart`, `SubagentStop`
|
||||
- **Хуки завдань**: `UserPromptSubmit`, `UserPromptExpansion`, `MessageDisplay`, `TaskCompleted`, `TaskCreated`, `TeammateIdle` (`TaskCompleted` і `TaskCreated` спрацьовують лише коли увімкнені todo-інструменти — типово вимкнені на Opus 4.8, Sonnet 5, Fable 5, Mythos 5 і новіших; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх)
|
||||
- **Хуки життєвого циклу**: `ConfigChange`, `CwdChanged`, `DirectoryAdded`, `FileChanged`, `PreCompact`, `PostCompact`, `WorktreeCreate`, `WorktreeRemove`, `Notification`, `InstructionsLoaded`, `Elicitation`, `ElicitationResult`
|
||||
- **Хуки життєвого циклу**: `ConfigChange`, `CwdChanged`, `DirectoryAdded`, `FileChanged`, `PreCompact`, `PostCompact`, `PreModelSwitch`, `PostModelSwitch`, `WorktreeCreate`, `WorktreeRemove`, `Notification`, `InstructionsLoaded`, `Elicitation`, `ElicitationResult`
|
||||
|
||||
</details>
|
||||
|
||||
@@ -659,8 +659,9 @@ Claude:
|
||||
|
||||
---
|
||||
|
||||
**Останнє оновлення**: 25 серпня 2026
|
||||
**Версія Claude Code**: 2.1.245
|
||||
**Останнє оновлення**: 2 вересня 2026
|
||||
**Версія Claude Code**: 2.1.257
|
||||
**Джерела**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
**Сумісні моделі**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
|
||||
- https://code.claude.com/docs/en/model-config
|
||||
**Сумісні моделі**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -2808,19 +2808,23 @@ graph TD
|
||||
|
||||
### Події хуків
|
||||
|
||||
Claude Code підтримує **31 подія хуків** у п'яти типах хуків (command, http, mcp_tool, prompt, agent):
|
||||
Claude Code підтримує **33 події хуків** у п'яти типах хуків (command, http, mcp_tool, prompt, agent):
|
||||
|
||||
| Подія хука | Тригер | Сценарії використання |
|
||||
|------------|---------|-----------|
|
||||
| **SessionStart** | Початок/відновлення/очищення/ущільнення сесії | Налаштування середовища, ініціалізація |
|
||||
| **Setup** | Початкове налаштування середовища (один раз на сесію) | Підготовка інструментів, встановлення залежностей |
|
||||
| **InstructionsLoaded** | Завантажено CLAUDE.md або файл правил | Валідація, трансформація, доповнення |
|
||||
| **UserPromptSubmit** | Користувач надсилає промпт | Валідація вводу, фільтрація промптів |
|
||||
| **UserPromptExpansion** | Промпт розгорнуто (@-згадки, слеш-команди) | Перетворення чи перевірка розгорнутого промпту |
|
||||
| **PreToolUse** | Перед запуском будь-якого інструменту | Валідація, шлюзи затвердження, логування |
|
||||
| **PermissionRequest** | Показано діалог дозволу | Авто-затвердження/відхилення |
|
||||
| **PermissionDenied** | Користувач відхилив запит дозволу | Логування, аналітика, політики |
|
||||
| **PostToolUse** | Після успішного виконання інструменту | Авто-форматування, сповіщення, очищення |
|
||||
| **PostToolUseFailure** | Помилка виконання інструменту | Обробка помилок, логування |
|
||||
| **PostToolBatch** | Після завершення пакета викликів інструментів | Зведені звіти, пакетна валідація |
|
||||
| **Notification** | Надіслано сповіщення | Алертинг, зовнішні інтеграції |
|
||||
| **MessageDisplay** | Текст повідомлення асистента відображається | Перетворення або приховування тексту |
|
||||
| **SubagentStart** | Створено субагента | Ін'єкція контексту, ініціалізація |
|
||||
| **SubagentStop** | Субагент завершив роботу | Валідація результату, логування |
|
||||
| **Stop** | Claude завершив відповідь | Генерація підсумку, завдання очищення |
|
||||
@@ -2830,9 +2834,12 @@ Claude Code підтримує **31 подія хуків** у п'яти тип
|
||||
| **TaskCreated** | Завдання створено через TaskCreate (спрацьовує лише коли увімкнені todo-інструменти — типово вимкнені на Opus 4.8, Sonnet 5, Fable 5, Mythos 5 і новіших; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Відстеження завдань, логування |
|
||||
| **ConfigChange** | Зміна конфігураційного файлу | Валідація, поширення |
|
||||
| **CwdChanged** | Зміна робочого каталогу | Налаштування для конкретного каталогу |
|
||||
| **DirectoryAdded** | Новий робочий каталог зареєстровано під час сесії | Налаштування інструментів для нового каталогу |
|
||||
| **FileChanged** | Зміна відстежуваного файлу | Моніторинг файлів, тригери перебудови |
|
||||
| **PreCompact** | Перед ущільненням контексту | Збереження стану |
|
||||
| **PostCompact** | Після завершення ущільнення | Дії після ущільнення |
|
||||
| **PreModelSwitch** | Перед застосуванням запитаного перемикання моделі | Контроль або блокування зміни моделі |
|
||||
| **PostModelSwitch** | Після зміни моделі сесії | Логування або реакція на зміну моделі |
|
||||
| **WorktreeCreate** | Створення worktree | Налаштування середовища, встановлення залежностей |
|
||||
| **WorktreeRemove** | Видалення worktree | Очищення, звільнення ресурсів |
|
||||
| **Elicitation** | MCP-сервер запитує введення користувача | Валідація вводу |
|
||||
@@ -3126,11 +3133,11 @@ User: \
|
||||
---
|
||||
|
||||
*Останнє оновлення: 15 серпня 2026*
|
||||
*Для Claude Haiku 4.5, Sonnet 4.6 та Opus 4.6*
|
||||
*Для Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5*
|
||||
*Тепер включає: хуки, контрольні точки, режим планування, розширене мислення, фонові завдання, режими дозволів (6 режимів), headless-режим, управління сесіями, авто-пам'ять, команди агентів, заплановані завдання, інтеграцію з Chrome, канали, голосовий ввід та комплектні навички*
|
||||
|
||||
---
|
||||
**Останнє оновлення**: 15 серпня 2026
|
||||
**Версія Claude Code**: 2.1.233
|
||||
**Останнє оновлення**: 2 вересня 2026
|
||||
**Версія Claude Code**: 2.1.257
|
||||
**Джерела**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
|
||||
+1
-1
@@ -245,7 +245,7 @@ graph TD
|
||||
| **Extended Thinking** | Перемикання глибокого мислення через `Alt+T`/`Option+T` або змінну `MAX_THINKING_TOKENS` | [Просунуті функції](09-advanced-features/) |
|
||||
| **Permission Modes** | Тонке управління: default, acceptEdits, plan, auto, dontAsk, bypassPermissions | [Просунуті функції](09-advanced-features/) |
|
||||
| **7-Tier Memory** | Managed Policy, Project, Project Rules, User, User Rules, Local, Auto Memory | [Посібник з пам'яті](02-memory/) |
|
||||
| **Hook Events** | 31 подія: PreToolUse, PostToolUse, PostToolUseFailure, Stop, StopFailure, SubagentStart, SubagentStop, Notification, Elicitation та інші | [Посібник з хуків](06-hooks/) |
|
||||
| **Hook Events** | 33 події: PreToolUse, PostToolUse, PostToolUseFailure, Stop, StopFailure, SubagentStart, SubagentStop, Notification, Elicitation та інші | [Посібник з хуків](06-hooks/) |
|
||||
| **Agent Teams** | Координація кількох агентів для складних завдань | [Посібник з субагентів](04-subagents/) |
|
||||
| **Scheduled Tasks** | Налаштування повторюваних завдань з `/loop` та cron | [Просунуті функції](09-advanced-features/) |
|
||||
| **Chrome Integration** | Автоматизація браузера з headless Chromium | [Просунуті функції](09-advanced-features/) |
|
||||
|
||||
@@ -133,10 +133,12 @@ Cung cấp hướng dẫn rõ ràng, từng bước cho Claude.
|
||||
Hiển thị các ví dụ cụ thể về việc sử dụng Skill này.
|
||||
```
|
||||
|
||||
### Các Trường Bắt Buộc
|
||||
### Các Trường Khuyến Nghị
|
||||
|
||||
- **name**: chỉ chữ thường, số, gạch ngang (tối đa 64 ký tự). Không thể chứa "anthropic" hoặc "claude".
|
||||
- **description**: những gì Skill làm VÀ khi nào sử dụng nó. Nội dung `description` + `when_to_use` gộp lại bị cắt ở **1.536 ký tự** trong danh sách skill (có thể điều chỉnh qua `skillListingMaxDescChars`). Điều này quan trọng để Claude biết khi nào kích hoạt skill.
|
||||
- **description** (khuyến nghị): những gì Skill làm VÀ khi nào sử dụng nó. Nếu bỏ trống, Claude Code dùng đoạn văn đầu tiên của nội dung markdown. Nội dung `description` + `when_to_use` gộp lại bị cắt ở **1.536 ký tự** trong danh sách skill (có thể điều chỉnh qua `skillListingMaxDescChars`). Đây là nội dung Claude đối chiếu để quyết định khi nào kích hoạt skill.
|
||||
- **name** (tùy chọn): mặc định lấy theo **tên thư mục** của skill. Khi được khai báo, nó đặt tên hiển thị — chỉ chữ thường, số, gạch ngang (tối đa 64 ký tự), và không thể chứa "anthropic" hoặc "claude". Với skill trong plugin, `name` cũng đặt phân đoạn cuối của lệnh.
|
||||
|
||||
Mọi trường frontmatter trong SKILL.md đều là tùy chọn; `description` là trường duy nhất được khuyến nghị.
|
||||
|
||||
### Các Trường Frontmatter Tùy Chọn
|
||||
|
||||
@@ -806,8 +808,8 @@ Khi bạn bắt đầu xây dựng skills một cách nghiêm túc, hai điều
|
||||
|
||||
---
|
||||
|
||||
**Cập Nhật Lần Cuối**: Ngày 25 tháng 8 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.245
|
||||
**Cập Nhật Lần Cuối**: Ngày 2 tháng 9 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.257
|
||||
**Nguồn**:
|
||||
- https://code.claude.com/docs/en/skills
|
||||
**Các Mô Hình Tương Thích**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
|
||||
**Các Mô Hình Tương Thích**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -173,7 +173,7 @@ Hooks xác thực dựa trên subagent mà spawn một agent chuyên dụng đ
|
||||
|
||||
## Các Sự Kiện Hook / Hook Events
|
||||
|
||||
Claude Code hỗ trợ **31 sự kiện hook**:
|
||||
Claude Code hỗ trợ **33 sự kiện hook**:
|
||||
|
||||
| Sự Kiện | Khi Được Kích Hoạt | Matcher Input | Có Chặn | Sử Dụng Phổ Biến |
|
||||
|-------|---------------|---------------|-----------|------------|
|
||||
@@ -203,6 +203,8 @@ Claude Code hỗ trợ **31 sự kiện hook**:
|
||||
| **FileChanged** | File được watch thay đổi | (none) | Không | Giám sát file, rebuild |
|
||||
| **PreCompact** | Trước khi dồn ngữ cảnh | manual/auto | Không | Hành động pre-dồn |
|
||||
| **PostCompact** | Sau khi dồn hoàn thành | (none) | Không | Hành động post-dồn |
|
||||
| **PreModelSwitch** | Trước khi Claude Code áp dụng yêu cầu chuyển đổi model | Tên chuẩn của model sắp chuyển sang (từ `to_model`) | Có | Kiểm soát hoặc từ chối việc đổi model |
|
||||
| **PostModelSwitch** | Sau khi model của phiên thay đổi, kể cả những thay đổi do chính Claude Code thực hiện (ví dụ khôi phục model khi tiếp tục phiên) | Tên chuẩn của model đã chuyển sang (từ `to_model`) | Không | Ghi log hoặc phản hồi thay đổi model |
|
||||
| **WorktreeCreate** | Worktree đang được tạo | (none) | Có (trả về path) | Khởi tạo worktree |
|
||||
| **WorktreeRemove** | Worktree đang được xóa | (none) | Không | Dọn dẹp worktree |
|
||||
| **Elicitation** | MCP server yêu cầu đầu vào người dùng | (none) | Có | Xác thực đầu vào |
|
||||
@@ -876,8 +878,8 @@ Chỉnh sửa `~/.claude/settings.json` hoặc `.claude/settings.json` với c
|
||||
|
||||
---
|
||||
|
||||
**Cập Nhật Lần Cuối**: Ngày 25 tháng 8 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.245
|
||||
**Cập Nhật Lần Cuối**: Ngày 2 tháng 9 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.257
|
||||
**Nguồn**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
**Các Mô Hình Tương Thích**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
|
||||
**Các Mô Hình Tương Thích**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
@@ -608,7 +608,7 @@ claude plugin uninstall <name> # Gỡ bỏ plugin
|
||||
claude plugin list # Liệt kê các plugin đã cài đặt
|
||||
claude plugin enable <name> # Kích hoạt plugin đã bị vô hiệu hóa
|
||||
claude plugin disable <name> # Vô hiệu hóa plugin
|
||||
claude plugin validate # Xác thực cấu trúc plugin
|
||||
claude plugin validate <path> # Xác thực cấu trúc plugin tại <path>
|
||||
```
|
||||
|
||||
## Các Phương Thức Cài Đặt / Installation Methods
|
||||
@@ -965,9 +965,10 @@ Các tính năng Claude Code sau hoạt động cùng với plugins:
|
||||
|
||||
---
|
||||
|
||||
**Cập Nhật Lần Cuối**: Ngày 19 tháng 8 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.235
|
||||
**Cập Nhật Lần Cuối**: Ngày 2 tháng 9 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.257
|
||||
**Nguồn**:
|
||||
- https://code.claude.com/docs/en/discover-plugins
|
||||
- https://code.claude.com/docs/en/plugins-reference
|
||||
- https://code.claude.com/docs/en/settings
|
||||
**Các Mô Hình Tương Thích**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
+11
-8
@@ -40,7 +40,7 @@ graph TD
|
||||
| `claude mcp serve` | Chạy Claude Code như một MCP server | `claude mcp serve` |
|
||||
| `claude agents` | Liệt kê tất cả các subagents được cấu hình | `claude agents` |
|
||||
| `claude auto-mode defaults` | In các quy tắc mặc định chế độ tự động như JSON | `claude auto-mode defaults` |
|
||||
| `claude remote-control` | Bắt đầu server Remote Control | `claude remote-control` |
|
||||
| `claude --remote-control [name]` | Khởi động Remote Control (đây là một flag, không phải subcommand; alias `--rc`) | `claude --rc` |
|
||||
| `claude plugin` | Quản lý plugins (cài đặt, kích hoạt, vô hiệu hóa) | `claude plugin install my-plugin` |
|
||||
| `claude auth login` | Đăng nhập (hỗ trợ `--email`, `--sso`) | `claude auth login --email user@example.com` |
|
||||
| `claude auth logout` | Đăng xuất khỏi tài khoản hiện tại | `claude auth logout` |
|
||||
@@ -57,13 +57,14 @@ graph TD
|
||||
| `-w, --worktree` | Bắt đầu trong git worktree cô lập | `claude -w` |
|
||||
| `-n, --name` | Tên hiển thị session | `claude -n "auth-refactor"` |
|
||||
| `--from-pr <number>` | Resume sessions được liên kết đến GitHub PR | `claude --from-pr 42` |
|
||||
| `--remote "task"` | Tạo session web trên claude.ai | `claude --remote "implement API"` |
|
||||
| `--cloud [description\|session_id\|url]` | Tạo session cloud trên claude.ai với mô tả đã cho, hoặc gắn vào một session sẵn có bằng session ID hoặc URL claude.ai/code | `claude --cloud "implement API"` |
|
||||
| `--remote "task"` | **Alias không dùng nữa của `--cloud`**, bao gồm cả dạng gắn vào session sẵn có. Hãy dùng `--cloud` | `claude --remote "implement API"` |
|
||||
| `--remote-control, --rc` | Session tương tác với Remote Control | `claude --rc` |
|
||||
| `--teleport` | Resume session web cục bộ | `claude --teleport` |
|
||||
| `--teammate-mode` | Chế độ hiển thị agent team | `claude --teammate-mode tmux` |
|
||||
| `--bare` | Chế độ tối thiểu (bỏ qua hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` |
|
||||
| `--enable-auto-mode` | Mở khóa chế độ quyền tự động | `claude --enable-auto-mode` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP | `claude --channels discord,telegram` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP. Mỗi mục phải được gắn thẻ `plugin:<name>@<marketplace>`; tên trần sẽ bị từ chối | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--chrome` / `--no-chrome` | Bật/tắt tích hợp trình duyệt Chrome | `claude --chrome` |
|
||||
| `--effort` | Đặt mức độ suy nghĩ | `claude --effort high` |
|
||||
| `--init` / `--init-only` | Chạy các hooks khởi tạo | `claude --init` |
|
||||
@@ -243,7 +244,7 @@ claude --settings '{"model":"opus","verbose":true}' "complex task"
|
||||
|------|-------------|---------|
|
||||
| `--mcp-config` | Tải MCP servers từ JSON | `claude --mcp-config ./mcp.json` |
|
||||
| `--strict-mcp-config` | Chỉ sử dụng MCP config được chỉ định | `claude --strict-mcp-config --mcp-config ./mcp.json` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP | `claude --channels discord,telegram` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP. Mỗi mục phải được gắn thẻ `plugin:<name>@<marketplace>`; tên trần sẽ bị từ chối | `claude --channels plugin:discord@my-marketplace` |
|
||||
|
||||
### Ví Dụ MCP / MCP Examples
|
||||
|
||||
@@ -313,7 +314,7 @@ Session gốc vẫn không thay đổi, và fork trở thành một session đ
|
||||
| `--enable-auto-mode` | Mở khóa chế độ quyền tự động | `claude --enable-auto-mode` |
|
||||
| `--effort` | Đặt mức độ suy nghĩ | `claude --effort high` |
|
||||
| `--bare` | Chế độ tối thiểu (bỏ qua hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP | `claude --channels discord` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP (gắn thẻ `plugin:<name>@<marketplace>`) | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--tmux` | Tạo tmux session cho worktree | `claude --tmux` |
|
||||
| `--fork-session` | Tạo session ID mới khi resume | `claude --resume abc --fork-session` |
|
||||
| `--max-budget-usd` | Chi phí tối đa (chế độ in); cũng dừng các subagent chạy nền khi đạt giới hạn (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` |
|
||||
@@ -833,6 +834,8 @@ claude -p --output-format json "query"
|
||||
|
||||
---
|
||||
|
||||
**Cập Nhật Lần Cuối**: Tháng 4 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1+
|
||||
**Các Mô Hình Tương Thích**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
|
||||
**Cập Nhật Lần Cuối**: Ngày 2 tháng 9 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.257
|
||||
**Nguồn**:
|
||||
- https://code.claude.com/docs/en/cli-reference
|
||||
**Các Mô Hình Tương Thích**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
+15
-5
@@ -20,9 +20,9 @@
|
||||
| **Skills** | 10 bundled | 5 | 15 | [03-skills/](03-skills/) |
|
||||
| **Plugins** | - | 3 | 3 | [07-plugins/](07-plugins/) |
|
||||
| **MCP Servers** | 1 | 4 | 5 | [05-mcp/](05-mcp/) |
|
||||
| **Hooks** | 31 sự kiện | 9 | 40 | [06-hooks/](06-hooks/) |
|
||||
| **Hooks** | 33 sự kiện | 9 | 42 | [06-hooks/](06-hooks/) |
|
||||
| **Bộ Nhớ** | 7 loại | 3 | 10 | [02-memory/](02-memory/) |
|
||||
| **Tổng** | **115** | **38** | **153** | |
|
||||
| **Tổng** | **117** | **38** | **155** | |
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +273,7 @@ Bộ sưu tập được đóng gói của commands, agents, MCP servers, và ho
|
||||
/plugin list # Liệt kê plugins đã cài
|
||||
/plugin install <name> # Cài plugin
|
||||
/plugin remove <name> # Gỡ plugin
|
||||
/plugin update <name> # Cập nhật plugin
|
||||
claude plugin update <name> # Cập nhật plugin (CLI; dạng slash /plugin update được nhắc trong phần văn bản nhưng không có trong tài liệu tham chiếu lệnh)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -332,13 +332,18 @@ Tự động hóa dựa trên sự kiện thực thi shell commands trên các s
|
||||
| Event | Mô Tả | Khi Được Kích Hoạt | Use Cases |
|
||||
|-------|-------------|----------------|-----------|
|
||||
| `SessionStart` | Session bắt đầu/tiếp tục | Khởi tạo session | Tasks thiết lập |
|
||||
| `Setup` | Thiết lập môi trường ban đầu (một lần mỗi session) | Bootstrap session lần đầu | Cài đặt tooling, cài dependencies |
|
||||
| `InstructionsLoaded` | Hướng dẫn được tải | CLAUDE.md hoặc file rules được tải | Xử lý hướng dẫn tùy chỉnh |
|
||||
| `UserPromptSubmit` | Trước khi xử lý prompt | User gửi tin nhắn | Xác thực input |
|
||||
| `UserPromptExpansion` | Prompt được mở rộng (@-mentions, slash commands) | Sau khi mở rộng, trước khi gửi | Biến đổi hoặc kiểm tra prompt đã mở rộng |
|
||||
| `PreToolUse` | Trước khi thực thi tool | Trước khi bất kỳ tool chạy | Xác thực, logging |
|
||||
| `PermissionRequest` | Dialog permission được hiển thị | Trước hành động nhạy cảm | Flows phê duyệt tùy chỉnh |
|
||||
| `PermissionDenied` | Người dùng từ chối yêu cầu quyền | Sau khi từ chối quyền | Ghi log, phân tích, thực thi chính sách |
|
||||
| `PostToolUse` | Sau khi tool thành công | Sau khi bất kỳ tool hoàn thành | Formatting, thông báo |
|
||||
| `PostToolUseFailure` | Thực thi tool thất bại | Sau khi tool lỗi | Xử lý lỗi, logging |
|
||||
| `PostToolBatch` | Sau khi một lô tool use hoàn tất | Kết thúc một lô tool | Báo cáo tổng hợp, xác thực theo lô |
|
||||
| `Notification` | Thông báo được gửi | Claude gửi thông báo | Cảnh báo bên ngoài |
|
||||
| `MessageDisplay` | Văn bản phản hồi được hiển thị | Trong khi message render | Biến đổi hoặc ẩn nội dung hiển thị |
|
||||
| `SubagentStart` | Subagent được tạo | Task subagent bắt đầu | Khởi tạo context subagent |
|
||||
| `SubagentStop` | Subagent hoàn thành | Task subagent hoàn tất | Chuỗi hành động |
|
||||
| `Stop` | Claude hoàn thành phản hồi | Phản hồi hoàn tất | Dọn dẹp, báo cáo |
|
||||
@@ -348,9 +353,12 @@ Tự động hóa dựa trên sự kiện thực thi shell commands trên các s
|
||||
| `TaskCreated` | Task được tạo qua TaskCreate (chỉ phát ra khi bật todo tools — tắt mặc định trên Opus 4.8, Sonnet 5, Fable 5, Mythos 5 và mới hơn; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` khôi phục) | Task mới được tạo | Theo dõi task, logging |
|
||||
| `ConfigChange` | Cấu hình được cập nhật | Settings được sửa đổi | Phản ứng thay đổi config |
|
||||
| `CwdChanged` | Thư mục làm việc thay đổi | Thư mục thay đổi | Thiết lập cụ thể theo thư mục |
|
||||
| `DirectoryAdded` | Thư mục làm việc mới được đăng ký giữa session | `/add-dir` hoặc SDK `register_repo_root` | Thiết lập tooling cho thư mục mới |
|
||||
| `FileChanged` | File được theo dõi thay đổi | File được sửa | Giám sát file, rebuild |
|
||||
| `PreCompact` | Trước operation compact | Nén context | Bảo toàn trạng thái |
|
||||
| `PostCompact` | Sau khi compact hoàn tất | Compact xong | Hành động post-compact |
|
||||
| `PreModelSwitch` | Trước khi áp dụng yêu cầu đổi model | Có yêu cầu đổi model | Kiểm soát hoặc chặn việc đổi model |
|
||||
| `PostModelSwitch` | Sau khi model của session thay đổi | Đổi model hoàn tất | Ghi log hoặc phản ứng khi đổi model |
|
||||
| `WorktreeCreate` | Worktree đang được tạo | Git worktree được tạo | Thiết lập môi trường worktree |
|
||||
| `WorktreeRemove` | Worktree đang bị gỡ | Git worktree bị gỡ | Dọn dẹp tài nguyên worktree |
|
||||
| `Elicitation` | MCP server yêu cầu input | MCP elicitation | Xác thực input |
|
||||
@@ -514,8 +522,10 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
|
||||
---
|
||||
|
||||
**Cập Nhật Lần Cuối**: Ngày 15 tháng 8 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.233
|
||||
**Cập Nhật Lần Cuối**: Ngày 2 tháng 9 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.257
|
||||
**Nguồn**:
|
||||
- https://code.claude.com/docs/en/commands
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
- https://code.claude.com/docs/en/plugins-reference
|
||||
- https://code.claude.com/docs/en/discover-plugins
|
||||
|
||||
+2
-2
@@ -220,11 +220,11 @@ Các script tự động hóa dựa trên sự kiện thực thi tự động.
|
||||
|
||||
**Hook Types** (5): `command`, `http`, `prompt`, `mcp_tool`, `agent` — cách hook chạy.
|
||||
|
||||
**Hook Events** (31, trong 4 nhóm) — khi nào hook chạy:
|
||||
**Hook Events** (33, trong 4 nhóm) — khi nào hook chạy:
|
||||
- Tool Hooks: PreToolUse, PostToolUse, PostToolUseFailure, PostToolBatch, PermissionRequest, PermissionDenied
|
||||
- Session Hooks: SessionStart, Setup, SessionEnd, Stop, StopFailure, SubagentStart, SubagentStop
|
||||
- Task Hooks: UserPromptSubmit, UserPromptExpansion, MessageDisplay, TaskCompleted, TaskCreated, TeammateIdle (TaskCompleted/TaskCreated chỉ phát ra khi bật todo tools — tắt mặc định trên Opus 4.8, Sonnet 5, Fable 5, Mythos 5 và mới hơn; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` khôi phục)
|
||||
- Lifecycle Hooks: ConfigChange, CwdChanged, DirectoryAdded, FileChanged, PreCompact, PostCompact, WorktreeCreate, WorktreeRemove, Notification, InstructionsLoaded, Elicitation, ElicitationResult
|
||||
- Lifecycle Hooks: ConfigChange, CwdChanged, DirectoryAdded, FileChanged, PreCompact, PostCompact, PreModelSwitch, PostModelSwitch, WorktreeCreate, WorktreeRemove, Notification, InstructionsLoaded, Elicitation, ElicitationResult
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ graph TD
|
||||
| **3** | [Checkpoints](08-checkpoints/) | ⭐⭐ Trung cấp | 45 phút | Level 1 | Quản lý session | Khám phá an toàn | Thử nghiệm, phục hồi |
|
||||
| **4** | [CLI Cơ Bản](10-cli/) | ⭐⭐ Người mới+ | 30 phút | Level 1 | None | Sử dụng CLI cốt | Mode tương tác & print |
|
||||
| **5** | [Skills](03-skills/) | ⭐⭐ Trung cấp | 1 giờ | Level 2 | Lệnh Slash | Chuyên môn tự động | Khả năng tái sử dụng, nhất quán |
|
||||
| **6** | [Hooks](06-hooks/) | ⭐⭐ Trung cấp | 1 giờ | Level 2 | Tools, Commands | Tự động hóa workflow (31 sự kiện, 5 types) | Xác thực, cổng chất lượng |
|
||||
| **6** | [Hooks](06-hooks/) | ⭐⭐ Trung cấp | 1 giờ | Level 2 | Tools, Commands | Tự động hóa workflow (33 sự kiện, 5 types) | Xác thực, cổng chất lượng |
|
||||
| **7** | [MCP](05-mcp/) | ⭐⭐⭐ Trung cấp+ | 1 giờ | Level 2 | Cấu hình | Truy cập dữ liệu trực tiếp | Tích hợp thời gian thực, APIs |
|
||||
| **8** | [Tác Nhân Con](04-subagents/) | ⭐⭐⭐ Trung cấp+ | 1.5 giờ | Level 2 | Bộ Nhớ, Commands | Xử lý task phức tạp (6 built-in bao gồm Bash) | Ủy quyền, chuyên môn hóa |
|
||||
| **9** | [Tính Năng Nâng Cao](09-advanced-features/) | ⭐⭐⭐⭐⭐ Nâng cao | 2-3 giờ | Level 3 | Tất cả trước | Công cụ power user | Planning, Auto Mode, Channels, Voice Dictation, permissions |
|
||||
@@ -230,7 +230,7 @@ Trước khi bắt đầu Level 2, đảm bảo bạn thoải mái với các kh
|
||||
|
||||
#### Bạn Sẽ Đạt Được
|
||||
✅ Auto-invoke các khả năng chuyên biệt với YAML frontmatter (bao gồm các trường `effort` và `shell`)
|
||||
✅ Thiết lập tự động hóa dựa trên sự kiện qua 25 hook events
|
||||
✅ Thiết lập tự động hóa dựa trên sự kiện qua 33 hook events
|
||||
✅ Sử dụng tất cả 4 hook types (command, http, prompt, agent)
|
||||
✅ Thực thi tiêu chuẩn chất lượng code
|
||||
✅ Tạo custom hooks cho workflow của bạn
|
||||
@@ -733,7 +733,10 @@ Khi bạn đã hoàn thành tất cả milestones:
|
||||
|
||||
---
|
||||
|
||||
**Cập Nhật Lần**: Tháng 3 năm 2026
|
||||
**Cập Nhật Lần Cuối**: Ngày 2 tháng 9 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.257
|
||||
**Nguồn**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
**Được Duy Trì Bởi**: Những người đóng góp Claude How-To
|
||||
**Giấy Phép**: Mục đích giáo dục, miễn phí sử dụng và điều chỉnh
|
||||
|
||||
|
||||
+12
-5
@@ -118,7 +118,7 @@ claude -r "session" # Tiếp tục phiên theo tên/ID
|
||||
| **Skills** | `.claude/skills/*/SKILL.md` | Tự động gọi |
|
||||
| **Tác Nhân Con** | `.claude/agents/*.md` | Tự động ủy quyền |
|
||||
| **MCP** | `.mcp.json` (dự án) hoặc `~/.claude.json` (người dùng) | `/mcp__server__action` |
|
||||
| **Hooks (31 sự kiện)** | `~/.claude/hooks/*.sh` | Kích hoạt sự kiện (5 loại) |
|
||||
| **Hooks (33 sự kiện)** | `~/.claude/hooks/*.sh` | Kích hoạt sự kiện (5 loại) |
|
||||
| **Plugins** | Thông qua `/plugin install` | Gói tất cả |
|
||||
| **Checkpoints** | Được tích hợp sẵn | `Esc+Esc` hoặc `/rewind` |
|
||||
| **Chế Độ Lập Kế Hoạch** | Được tích hợp sẵn | `/plan <tác vụ>` |
|
||||
@@ -189,7 +189,7 @@ vim CLAUDE.md
|
||||
|
||||
### Tự Động Hóa & Hooks
|
||||
```bash
|
||||
# Cài đặt hooks (31 sự kiện, 5 loại: command, http, mcp_tool, prompt, agent)
|
||||
# Cài đặt hooks (33 sự kiện, 5 loại: command, http, mcp_tool, prompt, agent)
|
||||
mkdir -p ~/.claude/hooks
|
||||
cp 06-hooks/*.sh ~/.claude/hooks/
|
||||
chmod +x ~/.claude/hooks/*.sh
|
||||
@@ -389,7 +389,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Chế Độ Tự Động** | Vận hành hoàn toàn tự chủ với bộ phân loại nền | Cờ `--enable-auto-mode`, `Shift+Tab` để chuyển đổi chế độ |
|
||||
| **Kênh** | Tích hợp Discord và Telegram | Cờ `--channels`, bot Discord/Telegram |
|
||||
| **Nhập Liệu Giọng Nói** | Nói lệnh và bối cảnh cho Claude | Lệnh `/voice` |
|
||||
| **Hooks (31 sự kiện)** | Hệ thống hook mở rộng với 5 loại | Các loại hook command, http, mcp_tool, prompt, agent |
|
||||
| **Hooks (33 sự kiện)** | Hệ thống hook mở rộng với 5 loại | Các loại hook command, http, mcp_tool, prompt, agent |
|
||||
| **MCP Elicitation** | MCP servers có thể yêu cầu input người dùng tại runtime | Tự động nhắc khi server cần làm rõ |
|
||||
| **WebSocket MCP** | Vận chuyển WebSocket cho kết nối MCP | Cấu hình trong `.mcp.json` với URL `ws://` |
|
||||
| **Plugin LSP** | Hỗ trợ Language Server Protocol cho plugins | `userConfig`, biến `${CLAUDE_PLUGIN_DATA}` |
|
||||
@@ -399,7 +399,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Danh Sách Tác Vụ** | Quản lý tác vụ nền | `/task list`, `/task status <id>` |
|
||||
| **Tự Động Bộ Nhớ** | Tự động lưu bộ nhớ từ cuộc hội thoại | Claude tự động lưu bối cảnh chính vào CLAUDE.md |
|
||||
| **Git Worktrees** | Không gian làm việc cô lập cho phát triển song song | `/worktree` để tạo không gian làm việc cô lập |
|
||||
| **Chọn Mô Hình** | Chuyển đổi giữa Sonnet 4.6 và Opus 4.6 | `/model` hoặc cờ `--model` |
|
||||
| **Chọn Mô Hình** | Chuyển đổi giữa Fable 5.1, Fable 5, Opus 5, Sonnet 5, Sonnet 4.6, Opus 4.8 và Haiku 4.5 | `/model` hoặc cờ `--model` |
|
||||
| **Đội Tác Nhân** | Phối hợp nhiều tác nhân trên tác vụ | Bật với biến môi trường `CLAUDE_AGENT_TEAMS=1` |
|
||||
| **Tác Vụ Định Kỳ** | Tác vụ định kỳ với `/loop` | `/loop 5m /command` hoặc công cụ CronCreate |
|
||||
| **Tích Hợp Chrome** | Tự động hóa trình duyệt | Cờ `--chrome` hoặc lệnh `/chrome` |
|
||||
@@ -445,7 +445,7 @@ echo $GITHUB_TOKEN
|
||||
| Workflow tự động | Skill | `03-skills/code-review-specialist/` |
|
||||
| Tác vụ chuyên biệt | Tác Nhân Con | `04-subagents/code-reviewer.md` |
|
||||
| Dữ liệu bên ngoài | MCP (+ Elicitation, WebSocket) | `05-mcp/github-mcp.json` |
|
||||
| Tự động hóa sự kiện | Hook (31 sự kiện, 5 loại) | `06-hooks/pre-commit.sh` |
|
||||
| Tự động hóa sự kiện | Hook (33 sự kiện, 5 loại) | `06-hooks/pre-commit.sh` |
|
||||
| Giải pháp hoàn chỉnh | Plugin (+ hỗ trợ LSP) | `07-plugins/pr-review/` |
|
||||
| Thử nghiệm an toàn | Checkpoint | `08-checkpoints/checkpoint-examples.md` |
|
||||
| Hoàn toàn tự chủ | Chế Độ Tự Động | `--enable-auto-mode` hoặc `Shift+Tab` |
|
||||
@@ -504,3 +504,10 @@ Checklist bắt đầu:
|
||||
**Index Hoàn Chỉnh**: `cat INDEX.md`
|
||||
|
||||
**Tham Khảo Này**: Giữ sẵn để tham khảo nhanh!
|
||||
|
||||
---
|
||||
|
||||
**Cập Nhật Lần Cuối**: Ngày 2 tháng 9 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.257
|
||||
**Nguồn**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
|
||||
+1
-1
@@ -240,7 +240,7 @@ Các bước này capture các core recommendations cho smooth workflows với C
|
||||
| **Extended Thinking** | Deep reasoning toggle qua `Alt+T`/`Option+T` hoặc `MAX_THINKING_TOKENS` env var | [Advanced Features](09-advanced-features/) |
|
||||
| **Permission Modes** | Fine-grained control: default, acceptEdits, plan, auto, dontAsk, bypassPermissions | [Advanced Features](09-advanced-features/) |
|
||||
| **7-Tier Memory** | Managed Policy, Project, Project Rules, User, User Rules, Local, Auto Memory | [Memory Guide](02-memory/) |
|
||||
| **Hook Events** | 31 events: PreToolUse, PostToolUse, PostToolUseFailure, Stop, StopFailure, SubagentStart, SubagentStop, Notification, Elicitation, và nhiều hơn | [Hooks Guide](06-hooks/) |
|
||||
| **Hook Events** | 33 events: PreToolUse, PostToolUse, PostToolUseFailure, Stop, StopFailure, SubagentStart, SubagentStop, Notification, Elicitation, và nhiều hơn | [Hooks Guide](06-hooks/) |
|
||||
| **Agent Teams** | Phối hợp nhiều agents làm việc cùng nhau trên các complex tasks | [Subagents Guide](04-subagents/) |
|
||||
| **Scheduled Tasks** | Thiết lập recurring tasks với `/loop` và cron tools | [Advanced Features](09-advanced-features/) |
|
||||
| **Chrome Integration** | Browser automation với headless Chromium | [Advanced Features](09-advanced-features/) |
|
||||
|
||||
+10
-3
@@ -68,10 +68,10 @@ description: 这个 skill 的用途,以及什么时候触发
|
||||
## Examples
|
||||
```
|
||||
|
||||
### 必填字段
|
||||
### 推荐字段
|
||||
|
||||
- `name`
|
||||
- `description`
|
||||
- `description`(推荐):说明这个 skill 做什么、什么时候用;Claude 就是靠它判断是否激活
|
||||
- `name`(可选):省略时默认取 skill 的目录名
|
||||
|
||||
### 可选 frontmatter 字段
|
||||
|
||||
@@ -269,3 +269,10 @@ chmod +x ~/.claude/skills/*/scripts/*
|
||||
- [Slash Commands 中文参考](../01-slash-commands/README.md)
|
||||
- [Memory 中文指南](../02-memory/README.md)
|
||||
- [Subagents 中文参考](../04-subagents/README.md)
|
||||
|
||||
---
|
||||
|
||||
**最后更新**: 2026 年 9 月 2 日
|
||||
**Claude Code 版本**: 2.1.257
|
||||
**来源**:
|
||||
- https://code.claude.com/docs/en/skills
|
||||
|
||||
@@ -22,12 +22,12 @@ Hooks 是事件驱动的自动化机制。它们会在 Claude Code 发生某些
|
||||
|
||||
## Hook 类型
|
||||
|
||||
Claude Code 支持 31 个 hook 事件,按用途分为以下 4 组。事件的 handler 类型共 5 种:`command`、`http`、`mcp_tool`、`prompt`、`agent`。
|
||||
Claude Code 支持 33 个 hook 事件,按用途分为以下 4 组。事件的 handler 类型共 5 种:`command`、`http`、`mcp_tool`、`prompt`、`agent`。
|
||||
|
||||
- **Tool Hooks**:`PreToolUse`、`PostToolUse`、`PostToolUseFailure`、`PostToolBatch`、`PermissionRequest`、`PermissionDenied`
|
||||
- **Session Hooks**:`SessionStart`、`Setup`、`SessionEnd`、`Stop`、`StopFailure`、`SubagentStart`、`SubagentStop`
|
||||
- **Task Hooks**:`UserPromptSubmit`、`UserPromptExpansion`、`MessageDisplay`、`TaskCompleted`、`TaskCreated`、`TeammateIdle`(`TaskCompleted` 和 `TaskCreated` 仅在启用 todo 工具时触发 —— 在 Opus 4.8、Sonnet 5、Fable 5、Mythos 5 及更新模型上默认关闭;`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复)
|
||||
- **Lifecycle Hooks**:`ConfigChange`、`CwdChanged`、`DirectoryAdded`、`FileChanged`、`PreCompact`、`PostCompact`、`WorktreeCreate`、`WorktreeRemove`、`Notification`、`InstructionsLoaded`、`Elicitation`、`ElicitationResult`
|
||||
- **Lifecycle Hooks**:`ConfigChange`、`CwdChanged`、`DirectoryAdded`、`FileChanged`、`PreCompact`、`PostCompact`、`PreModelSwitch`、`PostModelSwitch`、`WorktreeCreate`、`WorktreeRemove`、`Notification`、`InstructionsLoaded`、`Elicitation`、`ElicitationResult`
|
||||
|
||||
## 安装
|
||||
|
||||
@@ -113,7 +113,7 @@ Hooks 会在匹配到事件时自动执行。你可以把它理解成 Claude Cod
|
||||
|
||||
---
|
||||
|
||||
**最后更新**: 2026 年 8 月 15 日
|
||||
**Claude Code 版本**: 2.1.233
|
||||
**最后更新**: 2026 年 9 月 2 日
|
||||
**Claude Code 版本**: 2.1.257
|
||||
**来源**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
|
||||
@@ -595,7 +595,7 @@ claude plugin uninstall <name> # 删除插件
|
||||
claude plugin list # 列出已安装插件
|
||||
claude plugin enable <name> # 启用已禁用的插件
|
||||
claude plugin disable <name> # 禁用插件
|
||||
claude plugin validate # 验证插件结构
|
||||
claude plugin validate <path> # 验证 <path> 处的插件结构
|
||||
```
|
||||
|
||||
## 安装方式
|
||||
@@ -952,8 +952,9 @@ claude plugin update plugin-name
|
||||
|
||||
---
|
||||
|
||||
**最后更新**: 2026 年 8 月 19 日
|
||||
**Claude Code 版本**: 2.1.235
|
||||
**最后更新**: 2026 年 9 月 2 日
|
||||
**Claude Code 版本**: 2.1.257
|
||||
**来源**:
|
||||
- https://code.claude.com/docs/en/discover-plugins
|
||||
- https://code.claude.com/docs/en/plugins-reference
|
||||
- https://code.claude.com/docs/en/settings
|
||||
|
||||
+11
-3
@@ -40,7 +40,7 @@ graph TD
|
||||
| `claude mcp serve` | 将 Claude Code 作为 MCP server 运行 | `claude mcp serve` |
|
||||
| `claude agents` | 列出所有已配置的 subagents | `claude agents` |
|
||||
| `claude auto-mode defaults` | 以 JSON 打印 auto mode 默认规则 | `claude auto-mode defaults` |
|
||||
| `claude remote-control` | 启动远程控制服务 | `claude remote-control` |
|
||||
| `claude --remote-control [name]` | 启动 Remote Control(这是一个 flag,不是子命令;别名 `--rc`) | `claude --rc` |
|
||||
| `claude plugin` | 管理插件(安装、启用、禁用) | `claude plugin install my-plugin` |
|
||||
| `claude auth login` | 登录(支持 `--email`、`--sso`) | `claude auth login --email user@example.com` |
|
||||
| `claude auth logout` | 注销当前账号 | `claude auth logout` |
|
||||
@@ -57,13 +57,14 @@ graph TD
|
||||
| `-w, --worktree` | 在隔离的 git worktree 中启动 | `claude -w` |
|
||||
| `-n, --name` | 设置会话显示名称 | `claude -n "auth-refactor"` |
|
||||
| `--from-pr <number>` | 恢复与 GitHub PR 关联的会话 | `claude --from-pr 42` |
|
||||
| `--remote "task"` | 在 claude.ai 上创建 web session | `claude --remote "implement API"` |
|
||||
| `--cloud [description\|session_id\|url]` | 使用给定描述在 claude.ai 上创建云会话,或通过 session ID / claude.ai/code URL 接入已有会话 | `claude --cloud "implement API"` |
|
||||
| `--remote "task"` | **`--cloud` 的已弃用别名**(包括接入已有会话的形式)。请改用 `--cloud` | `claude --remote "implement API"` |
|
||||
| `--remote-control, --rc` | 使用 Remote Control 进入交互式会话 | `claude --rc` |
|
||||
| `--teleport` | 将 web session 恢复到本地 | `claude --teleport` |
|
||||
| `--teammate-mode` | agent team 显示模式 | `claude --teammate-mode tmux` |
|
||||
| `--bare` | 极简模式,跳过 hooks、skills、plugins、MCP、自动记忆和 `CLAUDE.md` | `claude --bare` |
|
||||
| `--enable-auto-mode` | 解锁 auto permission mode | `claude --enable-auto-mode` |
|
||||
| `--channels` | 订阅 MCP channel 插件 | `claude --channels discord,telegram` |
|
||||
| `--channels` | 订阅 MCP channel 插件。每一项必须写成 `plugin:<name>@<marketplace>` 的带标签形式;仅写名称会被拒绝 | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--chrome` / `--no-chrome` | 启用 / 禁用 Chrome 浏览器集成 | `claude --chrome` |
|
||||
| `--effort` | 设置推理强度 | `claude --effort high` |
|
||||
| `--init` / `--init-only` | 运行初始化 hooks | `claude --init` |
|
||||
@@ -638,3 +639,10 @@ claude --working-directory ./backend --mcp-config ./mcp.json
|
||||
- [Slash Commands 中文参考](../01-slash-commands/README.md)
|
||||
- [MCP 文档](../05-mcp/README.md)
|
||||
- [Claude Code 官方 CLI 文档](https://code.claude.com/docs/en/cli-reference)
|
||||
|
||||
---
|
||||
|
||||
**最后更新**: 2026 年 9 月 2 日
|
||||
**Claude Code 版本**: 2.1.257
|
||||
**来源**:
|
||||
- https://code.claude.com/docs/en/cli-reference
|
||||
|
||||
+15
-5
@@ -20,9 +20,9 @@
|
||||
| **Skills** | 10 个内置 | 6 | 16 | [03-skills/README.md](03-skills/README.md) |
|
||||
| **Plugins** | - | 3 | 3 | [07-plugins/README.md](07-plugins/README.md) |
|
||||
| **MCP Servers** | 1 | 0 | 1 | [05-mcp/README.md](05-mcp/README.md) |
|
||||
| **Hooks** | 31 个事件 | 0 | 31 | [06-hooks/README.md](06-hooks/README.md) |
|
||||
| **Hooks** | 33 个事件 | 0 | 33 | [06-hooks/README.md](06-hooks/README.md) |
|
||||
| **Memory** | 7 种类型 | 3 | 10 | [02-memory/README.md](02-memory/README.md) |
|
||||
| **总计** | **115** | **28** | **143** | |
|
||||
| **总计** | **117** | **28** | **145** | |
|
||||
|
||||
---
|
||||
|
||||
@@ -277,7 +277,7 @@ cp -r 03-skills/* ~/.claude/skills/
|
||||
/plugin list # 列出已安装的 plugins
|
||||
/plugin install <name> # 安装 plugin
|
||||
/plugin remove <name> # 移除 plugin
|
||||
/plugin update <name> # 更新 plugin
|
||||
claude plugin update <name> # 更新 plugin(CLI;/plugin update 斜杠命令形式仅在正文中被提及,命令参考中并无该条目)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -336,13 +336,18 @@ export GITHUB_TOKEN="your_token" && claude mcp add github -- npx -y @modelcontex
|
||||
| 事件 | 说明 | 触发时机 | 使用场景 |
|
||||
|-------|-------------|----------------|-----------|
|
||||
| `SessionStart` | 会话开始/恢复 | 会话初始化 | 初始化任务 |
|
||||
| `Setup` | 初始环境搭建(每个会话一次) | 会话首次启动 | 准备工具链、安装依赖 |
|
||||
| `InstructionsLoaded` | 指令已加载 | `CLAUDE.md` 或规则文件加载 | 自定义指令处理 |
|
||||
| `UserPromptSubmit` | 提示词提交前 | 用户发送消息 | 输入校验 |
|
||||
| `UserPromptExpansion` | 提示词被展开(@提及、斜杠命令解析) | 展开后、提交前 | 转换或检查展开后的提示词 |
|
||||
| `PreToolUse` | 工具执行前 | 任意工具运行之前 | 校验、日志 |
|
||||
| `PermissionRequest` | 显示权限对话框 | 敏感操作前 | 自定义审批流程 |
|
||||
| `PermissionDenied` | 用户拒绝权限请求 | 权限被拒绝后 | 日志、分析、策略执行 |
|
||||
| `PostToolUse` | 工具成功后 | 任意工具完成后 | 格式化、通知 |
|
||||
| `PostToolUseFailure` | 工具执行失败 | 工具报错后 | 错误处理、日志 |
|
||||
| `PostToolBatch` | 一批工具调用完成后 | 工具批次结束 | 汇总报告、批量校验 |
|
||||
| `Notification` | 发送通知时 | Claude 发送通知 | 外部提醒 |
|
||||
| `MessageDisplay` | 助手消息文本显示时 | 消息渲染过程中 | 转换或隐藏显示文本 |
|
||||
| `SubagentStart` | 启动 subagent | subagent 任务开始 | 初始化上下文 |
|
||||
| `SubagentStop` | subagent 完成 | subagent 任务结束 | 链式动作 |
|
||||
| `Stop` | Claude 完成响应 | 响应完成 | 清理、汇报 |
|
||||
@@ -352,9 +357,12 @@ export GITHUB_TOKEN="your_token" && claude mcp add github -- npx -y @modelcontex
|
||||
| `TaskCreated` | 通过 TaskCreate 创建任务(仅在启用 todo 工具时触发 —— 在 Opus 4.8、Sonnet 5、Fable 5、Mythos 5 及更新模型上默认关闭;`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复) | 新任务创建 | 任务追踪、日志 |
|
||||
| `ConfigChange` | 配置更新 | 设置被修改 | 响应配置变化 |
|
||||
| `CwdChanged` | 当前工作目录变化 | 目录切换 | 目录级初始化 |
|
||||
| `DirectoryAdded` | 会话中注册了新的工作目录 | `/add-dir` 或 SDK `register_repo_root` | 为新目录配置工具链 |
|
||||
| `FileChanged` | 监控文件发生变化 | 文件被修改 | 文件监控、重建 |
|
||||
| `PreCompact` | 压缩前 | 上下文压缩前 | 状态保留 |
|
||||
| `PostCompact` | 压缩完成后 | 压缩完成 | 压缩后动作 |
|
||||
| `PreModelSwitch` | 应用模型切换之前 | 请求切换模型时 | 拦截或否决模型变更 |
|
||||
| `PostModelSwitch` | 会话模型变更之后 | 模型切换完成 | 记录或响应模型变更 |
|
||||
| `WorktreeCreate` | worktree 创建中 | git worktree 创建 | 设置 worktree 环境 |
|
||||
| `WorktreeRemove` | worktree 被移除 | git worktree 删除 | 清理 worktree 资源 |
|
||||
| `Elicitation` | MCP server 请求输入 | MCP elicitation | 输入校验 |
|
||||
@@ -523,8 +531,10 @@ claude mcp add github -- npx -y @modelcontextprotocol/server-github
|
||||
|
||||
---
|
||||
|
||||
**最后更新**: 2026 年 8 月 15 日
|
||||
**Claude Code 版本**: 2.1.233
|
||||
**最后更新**: 2026 年 9 月 2 日
|
||||
**Claude Code 版本**: 2.1.257
|
||||
**来源**:
|
||||
- https://code.claude.com/docs/en/commands
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
- https://code.claude.com/docs/en/plugins-reference
|
||||
- https://code.claude.com/docs/en/discover-plugins
|
||||
|
||||
+2
-2
@@ -216,11 +216,11 @@ blog-draft/
|
||||
|
||||
**Hook 类型**(5 种):`command`、`http`、`prompt`、`mcp_tool`、`agent` — 决定 hook 如何运行。
|
||||
|
||||
**Hook 事件**(31 个,分 4 类)— 决定 hook 何时运行:
|
||||
**Hook 事件**(33 个,分 4 类)— 决定 hook 何时运行:
|
||||
- 工具 Hook:`PreToolUse`、`PostToolUse`、`PostToolUseFailure`、`PostToolBatch`、`PermissionRequest`、`PermissionDenied`
|
||||
- 会话 Hook:`SessionStart`、`Setup`、`SessionEnd`、`Stop`、`StopFailure`、`SubagentStart`、`SubagentStop`
|
||||
- 任务 Hook:`UserPromptSubmit`、`UserPromptExpansion`、`MessageDisplay`、`TaskCompleted`、`TaskCreated`、`TeammateIdle`(TaskCompleted/TaskCreated 仅在启用 todo 工具时触发 —— 在 Opus 4.8、Sonnet 5、Fable 5、Mythos 5 及更新模型上默认关闭;`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复)
|
||||
- 生命周期 Hook:`ConfigChange`、`CwdChanged`、`DirectoryAdded`、`FileChanged`、`PreCompact`、`PostCompact`、`WorktreeCreate`、`WorktreeRemove`、`Notification`、`InstructionsLoaded`、`Elicitation`、`ElicitationResult`
|
||||
- 生命周期 Hook:`ConfigChange`、`CwdChanged`、`DirectoryAdded`、`FileChanged`、`PreCompact`、`PostCompact`、`PreModelSwitch`、`PostModelSwitch`、`WorktreeCreate`、`WorktreeRemove`、`Notification`、`InstructionsLoaded`、`Elicitation`、`ElicitationResult`
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ graph TD
|
||||
| **3** | [Checkpoints](08-checkpoints/README.md) | ⭐⭐ Intermediate | 45 分钟 | Level 1 | 会话管理 | 安全探索 | 试验、恢复 |
|
||||
| **4** | [CLI Basics](10-cli/README.md) | ⭐⭐ Beginner+ | 30 分钟 | Level 1 | 无 | 核心 CLI 用法 | 交互式与 print mode |
|
||||
| **5** | [Skills](03-skills/README.md) | ⭐⭐ Intermediate | 1 小时 | Level 2 | Slash Commands | 自动化专业能力 | 可复用能力、一致性 |
|
||||
| **6** | [Hooks](06-hooks/README.md) | ⭐⭐ Intermediate | 1 小时 | Level 2 | 工具、命令 | 工作流自动化(31 个事件、5 种类型) | 校验、质量门禁 |
|
||||
| **6** | [Hooks](06-hooks/README.md) | ⭐⭐ Intermediate | 1 小时 | Level 2 | 工具、命令 | 工作流自动化(33 个事件、5 种类型) | 校验、质量门禁 |
|
||||
| **7** | [MCP](05-mcp/README.md) | ⭐⭐⭐ Intermediate+ | 1 小时 | Level 2 | 配置 | 实时数据访问 | 实时集成、API |
|
||||
| **8** | [Subagents](04-subagents/README.md) | ⭐⭐⭐ Intermediate+ | 1.5 小时 | Level 2 | Memory、命令 | 处理复杂任务(包含 Bash 在内的 6 个内置 agent) | 委派、专业分工 |
|
||||
| **9** | [Advanced Features](09-advanced-features/README.md) | ⭐⭐⭐⭐⭐ Advanced | 2-3 小时 | Level 3 | 前面所有内容 | 高阶工具 | Planning、自动模式(Auto Mode)、通道(Channels)、语音输入、权限控制 |
|
||||
@@ -238,7 +238,7 @@ cat error.log | claude -p "explain this error"
|
||||
|
||||
#### 你将完成什么
|
||||
✅ 通过 YAML frontmatter 自动触发专门能力(包含 `effort` 和 `shell` 字段)
|
||||
✅ 在 25 个 hook 事件上设置事件驱动自动化
|
||||
✅ 在 33 个 hook 事件上设置事件驱动自动化
|
||||
✅ 使用 4 种 hook 类型(command、http、prompt、agent)
|
||||
✅ 强制执行代码质量标准
|
||||
✅ 为自己的工作流创建自定义 hooks
|
||||
@@ -716,7 +716,10 @@ done
|
||||
|
||||
---
|
||||
|
||||
**最后更新**:2026 年 3 月
|
||||
**最后更新**:2026 年 9 月 2 日
|
||||
**Claude Code 版本**:2.1.257
|
||||
**来源**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
**维护者**:Claude How-To Contributors
|
||||
**许可证**:仅供学习与参考,免费使用和改编
|
||||
|
||||
|
||||
+12
-5
@@ -118,7 +118,7 @@ claude -r "session" # 按名称/ID 恢复会话
|
||||
| **Skills** | `.claude/skills/*/SKILL.md` | 自动触发 |
|
||||
| **Subagents** | `.claude/agents/*.md` | 自动委派 |
|
||||
| **MCP** | `.mcp.json`(项目)或 `~/.claude.json`(用户) | `/mcp__server__action` |
|
||||
| **Hooks(31 个事件)** | `~/.claude/hooks/*.sh` | 事件触发(5 类) |
|
||||
| **Hooks(33 个事件)** | `~/.claude/hooks/*.sh` | 事件触发(5 类) |
|
||||
| **Plugins** | 通过 `/plugin install` | 打包所有能力 |
|
||||
| **Checkpoints** | 内置 | `Esc+Esc` 或 `/rewind` |
|
||||
| **Planning Mode** | 内置 | `/plan <task>` |
|
||||
@@ -189,7 +189,7 @@ vim CLAUDE.md
|
||||
|
||||
### 自动化与 Hooks
|
||||
```bash
|
||||
# 安装 hooks(31 个事件,5 类:command、http、mcp_tool、prompt、agent)
|
||||
# 安装 hooks(33 个事件,5 类:command、http、mcp_tool、prompt、agent)
|
||||
mkdir -p ~/.claude/hooks
|
||||
cp 06-hooks/*.sh ~/.claude/hooks/
|
||||
chmod +x ~/.claude/hooks/*.sh
|
||||
@@ -389,7 +389,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Auto Mode** | 通过后台分类器实现完全自治 | `--enable-auto-mode` 参数,`Shift+Tab` 切换模式 |
|
||||
| **Channels** | Discord 和 Telegram 集成 | `--channels` 参数,Discord / Telegram bot |
|
||||
| **Voice Dictation** | 对 Claude 说出命令和上下文 | `/voice` 命令 |
|
||||
| **Hooks(31 个事件)** | 扩展后的 hook 系统,包含 5 类 | command、http、mcp_tool、prompt、agent hook 类型 |
|
||||
| **Hooks(33 个事件)** | 扩展后的 hook 系统,包含 5 类 | command、http、mcp_tool、prompt、agent hook 类型 |
|
||||
| **MCP Elicitation** | MCP server 可在运行时请求用户输入 | 当 server 需要澄清时自动提示 |
|
||||
| **WebSocket MCP** | MCP 的 WebSocket 传输 | 在 `.mcp.json` 中配置 `ws://` URL |
|
||||
| **Plugin LSP** | 插件支持 Language Server Protocol | `userConfig`、`${CLAUDE_PLUGIN_DATA}` 变量 |
|
||||
@@ -399,7 +399,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
| **Task List** | 管理后台任务 | `/task list`、`/task status <id>` |
|
||||
| **Auto Memory** | 从对话中自动保存记忆 | Claude 会自动保存关键上下文到 `CLAUDE.md` |
|
||||
| **Git Worktrees** | 用于并行开发的隔离工作区 | 使用 `/worktree` 创建隔离空间 |
|
||||
| **Model Selection** | 在 Sonnet 4.6 和 Opus 4.6 之间切换 | `/model` 或 `--model` 参数 |
|
||||
| **Model Selection** | 在 Fable 5.1、Fable 5、Opus 5、Sonnet 5、Sonnet 4.6、Opus 4.8 和 Haiku 4.5 之间切换 | `/model` 或 `--model` 参数 |
|
||||
| **Agent Teams** | 协调多个 agent 执行任务 | 通过环境变量 `CLAUDE_AGENT_TEAMS=1` 启用 |
|
||||
| **Scheduled Tasks** | 使用 `/loop` 运行周期任务 | `/loop 5m /command` 或 CronCreate 工具 |
|
||||
| **Chrome Integration** | 浏览器自动化 | `--chrome` 参数或 `/chrome` 命令 |
|
||||
@@ -445,7 +445,7 @@ echo $GITHUB_TOKEN
|
||||
| 自动化工作流 | Skill | `03-skills/code-review-specialist/` |
|
||||
| 专门任务 | Subagent | `04-subagents/code-reviewer.md` |
|
||||
| 外部数据 | MCP(+ Elicitation、WebSocket) | `05-mcp/github-mcp.json` |
|
||||
| 事件自动化 | Hook(31 个事件、5 类) | `06-hooks/pre-commit.sh` |
|
||||
| 事件自动化 | Hook(33 个事件、5 类) | `06-hooks/pre-commit.sh` |
|
||||
| 完整方案 | Plugin(+ LSP 支持) | `07-plugins/pr-review/` |
|
||||
| 安全实验 | Checkpoint | `08-checkpoints/checkpoint-examples.md` |
|
||||
| 完全自治 | Auto Mode | `--enable-auto-mode` 或 `Shift+Tab` |
|
||||
@@ -504,3 +504,10 @@ echo $GITHUB_TOKEN
|
||||
**完整索引**:`cat INDEX.md`
|
||||
|
||||
**这张卡片**:建议随手保留,方便快速查阅!
|
||||
|
||||
---
|
||||
|
||||
**最后更新**:2026 年 9 月 2 日
|
||||
**Claude Code 版本**:2.1.257
|
||||
**来源**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
|
||||
+7
-6
@@ -206,7 +206,7 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
|
||||
完整路径大约需要 11 到 13 小时。但你在 15 分钟内就能获得直接收益,只要复制一个 slash command 模板并试用即可。
|
||||
|
||||
**我可以搭配 Claude Sonnet / Haiku / Opus 使用吗?**
|
||||
可以。所有模板都适用于 Claude Sonnet 4.6、Claude Opus 4.6 和 Claude Haiku 4.5。
|
||||
可以。所有模板都适用于 Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5。
|
||||
|
||||
**我可以参与贡献吗?**
|
||||
当然可以。请查看 [CONTRIBUTING.md](CONTRIBUTING.md) 了解贡献规范。我们欢迎新的示例、bug 修复、文档改进以及社区模板。
|
||||
@@ -480,11 +480,11 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
|
||||
**Hook 类型**(5 种):`command`、`http`、`prompt`、`mcp_tool`、`agent` — 决定 hook 如何运行。
|
||||
|
||||
**Hook 事件**(31 个,分 4 类)— 决定 hook 何时运行:
|
||||
**Hook 事件**(33 个,分 4 类)— 决定 hook 何时运行:
|
||||
- **工具 Hook**: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PostToolBatch`, `PermissionRequest`, `PermissionDenied`
|
||||
- **会话 Hook**: `SessionStart`, `Setup`, `SessionEnd`, `Stop`, `StopFailure`, `SubagentStart`, `SubagentStop`
|
||||
- **任务 Hook**: `UserPromptSubmit`, `UserPromptExpansion`, `MessageDisplay`, `TaskCompleted`, `TaskCreated`, `TeammateIdle`(`TaskCompleted` 和 `TaskCreated` 仅在启用 todo 工具时触发 —— 在 Opus 4.8、Sonnet 5、Fable 5、Mythos 5 及更新模型上默认关闭;`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复)
|
||||
- **生命周期 Hook**: `ConfigChange`, `CwdChanged`, `DirectoryAdded`, `FileChanged`, `PreCompact`, `PostCompact`, `WorktreeCreate`, `WorktreeRemove`, `Notification`, `InstructionsLoaded`, `Elicitation`, `ElicitationResult`
|
||||
- **生命周期 Hook**: `ConfigChange`, `CwdChanged`, `DirectoryAdded`, `FileChanged`, `PreCompact`, `PostCompact`, `PreModelSwitch`, `PostModelSwitch`, `WorktreeCreate`, `WorktreeRemove`, `Notification`, `InstructionsLoaded`, `Elicitation`, `ElicitationResult`
|
||||
|
||||
</details>
|
||||
|
||||
@@ -878,8 +878,9 @@ MIT 许可证,详见 [LICENSE](LICENSE)。你可以自由使用、修改和分
|
||||
|
||||
---
|
||||
|
||||
**最后更新**:2026 年 8 月 25 日
|
||||
**Claude Code 版本**:2.1.245
|
||||
**最后更新**:2026 年 9 月 2 日
|
||||
**Claude Code 版本**:2.1.257
|
||||
**来源**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
**兼容模型**:Claude Sonnet 4.6、Claude Opus 4.6、Claude Haiku 4.5
|
||||
- https://code.claude.com/docs/en/model-config
|
||||
**兼容模型**:Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5
|
||||
|
||||
@@ -1303,7 +1303,7 @@ Hooks 是事件驱动的 shell 命令,会在 Claude Code 的特定事件发生
|
||||
|
||||
### Hook 事件
|
||||
|
||||
Claude Code 支持 **25 个 hook 事件**,分布在四类钩子中:
|
||||
Claude Code 支持 **33 个 hook 事件**,分布在四类钩子中:
|
||||
|
||||
| Hook 事件 | 触发时机 | 常见用途 |
|
||||
|-----------|----------|----------|
|
||||
@@ -1533,6 +1533,10 @@ claude -r "Feature"
|
||||
|
||||
---
|
||||
|
||||
*最后更新:2026 年 3 月*
|
||||
*适用于 Claude Haiku 4.5、Sonnet 4.6、Opus 4.6*
|
||||
*适用于 Claude Fable 5、Claude Opus 5、Claude Sonnet 5、Claude Sonnet 4.6、Claude Opus 4.8、Claude Haiku 4.5*
|
||||
*现已覆盖:Hooks、Checkpoints、Planning Mode、Extended Thinking、Background Tasks、Permission Modes、Headless Mode、Session Management、Auto Memory、Agent Teams、Scheduled Tasks、Chrome Integration、Bundled Skills 等概念。*
|
||||
|
||||
**最后更新**:2026 年 9 月 2 日
|
||||
**Claude Code 版本**:2.1.257
|
||||
**来源**:
|
||||
- https://code.claude.com/docs/en/hooks
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@ graph TD
|
||||
| **Extended Thinking** | 通过 `Alt+T` / `Option+T` 或 `MAX_THINKING_TOKENS` 环境变量切换深度推理 | [高级功能](09-advanced-features/README.md) |
|
||||
| **Permission Modes** | 精细权限控制:default、acceptEdits、plan、auto、dontAsk、bypassPermissions | [高级功能](09-advanced-features/README.md) |
|
||||
| **7-Tier Memory** | Managed Policy、Project、Project Rules、User、User Rules、Local、Auto Memory | [记忆指南](02-memory/README.md) |
|
||||
| **Hook Events** | 31 个事件:PreToolUse、PostToolUse、PostToolUseFailure、Stop、StopFailure、SubagentStart、SubagentStop、Notification、Elicitation 等 | [Hooks 指南](06-hooks/README.md) |
|
||||
| **Hook Events** | 33 个事件:PreToolUse、PostToolUse、PostToolUseFailure、Stop、StopFailure、SubagentStart、SubagentStop、Notification、Elicitation 等 | [Hooks 指南](06-hooks/README.md) |
|
||||
| **Agent Teams** | 协调多个 agent 共同处理复杂任务 | [Subagents 指南](04-subagents/README.md) |
|
||||
| **Scheduled Tasks** | 用 `/loop` 和 cron 工具设置周期性任务 | [高级功能](09-advanced-features/README.md) |
|
||||
| **Chrome Integration** | 使用无头 Chromium 做浏览器自动化 | [高级功能](09-advanced-features/README.md) |
|
||||
|
||||
Reference in New Issue
Block a user