docs: sync to Claude Code v2.1.278 (#183)

* docs: sync to Claude Code v2.1.278

Type: docs

Audit of the tutorial against Claude Code 2.1.278 (repo baseline was
2.1.263). Fixes claims the repo asserts that are now false; new-feature
coverage is English-only.

P0 - the repo stated the opposite of current behavior:
- AGENTS.md: the claude-md skill said Claude Code "does not read
  AGENTS.md directly" in all 5 languages. It has since v2.1.277, when no
  CLAUDE.md exists at or above the working directory.
- /output-style: listed as "Removed in v2.1.91" in 5 languages and in
  09-advanced-features. Re-added in v2.1.269; row moved out of the
  Deprecated Commands table.
- Permission rules: setup-auto-mode-permissions.py seeded Write(*),
  Glob(*) and NotebookEdit(*), which Claude Code accepts but never
  consults and warns about at startup. Removed; same fix in the
  config-examples.json profile and the 06/09 category tables.
- taskOutputMaxChars: documented as live. The TaskOutput tool was
  removed in v2.1.278 and the key is inert.

P1:
- Dynamic workflow "medium" guideline is fewer than 10 agents, not 15;
  the default is small on Pro plans since v2.1.271.
- Todo-tool availability restated as the official allowlist (Claude 3.x,
  Opus 4-4.7, Sonnet 4-4.6, Haiku 4.5) instead of a denylist; 23 sites
  across 5 languages.
- Memory hierarchy now notes the AGENTS.md fallback.
- Auto-mode classifier cost qualified: not charged on Enterprise plans
  and Claude API accounts since v2.1.278.

P3 (English only): full AGENTS.md section in 02-memory; omitClaudeMd
subagent field; plugin eval / --json / --accept-command / --marketplace;
maxEffortLevel, bashEditDiffEnabled, syncClaudeAi*, 4 env vars,
--system-prompt-snapshot, --plugin-dir folders; send-now key and Monitor
deadlines; checkpoints subagent-edit limitation.

Learning skills audited clean: 100 quiz questions and 100 Review
pointers all valid, 20 self-assessment options correctly mapped.

Cross-file anchors: 15 broken before, 15 after, 0 introduced.

* docs: address review — stale version stamps, /output-style re-add, permission tables
This commit is contained in:
Luong NGUYEN
2026-09-20 01:15:34 +02:00
committed by GitHub
parent 97bfb0685e
commit 8aeb5a72dc
49 changed files with 356 additions and 198 deletions
+5 -4
View File
@@ -66,6 +66,7 @@ Built-in commands are shortcuts for common actions. There are **60+ built-in com
| `/memory` | Edit `CLAUDE.md`, toggle auto-memory |
| `/mobile` | QR code for mobile app (aliases: `/ios`, `/android`) |
| `/model [model]` | Select model with left/right arrows for effort. Since v2.1.153, the choice is **saved as the default** for new sessions (matching the IDE); press `s` after selecting to apply it to the current session only. (The keybinding `modelPicker:setAsDefault` was renamed to `modelPicker:thisSessionOnly`; the old `d` action is now `s`.) As of v2.1.219, the picker shows the merged Opus row as "Opus (1M context)". |
| `/output-style [name]` | List and switch output styles (re-added in v2.1.269 after being removed in v2.1.91). With no argument it lists the styles and marks the current one. Works in headless and Remote Control sessions; the selection is saved to `.claude/settings.local.json` |
| `/passes` | Share free week of Claude Code |
| `/permissions` | View/update permissions (alias: `/allowed-tools`) |
| `/plan [description]` | Enter plan mode |
@@ -126,7 +127,6 @@ These skills ship with Claude Code and are invoked like slash commands:
| Command | Status |
|---------|--------|
| `/output-style` | Removed in v2.1.91 (deprecated v2.1.73) — use `/config` → Output style, or the `outputStyle` setting |
| `/pr-comments` | Removed in v2.1.91 — ask Claude directly to view PR comments |
| `/vim` | Removed in v2.1.92 — use /config → Editor mode |
| `/undo` | No longer listed in the official commands reference as of v2.1.245 (it was added as an alias for `/rewind` in v2.1.108) — use `/rewind` or press `Esc` twice |
@@ -135,7 +135,7 @@ These skills ship with Claude Code and are invoked like slash commands:
- `/fork` and `/subtask` swapped roles in **v2.1.212**. `/fork` now copies the conversation into a new independent background session; the forked-subagent behavior it used to have moved to the new `/subtask` command. History: `/fork` was an alias for `/branch` from v2.1.77 to v2.1.161; from v2.1.161 to v2.1.211 it started a forked subagent (what `/subtask` does now). When agent view is turned off, `/subtask` is unavailable and `/fork` keeps the forked-subagent behavior
- `/resume` (no arguments) opens a picker of past sessions — including ones removed from the visible list — and resumes the chosen one as a background session (v2.1.212)
- `/output-style` deprecated (v2.1.73) and removed (v2.1.91) — output styles are still available via `/config` → Output style or the `outputStyle` setting; the built-ins are Default, Proactive, Explanatory, Learning, and Concise (added in v2.1.237)
- `/output-style` was deprecated (v2.1.73) and removed (v2.1.91), then **re-added in v2.1.269** — it is a live command again in v2.1.278, and works in headless and Remote Control sessions. Output styles also remain available via `/config` → Output style or the `outputStyle` setting; the built-ins are Default, Proactive, Explanatory, Learning, and Concise (added in v2.1.237)
- `/review` became a full alias of `/code-review` — same targets, effort levels, and flags (v2.1.223). History: it first moved onto the `/code-review medium` engine in v2.1.186 while remaining PR-only
- `/effort` command added; `max` level available on Opus 4.6+ (originally Opus 4.6-only)
- `/voice` command added for push-to-talk voice dictation
@@ -650,9 +650,10 @@ If both exist with the same name, the **skill takes precedence**. Remove one or
---
**Last Updated**: September 6, 2026
**Claude Code Version**: 2.1.263
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/output-styles
- https://code.claude.com/docs/en/skills
- https://code.claude.com/docs/en/slash-commands
- https://code.claude.com/docs/en/interactive-mode
+55 -3
View File
@@ -219,7 +219,7 @@ Claude Code has two complementary memory systems, both loaded at the start of ev
|-------|----------|---------|
| Managed policy | macOS: `/Library/Application Support/ClaudeCode/CLAUDE.md`<br>Linux/WSL: `/etc/claude-code/CLAUDE.md`<br>Windows: `C:\Program Files\ClaudeCode\CLAUDE.md` | Organization-wide instructions managed by IT/DevOps. Cannot be excluded by individual settings. |
| User instructions | `~/.claude/CLAUDE.md` | Personal preferences for all projects |
| Project instructions | `./CLAUDE.md` or `./.claude/CLAUDE.md` | Team-shared instructions, version controlled |
| Project instructions | `./CLAUDE.md` or `./.claude/CLAUDE.md` | Team-shared instructions, version controlled. Since v2.1.277, `./AGENTS.md` loads at this same tier instead, when no `CLAUDE.md` or `CLAUDE.local.md` exists at or above the working directory — controlled by **Project instructions** in `/config` |
| Local instructions | `./CLAUDE.local.md` | Personal project-specific preferences; add to `.gitignore` |
Within the directory tree, Claude Code walks up from your working directory: `foo/CLAUDE.md` loads before `foo/bar/CLAUDE.md` if you launch from `foo/bar/`, so instructions closer to where you launched are read *last* — not "highest priority" in an override sense, just most recent in context. Within each directory, `CLAUDE.local.md` is appended after `CLAUDE.md`. CLAUDE.md and CLAUDE.local.md files in subdirectories *under* your working directory load on demand, when Claude reads files in those subdirectories, rather than at launch.
@@ -253,6 +253,57 @@ graph TD
All files shown are concatenated into one context, not selected by override — later boxes appear later in context, not "instead of" earlier ones.
## AGENTS.md
`AGENTS.md` is a cross-tool project-context file: the same *category* of document as CLAUDE.md, written so that several coding agents can share one set of project conventions. Since **v2.1.277**, Claude Code reads it directly as project instructions rather than requiring you to import it.
**Default behavior** (`claude-md-or-agents-md`):
| What the project contains | What Claude Code reads |
|---------------------------|------------------------|
| `AGENTS.md`, no `CLAUDE.md` | `AGENTS.md` |
| Both `AGENTS.md` and `CLAUDE.md` | `CLAUDE.md` only |
| A `CLAUDE.md` that imports `AGENTS.md` with `@AGENTS.md` | `CLAUDE.md`, with the import expanded |
**Which files suppress AGENTS.md.** Claude Code checks the working directory and every directory above it for `CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md`. If it finds any of them, `AGENTS.md` is not read. `~/.claude/CLAUDE.md`, managed CLAUDE.md, and `.claude/rules/` do **not** count for this check and keep loading alongside whichever project file wins.
> **Warning**: adding a `CLAUDE.local.md` silently stops `AGENTS.md` being read. If your project instructions seem to vanish after you create a local override, this is usually why.
**What gets read.** Every `AGENTS.md` and `.claude/AGENTS.md` at and above the working directory loads at session start; files in subdirectories load on demand, when Claude reads files there. `@path` imports expand the same way they do in CLAUDE.md, and `claudeMdExcludes` applies.
**What is never read**: `AGENTS.local.md`, `AGENTS.override.md`, and anything under `.agents/`.
**Choosing the behavior.** The **Project instructions** setting takes four values:
| Value | Effect |
|-------|--------|
| `claude-md-or-agents-md` | Default — `AGENTS.md` only when no CLAUDE.md file is found |
| `claude-md-and-agents-md` | Both are read when both exist |
| `claude-md` | Only CLAUDE.md files; `AGENTS.md` is ignored |
| `managed-only` | Only managed policy instructions |
Set it through `/config`, or in settings:
```jsonc
{
"pluginConfigs": {
"agents-md@builtin": {
"options": {
"instructionFiles": "claude-md-and-agents-md"
}
}
}
}
```
This key is honored in user and managed settings only — setting it in project or local settings has no effect.
**Where direct reading is unavailable.** On versions before v2.1.277, on Bedrock/Vertex/Foundry, with telemetry disabled, during the first session after upgrading, under `disableAllHooks` or `allowManagedHooksOnly`, or with the built-in `agents-md` plugin disabled, Claude Code will not pick up `AGENTS.md` on its own. In those cases, import it from CLAUDE.md:
```markdown
@AGENTS.md
```
## Excluding CLAUDE.md Files with `claudeMdExcludes`
In large monorepos, some CLAUDE.md files may be irrelevant to your current work. The `claudeMdExcludes` setting lets you skip specific CLAUDE.md files so they are not loaded into context:
@@ -1193,8 +1244,9 @@ Auto Memory is a separate mechanism (`~/.claude/projects/<project>/memory/`), no
---
**Last Updated**: August 25, 2026
**Claude Code Version**: 2.1.245
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/memory
- https://code.claude.com/docs/en/memory#agents-md
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
+4 -3
View File
@@ -193,7 +193,7 @@ Before finalizing, verify:
If the user requests AGENTS.md creation/update:
**Claude Code does not read AGENTS.md directly.** To make it take effect, import it from CLAUDE.md with `@AGENTS.md`, or symlink `CLAUDE.md` to it. This is the single most common misunderstanding about the file.
**Since v2.1.277, Claude Code reads `AGENTS.md` directly as project instructions** — but only when the working directory and every directory above it contain no `CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md`. `~/.claude/CLAUDE.md`, managed CLAUDE.md, and `.claude/rules/` do not count for that check and keep loading alongside. Which files are read is controlled by **Project instructions** in `/config`: `claude-md-or-agents-md` (default), `claude-md-and-agents-md`, `claude-md`, or `managed-only`. Where direct reading is unavailable — Bedrock/Vertex/Foundry, telemetry disabled, the first session after upgrading, or `disableAllHooks`/`allowManagedHooksOnly` — fall back to importing it from CLAUDE.md with `@AGENTS.md`, or symlinking `CLAUDE.md` to it.
AGENTS.md is a cross-tool project-context file — the same *category* of document as CLAUDE.md, not an agent-definition format. It exists so several coding agents can share one set of project conventions:
- Build, test, and lint commands
@@ -217,8 +217,9 @@ Apply similar principles:
---
**Last Updated**: August 4, 2026
**Claude Code Version**: 2.1.220
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/skills
- https://code.claude.com/docs/en/memory#agents-md
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
+3 -2
View File
@@ -144,6 +144,7 @@ to solving problems.
| `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"` |
| `omitClaudeMd` | No | Set to `true` to launch the subagent without the user, project, and local CLAUDE.md files (v2.1.271+). Managed policy files still load, except for managed subagents. Ignored when the agent runs as the main session agent via `--agent` or the `agent` setting. Also accepted in `--agents` JSON |
#### Subagent Model Environment Variables
@@ -1331,8 +1332,8 @@ See the OpenTelemetry section in [Advanced Features → Telemetry](../09-advance
---
**Last Updated**: September 6, 2026
**Claude Code Version**: 2.1.263
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/sub-agents
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
+13 -10
View File
@@ -285,10 +285,10 @@ Claude Code supports **33 hook events**:
> **`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,
> and newer models**. On those models the hooks are still valid configuration but simply
> never fire — you get no output and no error. Set `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` to
> bring the tools, and therefore the events, back.
> `TodoWrite`), which are **available by default only on Claude 3.x models, Opus 4 through
> 4.7, Sonnet 4 through 4.6, and Haiku 4.5**. On other models the hooks are still valid
> configuration but simply never fire — you get no output and no error. Set
> `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` to bring the tools, and therefore the events, back.
> **PostToolUse duration (v2.1.119):** `PostToolUse` and `PostToolUseFailure` hook inputs now include `duration_ms` — see the [PostToolUse](#posttooluse) section for details.
@@ -1205,7 +1205,7 @@ if __name__ == "__main__":
### Example 7: Seed Auto-Mode Permissions (One-Time Setup Script)
A one-time setup script that seeds `~/.claude/settings.json` with ~67 safe permission rules equivalent to Claude Code's auto-mode baseline — without any hook, without remembering future choices. Run it once; safe to re-run (skips rules already present).
A one-time setup script that seeds `~/.claude/settings.json` with safe permission rules equivalent to Claude Code's auto-mode baseline — 37 by default, up to 63 with every category flag enabled — without any hook, without remembering future choices. Run it once; safe to re-run (skips rules already present).
**File:** `09-advanced-features/setup-auto-mode-permissions.py`
@@ -1221,12 +1221,13 @@ python3 09-advanced-features/setup-auto-mode-permissions.py
| Category | Examples |
|----------|---------|
| Built-in tools | `Read(*)`, `Edit(*)`, `Write(*)`, `Glob(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)` |
| Built-in tools | `Read(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)` |
| Optional edits (--include-edits) | `Edit(*)` |
| Git read | `Bash(git status:*)`, `Bash(git log:*)`, `Bash(git diff:*)` |
| Git write (local) | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git checkout:*)` |
| Package managers | `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(cargo build:*)` |
| Package managers | `Bash(npm ci:*)`, `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(pip3 install:*)` |
| Build & test | `Bash(make:*)`, `Bash(pytest:*)`, `Bash(go test:*)` |
| Common shell | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)`, `Bash(cp:*)`, `Bash(mv:*)` |
| Common shell | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)` |
| GitHub CLI | `Bash(gh pr view:*)`, `Bash(gh pr create:*)`, `Bash(gh issue list:*)` |
**What is intentionally excluded** (never added by this script):
@@ -1626,10 +1627,12 @@ Edit `~/.claude/settings.json` or `.claude/settings.json` with the hook configur
---
**Last Updated**: September 2, 2026
**Claude Code Version**: 2.1.257
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/hooks
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
- https://code.claude.com/docs/en/sub-agents
- https://code.claude.com/docs/en/permissions
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
**Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
+36 -2
View File
@@ -844,6 +844,40 @@ projected ctx: +1,420 tokens per turn · +9,800 tokens per /review invocation
LSP servers were added to the details pane in v2.1.142. See also the marketplace browse pane's projected context cost (v2.1.143) covered in [Plugin Marketplace](#plugin-marketplace).
### `claude plugin eval` (v2.1.269+)
`claude plugin eval` runs a plugin's eval suite and reports scored, reproducible results, so you can tell whether a change to a skill or agent actually improved it. Results come back as JSON plus an HTML report.
```bash
claude plugin eval # Run the plugin's eval suite
claude plugin eval --help # Full option list
```
### Machine-readable output with `--json` (v2.1.268+)
`--json` is accepted on `install`, `uninstall`, `update`, `enable`, and `disable`, which makes plugin management scriptable in CI. Each row of `claude plugin list --json` also carries `errorDetails` and `noteDetails`, so a failing plugin explains itself without a second command.
```bash
claude plugin install my-plugin@my-marketplace --json
claude plugin list --json
```
### Accepting an exact command with `--accept-command` (v2.1.271+)
`--accept-command <sha256>` on `install` and `update` accepts exactly the command a previous `--json` run displayed, in place of a blanket `-y`.
```bash
claude plugin install my-plugin@my-marketplace --accept-command <sha256>
```
### Installing from a marketplace you haven't added (v2.1.275+)
In a session, `/plugin install <plugin> --marketplace <source>` names the marketplace inline and offers to add it before installing, so discovering and adding a marketplace is no longer a separate step. This is the in-session slash-command form, not a `claude plugin` CLI flag.
```bash
/plugin install code-reviewer --marketplace anthropics/claude-code-plugins
```
## Installation Methods
### From Marketplace
@@ -1269,8 +1303,8 @@ The following Claude Code features work together with plugins:
---
**Last Updated**: September 6, 2026
**Claude Code Version**: 2.1.263
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/plugins
- https://code.claude.com/docs/en/plugins-reference
+3 -2
View File
@@ -246,6 +246,7 @@ Checkpoints have the following limitations:
- **Bash command changes NOT tracked** - Operations like `rm`, `mv`, `cp` on the filesystem are not captured in checkpoints
- **External changes NOT tracked** - Changes made outside Claude Code (in your editor, terminal, etc.) are not captured
- **Not a replacement for version control** - Use git for permanent, auditable changes to your codebase
- **Subagent edits NOT restored** - Files edited by a subagent are untracked, so `/rewind` leaves them as they are; the exception is a foreground `context: fork` skill, whose edits are restored like the main session's
> **v2.1.216 update**: `/rewind` no longer restores or deletes files through symlinks or hard links at tracked paths. If a tracked path resolves through a symlink or hard link, rewind skips it rather than following the link, and it reports how many paths it skipped for this reason.
@@ -336,8 +337,8 @@ Remember: checkpoints are not a replacement for git. Use checkpoints for rapid e
---
**Last Updated**: August 25, 2026
**Claude Code Version**: 2.1.245
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/checkpointing
- https://code.claude.com/docs/en/settings
+32 -14
View File
@@ -385,7 +385,7 @@ Auto mode is available only when your account meets all of these requirements:
- **Organization**: on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in managed settings.
- **Model**: on the Anthropic API and Claude Platform on AWS — Claude Opus 4.6 or later (Opus 5 included), Sonnet 4.6 or later, or Fable 5. On Amazon Bedrock, Google Cloud's Agent Platform (Vertex AI), Microsoft Foundry, and signed-in Claude apps gateway sessions — only Claude Sonnet 5, Opus 4.7 or later (Opus 5 included), and Fable 5. Older models — Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models — are not supported on any provider.
- **Provider**: available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud's Agent Platform (Vertex AI), Microsoft Foundry, and signed-in Claude apps gateway sessions. In v2.1.158 through v2.1.206, auto mode was off on all of these except the Anthropic API and Claude Platform on AWS until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
- **Classifier**: runs on Claude Sonnet 4.6 (adds extra token cost)
- **Classifier**: adds extra token cost, except on Enterprise plans and Claude API accounts, where v2.1.278+ runs the check server-side at no charge
### Enabling Auto Mode
@@ -559,15 +559,14 @@ The script adds rules across these categories:
| Category | Examples |
|----------|---------|
| Core read-only tools | `Read(*)`, `Glob(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)`, `WebFetch(*)` |
| Core read-only tools | `Read(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)`, `WebFetch(*)` |
| Local inspection | `Bash(git status:*)`, `Bash(git log:*)`, `Bash(git diff:*)`, `Bash(cat:*)` |
| Optional edits | `Edit(*)`, `Write(*)`, `NotebookEdit(*)` |
| Optional edits | `Edit(*)` |
| Optional test/build | `Bash(pytest:*)`, `Bash(python3 -m pytest:*)`, `Bash(cargo test:*)` |
| Optional git writes | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git stash:*)` |
| Git (local write) | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git checkout:*)` |
| Package managers | `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(cargo build:*)` |
| Optional git writes | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git checkout:*)`, `Bash(git switch:*)`, `Bash(git stash:*)`, `Bash(git tag:*)` |
| Package managers | `Bash(npm ci:*)`, `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(pip3 install:*)` |
| Build & test | `Bash(make:*)`, `Bash(pytest:*)`, `Bash(go test:*)` |
| Common shell | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)`, `Bash(cp:*)`, `Bash(mv:*)` |
| Common shell | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)` |
| GitHub CLI | `Bash(gh pr view:*)`, `Bash(gh pr create:*)`, `Bash(gh issue list:*)` |
Dangerous operations (`rm -rf`, `sudo`, force push, `DROP TABLE`, `terraform destroy`, etc.) are intentionally excluded. The script is idempotent — running it twice won't duplicate rules.
@@ -702,6 +701,8 @@ Concurrency is not a background-task setting either — how many agents run at o
Monitor attaches to any shell command that writes to stdout. Each stdout line from the command becomes a notification that wakes the session. Claude specifies the command; the harness streams output and delivers events as they fire. See the related [Background Tasks](#background-tasks) section for launching the underlying processes.
> **Deadlines (v2.1.271)**: every Monitor watch now carries a deadline — at most 30 minutes, or 10 minutes in single-prompt `-p` runs. When the deadline passes, Claude is notified so it can re-arm the watch. There is no longer a way to arm a watch that never times out.
### Why It Matters
Polling with `/loop` or `sleep` burns a full API round-trip every cycle, whether or not anything changed. Monitor stays silent until an event fires, consuming **zero tokens** while the command is quiet. When an event does occur, Claude reacts immediately — no delayed discovery waiting for the next poll tick. For anything that runs longer than a few minutes, this is both cheaper and faster than poll loops.
@@ -739,7 +740,7 @@ done
Dynamic workflows let Claude orchestrate tens to hundreds of background [subagents](../04-subagents/README.md) **deterministically** — fan-out, pipelines, and parallel stages encoded in a script rather than left to the model's improvisation. Where a single agent holds one context window, a workflow decomposes a task across many agents and recombines their results.
As of v2.1.219, dynamic workflows default to a **medium size guideline (aim for fewer than 15 agents)**. Pick another size — or unrestricted — via **Dynamic workflow size** in `/config`, or set the `workflowSizeGuideline` key in your settings file. The running-workflow status line shows the active size and points to `/config` for changing it.
As of v2.1.219, dynamic workflows default to a **medium size guideline (aim for fewer than 10 agents)** — or to **small** when you are signed in on a Pro plan, since v2.1.271. Pick another size — or unrestricted — via **Dynamic workflow size** in `/config`, or set the `workflowSizeGuideline` key in your settings file. The running-workflow status line shows the active size and points to `/config` for changing it.
### When to Use Them
@@ -1292,6 +1293,7 @@ Claude Code supports keyboard shortcuts for efficiency. Here's the complete refe
| `Option+T` / `Alt+T` | Toggle extended thinking |
| `Option+O` / `Alt+O` | Toggle fast mode (`/fast`) |
| `Ctrl+X` `Ctrl+K` | Stop all background subagents |
| `Ctrl+Enter` (or `Ctrl+X` `Ctrl+S`) | Send now — interrupt the current turn and send every queued message at once. Sent and queued messages stay gray until the model receives them (v2.1.275) |
| `Ctrl+S` | Stash the current prompt; press again to restore it |
| `Ctrl+_` | Undo the last edit to the prompt input |
| `:` | Type `:` at the start of a word to open emoji shortcode completion, e.g. `:heart:` (v2.1.217+) |
@@ -1534,7 +1536,7 @@ For instructions about your project or codebase, use [CLAUDE.md](../02-memory/)
### Selecting a style
Run `/config` and choose **Output style**. The selection is saved to `.claude/settings.local.json`. To set it without the menu, edit the setting directly:
Run `/config` and choose **Output style**, or run `/output-style <style>` to switch directly — with no argument it lists the available styles and marks the current one. Either way the selection is saved to `.claude/settings.local.json`. To set it without the menu, edit the setting directly:
```json
{
@@ -1542,7 +1544,7 @@ Run `/config` and choose **Output style**. The selection is saved to `.claude/se
}
```
> **Note**: The standalone `/output-style` command was deprecated in v2.1.73 and **removed in v2.1.91**. Use `/config` or the `outputStyle` setting.
> **Note**: The standalone `/output-style` command was deprecated in v2.1.73 and removed in v2.1.91, but it **returned in v2.1.269** and is live in v2.1.278. It works in headless and Remote Control sessions. `/config` and the `outputStyle` setting still work too.
Output style is part of the system prompt, which Claude Code reads once at session start — changes take effect after `/clear` or in a new session.
@@ -2424,7 +2426,10 @@ These keys go in `~/.claude/settings.json` (or a project `.claude/settings.json`
| `keybindingFlavor` | **Deprecated since v2.1.261 and has no effect.** The prompt's word-editing keys always follow readline conventions, as Bash does: `Ctrl+W` deletes back to whitespace, `Alt+F` and `Alt+D` stop at word end, and punctuation separates words. Claude Code still accepts the key, so a settings file that sets it stays valid. (In v2.1.238v2.1.260 it chose between `"classic"` and `"readline"`.) |
| `spellcheck` | (v2.1.235) Underlines misspelled words in the prompt input using whichever of `aspell`, `hunspell`, or `ispell` is on your `PATH`, tried in that order. Object-valued — `{"enabled": true, "language": "en_GB"}` — and off by default. **Read from user settings, the `--settings` flag, and managed settings only**: a `spellcheck` block in a project `.claude/settings.json` or `.claude/settings.local.json` is ignored. |
| `bashOutputMaxChars` | (v2.1.261) How many characters of a **successful** Bash or PowerShell command's output Claude receives inline, up to 128K. Past the limit Claude Code saves the output to a file and Claude gets a short preview plus the path. Setting it makes Claude Code ignore `BASH_MAX_OUTPUT_LENGTH`. |
| `taskOutputMaxChars` | (v2.1.261) How many characters of a **background task's** output Claude receives inline when reading it with the `TaskOutput` tool, up to 128K. For a longer finished task Claude receives the most recent characters. Setting it makes Claude Code ignore `TASK_MAX_OUTPUT_LENGTH`. |
| `taskOutputMaxChars` | (v2.1.261) **Superseded in v2.1.278 and has no effect.** It used to cap how many characters of a **background task's** output Claude received inline when reading it with the `TaskOutput` tool. v2.1.278 removed the `TaskOutput` tool — Claude now reads a background task's output file with `Read` — so this key and `TASK_MAX_OUTPUT_LENGTH` are both inert. Claude Code still accepts the key, so a settings file that sets it stays valid. |
| `maxEffortLevel` | (v2.1.267) Caps the effort level Claude Code may use, on every provider including Bedrock, Vertex, and Foundry. Set it top-level or per-model under `modelSettings`. Users can still pick a lower level. |
| `bashEditDiffEnabled` | (v2.1.269) Bash tool results include a diff of the files the command changed. |
| `syncClaudeAiSkills` / `syncClaudeAiPlugins` | (v2.1.275) Set either to `false` to opt out of syncing the skills or plugins you have enabled on your claude.ai account into terminal sessions. |
### Fallback Models (`fallbackModel`)
@@ -2516,7 +2521,7 @@ export CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION=200 # Cap on WebSearch t
export CLAUDE_AX_SCREEN_READER=1 # Enable plain-text screen reader rendering mode. Same effect as --ax-screen-reader or "axScreenReader": true in settings.
# Newer variables (v2.1.221v2.1.234) — changelog-sourced; the CLI reference has no env-var section
export CLAUDE_CODE_ENABLE_TODO_TOOLS=1 # (v2.1.233) Restore the todo/task-tracking tools (TaskCreate/Get/Update/List, TodoWrite), which are off on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and newer models
export CLAUDE_CODE_ENABLE_TODO_TOOLS=1 # (v2.1.233) Restore the todo/task-tracking tools (TaskCreate/Get/Update/List, TodoWrite), which are available by default only on Claude 3.x models, Opus 4 through 4.7, Sonnet 4 through 4.6, and Haiku 4.5 (v2.1.268)
export CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS=900000 # (v2.1.233) WebFetch URL cache TTL. Default 15 minutes.
export CLAUDE_CODE_TOOL_MEMORY_LIMIT=2G # (v2.1.233, Linux) Opt-in memory cgroup applied to Bash commands
export ANTHROPIC_BEDROCK_REGION_PREFIX=us # (v2.1.224) Prefer a specific Bedrock cross-region inference profile
@@ -2525,6 +2530,12 @@ export CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS=0 # (v2.1.229) Disable
export CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS=300000 # (v2.1.224) Overrides the dialogExpiry setting
export CLAUDE_CODE_PROJECT_DIR_NAME=my-app # (v2.1.234) Short name for the per-project transcript directory, for hosts that give each session its own config directory
export CLAUDE_CODE_GOAL_CHECKIN_MINUTES=30 # (v2.1.234) Minutes a background task may stall before Claude checks in while a /goal is active. Set 0 to disable check-ins.
# Newer variables (v2.1.268-v2.1.278) - changelog-sourced
export CLAUDE_CODE_MCP_STARTUP_WAIT_MS=5000 # (v2.1.274) How long the first non-interactive turn waits for MCP servers that are still connecting. 0 = do not wait.
export CLAUDE_CODE_WEBFETCH_DEADLINE_MS=300000 # (v2.1.268) Overrides WebFetch's new 300-second deadline. 0 disables the deadline.
export CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS=32 # (v2.1.269) Raises the Workflow tool's per-run concurrent agent limit. Accepts 1-256.
export CLAUDE_CODE_AUTO_MODE_SERVER=0 # (v2.1.278) Opt out of server-side auto-mode checks on Bedrock, Vertex, Foundry, and gateways
```
> **v2.1.223 — `CLAUDE_CODE_DISABLE_1M_CONTEXT` widened**: the variable now holds **every**
@@ -2727,9 +2738,16 @@ For more information about Claude Code and related features:
---
**Last Updated**: September 6, 2026
**Claude Code Version**: 2.1.263
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/output-styles
- https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md
- https://code.claude.com/docs/en/permissions
- https://code.claude.com/docs/en/workflows#set-a-size-guideline
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/auto-mode-classifier-billing
- https://code.claude.com/docs/en/env-vars
- https://code.claude.com/docs/en/settings
- https://code.claude.com/docs/en/sandboxing
- https://code.claude.com/docs/en/commands
+1 -1
View File
@@ -194,7 +194,7 @@
"model": "claude-sonnet-5",
"permissions": {
"defaultMode": "acceptEdits",
"allow": ["Write(**/*.md)"]
"allow": ["Edit(**/*.md)"]
},
"hooks": {
"PostToolUse": [
@@ -26,7 +26,6 @@ SETTINGS_PATH = Path.home() / ".claude" / "settings.json"
# Core baseline: read-only inspection and low-risk local shell commands.
CORE_PERMISSIONS = [
"Read(*)",
"Glob(*)",
"Grep(*)",
"Agent(*)",
"Skill(*)",
@@ -68,8 +67,6 @@ CORE_PERMISSIONS = [
# Optional but still local: file edits and task bookkeeping.
EDITING_PERMISSIONS = [
"Edit(*)",
"Write(*)",
"NotebookEdit(*)",
"TaskCreate(*)",
"TaskUpdate(*)",
]
@@ -133,7 +130,7 @@ def parse_args() -> argparse.Namespace:
parser.add_argument(
"--include-edits",
action="store_true",
help="Add file-editing permissions (Edit/Write/NotebookEdit/TaskCreate/TaskUpdate)",
help="Add file-editing permissions (Edit/TaskCreate/TaskUpdate)",
)
parser.add_argument(
"--include-tests",
+18 -7
View File
@@ -75,6 +75,7 @@ The older JavaScript bundle is still produced for Windows and for environments t
| `-c, --continue` | Load most recent conversation | `claude --continue` |
| `-r, --resume` | Resume specific session by ID or name | `claude --resume auth-refactor` |
| `-v, --version` | Output version number | `claude -v` |
| `--system-prompt-snapshot off` | Render the system prompt fresh on every request instead of reusing the prompt recorded with the conversation. Useful while iterating on prompt text (v2.1.267) | `claude --system-prompt-snapshot off` |
| `-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` |
@@ -291,7 +292,7 @@ claude -p --json-schema '{"type":"object","properties":{"bugs":{"type":"array"}}
> **`/config` persistence (v2.1.119)**: Changes made interactively via the `/config` command are now written to `~/.claude/settings.json` and participate in the normal precedence chain (policy → local → project → user). Before v2.1.119, some `/config` changes were session-only. See [Memory & Settings](../02-memory/README.md) for the full precedence order.
| `--settings` | Load settings from file or JSON. File must be no larger than 2 MiB (v2.1.214) | `claude --settings ./settings.json` |
| `--plugin-dir` | Load plugins from directory (repeatable) | `claude --plugin-dir ./my-plugin` |
| `--plugin-dir` | Load plugins from directory (repeatable). Since v2.1.265 it also accepts a **folder of plugins** — every child folder with a manifest loads, and children added or removed while the session runs are picked up | `claude --plugin-dir ./my-plugin` |
### Multi-Directory Example
@@ -390,7 +391,7 @@ claude project purge --all --interactive
| `--debug` | Enable debug mode with filtering | `claude --debug "api,mcp"` |
| `--enable-lsp-logging` | Enable verbose LSP logging | `claude --enable-lsp-logging` |
| `--betas` | Beta headers for API requests | `claude --betas interleaved-thinking` |
| `--plugin-dir` | Load plugins from directory (repeatable) | `claude --plugin-dir ./my-plugin` |
| `--plugin-dir` | Load plugins from directory (repeatable). Since v2.1.265 it also accepts a **folder of plugins** — every child folder with a manifest loads, and children added or removed while the session runs are picked up | `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 (tagged `plugin:<name>@<marketplace>`) | `claude --channels plugin:discord@my-marketplace` |
@@ -898,7 +899,11 @@ The "ultrathink" keyword in prompts activates deep reasoning. The `/effort` menu
| `CLAUDE_ENABLE_STREAM_WATCHDOG` | Streaming idle watchdog (aborts/retries after 5 min with no stream events) is on by default for all providers; set to `0` to disable (v2.1.196). |
| `CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT` | Override the 5-minute idle abort for remote MCP tool calls that hang with no response (v2.1.187+). |
| `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE` | **Removed (no-op as of v2.1.160).** Previously pinned Fast Mode (`/fast`) to Opus 4.6. As of v2.1.219, `/fast` applies to **Opus 5 and Opus 4.8** only — Opus 4.6 and Opus 4.7 are no longer fast-mode targets. |
| `CLAUDE_CODE_ENABLE_TODO_TOOLS` | Set to `1` to restore the todo/task-tracking tools (`TaskCreate`/`Get`/`Update`/`List`, `TodoWrite`), which are unavailable on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and newer models (v2.1.233) |
| `CLAUDE_CODE_MCP_STARTUP_WAIT_MS` | Bounds how long the first non-interactive turn waits for MCP servers that are still connecting. Set `0` to not wait at all (v2.1.274) |
| `CLAUDE_CODE_WEBFETCH_DEADLINE_MS` | Overrides WebFetch's 300-second deadline, introduced in v2.1.268. Set `0` to disable the deadline (v2.1.268) |
| `CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS` | Raises the Workflow tool's per-run concurrent agent limit. Accepts 1256 (v2.1.269) |
| `CLAUDE_CODE_AUTO_MODE_SERVER` | Set to `0` to opt out of server-side auto-mode checks on Bedrock, Vertex, Foundry, and gateways (v2.1.278) |
| `CLAUDE_CODE_ENABLE_TODO_TOOLS` | Set to `1` to restore the todo/task-tracking tools (`TaskCreate`/`Get`/`Update`/`List`, `TodoWrite`), which are available by default only on Claude 3.x models, Opus 4 through 4.7, Sonnet 4 through 4.6, and Haiku 4.5 (v2.1.268) |
| `CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS` | How long WebFetch caches a fetched URL. Default 15 minutes (v2.1.233) |
| `CLAUDE_CODE_TOOL_MEMORY_LIMIT` | Linux only: opt in to a memory cgroup applied to Bash commands (v2.1.233) |
| `ANTHROPIC_BEDROCK_REGION_PREFIX` | Prefer a specific Bedrock cross-region inference profile (v2.1.224) |
@@ -929,7 +934,7 @@ These keys live in a `settings.json` file (`~/.claude/settings.json` for user sc
| `language` | Sets Claude's preferred response language and voice-dictation language (e.g. `"french"`, `"japanese"`). As of **v2.1.176** it also pins the language used for auto-generated session titles. |
| `sandbox.filesystem.disabled` | (v2.1.216) Skips filesystem sandboxing while keeping network egress control enforced. For workflows where file sandboxing breaks tooling but network policy must stay enforced. |
| `emojiCompletionEnabled` | (v2.1.217) Enables emoji shortcode autocomplete in the prompt input (e.g. typing `:heart:` inserts ❤️). Set `false` to disable. |
| `workflowSizeGuideline` | (v2.1.219) Sets the advisory Dynamic workflow size guideline from any settings file. The guideline is guidance Claude aims for, not a hard cap — the default is medium (aim for fewer than 15 agents), and other sizes or unrestricted can be selected. While this key is set, the "Dynamic workflow size" row is hidden in `/config`. Distinct from `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`, which is an enforced concurrency limit. |
| `workflowSizeGuideline` | (v2.1.219) Sets the advisory Dynamic workflow size guideline from any settings file. The guideline is guidance Claude aims for, not a hard cap — the default is medium (aim for fewer than 10 agents), or small when signed in on a Pro plan (v2.1.271+), and other sizes or unrestricted can be selected. While this key is set, the "Dynamic workflow size" row is hidden in `/config`. Distinct from `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`, which is an enforced concurrency limit. |
| `spellcheck` | (v2.1.235) Underlines misspelled words in the prompt input using whichever of `aspell`, `hunspell`, or `ispell` is on your `PATH`, tried in that order. Object-valued — `{"enabled": true, "language": "en_GB"}` — and off by default. **Read from user settings, the `--settings` flag, and managed settings only**: a `spellcheck` block in a project `.claude/settings.json` or `.claude/settings.local.json` is ignored. See also [Advanced Features → Additional Per-User Settings](../09-advanced-features/README.md#additional-per-user-settings). |
| `modelPicker` | (v2.1.243) Choose which models the `/model` picker lists, in your own order and with your own labels. One of the few settings that **replaces rather than merges** across settings layers. |
| `promptCacheTtl` | (v2.1.243) Choose the prompt cache lifetime for the main conversation. |
@@ -937,7 +942,10 @@ These keys live in a `settings.json` file (`~/.claude/settings.json` for user sc
| `modelPricing` | (v2.1.243) **Managed setting.** Supplies your organization's contracted rates so `/cost`, the status line, and telemetry report those instead of list price. |
| `keybindingFlavor` | **Deprecated since v2.1.261 and has no effect.** The prompt's word-editing keys always follow readline conventions, as Bash does: `Ctrl+W` deletes back to whitespace, `Alt+F` and `Alt+D` stop at word end, and punctuation separates words. Claude Code still accepts the key, so a settings file that sets it stays valid. (In v2.1.238v2.1.260 it chose between `"classic"` and `"readline"`.) |
| `bashOutputMaxChars` | (v2.1.261) How many characters of a **successful** Bash or PowerShell command's output Claude receives inline, up to 128K. Past the limit Claude Code saves the output to a file and Claude gets a short preview plus the path. Setting it makes Claude Code ignore `BASH_MAX_OUTPUT_LENGTH`. |
| `taskOutputMaxChars` | (v2.1.261) How many characters of a **background task's** output Claude receives inline when reading it with the `TaskOutput` tool, up to 128K. For a longer finished task Claude receives the most recent characters. Setting it makes Claude Code ignore `TASK_MAX_OUTPUT_LENGTH`. |
| `taskOutputMaxChars` | (v2.1.261) **Superseded in v2.1.278 and has no effect.** It used to cap how many characters of a **background task's** output Claude received inline when reading it with the `TaskOutput` tool. v2.1.278 removed the `TaskOutput` tool — Claude now reads a background task's output file with `Read` — so this key and `TASK_MAX_OUTPUT_LENGTH` are both inert. Claude Code still accepts the key, so a settings file that sets it stays valid. |
| `maxEffortLevel` | (v2.1.267) Caps the effort level Claude Code may use, on every provider including Bedrock, Vertex, and Foundry. Set it top-level or per-model under `modelSettings`. Users can still pick a lower level. |
| `bashEditDiffEnabled` | (v2.1.269) Bash tool results include a diff of the files the command changed. |
| `syncClaudeAiSkills` / `syncClaudeAiPlugins` | (v2.1.275) Set either to `false` to opt out of syncing the skills or plugins you have enabled on your claude.ai account into terminal sessions. |
```json
{
@@ -1051,9 +1059,12 @@ claude -p --output-format json "query"
---
**Last Updated**: September 6, 2026
**Claude Code Version**: 2.1.263
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md
- https://code.claude.com/docs/en/workflows#set-a-size-guideline
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/cli-reference
- https://code.claude.com/docs/en/env-vars
- https://code.claude.com/docs/en/changelog#2-1-174
+3 -3
View File
@@ -470,7 +470,7 @@ cp 02-memory/personal-CLAUDE.md ~/.claude/CLAUDE.md
| **/tui** | Toggle fullscreen TUI (text user interface) mode for flicker-free rendering (v2.1.110) | Use `/tui` in fullscreen terminals or tmux |
| **/undo** | **No longer documented** — added as an alias for `/rewind` in v2.1.108, but it appears nowhere in the official commands reference | Use `/rewind` (or `Esc Esc`) instead |
| **Monitor Tool** | Watch a background command's stdout stream and react to events instead of polling (v2.1.98+) | Use the Monitor tool via [Advanced Features](09-advanced-features/) |
| **Output Styles** | Change Claude's role, tone, and default response format via the system prompt. Built-ins: Default, Proactive, Explanatory, Learning, Concise | `/config` → Output style, or set `outputStyle`. The `/output-style` command was removed in v2.1.91. See [Advanced Features](09-advanced-features/#output-styles) |
| **Output Styles** | Change Claude's role, tone, and default response format via the system prompt. Built-ins: Default, Proactive, Explanatory, Learning, Concise | `/config` → Output style, set `outputStyle`, or run `/output-style` (re-added in v2.1.269 after removal in v2.1.91). See [Advanced Features](09-advanced-features/#output-styles) |
| **Status Line** | Render a custom status line from a command that receives session, model, cost, and context JSON on stdin | `/statusline` or the `statusLine` setting. See [Advanced Features](09-advanced-features/#status-line) |
| **Community Marketplace** | Third-party plugins that passed Anthropic's automated validation, each pinned to a commit SHA | `/plugin marketplace add anthropics/claude-plugins-community`, then `/plugin install <name>@claude-community` |
| **/team-onboarding** | Auto-generate a teammate ramp-up guide from the project's Claude Code setup (v2.1.101) | Run `/team-onboarding` in your project |
@@ -573,8 +573,8 @@ chmod +x ~/.claude/hooks/*.sh
---
**Last Updated**: September 6, 2026
**Claude Code Version**: 2.1.263
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/sub-agents
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
+9 -4
View File
@@ -58,6 +58,8 @@ Persistent context and project standards.
**Usage**: Automatically loaded by Claude
**AGENTS.md** (v2.1.277): read as project instructions when no `CLAUDE.md`, `.claude/CLAUDE.md` or `CLAUDE.local.md` exists at or above the working directory — see `02-memory/README.md#agentsmd`
---
## 03. Skills (23 files)
@@ -227,7 +229,7 @@ Event-driven automation scripts that execute automatically.
**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)
- Task Hooks: UserPromptSubmit, UserPromptExpansion, MessageDisplay, TaskCompleted, TaskCreated, TeammateIdle (TaskCompleted/TaskCreated only fire when the todo tools are enabled — available by default only on Claude 3.x models, Opus 4 through 4.7, Sonnet 4 through 4.6, and Haiku 4.5)
- Lifecycle Hooks: ConfigChange, CwdChanged, DirectoryAdded, FileChanged, PreCompact, PostCompact, PreModelSwitch, PostModelSwitch, WorktreeCreate, WorktreeRemove, Notification, InstructionsLoaded, Elicitation, ElicitationResult
---
@@ -404,7 +406,7 @@ Advanced capabilities for complex workflows.
- Deterministic orchestration of tens-to-hundreds of background subagents
- Fan-out / pipeline / parallel stages for comprehensive coverage
- View runs with `/workflows`; `ultracode` `/effort` turns it on for a session
- Default size guideline is medium (aim for fewer than 15 agents) as of v2.1.219 — change it with **Dynamic workflow size** in `/config`
- Default size guideline is medium (aim for fewer than 10 agents) as of v2.1.219 — change it with **Dynamic workflow size** in `/config`
### Permission Modes
- **manual**: Ask for approval on risky actions (renamed from `default` in v2.1.200; `default` still accepted)
@@ -895,9 +897,12 @@ Want to add more examples? Follow the structure:
---
**Last Updated**: August 25, 2026
**Claude Code Version**: 2.1.245
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/workflows#set-a-size-guideline
- https://code.claude.com/docs/en/memory#agents-md
- https://code.claude.com/docs/en/overview
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/commands
+6 -3
View File
@@ -400,10 +400,11 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/
| **Desktop App** | Native desktop application | Download from claude.ai/download |
| **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 |
| **AGENTS.md** *(v2.1.277)* | Cross-tool project-context file, read as project instructions when no `CLAUDE.md` exists at or above the working directory | Switch modes with **Project instructions** in `/config`. See [AGENTS.md](02-memory/README.md#agentsmd) |
| **Git Worktrees** | Isolated workspaces for parallel development | `/worktree` to create isolated workspace |
| **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` |
| **Dynamic Workflows** *(v2.1.154)* | Deterministic multi-agent orchestration; since v2.1.219 the default size guideline is medium (aim for fewer than 10 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 |
| **Chrome Integration** | Browser automation | `--chrome` flag or `/chrome` command |
| **Keyboard Customization** | Custom keybindings | `/keybindings` command |
@@ -519,9 +520,11 @@ Getting started checklist:
---
**Last Updated**: September 2, 2026
**Claude Code Version**: 2.1.257
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/workflows#set-a-size-guideline
- https://code.claude.com/docs/en/memory#agents-md
- https://code.claude.com/docs/en/changelog
- https://code.claude.com/docs/en/cli-reference
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
+7 -6
View File
@@ -12,7 +12,7 @@
[![GitHub Stars](https://img.shields.io/github/stars/luongnv89/claude-howto?style=flat&color=gold)](https://github.com/luongnv89/claude-howto/stargazers)
[![GitHub Forks](https://img.shields.io/github/forks/luongnv89/claude-howto?style=flat)](https://github.com/luongnv89/claude-howto/network/members)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Version](https://img.shields.io/badge/version-2.1.263-brightgreen)](CHANGELOG.md)
[![Version](https://img.shields.io/badge/version-2.1.278-brightgreen)](CHANGELOG.md)
[![Claude Code](https://img.shields.io/badge/Claude_Code-2.1+-purple)](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.263, September 2026)
- **Actively maintained** — synced with every Claude Code release (latest: v2.1.278, September 2026)
- **Community-driven** — contributions from developers who share their real-world configurations
[![Star History Chart](https://api.star-history.com/svg?repos=luongnv89/claude-howto&type=Date)](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.263 (September 2026), compatible with Claude Code 2.1+.
Actively. The guide is synced with every Claude Code release. Current version: v2.1.278 (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.
@@ -487,7 +487,7 @@ Configure hooks in `~/.claude/settings.json`:
**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)
- **Task Hooks**: `UserPromptSubmit`, `UserPromptExpansion`, `MessageDisplay`, `TaskCompleted`, `TaskCreated`, `TeammateIdle``TaskCompleted` and `TaskCreated` only fire when the todo tools are enabled, which is available by default only on Claude 3.x models, Opus 4 through 4.7, Sonnet 4 through 4.6, and Haiku 4.5 (`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` restores them)
- **Lifecycle Hooks**: `ConfigChange`, `CwdChanged`, `DirectoryAdded`, `FileChanged`, `PreCompact`, `PostCompact`, `PreModelSwitch`, `PostModelSwitch`, `WorktreeCreate`, `WorktreeRemove`, `Notification`, `InstructionsLoaded`, `Elicitation`, `ElicitationResult`
</details>
@@ -873,9 +873,10 @@ MIT License - see [LICENSE](LICENSE). Free to use, modify, and distribute. The o
---
**Last Updated**: September 6, 2026
**Claude Code Version**: 2.1.263
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/overview
- https://code.claude.com/docs/en/changelog
+5 -4
View File
@@ -1154,8 +1154,8 @@ Claude Code supports **33 hook events** across five hook types (command, http, m
| **Stop** | Claude finishes responding | Summary generation, cleanup tasks |
| **StopFailure** | API error ends turn | Error recovery, logging |
| **TeammateIdle** | Agent team teammate idle | Work distribution, coordination |
| **TaskCompleted** | Task marked complete. Only fires when the todo tools are enabled — off by default on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and newer models; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` restores them (v2.1.233) | Post-task processing |
| **TaskCreated** | Task created via TaskCreate. Only fires when the todo tools are enabled — off by default on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and newer models; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` restores them (v2.1.233) | Task tracking, logging |
| **TaskCompleted** | Task marked complete. Only fires when the todo tools are enabled — available by default only on Claude 3.x models, Opus 4 through 4.7, Sonnet 4 through 4.6, and Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` restores them (v2.1.233) | Post-task processing |
| **TaskCreated** | Task created via TaskCreate. Only fires when the todo tools are enabled — available by default only on Claude 3.x models, Opus 4 through 4.7, Sonnet 4 through 4.6, and Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` restores them (v2.1.233) | Task tracking, logging |
| **ConfigChange** | Config file changes | Validation, propagation |
| **CwdChanged** | Working directory changes | Directory-specific setup |
| **DirectoryAdded** | New working directory registered mid-session via `/add-dir` or the SDK `register_repo_root` control request | Set up tooling for a newly added directory |
@@ -1474,9 +1474,10 @@ Claude Code supports the following models with adaptive reasoning effort:
- [Anthropic Cookbook](https://github.com/anthropics/anthropic-cookbook)
---
**Last Updated**: September 2, 2026
**Claude Code Version**: 2.1.257
**Last Updated**: September 19, 2026
**Claude Code Version**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://www.anthropic.com/news/claude-sonnet-5
- https://code.claude.com/docs/en/cli-reference
- https://code.claude.com/docs/en/model-config
+5 -4
View File
@@ -63,6 +63,7 @@
| `/memory` | `CLAUDE.md` を編集、自動メモリを切り替え |
| `/mobile` | モバイルアプリの QR コード(エイリアス: `/ios``/android` |
| `/model [model]` | モデル選択。左右キーで思考量を変更 |
| `/output-style [name]` | 出力スタイルの一覧表示と切り替え(v2.1.91 で削除された後、v2.1.269 で再追加)。引数なしで実行するとスタイルを一覧表示し、現在のものを示す。headless と Remote Control のセッションでも動作し、選択内容は `.claude/settings.local.json` に保存される |
| `/passes` | Claude Code 無料 1 週間を共有 |
| `/permissions` | 権限を表示/更新(エイリアス: `/allowed-tools` |
| `/plan [description]` | プランモードに入る |
@@ -113,7 +114,6 @@
| コマンド | ステータス |
|---------|----------|
| `/output-style` | v2.1.91 で削除 — 出力スタイルは `/config` または `outputStyle` 設定から引き続き利用できる |
| `/fork` | `/branch` に改名(エイリアスは引き続き有効、v2.1.77) |
| `/pr-comments` | v2.1.91 で削除 — Claude に直接 PR コメントを見るよう依頼する |
| `/vim` | v2.1.92 で削除 — /config → エディタモードを使う |
@@ -122,7 +122,7 @@
### 直近の変更点
- `/fork``/branch` に改名し、`/fork` はエイリアスとして残置(v2.1.77)
- `/output-style` 削除(v2.1.91)。出力スタイル自体は `/config` または `outputStyle` 設定で引き続き利用できる
- `/output-style` 削除(v2.1.91された後、**v2.1.269 で再追加**され、v2.1.278 では再び利用可能なコマンドである。headless と Remote Control のセッションでも動作する。出力スタイル自体は `/config` または `outputStyle` 設定で引き続き利用できる
- `/review``/code-review` の完全なエイリアスになった — ターゲット、effort レベル、フラグはすべて同じ(v2.1.223)。履歴: v2.1.186 でまず `/code-review medium` エンジンに移行したが、当時は PR 専用だった
- `/effort` コマンドを追加。`max` レベルは Opus 4.7 が必要(当初は Opus 4.6 限定)
- プッシュトゥトーク音声入力の `/voice` コマンドを追加
@@ -603,10 +603,11 @@ Deploy the application to production:
---
**最終更新**: 2026 年 825
**Claude Code バージョン**: 2.1.245
**最終更新**: 2026 年 919
**Claude Code バージョン**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/commands
- https://code.claude.com/docs/en/output-styles
- https://code.claude.com/docs/en/interactive-mode
- https://code.claude.com/docs/en/changelog
- https://github.com/anthropics/claude-code/releases/tag/v2.1.118
+4 -2
View File
@@ -227,6 +227,7 @@ Claude Code は多階層のメモリシステムを使う。Claude Code 起動
3. **Project Memory** — チーム共有のコンテキスト(バージョン管理対象)
- `./.claude/CLAUDE.md` または `./CLAUDE.md`(リポジトリのルート)
- v2.1.277 以降、作業ディレクトリとその上位に `CLAUDE.md``CLAUDE.local.md` も存在しない場合、同じ階層で代わりに `./AGENTS.md` が読み込まれる。`/config`**Project instructions** で制御する
4. **Project Rules** — モジュール式・トピック別のプロジェクト指示
- `./.claude/rules/*.md`
@@ -1206,10 +1207,11 @@ Claude はどのメモリファイルを更新するかを尋ねる。
- [公式メモリドキュメント](https://code.claude.com/docs/en/memory) — Anthropic ドキュメント
---
**最終更新**: 2026 年 825
**Claude Code バージョン**: 2.1.245
**最終更新**: 2026 年 919
**Claude Code バージョン**: 2.1.278
**Sources**:
- https://code.claude.com/docs/en/memory
- https://code.claude.com/docs/en/memory#agents-md
- https://code.claude.com/docs/en/settings
- https://github.com/anthropics/claude-code/releases/tag/v2.1.117
- https://github.com/anthropics/claude-code/releases/tag/v2.1.119
+1 -1
View File
@@ -196,7 +196,7 @@ Brief one-line description.
ユーザーが AGENTS.md の作成・更新を求めた場合:
**Claude Code は AGENTS.md を直接読み込まない。** 有効にするには、CLAUDE.md から `@AGENTS.md` でインポートするか、`CLAUDE.md` をこのファイルへのシンボリックリンクにする。これはこのファイルに関する最もよくある誤解である
**v2.1.277 以降、Claude Code は `AGENTS.md` をプロジェクト指示として直接読み込む。** ただし、作業ディレクトリとその上位すべてのディレクトリに `CLAUDE.md``.claude/CLAUDE.md``CLAUDE.local.md` のいずれも存在しない場合に限る。`~/.claude/CLAUDE.md`、管理 CLAUDE.md、`.claude/rules/` はこの判定の対象外であり、引き続き併せて読み込まれる。この挙動は `/config`**Project instructions** で制御する: `claude-md-or-agents-md`(デフォルト)、`claude-md-and-agents-md``claude-md``managed-only`。直接読み込みが利用できない環境 — Bedrock/Vertex/Foundry、テレメトリ無効、アップグレード後の最初のセッション、`disableAllHooks`/`allowManagedHooksOnly` — では、CLAUDE.md から `@AGENTS.md` でインポートするか、`CLAUDE.md` をこのファイルへのシンボリックリンクにするフォールバックを使う
AGENTS.md はツール横断のプロジェクトコンテキストファイルであり、CLAUDE.md と同じ *種類* のドキュメントである。エージェント定義フォーマットではない。複数のコーディングエージェントが 1 つのプロジェクト規約を共有できるようにするために存在する:
- ビルド、テスト、リントのコマンド
+10 -7
View File
@@ -225,7 +225,7 @@ Claude Code は **33 種類のフックイベント** をサポートする。
| **ElicitationResult** | ユーザーが elicitation に応答 | (なし) | 可 | 応答処理 |
| **SessionEnd** | セッション終了 | (なし) | 不可 | クリーンアップ、最終ロギング |
> **`TaskCreated``TaskCompleted` は todo ツールが有効なときのみ発火する(v2.1.233)。** これらのイベントは todo/タスク追跡ツール(`TaskCreate`/`Get`/`Update`/`List``TodoWrite`)から発火するが、それらは **Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降のモデルでは利用できない**これらのモデルではフックの設定自体は有効なまま、単に発火しない — 出力もエラーも出ない。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` を設定すると復活する。
> **`TaskCreated``TaskCompleted` は todo ツールが有効なときのみ発火する(v2.1.233)。** これらのイベントは todo/タスク追跡ツール(`TaskCreate`/`Get`/`Update`/`List``TodoWrite`)から発火するが、それらは **Claude 3.x モデル、Opus 4〜4.7、Sonnet 4〜4.6、Haiku 4.5 でのみデフォルトで利用でき**それ以外のモデルではフックの設定自体は有効なまま、単に発火しない — 出力もエラーも出ない。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` を設定すると復活する。
> **PostToolUse の durationv2.1.119):** `PostToolUse``PostToolUseFailure` のフック入力に `duration_ms` が含まれるようになった。詳細は [PostToolUse](#posttooluse) セクションを参照。
@@ -962,7 +962,7 @@ if __name__ == "__main__":
### 例 7:自動モード権限のシード(一度限りのセットアップスクリプト)
`~/.claude/settings.json` に Claude Code の自動モードベースラインに相当する約 67 個の安全な権限ルールをシードする一度限りのセットアップスクリプト。フックなし、将来の選択を覚えることもなし。1 回実行すれば良く、再実行しても安全(既存ルールはスキップ)。
`~/.claude/settings.json` に Claude Code の自動モードベースラインに相当する安全な権限ルール(デフォルトで 37 個、すべてのカテゴリフラグを有効にすると最大 63 個)をシードする一度限りのセットアップスクリプト。フックなし、将来の選択を覚えることもなし。1 回実行すれば良く、再実行しても安全(既存ルールはスキップ)。
**ファイル:** `09-advanced-features/setup-auto-mode-permissions.py`
@@ -978,12 +978,13 @@ python3 09-advanced-features/setup-auto-mode-permissions.py
| カテゴリ | 例 |
|----------|-----|
| 組み込みツール | `Read(*)``Edit(*)``Write(*)``Glob(*)``Grep(*)``Agent(*)``WebSearch(*)` |
| 組み込みツール | `Read(*)``Grep(*)``Agent(*)``WebSearch(*)` |
| オプションの編集(--include-edits | `Edit(*)` |
| Git 読み取り | `Bash(git status:*)``Bash(git log:*)``Bash(git diff:*)` |
| Git 書き込み(ローカル) | `Bash(git add:*)``Bash(git commit:*)``Bash(git checkout:*)` |
| パッケージマネージャ | `Bash(npm install:*)``Bash(pip install:*)``Bash(cargo build:*)` |
| パッケージマネージャ | `Bash(npm ci:*)``Bash(npm install:*)``Bash(pip install:*)``Bash(pip3 install:*)` |
| ビルド・テスト | `Bash(make:*)``Bash(pytest:*)``Bash(go test:*)` |
| 一般的なシェル | `Bash(ls:*)``Bash(cat:*)``Bash(find:*)``Bash(cp:*)``Bash(mv:*)` |
| 一般的なシェル | `Bash(ls:*)``Bash(cat:*)``Bash(find:*)` |
| GitHub CLI | `Bash(gh pr view:*)``Bash(gh pr create:*)``Bash(gh issue list:*)` |
**意図的に除外される項目**(このスクリプトでは追加されない):
@@ -1381,10 +1382,12 @@ chmod +x ~/.claude/hooks/*.sh
---
**最終更新:** 2026 年 9 月 2
**Claude Code バージョン:** 2.1.257
**最終更新:** 2026 年 9 月 19
**Claude Code バージョン:** 2.1.278
**情報源:**
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/permissions
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- 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
+10 -9
View File
@@ -360,7 +360,7 @@ export CLAUDE_CODE_EFFORT_LEVEL=xhigh
- **プラン:** Team、Enterprise、または APIPro や Max プランでは利用不可)
- **モデル:** Claude Sonnet 4.6 または Opus 4.7
- **プロバイダ:** Anthropic API のみ(Bedrock、Vertex、Foundry では非対応)
- **分類器:** Claude Sonnet 4.6 上で動作する(追加のトークンコストが発生)
- **分類器:** 追加のトークンコストが発生する。ただし Enterprise プランと Claude API アカウントでは、v2.1.278 以降サーバー側でチェックが実行され、課金されない
### オートモードの有効化
@@ -486,15 +486,14 @@ python3 09-advanced-features/setup-auto-mode-permissions.py --include-git-write
| カテゴリ | 例 |
|----------|---------|
| コア読み取り専用ツール | `Read(*)``Glob(*)``Grep(*)``Agent(*)``WebSearch(*)``WebFetch(*)` |
| コア読み取り専用ツール | `Read(*)``Grep(*)``Agent(*)``WebSearch(*)``WebFetch(*)` |
| ローカル検査 | `Bash(git status:*)``Bash(git log:*)``Bash(git diff:*)``Bash(cat:*)` |
| オプションの編集 | `Edit(*)``Write(*)``NotebookEdit(*)` |
| オプションの編集 | `Edit(*)` |
| オプションのテスト/ビルド | `Bash(pytest:*)``Bash(python3 -m pytest:*)``Bash(cargo test:*)` |
| オプションの Git 書き込み | `Bash(git add:*)``Bash(git commit:*)``Bash(git stash:*)` |
| Git(ローカル書き込み) | `Bash(git add:*)``Bash(git commit:*)``Bash(git checkout:*)` |
| パッケージマネージャ | `Bash(npm install:*)``Bash(pip install:*)``Bash(cargo build:*)` |
| オプションの Git 書き込み | `Bash(git add:*)``Bash(git commit:*)``Bash(git checkout:*)``Bash(git switch:*)``Bash(git stash:*)``Bash(git tag:*)` |
| パッケージマネージャ | `Bash(npm ci:*)``Bash(npm install:*)``Bash(pip install:*)``Bash(pip3 install:*)` |
| ビルドとテスト | `Bash(make:*)``Bash(pytest:*)``Bash(go test:*)` |
| よく使うシェル | `Bash(ls:*)``Bash(cat:*)``Bash(find:*)``Bash(cp:*)``Bash(mv:*)` |
| よく使うシェル | `Bash(ls:*)``Bash(cat:*)``Bash(find:*)` |
| GitHub CLI | `Bash(gh pr view:*)``Bash(gh pr create:*)``Bash(gh issue list:*)` |
危険な操作(`rm -rf``sudo`、強制プッシュ、`DROP TABLE``terraform destroy` など)は意図的に除外されている。スクリプトは冪等であり、2 回実行してもルールは重複しない。
@@ -2108,9 +2107,11 @@ Claude Code および関連機能の詳細:
---
**最終更新:** 2026 年 825
**Claude Code バージョン:** 2.1.245
**最終更新:** 2026 年 919
**Claude Code バージョン:** 2.1.278
**情報源:**
- https://code.claude.com/docs/en/permissions
- https://code.claude.com/docs/en/auto-mode-classifier-billing
- https://code.claude.com/docs/en/permission-modes
- https://code.claude.com/docs/en/commands
- https://code.claude.com/docs/en/interactive-mode
+5 -4
View File
@@ -360,8 +360,8 @@ Claude Code のイベントでシェルコマンドを自動実行するイベ
| `Stop` | Claude が応答完了 | 応答完了時 | 後処理、レポート |
| `StopFailure` | API エラーでターン終了 | API エラー発生時 | エラー復旧、ログ |
| `TeammateIdle` | チームメンバーエージェントがアイドル | エージェントチーム協調時 | 作業の分配 |
| `TaskCompleted` | タスク完了マーク(todo ツールが有効なときのみ発火 — Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降ではデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | タスク完了時 | タスク後処理 |
| `TaskCreated` | TaskCreate でタスク作成(todo ツールが有効なときのみ発火 — Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降ではデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | 新タスク作成時 | タスク追跡、ログ |
| `TaskCompleted` | タスク完了マーク(todo ツールが有効なときのみ発火 — Claude 3.x、Opus 4〜4.7、Sonnet 4〜4.6、Haiku 4.5 でのみデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | タスク完了時 | タスク後処理 |
| `TaskCreated` | TaskCreate でタスク作成(todo ツールが有効なときのみ発火 — Claude 3.x、Opus 4〜4.7、Sonnet 4〜4.6、Haiku 4.5 でのみデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | 新タスク作成時 | タスク追跡、ログ |
| `ConfigChange` | 設定更新 | 設定変更時 | 設定変更への対応 |
| `CwdChanged` | 作業ディレクトリ変更 | ディレクトリ変更時 | ディレクトリ別セットアップ |
| `DirectoryAdded` | セッション中に作業ディレクトリが追加登録 | `/add-dir` または SDK `register_repo_root` | 新規ディレクトリ向けツール設定 |
@@ -540,9 +540,10 @@ chmod +x ~/.claude/hooks/*.sh
---
**最終更新**2026 年 9 月 2
**Claude Code バージョン**2.1.257
**最終更新**2026 年 9 月 19
**Claude Code バージョン**2.1.278
**情報源**
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/overview
- https://code.claude.com/docs/en/commands
- https://code.claude.com/docs/en/hooks
+4 -3
View File
@@ -229,7 +229,7 @@ blog-draft/
**フックイベント**(33 件、4 カテゴリ)— 実行タイミング:
- ツール系フック:PreToolUse、PostToolUse、PostToolUseFailure、PostToolBatch、PermissionRequest、PermissionDenied
- セッション系フック:SessionStart、Setup、SessionEnd、Stop、StopFailure、SubagentStart、SubagentStop
- タスク系フック:UserPromptSubmit、UserPromptExpansion、MessageDisplay、TaskCompleted、TaskCreated、TeammateIdleTaskCompleted と TaskCreated は todo ツールが有効なときのみ発火 — Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降ではデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活)
- タスク系フック:UserPromptSubmit、UserPromptExpansion、MessageDisplay、TaskCompleted、TaskCreated、TeammateIdleTaskCompleted と TaskCreated は todo ツールが有効なときのみ発火 — Claude 3.x、Opus 4〜4.7、Sonnet 4〜4.6、Haiku 4.5 でのみデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活)
- ライフサイクル系フック:ConfigChange、CwdChanged、DirectoryAdded、FileChanged、PreCompact、PostCompact、PreModelSwitch、PostModelSwitch、WorktreeCreate、WorktreeRemove、Notification、InstructionsLoaded、Elicitation、ElicitationResult
---
@@ -882,8 +882,8 @@ Run tests in background
---
**最終更新**2026 年 8 月 15
**Claude Code バージョン**2.1.233
**最終更新**2026 年 9 月 19
**Claude Code バージョン**2.1.278
**互換モデル**Claude Sonnet 4.6、Claude Opus 4.7、Claude Haiku 4.5
**例題総数**100 ファイル超
**カテゴリ**10 機能
@@ -891,6 +891,7 @@ Run tests in background
**設定例**10 シナリオ以上
**すぐ使える**:すべての例
**情報源**
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/overview
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/commands
+4 -3
View File
@@ -491,7 +491,7 @@ chmod +x ~/.claude/hooks/*.sh
**フックイベント**(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` で復活)
- **タスク系フック**`UserPromptSubmit``UserPromptExpansion``MessageDisplay``TaskCompleted``TaskCreated``TeammateIdle``TaskCompleted``TaskCreated` は todo ツールが有効なときのみ発火 — Claude 3.x、Opus 4〜4.7、Sonnet 4〜4.6、Haiku 4.5 でのみデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活)
- **ライフサイクル系フック**`ConfigChange``CwdChanged``DirectoryAdded``FileChanged``PreCompact``PostCompact``PreModelSwitch``PostModelSwitch``WorktreeCreate``WorktreeRemove``Notification``InstructionsLoaded``Elicitation``ElicitationResult`
</details>
@@ -877,9 +877,10 @@ MIT License — [LICENSE](../LICENSE) を参照。利用、変更、再配布は
---
**最終更新**2026 年 825
**Claude Code バージョン**2.1.245
**最終更新**2026 年 919
**Claude Code バージョン**2.1.278
**情報源**
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/overview
- https://code.claude.com/docs/en/changelog
+5 -4
View File
@@ -2835,8 +2835,8 @@ Claude Code は 5 種類(command、http、mcp_tool、prompt、agent)にわ
| **Stop** | Claude の応答完了時 | サマリー生成、後処理 |
| **StopFailure** | API エラーでターン終了時 | エラー回復、ログ |
| **TeammateIdle** | エージェントチームのメンバーがアイドル時 | 作業分配、調整 |
| **TaskCompleted** | タスク完了時(todo ツールが有効なときのみ発火 — Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降ではデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | 後続処理 |
| **TaskCreated** | TaskCreate でタスク作成時(todo ツールが有効なときのみ発火 — Opus 4.8、Sonnet 5、Fable 5、Mythos 5 以降ではデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | タスク追跡、ログ |
| **TaskCompleted** | タスク完了時(todo ツールが有効なときのみ発火 — Claude 3.x、Opus 4〜4.7、Sonnet 4〜4.6、Haiku 4.5 でのみデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | 後続処理 |
| **TaskCreated** | TaskCreate でタスク作成時(todo ツールが有効なときのみ発火 — Claude 3.x、Opus 4〜4.7、Sonnet 4〜4.6、Haiku 4.5 でのみデフォルト効。`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` で復活) | タスク追跡、ログ |
| **ConfigChange** | 設定ファイル変更時 | 検証、伝播 |
| **CwdChanged** | 作業ディレクトリ変更時 | ディレクトリ別セットアップ |
| **DirectoryAdded** | セッション中に作業ディレクトリが追加登録 | 新規ディレクトリ向けツール設定 |
@@ -3156,9 +3156,10 @@ Claude Code は推論努力を調整可能な 3 モデルをサポートする
*収録機能:フック、チェックポイント、プラニングモード、拡張思考、バックグラウンドタスク、権限モード(6 種)、ヘッドレスモード、セッション管理、Auto Memory、Agent Teams、定期タスク、Chrome 連携、Channels、音声入力、同梱スキル*
---
**最終更新:** 2026 年 9 月 2
**Claude Code バージョン:** 2.1.257
**最終更新:** 2026 年 9 月 19
**Claude Code バージョン:** 2.1.278
**出典:**
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/overview
- https://code.claude.com/docs/en/hooks
- https://www.anthropic.com/news/claude-opus-4-7
+5 -4
View File
@@ -61,6 +61,7 @@
| `/memory` | Редагувати `CLAUDE.md`, перемкнути автопам'ять |
| `/mobile` | QR-код для мобільного (аліаси: `/ios`, `/android`) |
| `/model [model]` | Вибір моделі зі стрілками вліво/вправо для рівня зусиль |
| `/output-style [name]` | Перегляд списку та перемикання стилів виводу (повернена у v2.1.269 після видалення у v2.1.91). Без аргументу виводить список стилів і позначає поточний. Працює в headless- та Remote Control-сесіях; вибір зберігається у `.claude/settings.local.json` |
| `/passes` | Поділитися безкоштовним тижнем Claude Code |
| `/permissions` | Переглянути/оновити дозволи (аліас: `/allowed-tools`) |
| `/plan [description]` | Увійти в режим планування |
@@ -106,7 +107,6 @@
| Команда | Статус |
|---------|--------|
| `/output-style` | Видалена в v2.1.91 (застаріла з v2.1.73) — використовуйте `/config` → Output style або налаштування `outputStyle` |
| `/fork` | Перейменована на `/branch` (аліас працює, v2.1.77) |
| `/pr-comments` | Видалена в v2.1.91 — запитайте Claude напряму |
| `/vim` | Видалена в v2.1.92 — використовуйте /config → Editor mode |
@@ -114,7 +114,7 @@
### Останні зміни
- `/fork` перейменовано на `/branch`, `/fork` залишено як аліас (v2.1.77)
- `/output-style` застаріла (v2.1.73) і видалена (v2.1.91) — стилі виводу все ще доступні через `/config` → Output style або налаштування `outputStyle`; вбудовані: Default, Proactive, Explanatory, Learning, Concise (додано у v2.1.237)
- `/output-style` застаріла (v2.1.73) і була видалена (v2.1.91), а потім **повернена у v2.1.269** — у v2.1.278 це знову робоча команда, що працює в headless- та Remote Control-сесіях. Стилі виводу так само лишаються доступними через `/config` → Output style або налаштування `outputStyle`; вбудовані: Default, Proactive, Explanatory, Learning, Concise (додано у v2.1.237)
- `/review` став повним псевдонімом `/code-review` — ті самі цілі, рівні зусиль і прапорці (v2.1.223). Історія: спершу він перейшов на рушій `/code-review medium` у v2.1.186, залишаючись доступним лише для PR
- Додано команду `/effort` з рівнем `max` для Opus 4.6
- Додано команду `/voice` для голосового вводу push-to-talk
@@ -576,10 +576,11 @@ Deploy the application to production:
---
**Останнє оновлення**: 19 серпня 2026
**Версія Claude Code**: 2.1.235
**Останнє оновлення**: 19 вересня 2026
**Версія Claude Code**: 2.1.278
**Джерела**:
- https://code.claude.com/docs/en/commands
- https://code.claude.com/docs/en/output-styles
**Сумісні моделі**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
*Частина серії посібників [Claude How To](../)*
+4 -2
View File
@@ -226,6 +226,7 @@ Claude Code використовує багаторівневу ієрархіч
3. **Project Memory** — спільний контекст команди (версіонований)
- `./.claude/CLAUDE.md` або `./CLAUDE.md` (у корені репозиторію)
- Починаючи з v2.1.277, на цьому ж рівні натомість завантажується `./AGENTS.md`, якщо ні в робочому каталозі, ні вище немає `CLAUDE.md` чи `CLAUDE.local.md` — керується через **Project instructions** у `/config`
4. **Project Rules** — модульні, тематичні інструкції проєкту
- `./.claude/rules/*.md`
@@ -1158,8 +1159,9 @@ Claude запропонує обрати, який файл пам'яті оно
- [Офіційна документація пам'яті](https://code.claude.com/docs/en/memory) — документація Anthropic
---
**Останнє оновлення**: 25 серпня 2026
**Версія Claude Code**: 2.1.245
**Останнє оновлення**: 19 вересня 2026
**Версія Claude Code**: 2.1.278
**Джерела**:
- https://code.claude.com/docs/en/memory
- https://code.claude.com/docs/en/memory#agents-md
**Сумісні моделі**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
+1 -1
View File
@@ -193,7 +193,7 @@ For detailed build instructions, refer to `agent_docs/building_the_project.md`
Якщо користувач запитує створення/оновлення AGENTS.md:
**Claude Code не читає AGENTS.md напряму.** Щоб файл почав діяти, імпортуйте його з CLAUDE.md через `@AGENTS.md` або зробіть `CLAUDE.md` символічним посиланням на нього. Це найпоширеніше непорозуміння щодо цього файлу.
**Починаючи з v2.1.277, Claude Code читає `AGENTS.md` напряму як інструкції проєкту** — але лише тоді, коли ні в робочому каталозі, ні в жодному каталозі вище немає `CLAUDE.md`, `.claude/CLAUDE.md` чи `CLAUDE.local.md`. `~/.claude/CLAUDE.md`, керований CLAUDE.md і `.claude/rules/` не враховуються в цій перевірці та завантажуються паралельно. Поведінку визначає **Project instructions** у `/config`: `claude-md-or-agents-md` (за замовчуванням), `claude-md-and-agents-md`, `claude-md` або `managed-only`. Там, де пряме читання недоступне — Bedrock/Vertex/Foundry, вимкнена телеметрія, перша сесія після оновлення або `disableAllHooks`/`allowManagedHooksOnly` — використовуйте запасний варіант: імпортуйте файл з CLAUDE.md через `@AGENTS.md` або зробіть `CLAUDE.md` символічним посиланням на нього.
AGENTS.md — це міжінструментальний файл контексту проєкту, тобто документ тієї ж *категорії*, що й CLAUDE.md, а не формат визначення агентів. Він існує для того, щоб кілька кодових агентів могли користуватися спільним набором конвенцій проєкту:
- Команди збірки, тестування та лінтингу
+10 -7
View File
@@ -223,7 +223,7 @@ Claude Code підтримує **33 події хуків**:
| **ElicitationResult** | Відповідь користувача на elicitation | (немає) | Так | Обробка відповіді |
| **SessionEnd** | Завершення сесії | (немає) | Ні | Очищення, фінальне логування |
> **`TaskCreated` і `TaskCompleted` потребують увімкнених todo-інструментів (v2.1.233).** Ці події виникають від todo / task-tracking інструментів (`TaskCreate`/`Get`/`Update`/`List`, `TodoWrite`), які **більше не доступні на Opus 4.8, Sonnet 5, Fable 5, Mythos 5 та новіших моделях**. На цих моделях хук лишається валідною конфігурацією, але просто ніколи не спрацьовує — без виводу і без помилки. Встановіть `CLAUDE_CODE_ENABLE_TODO_TOOLS=1`, щоб повернути їх.
> **`TaskCreated` і `TaskCompleted` потребують увімкнених todo-інструментів (v2.1.233).** Ці події виникають від todo / task-tracking інструментів (`TaskCreate`/`Get`/`Update`/`List`, `TodoWrite`), які **доступні за замовчуванням лише на моделях Claude 3.x, Opus 4 — 4.7, Sonnet 4 — 4.6 та Haiku 4.5**. На інших моделях хук лишається валідною конфігурацією, але просто ніколи не спрацьовує — без виводу і без помилки. Встановіть `CLAUDE_CODE_ENABLE_TODO_TOOLS=1`, щоб повернути їх.
### PreToolUse
@@ -954,7 +954,7 @@ if __name__ == "__main__":
### Приклад 7: Початкове налаштування дозволів Auto-Mode (одноразовий скрипт)
Одноразовий скрипт налаштування, що додає до `~/.claude/settings.json` ~67 безпечних правил дозволів, еквівалентних базовому набору auto-mode Claude Code — без жодного хука, без запамʼятовування майбутніх виборів. Запустіть один раз; безпечно для повторного запуску (пропускає правила, що вже присутні).
Одноразовий скрипт налаштування, що додає до `~/.claude/settings.json` безпечні правила дозволів, еквівалентні базовому набору auto-mode Claude Code — 37 типово, до 63 з усіма прапорцями категорій — без жодного хука, без запамʼятовування майбутніх виборів. Запустіть один раз; безпечно для повторного запуску (пропускає правила, що вже присутні).
**Файл:** `09-advanced-features/setup-auto-mode-permissions.py`
@@ -970,12 +970,13 @@ python3 09-advanced-features/setup-auto-mode-permissions.py
| Категорія | Приклади |
|-----------|---------|
| Вбудовані інструменти | `Read(*)`, `Edit(*)`, `Write(*)`, `Glob(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)` |
| Вбудовані інструменти | `Read(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)` |
| Опціональне редагування (--include-edits) | `Edit(*)` |
| Git читання | `Bash(git status:*)`, `Bash(git log:*)`, `Bash(git diff:*)` |
| Git запис (локально) | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git checkout:*)` |
| Пакетні менеджери | `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(cargo build:*)` |
| Пакетні менеджери | `Bash(npm ci:*)`, `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(pip3 install:*)` |
| Збірка та тестування | `Bash(make:*)`, `Bash(pytest:*)`, `Bash(go test:*)` |
| Загальні shell-команди | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)`, `Bash(cp:*)`, `Bash(mv:*)` |
| Загальні shell-команди | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)` |
| GitHub CLI | `Bash(gh pr view:*)`, `Bash(gh pr create:*)`, `Bash(gh issue list:*)` |
**Що навмисно виключено** (цей скрипт ніколи не додає):
@@ -1217,8 +1218,10 @@ chmod +x ~/.claude/hooks/*.sh
- **[Посібник з памʼяті](../02-memory/)** — конфігурація постійного контексту
---
**Останнє оновлення**: 2 вересня 2026
**Версія Claude Code**: 2.1.257
**Останнє оновлення**: 19 вересня 2026
**Версія Claude Code**: 2.1.278
**Джерела**:
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/permissions
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
**Сумісні моделі**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
+10 -9
View File
@@ -351,7 +351,7 @@ Auto Mode — це режим дозволів, який використову
- **План**: Team, Enterprise або API (недоступно на планах Pro або Max)
- **Модель**: Claude Sonnet 4.6 або Opus 4.6
- **Провайдер**: Тільки Anthropic API (не підтримується на Bedrock, Vertex або Foundry)
- **Класифікатор**: Працює на Claude Sonnet 4.6 (додаткова вартість токенів)
- **Класифікатор**: Додаткова вартість токенів, окрім планів Enterprise та акаунтів Claude API, де v2.1.278+ виконує перевірку на боці сервера без оплати
### Увімкнення Auto Mode
@@ -447,15 +447,14 @@ python3 09-advanced-features/setup-auto-mode-permissions.py --include-git-write
| Категорія | Приклади |
|----------|---------|
| Базові інструменти тільки для читання | `Read(*)`, `Glob(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)`, `WebFetch(*)` |
| Базові інструменти тільки для читання | `Read(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)`, `WebFetch(*)` |
| Локальне інспектування | `Bash(git status:*)`, `Bash(git log:*)`, `Bash(git diff:*)`, `Bash(cat:*)` |
| Опціональне редагування | `Edit(*)`, `Write(*)`, `NotebookEdit(*)` |
| Опціональне редагування | `Edit(*)` |
| Опціональні тести/збірка | `Bash(pytest:*)`, `Bash(python3 -m pytest:*)`, `Bash(cargo test:*)` |
| Опціональний запис у git | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git stash:*)` |
| Git (локальний запис) | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git checkout:*)` |
| Менеджери пакетів | `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(cargo build:*)` |
| Опціональний запис у git | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git checkout:*)`, `Bash(git switch:*)`, `Bash(git stash:*)`, `Bash(git tag:*)` |
| Менеджери пакетів | `Bash(npm ci:*)`, `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(pip3 install:*)` |
| Збірка та тести | `Bash(make:*)`, `Bash(pytest:*)`, `Bash(go test:*)` |
| Звичайні shell-команди | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)`, `Bash(cp:*)`, `Bash(mv:*)` |
| Звичайні shell-команди | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)` |
| GitHub CLI | `Bash(gh pr view:*)`, `Bash(gh pr create:*)`, `Bash(gh issue list:*)` |
Небезпечні операції (`rm -rf`, `sudo`, force push, `DROP TABLE`, `terraform destroy` тощо) навмисно виключені. Скрипт ідемпотентний — повторний запуск не дублює правила.
@@ -1933,8 +1932,10 @@ claude --teammate-mode in-process
- [Офіційна документація Agent Teams](https://code.claude.com/docs/en/agent-teams)
---
**Останнє оновлення**: 25 серпня 2026
**Версія Claude Code**: 2.1.245
**Останнє оновлення**: 19 вересня 2026
**Версія Claude Code**: 2.1.278
**Джерела**:
- https://code.claude.com/docs/en/permissions
- https://code.claude.com/docs/en/auto-mode-classifier-billing
- https://code.claude.com/docs/en/commands
**Сумісні моделі**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
@@ -26,7 +26,6 @@ SETTINGS_PATH = Path.home() / ".claude" / "settings.json"
# Core baseline: read-only inspection and low-risk local shell commands.
CORE_PERMISSIONS = [
"Read(*)",
"Glob(*)",
"Grep(*)",
"Agent(*)",
"Skill(*)",
@@ -68,8 +67,6 @@ CORE_PERMISSIONS = [
# Optional but still local: file edits and task bookkeeping.
EDITING_PERMISSIONS = [
"Edit(*)",
"Write(*)",
"NotebookEdit(*)",
"TaskCreate(*)",
"TaskUpdate(*)",
]
@@ -133,7 +130,7 @@ def parse_args() -> argparse.Namespace:
parser.add_argument(
"--include-edits",
action="store_true",
help="Add file-editing permissions (Edit/Write/NotebookEdit/TaskCreate/TaskUpdate)",
help="Add file-editing permissions (Edit/TaskCreate/TaskUpdate)",
)
parser.add_argument(
"--include-tests",
+5 -4
View File
@@ -357,8 +357,8 @@ export GITHUB_TOKEN="your_token" && claude mcp add github -- npx -y @modelcontex
| `Stop` | Claude завершив відповідь | Відповідь готова | Очищення, звітність |
| `StopFailure` | API-помилка завершила черга | API-помилка | Відновлення, логування |
| `TeammateIdle` | Агент-партнер бездіє | Координація агентів | Розподіл роботи |
| `TaskCompleted` | Завдання позначено як виконане (спрацьовує лише коли увімкнені todo-інструменти — типово вимкнені на Opus 4.8, Sonnet 5, Fable 5, Mythos 5 і новіших; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Завдання завершено | Пост-обробка |
| `TaskCreated` | Завдання створено через TaskCreate (спрацьовує лише коли увімкнені todo-інструменти — типово вимкнені на Opus 4.8, Sonnet 5, Fable 5, Mythos 5 і новіших; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Нове завдання створено | Відстеження, логування |
| `TaskCompleted` | Завдання позначено як виконане (спрацьовує лише коли увімкнені todo-інструменти — доступні типово тільки на Claude 3.x, Opus 44.7, Sonnet 44.6 та Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Завдання завершено | Пост-обробка |
| `TaskCreated` | Завдання створено через TaskCreate (спрацьовує лише коли увімкнені todo-інструменти — доступні типово тільки на Claude 3.x, Opus 44.7, Sonnet 44.6 та Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Нове завдання створено | Відстеження, логування |
| `ConfigChange` | Конфігурацію оновлено | Налаштування змінені | Реакція на зміни конфігурації |
| `CwdChanged` | Робочий каталог змінився | Зміна каталогу | Налаштування для каталогу |
| `DirectoryAdded` | Новий робочий каталог зареєстровано під час сесії | `/add-dir` або SDK `register_repo_root` | Налаштування інструментів для нового каталогу |
@@ -532,9 +532,10 @@ chmod +x ~/.claude/hooks/*.sh
---
**Останнє оновлення**: 2 вересня 2026
**Версія Claude Code**: 2.1.257
**Останнє оновлення**: 19 вересня 2026
**Версія Claude Code**: 2.1.278
**Джерела**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/commands
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/plugins-reference
+4 -3
View File
@@ -237,7 +237,7 @@ blog-draft/
- Хуки інструментів: 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` повертає їх)
- Хуки завдань: UserPromptSubmit, UserPromptExpansion, MessageDisplay, TaskCompleted, TaskCreated, TeammateIdle (TaskCompleted/TaskCreated спрацьовують лише коли увімкнені todo-інструменти — доступні типово тільки на Claude 3.x, Opus 44.7, Sonnet 44.6 та Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх)
- Хуки життєвого циклу: ConfigChange, CwdChanged, DirectoryAdded, FileChanged, PreCompact, PostCompact, PreModelSwitch, PostModelSwitch, WorktreeCreate, WorktreeRemove, Notification, InstructionsLoaded, Elicitation, ElicitationResult
---
@@ -932,12 +932,13 @@ Run tests in background
---
**Останнє оновлення**: 15 серпня 2026
**Версія Claude Code**: 2.1.233
**Останнє оновлення**: 19 вересня 2026
**Версія Claude Code**: 2.1.278
**Прикладів**: 100+ файлів
**Категорій**: 10 функцій
**Хуків**: 8 скриптів автоматизації
**Прикладів конфігурації**: 10+ сценаріїв
**Готові до використання**: Усі приклади
**Джерела**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/hooks
+4 -3
View File
@@ -443,7 +443,7 @@ chmod +x ~/.claude/hooks/*.sh
**Події хуків** (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` повертає їх)
- **Хуки завдань**: `UserPromptSubmit`, `UserPromptExpansion`, `MessageDisplay`, `TaskCompleted`, `TaskCreated`, `TeammateIdle` (`TaskCompleted` і `TaskCreated` спрацьовують лише коли увімкнені todo-інструменти — доступні типово тільки на Claude 3.x, Opus 44.7, Sonnet 44.6 та Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх)
- **Хуки життєвого циклу**: `ConfigChange`, `CwdChanged`, `DirectoryAdded`, `FileChanged`, `PreCompact`, `PostCompact`, `PreModelSwitch`, `PostModelSwitch`, `WorktreeCreate`, `WorktreeRemove`, `Notification`, `InstructionsLoaded`, `Elicitation`, `ElicitationResult`
</details>
@@ -659,9 +659,10 @@ Claude:
---
**Останнє оновлення**: 2 вересня 2026
**Версія Claude Code**: 2.1.257
**Останнє оновлення**: 19 вересня 2026
**Версія Claude Code**: 2.1.278
**Джерела**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/hooks
- 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
+5 -4
View File
@@ -2830,8 +2830,8 @@ Claude Code підтримує **33 події хуків** у п'яти тип
| **Stop** | Claude завершив відповідь | Генерація підсумку, завдання очищення |
| **StopFailure** | Помилка API завершує хід | Відновлення після помилки, логування |
| **TeammateIdle** | Тімейт у команді агентів без роботи | Розподіл роботи, координація |
| **TaskCompleted** | Завдання позначено як виконане (спрацьовує лише коли увімкнені todo-інструменти — типово вимкнені на Opus 4.8, Sonnet 5, Fable 5, Mythos 5 і новіших; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Пост-обробка завдання |
| **TaskCreated** | Завдання створено через TaskCreate (спрацьовує лише коли увімкнені todo-інструменти — типово вимкнені на Opus 4.8, Sonnet 5, Fable 5, Mythos 5 і новіших; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Відстеження завдань, логування |
| **TaskCompleted** | Завдання позначено як виконане (спрацьовує лише коли увімкнені todo-інструменти — доступні типово тільки на Claude 3.x, Opus 44.7, Sonnet 44.6 та Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Пост-обробка завдання |
| **TaskCreated** | Завдання створено через TaskCreate (спрацьовує лише коли увімкнені todo-інструменти — доступні типово тільки на Claude 3.x, Opus 44.7, Sonnet 44.6 та Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` повертає їх) | Відстеження завдань, логування |
| **ConfigChange** | Зміна конфігураційного файлу | Валідація, поширення |
| **CwdChanged** | Зміна робочого каталогу | Налаштування для конкретного каталогу |
| **DirectoryAdded** | Новий робочий каталог зареєстровано під час сесії | Налаштування інструментів для нового каталогу |
@@ -3137,7 +3137,8 @@ User: \
*Тепер включає: хуки, контрольні точки, режим планування, розширене мислення, фонові завдання, режими дозволів (6 режимів), headless-режим, управління сесіями, авто-пам'ять, команди агентів, заплановані завдання, інтеграцію з Chrome, канали, голосовий ввід та комплектні навички*
---
**Останнє оновлення**: 2 вересня 2026
**Версія Claude Code**: 2.1.257
**Останнє оновлення**: 19 вересня 2026
**Версія Claude Code**: 2.1.278
**Джерела**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/hooks
+5 -4
View File
@@ -59,6 +59,7 @@ Lệnh tích hợp sẵn là các lối tắt cho các hành động phổ biế
| `/memory` | Chỉnh sửa `CLAUDE.md`, bật/tắt auto-memory |
| `/mobile` | Mã QR cho ứng dụng di động (bí danh: `/ios`, `/android`) |
| `/model [model]` | Chọn mô hình với mũi tên trái/phải cho nỗ lực |
| `/output-style [name]` | Liệt kê và chuyển đổi output style (được thêm lại ở v2.1.269 sau khi bị xóa ở v2.1.91). Không có tham số thì lệnh liệt kê các style và đánh dấu style hiện tại. Hoạt động trong phiên headless và Remote Control; lựa chọn được lưu vào `.claude/settings.local.json` |
| `/passes` | Chia sẻ tuần miễn phí Claude Code |
| `/permissions` | Xem/cập nhật quyền (bí danh: `/allowed-tools`) |
| `/plan [description]` | Nhập chế độ lập kế hoạch |
@@ -103,14 +104,13 @@ Những skills này được gửi kèm với Claude Code và được gọi nh
| Lệnh | Trạng Thái |
|---------|--------|
| `/output-style` | Đã xóa trong v2.1.91 (lỗi thời từ v2.1.73) — dùng `/config` → Output style, hoặc setting `outputStyle` |
| `/pr-comments` | Đã xóa trong v2.1.91 — hỏi Claude trực tiếp để xem bình luận PR |
| `/vim` | Đã xóa trong v2.1.92 — sử dụng /config → Editor mode |
### Thay Đổi Gần Đây
- `/fork``/subtask` hoán đổi vai trò trong **v2.1.212**. `/fork` giờ sao chép cuộc hội thoại thành một phiên nền độc lập mới; hành vi subagent-được-fork mà nó từng có đã chuyển sang lệnh mới `/subtask`. Lịch sử: `/fork` là bí danh của `/branch` từ v2.1.77 đến v2.1.161; từ v2.1.161 đến v2.1.211 nó khởi chạy một subagent được fork (việc mà `/subtask` làm bây giờ). Khi tắt agent view, `/subtask` không khả dụng và `/fork` giữ hành vi subagent-được-fork
- `/output-style` đã lỗi thời (v2.1.73) và bị xóa (v2.1.91) — output styles vẫn có sẵn qua `/config` → Output style hoặc setting `outputStyle`; các bản tích hợp sẵn là Default, Proactive, Explanatory, Learning, và Concise (thêm ở v2.1.237)
- `/output-style` đã lỗi thời (v2.1.73) và bị xóa (v2.1.91), sau đó **được thêm lại ở v2.1.269** — nó là lệnh còn hoạt động trở lại trong v2.1.278, và chạy được trong phiên headless lẫn Remote Control. Output styles cũng vẫn có sẵn qua `/config` → Output style hoặc setting `outputStyle`; các bản tích hợp sẵn là Default, Proactive, Explanatory, Learning, và Concise (thêm ở v2.1.237)
- `/review` trở thành bí danh đầy đủ của `/code-review` — cùng target, mức effort và flags (v2.1.223). Lịch sử: ban đầu nó chuyển sang engine `/code-review medium` trong v2.1.186 nhưng vẫn chỉ dùng cho PR
- Lệnh `/effort` được thêm với mức `max` yêu cầu Opus 4.6
- Lệnh `/voice` được thêm cho nhập liệu giọng nói push-to-talk
@@ -557,10 +557,11 @@ Nếu cả hai tồn tại với cùng tên, **skill sẽ được ưu tiên**.
---
**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 19 tháng 9 năm 2026
**Phiên Bản Claude Code**: 2.1.278
**Nguồn**:
- https://code.claude.com/docs/en/commands
- https://code.claude.com/docs/en/output-styles
**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
*Phần của series hướng dẫn [Claude How To](../)*
+4 -2
View File
@@ -235,6 +235,7 @@ Claude Code sử dụng một hệ thống bộ nhớ phân cấp đa tầng. C
3. **Project Memory** - Bối cảnh được chia sẻ cho đội (được kiểm soát phiên bản)
- `./.claude/CLAUDE.md` hoặc `./CLAUDE.md` (trong root repository)
- Từ v2.1.277, `./AGENTS.md` được tải ở chính tầng này thay thế, khi không có `CLAUDE.md` hay `CLAUDE.local.md` ở thư mục làm việc hoặc phía trên nó — điều khiển bằng **Project instructions** trong `/config`
4. **Project Rules** - Hướng dẫn dự án mô-đun, cụ thể theo chủ đề
- `./.claude/rules/*.md`
@@ -1158,8 +1159,9 @@ Claude sẽ nhắc bạn chọn file bộ nhớ nào để cập nhật.
---
**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 19 tháng 9 năm 2026
**Phiên Bản Claude Code**: 2.1.278
**Nguồn**:
- https://code.claude.com/docs/en/memory
- https://code.claude.com/docs/en/memory#agents-md
**Các Mô Hình Tương Thích**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
+1 -1
View File
@@ -193,7 +193,7 @@ Trước khi hoàn thành, xác minh:
Nếu người dùng yêu cầu tạo/cập nhật AGENTS.md:
**Claude Code KHÔNG đọc AGENTS.md trực tiếp.** Để nó có hiệu lực, hãy import từ CLAUDE.md bằng `@AGENTS.md`, hoặc symlink `CLAUDE.md` tới nó. Đây là hiểu lầm phổ biến nhất về file này.
**Từ v2.1.277, Claude Code đọc `AGENTS.md` trực tiếp như hướng dẫn dự án** — nhưng chỉ khi thư mục làm việc và mọi thư mục phía trên nó đều không có `CLAUDE.md`, `.claude/CLAUDE.md`, hay `CLAUDE.local.md`. `~/.claude/CLAUDE.md`, CLAUDE.md được quản lý, và `.claude/rules/` không tính vào kiểm tra đó và vẫn được tải song song. Hành vi này được điều khiển bởi **Project instructions** trong `/config`: `claude-md-or-agents-md` (mặc định), `claude-md-and-agents-md`, `claude-md`, hoặc `managed-only`. Ở nơi không hỗ trợ đọc trực tiếp — Bedrock/Vertex/Foundry, telemetry bị tắt, phiên đầu tiên sau khi nâng cấp, hoặc `disableAllHooks`/`allowManagedHooksOnly` — hãy dùng cách dự phòng: import từ CLAUDE.md bằng `@AGENTS.md`, hoặc symlink `CLAUDE.md` tới nó.
AGENTS.md là file bối cảnh dự án dùng chung giữa nhiều công cụ — cùng *loại* tài liệu với CLAUDE.md, không phải định dạng định nghĩa tác nhân. Nó tồn tại để nhiều coding agent có thể dùng chung một bộ quy ước dự án:
- Các lệnh build, test, và lint
+4 -3
View File
@@ -211,7 +211,7 @@ Claude Code hỗ trợ **33 sự kiện hook**:
| **ElicitationResult** | Người dùng phản hồi elicitation | (none) | Có | Xử lý phản hồi |
| **SessionEnd** | Phiên kết thúc | (none) | Không | Dọn dẹp, logging cuối |
> **`TaskCreated``TaskCompleted` cần bật todo tools (v2.1.233).** Hai sự kiện này phát ra từ các todo/task-tracking tools (`TaskCreate`/`Get`/`Update`/`List`, `TodoWrite`), vốn **không còn khả dụng trên Opus 4.8, Sonnet 5, Fable 5, Mythos 5 và các model mới hơn**. Trên các model đó, hook vẫn là cấu hình hợp lệ nhưng đơn giản là không bao giờ chạy — không có output và cũng không có lỗi. Đặt `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` để khôi phục.
> **`TaskCreated``TaskCompleted` cần bật todo tools (v2.1.233).** Hai sự kiện này phát ra từ các todo/task-tracking tools (`TaskCreate`/`Get`/`Update`/`List`, `TodoWrite`), vốn **chỉ khả dụng mặc định trên các model Claude 3.x, Opus 4 đến 4.7, Sonnet 4 đến 4.6 và Haiku 4.5**. Trên các model khác, hook vẫn là cấu hình hợp lệ nhưng đơn giản là không bao giờ chạy — không có output và cũng không có lỗi. Đặt `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` để khôi phục.
### PreToolUse
@@ -878,8 +878,9 @@ 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 2 tháng 9 năm 2026
**Phiên Bản Claude Code**: 2.1.257
**Cập Nhật Lần Cuối**: Ngày 19 tháng 9 năm 2026
**Phiên Bản Claude Code**: 2.1.278
**Nguồn**:
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
**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 -9
View File
@@ -349,7 +349,7 @@ Auto Mode is a permission mode that uses a background safety classifier to revie
- **Plan**: Team plan (Enterprise and API rolling out)
- **Model**: Claude Sonnet 4.6 or Opus 4.6
- **Classifier**: Runs on Claude Sonnet 4.6 (adds extra token cost)
- **Classifier**: Tốn thêm chi phí token, ngoại trừ trên gói Enterprise và tài khoản Claude API, nơi v2.1.278+ chạy kiểm tra phía máy chủ mà không tính phí
### Enabling Auto Mode
@@ -445,15 +445,14 @@ The script adds rules across these categories:
| Category | Examples |
|----------|---------|
| Core read-only tools | `Read(*)`, `Glob(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)`, `WebFetch(*)` |
| Core read-only tools | `Read(*)`, `Grep(*)`, `Agent(*)`, `WebSearch(*)`, `WebFetch(*)` |
| Local inspection | `Bash(git status:*)`, `Bash(git log:*)`, `Bash(git diff:*)`, `Bash(cat:*)` |
| Optional edits | `Edit(*)`, `Write(*)`, `NotebookEdit(*)` |
| Optional edits | `Edit(*)` |
| Optional test/build | `Bash(pytest:*)`, `Bash(python3 -m pytest:*)`, `Bash(cargo test:*)` |
| Optional git writes | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git stash:*)` |
| Git (local write) | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git checkout:*)` |
| Package managers | `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(cargo build:*)` |
| Optional git writes | `Bash(git add:*)`, `Bash(git commit:*)`, `Bash(git checkout:*)`, `Bash(git switch:*)`, `Bash(git stash:*)`, `Bash(git tag:*)` |
| Package managers | `Bash(npm ci:*)`, `Bash(npm install:*)`, `Bash(pip install:*)`, `Bash(pip3 install:*)` |
| Build & test | `Bash(make:*)`, `Bash(pytest:*)`, `Bash(go test:*)` |
| Common shell | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)`, `Bash(cp:*)`, `Bash(mv:*)` |
| Common shell | `Bash(ls:*)`, `Bash(cat:*)`, `Bash(find:*)` |
| GitHub CLI | `Bash(gh pr view:*)`, `Bash(gh pr create:*)`, `Bash(gh issue list:*)` |
Dangerous operations (`rm -rf`, `sudo`, force push, `DROP TABLE`, `terraform destroy`, etc.) are intentionally excluded. The script is idempotent — running it twice won't duplicate rules.
@@ -1870,6 +1869,9 @@ For more information about Claude Code and related features:
---
**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 19 tháng 9 năm 2026
**Phiên Bản Claude Code**: 2.1.278
**Nguồn**:
- https://code.claude.com/docs/en/permissions
- https://code.claude.com/docs/en/auto-mode-classifier-billing
**Các Mô Hình Tương Thích**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
@@ -26,7 +26,6 @@ SETTINGS_PATH = Path.home() / ".claude" / "settings.json"
# Core baseline: read-only inspection and low-risk local shell commands.
CORE_PERMISSIONS = [
"Read(*)",
"Glob(*)",
"Grep(*)",
"Agent(*)",
"Skill(*)",
@@ -68,8 +67,6 @@ CORE_PERMISSIONS = [
# Optional but still local: file edits and task bookkeeping.
EDITING_PERMISSIONS = [
"Edit(*)",
"Write(*)",
"NotebookEdit(*)",
"TaskCreate(*)",
"TaskUpdate(*)",
]
@@ -133,7 +130,7 @@ def parse_args() -> argparse.Namespace:
parser.add_argument(
"--include-edits",
action="store_true",
help="Add file-editing permissions (Edit/Write/NotebookEdit/TaskCreate/TaskUpdate)",
help="Add file-editing permissions (Edit/TaskCreate/TaskUpdate)",
)
parser.add_argument(
"--include-tests",
+5 -4
View File
@@ -349,8 +349,8 @@ Tự động hóa dựa trên sự kiện thực thi shell commands trên các s
| `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 |
| `StopFailure` | Lỗi API kết thúc turn | Lỗi API xảy ra | Phục hồi lỗi, logging |
| `TeammateIdle` | Agent teammate rảnh | Phối hợp agent team | Phân phối work |
| `TaskCompleted` | Task được đánh dấu hoàn tất (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 xong | Xử lý post-task |
| `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 |
| `TaskCompleted` | Task được đánh dấu hoàn tất (chỉ phát ra khi bật todo tools — mặc định chỉ có trên Claude 3.x, Opus 4 đến 4.7, Sonnet 4 đến 4.6 và Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` khôi phục) | Task xong | Xử lý post-task |
| `TaskCreated` | Task được tạo qua TaskCreate (chỉ phát ra khi bật todo tools — mặc định chỉ có trên Claude 3.x, Opus 4 đến 4.7, Sonnet 4 đến 4.6 và Haiku 4.5; `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 |
@@ -522,9 +522,10 @@ chmod +x ~/.claude/hooks/*.sh
---
**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
**Cập Nhật Lần Cuối**: Ngày 19 tháng 9 năm 2026
**Phiên Bản Claude Code**: 2.1.278
**Nguồn**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/commands
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/plugins-reference
+4 -3
View File
@@ -223,7 +223,7 @@ Các script tự động hóa dựa trên sự kiện thực thi tự động.
**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)
- Task Hooks: UserPromptSubmit, UserPromptExpansion, MessageDisplay, TaskCompleted, TaskCreated, TeammateIdle (TaskCompleted/TaskCreated chỉ phát ra khi bật todo tools — mặc định chỉ có trên Claude 3.x, Opus 4 đến 4.7, Sonnet 4 đến 4.6 và Haiku 4.5; `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` khôi phục)
- Lifecycle Hooks: ConfigChange, CwdChanged, DirectoryAdded, FileChanged, PreCompact, PostCompact, PreModelSwitch, PostModelSwitch, WorktreeCreate, WorktreeRemove, Notification, InstructionsLoaded, Elicitation, ElicitationResult
---
@@ -876,12 +876,13 @@ Muốn thêm ví dụ nữa? Theo cấu trúc:
---
**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 19 tháng 9 năm 2026
**Phiên Bản Claude Code**: 2.1.278
**Tổng Số Ví Dụ**: 100+ files
**Danh Mục**: 10 tính năng
**Hooks**: 8 scripts tự động hóa
**Ví Dụ Cấu Hình**: 10+ scenarios
**Sẵn Sàng Sử Dụng**: Tất cả ví dụ
**Nguồn**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/hooks
+5 -4
View File
@@ -59,6 +59,7 @@ Claude Code 目前提供 55+ 个内置命令和 5 个内置 Skills。你可以
| `/memory` | 编辑 `CLAUDE.md`,切换自动记忆 |
| `/mobile` | 生成移动端扫码二维码(别名:`/ios``/android` |
| `/model [model]` | 选择模型,并可用左右箭头调整 effort |
| `/output-style [name]` | 列出并切换 output stylev2.1.91 移除后,于 v2.1.269 重新加回)。不带参数时列出所有 style 并标记当前使用的那个。在 headless 和 Remote Control 会话中均可使用;选择结果保存到 `.claude/settings.local.json` |
| `/passes` | 分享一周免费 Claude Code 使用权 |
| `/permissions` | 查看或更新权限(别名:`/allowed-tools` |
| `/plan [description]` | 进入规划模式 |
@@ -101,13 +102,12 @@ Claude Code 目前提供 55+ 个内置命令和 5 个内置 Skills。你可以
| 命令 | 状态 |
|---------|--------|
| `/output-style` | 已于 v2.1.91 移除(v2.1.73 起弃用)— 改用 `/config` → Output style,或 `outputStyle` 设置 |
| `/vim` | 自 v2.1.92 起移除;改用 `/config → Editor mode` |
### 最近变化
- `/fork``/subtask`**v2.1.212** 互换了角色。`/fork` 现在是把对话复制到一个独立的后台会话;原来的 forked subagent 行为转移到了新命令 `/subtask`。历史:v2.1.77v2.1.161 期间 `/fork``/branch` 的别名;v2.1.161v2.1.211 期间它启动 forked subagent(即现在 `/subtask` 的行为)。关闭 agent view 时 `/subtask` 不可用,`/fork` 仍保留 forked subagent 行为
- `/output-style` 弃用(v2.1.73)并于 v2.1.91 移除output styles 仍可通过 `/config` → Output style 或 `outputStyle` 设置使用
- `/output-style` 曾被弃用(v2.1.73)并于 v2.1.91 移除,随后**在 v2.1.269 重新加回** — 在 v2.1.278 中它又是一个可用命令,并且在 headless 和 Remote Control 会话中都能工作。output styles 同样仍可通过 `/config` → Output style 或 `outputStyle` 设置使用
- `/review` 成为 `/code-review` 的完整别名 —— 目标、effort 级别和标志完全相同(v2.1.223)。历史:它在 v2.1.186 首次迁移到 `/code-review medium` 引擎,但当时仅支持 PR
- 新增 `/effort`,其中 `max` 级别需要 Opus 4.6
- 新增 `/voice`,用于按住说话语音输入
@@ -548,10 +548,11 @@ allowed-tools: Bash(npm *), Bash(git *)
---
**最后更新**: 2026 年 8 月 19 日
**Claude Code 版本**: 2.1.235
**最后更新**: 2026 年 9 月 19 日
**Claude Code 版本**: 2.1.278
**来源**:
- https://code.claude.com/docs/en/commands
- https://code.claude.com/docs/en/output-styles
**兼容模型**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
---
+1 -1
View File
@@ -193,7 +193,7 @@ agent_docs/
如果用户请求创建或更新 AGENTS.md:
**Claude Code 会直接读取 AGENTS.md。** 要让它生效,需要在 CLAUDE.md 中用 `@AGENTS.md` 导入,或者把 `CLAUDE.md` 软链接到它。这是关于这个文件最常见的误解。
**从 v2.1.277 起,Claude Code 会直接`AGENTS.md` 作为项目指令读取。** 但前提是工作目录以及它上面的每一级目录都没有 `CLAUDE.md``.claude/CLAUDE.md``CLAUDE.local.md``~/.claude/CLAUDE.md`、受管理的 CLAUDE.md 和 `.claude/rules/` 不计入这项检查,它们仍会一并加载。该行为由 `/config` 中的 **Project instructions** 控制:`claude-md-or-agents-md`(默认)、`claude-md-and-agents-md``claude-md``managed-only`。在无法直接读取的环境中 — Bedrock/Vertex/Foundry、关闭遥测、升级后的第一个会话,或 `disableAllHooks`/`allowManagedHooksOnly` — 退回到在 CLAUDE.md 中用 `@AGENTS.md` 导入,或者把 `CLAUDE.md` 软链接到它。
AGENTS.md 是一个跨工具的项目上下文文件 — 和 CLAUDE.md 属于同一*类*文档,而不是 agent 定义格式。它的存在是为了让多个编码 agent 共用同一套项目约定:
- 构建、测试和 lint 命令
+4 -3
View File
@@ -26,7 +26,7 @@ Claude Code 支持 33 个 hook 事件,按用途分为以下 4 组。事件的
- **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` 可恢复)
- **Task Hooks**`UserPromptSubmit``UserPromptExpansion``MessageDisplay``TaskCompleted``TaskCreated``TeammateIdle``TaskCompleted``TaskCreated` 仅在启用 todo 工具时触发 —— 默认仅在 Claude 3.x 模型、Opus 4 至 4.7、Sonnet 4 至 4.6 及 Haiku 4.5 上可用`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复)
- **Lifecycle Hooks**`ConfigChange``CwdChanged``DirectoryAdded``FileChanged``PreCompact``PostCompact``PreModelSwitch``PostModelSwitch``WorktreeCreate``WorktreeRemove``Notification``InstructionsLoaded``Elicitation``ElicitationResult`
## 安装
@@ -113,7 +113,8 @@ Hooks 会在匹配到事件时自动执行。你可以把它理解成 Claude Cod
---
**最后更新**: 2026 年 9 月 2
**Claude Code 版本**: 2.1.257
**最后更新**: 2026 年 9 月 19
**Claude Code 版本**: 2.1.278
**来源**:
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
+5 -4
View File
@@ -353,8 +353,8 @@ export GITHUB_TOKEN="your_token" && claude mcp add github -- npx -y @modelcontex
| `Stop` | Claude 完成响应 | 响应完成 | 清理、汇报 |
| `StopFailure` | API 错误导致结束 | API 错误发生 | 错误恢复、日志 |
| `TeammateIdle` | 队友 agent 空闲 | agent team 协调 | 分配工作 |
| `TaskCompleted` | 任务标记完成(仅在启用 todo 工具时触发 —— 在 Opus 4.8、Sonnet 5、Fable 5、Mythos 5 及更新模型上默认关闭`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复) | 任务完成 | 任务后处理 |
| `TaskCreated` | 通过 TaskCreate 创建任务(仅在启用 todo 工具时触发 —— 在 Opus 4.8、Sonnet 5、Fable 5、Mythos 5 及更新模型上默认关闭`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复) | 新任务创建 | 任务追踪、日志 |
| `TaskCompleted` | 任务标记完成(仅在启用 todo 工具时触发 —— 默认仅在 Claude 3.x、Opus 4 至 4.7、Sonnet 4 至 4.6、Haiku 4.5 上可用`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复) | 任务完成 | 任务后处理 |
| `TaskCreated` | 通过 TaskCreate 创建任务(仅在启用 todo 工具时触发 —— 默认仅在 Claude 3.x、Opus 4 至 4.7、Sonnet 4 至 4.6、Haiku 4.5 上可用`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复) | 新任务创建 | 任务追踪、日志 |
| `ConfigChange` | 配置更新 | 设置被修改 | 响应配置变化 |
| `CwdChanged` | 当前工作目录变化 | 目录切换 | 目录级初始化 |
| `DirectoryAdded` | 会话中注册了新的工作目录 | `/add-dir` 或 SDK `register_repo_root` | 为新目录配置工具链 |
@@ -531,9 +531,10 @@ claude mcp add github -- npx -y @modelcontextprotocol/server-github
---
**最后更新**: 2026 年 9 月 2
**Claude Code 版本**: 2.1.257
**最后更新**: 2026 年 9 月 19
**Claude Code 版本**: 2.1.278
**来源**:
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/commands
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/plugins-reference
+4 -3
View File
@@ -219,7 +219,7 @@ blog-draft/
**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`UserPromptSubmit``UserPromptExpansion``MessageDisplay``TaskCompleted``TaskCreated``TeammateIdle`TaskCompleted/TaskCreated 仅在启用 todo 工具时触发 —— 默认仅在 Claude 3.x、Opus 4 至 4.7、Sonnet 4 至 4.6、Haiku 4.5 上可用`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复)
- 生命周期 Hook`ConfigChange``CwdChanged``DirectoryAdded``FileChanged``PreCompact``PostCompact``PreModelSwitch``PostModelSwitch``WorktreeCreate``WorktreeRemove``Notification``InstructionsLoaded``Elicitation``ElicitationResult`
---
@@ -894,12 +894,13 @@ claude -p "Run tests and report results"
---
**最后更新**2026 年 8 月 15
**Claude Code 版本**2.1.233
**最后更新**2026 年 9 月 19
**Claude Code 版本**2.1.278
**总示例数**100+ 文件
**分类数**10 个功能
**Hooks**8 个自动化脚本
**配置示例**10+ 个场景
**可直接使用**:所有示例
**来源**
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/hooks
+4 -3
View File
@@ -483,7 +483,7 @@ chmod +x ~/.claude/hooks/*.sh
**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**: `UserPromptSubmit`, `UserPromptExpansion`, `MessageDisplay`, `TaskCompleted`, `TaskCreated`, `TeammateIdle``TaskCompleted``TaskCreated` 仅在启用 todo 工具时触发 —— 默认仅在 Claude 3.x、Opus 4 至 4.7、Sonnet 4 至 4.6、Haiku 4.5 上可用`CLAUDE_CODE_ENABLE_TODO_TOOLS=1` 可恢复)
- **生命周期 Hook**: `ConfigChange`, `CwdChanged`, `DirectoryAdded`, `FileChanged`, `PreCompact`, `PostCompact`, `PreModelSwitch`, `PostModelSwitch`, `WorktreeCreate`, `WorktreeRemove`, `Notification`, `InstructionsLoaded`, `Elicitation`, `ElicitationResult`
</details>
@@ -878,9 +878,10 @@ MIT 许可证,详见 [LICENSE](LICENSE)。你可以自由使用、修改和分
---
**最后更新**2026 年 9 月 2
**Claude Code 版本**2.1.257
**最后更新**2026 年 9 月 19
**Claude Code 版本**2.1.278
**来源**
- https://code.claude.com/docs/en/tools-reference#task-tool-availability
- https://code.claude.com/docs/en/hooks
- 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