diff --git a/01-slash-commands/README.md b/01-slash-commands/README.md index 03e021a..7a04206 100644 --- a/01-slash-commands/README.md +++ b/01-slash-commands/README.md @@ -31,9 +31,9 @@ Built-in commands are shortcuts for common actions. There are **60+ built-in com | `/chrome` | Configure Chrome browser integration | | `/clear` | Clear conversation (aliases: `/reset`, `/new`) | | `/color [color\|default]` | Set prompt bar color. Bare `/color` (no args) picks a random session color (v2.1.128+); pass a color name or hex to set explicitly. | -| `/compact [instructions]` | Compact conversation with optional focus instructions | +| `/compact [instructions]` | Compact conversation with optional focus instructions. A failed compact now displays as an error in the UI instead of silently doing nothing (v2.1.216) | | `/config` | Open Settings (alias: `/settings`) | -| `/context` | Visualize context usage as colored grid | +| `/context` | Visualize context usage as colored grid. Shows an explicit warning when usage is over the context window limit (v2.1.216) | | `/copy [N]` | Copy assistant response to clipboard; `w` writes to file | | `/cost` | Typing-shortcut alias for `/usage` — opens the cost tab (v2.1.118+) | | `/desktop` | Continue in Desktop app (alias: `/app`) | @@ -633,8 +633,8 @@ If both exist with the same name, the **skill takes precedence**. Remove one or --- -**Last Updated**: July 18, 2026 -**Claude Code Version**: 2.1.212 +**Last Updated**: 2026-07-22 +**Claude Code Version**: 2.1.217 **Sources**: - https://code.claude.com/docs/en/slash-commands - https://code.claude.com/docs/en/skills diff --git a/02-memory/README.md b/02-memory/README.md index 18ee304..71f4583 100644 --- a/02-memory/README.md +++ b/02-memory/README.md @@ -115,7 +115,7 @@ If you relied on this pattern, switch to the `/memory` command or conversational ### The `/memory` Command -The `/memory` command provides direct access to edit your CLAUDE.md memory files within Claude Code sessions. It opens your memory files in your system editor for comprehensive editing. +The `/memory` command provides direct access to edit your CLAUDE.md memory files within Claude Code sessions. It opens your memory files in your system editor for comprehensive editing. When the file opens in a GUI editor, the session no longer blocks while the file stays open, so you can keep working in parallel (v2.1.216); terminal editors like Vim still take over the terminal until you exit. **Usage:** @@ -449,6 +449,7 @@ Auto memory is a persistent directory where Claude automatically records learnin - **Topic files**: Optional additional files for specific subjects (e.g., `debugging.md`, `api-conventions.md`) - **Loading behavior**: The first 200 lines of `MEMORY.md` (or first 25KB, whichever comes first) are loaded into context at session start. Topic files are loaded on demand, not at startup. - **Read/write**: Claude reads and writes memory files during sessions as it discovers patterns and project-specific knowledge +- **Frontmatter**: Files that begin with YAML frontmatter get a `modified` field — an ISO 8601 timestamp Claude Code records each time it writes the file (v2.1.214) ### Auto Memory Architecture @@ -913,7 +914,7 @@ graph LR - **Directory memory**: Module-specific rules and overrides - **Leverage imports**: Use `@path/to/file` syntax to reference existing documentation - - Supports up to 5 levels of recursive nesting + - Supports a maximum depth of 4 hops for recursive imports - Avoids duplication across memory files - Example: `See @README.md for project overview` @@ -935,13 +936,13 @@ graph LR - **Don't be vague**: Avoid generic statements like "follow best practices" or "write good code" -- **Don't make it too long**: Keep individual memory files focused and under 500 lines +- **Don't make it too long**: Keep individual memory files focused — keep it under a few hundred lines; shorter is better - **Don't over-organize**: Use hierarchy strategically; don't create excessive subdirectory overrides - **Don't forget to update**: Stale memory can cause confusion and outdated practices -- **Don't exceed nesting limits**: Memory imports support up to 5 levels of nesting +- **Don't exceed nesting limits**: Memory imports support a maximum depth of 4 hops ### Memory Management Tips @@ -1148,15 +1149,8 @@ Auto Memory is a separate mechanism (`~/.claude/projects//memory/`), no - [Official Memory Docs](https://code.claude.com/docs/en/memory) - Anthropic documentation --- -**Last Updated**: July 18, 2026 -**Claude Code Version**: 2.1.212 + +**Last Updated**: 2026-07-22 +**Claude Code Version**: 2.1.217 **Sources**: - https://code.claude.com/docs/en/memory -- https://code.claude.com/docs/en/settings -- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md -- https://docs.anthropic.com/en/docs/claude-code/settings -- https://code.claude.com/docs/en/cli-reference -- https://github.com/anthropics/claude-code/releases/tag/v2.1.117 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.144 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.145 -**Compatible Models**: Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5 diff --git a/03-skills/README.md b/03-skills/README.md index c6a99ae..ad94cec 100644 --- a/03-skills/README.md +++ b/03-skills/README.md @@ -834,9 +834,9 @@ Claude Code ships with a set of built-in skills that are always available withou | `/loop [interval] ` | Run prompt repeatedly on interval (e.g., `/loop 5m check the deploy`) | | `/run` *(v2.1.145+)* | Launch this project's app to see a change running — looks for a project skill, otherwise falls back to built-in patterns per project type | | `/run-skill-generator` *(v2.1.145+)* | Teach `/run`/`/verify` how to handle a specific project by generating a per-project skill | -| `/code-review [effort]` | Review the current diff for correctness bugs at a chosen effort level (e.g. `/code-review high`); pass `--comment` to post findings as inline PR comments. A distinct skill from `/simplify` (quality/reuse cleanups), which was split back out in v2.1.154. | +| `/code-review [effort]` | Review the current diff for correctness bugs at a chosen effort level (e.g. `/code-review high`); pass `--comment` to post findings as inline PR comments. A distinct skill from `/simplify` (quality/reuse cleanups), which was split back out in v2.1.154. (explicit invocation only since v2.1.215 — Claude won't trigger this on its own) | | `/simplify` | Cleanup-only review — reuse, simplification, efficiency, altitude — and applies the fixes. Split back out from `/code-review` in v2.1.154 | -| `/verify` *(v2.1.145+)* | Build, run, and observe the app to confirm a fix works (not just that tests pass) | +| `/verify` *(v2.1.145+)* | Build, run, and observe the app to confirm a fix works (not just that tests pass) (explicit invocation only since v2.1.215 — Claude won't trigger this on its own) | These skills are available out-of-the-box and do not need to be installed or configured. They follow the same SKILL.md format as custom skills. @@ -882,13 +882,9 @@ Once you start building skills seriously, two things become essential: a library - [Hooks Guide](../06-hooks/) - Event-driven automation --- -**Last Updated**: July 11, 2026 -**Claude Code Version**: 2.1.206 + +**Last Updated**: 2026-07-22 +**Claude Code Version**: 2.1.217 **Sources**: - https://code.claude.com/docs/en/skills -- https://code.claude.com/docs/en/settings -- https://code.claude.com/docs/en/changelog -- https://code.claude.com/docs/en/commands -- https://github.com/anthropics/claude-code/releases/tag/v2.1.152 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.154 -**Compatible Models**: Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5 +- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md diff --git a/03-skills/brand-voice/SKILL.md b/03-skills/brand-voice/SKILL.md index 00c3fdc..83c0a17 100644 --- a/03-skills/brand-voice/SKILL.md +++ b/03-skills/brand-voice/SKILL.md @@ -1,6 +1,7 @@ --- -name: brand-voice-consistency +name: brand-voice description: Ensure all communication matches brand voice and tone guidelines. Use when creating marketing copy, customer communications, public-facing content, or when users mention brand voice, tone, or writing style. +user-invocable: false --- # Brand Voice Skill diff --git a/03-skills/claude-md/SKILL.md b/03-skills/claude-md/SKILL.md index 2b3c1b4..6ae7a5b 100644 --- a/03-skills/claude-md/SKILL.md +++ b/03-skills/claude-md/SKILL.md @@ -93,7 +93,7 @@ For detailed build instructions, refer to `agent_docs/building_the_project.md` When creating or updating CLAUDE.md: -1. **Target Length**: Under 300 lines (ideally under 100) +1. **Target Length**: Keep it under a few hundred lines; shorter is better 2. **No Style Rules**: Remove any linting/formatting instructions 3. **No Task-Specific Instructions**: Move to separate files 4. **No Code Snippets**: Use file references instead @@ -150,7 +150,7 @@ Brief one-line description. Before finalizing, verify: -- [ ] Under 300 lines (preferably under 100) +- [ ] Kept under a few hundred lines; shorter is better - [ ] Every line applies to ALL sessions - [ ] No style/formatting rules - [ ] No code snippets (use file references) diff --git a/04-subagents/README.md b/04-subagents/README.md index 20182c8..b91fc0a 100644 --- a/04-subagents/README.md +++ b/04-subagents/README.md @@ -836,6 +836,16 @@ Claude Code caps subagent spawns at **200 per session** by default, to stop runa export CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION=200 ``` +Two more environment variables cap subagent fan-out: + +- `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` (v2.1.217) - Maximum number of subagents running **concurrently** at once. Default: 20. +- `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` (v2.1.217) - Maximum **nesting depth** for subagents spawning their own subagents. Nested spawning is disabled by default; set this to opt in (see [Key Behaviors](#key-behaviors)). + +```bash +export CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS=20 +export CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH=5 +``` + --- ## Architecture @@ -919,7 +929,7 @@ graph TB ### Key Behaviors -- **Nested spawning (up to 5 levels)** - As of v2.1.172, subagents can spawn their own subagents, nested up to 5 levels deep. Earlier versions did not allow any nesting. Use the `Agent(agent_type)` restriction syntax (see [Restrict Spawnable Subagents](#restrict-spawnable-subagents)) to control which subagents a given subagent may spawn +- **No nested spawning by default (v2.1.217)** - As of v2.1.217, subagents do not spawn their own subagents by default. Set `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` to opt into nested spawning, up to the depth you configure. (History: from v2.1.172 through v2.1.216, subagents could nest by default, up to 5 levels deep; v2.1.217 made that opt-in.) Use the `Agent(agent_type)` restriction syntax (see [Restrict Spawnable Subagents](#restrict-spawnable-subagents)) to control which subagents a given subagent may spawn - **Background permissions** - Background subagents auto-deny any permissions that are not pre-approved - **Backgrounding** - Press `Ctrl+B` to background a currently running task - **Transcripts** - Subagent transcripts are stored at `~/.claude/projects/{project}/{sessionId}/subagents/agent-{agentId}.jsonl` @@ -1260,12 +1270,12 @@ See the OpenTelemetry section in [Advanced Features → Telemetry](../09-advance --- -**Last Updated**: July 18, 2026 -**Claude Code Version**: 2.1.212 +**Last Updated**: July 22, 2026 +**Claude Code Version**: 2.1.217 **Sources**: -- https://code.claude.com/docs/en/subagents -- https://code.claude.com/docs/en/cli-reference +- https://code.claude.com/docs/en/sub-agents - https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md +- https://code.claude.com/docs/en/cli-reference - https://code.claude.com/docs/en/agent-teams - https://code.claude.com/docs/en/changelog#2-1-172 - https://code.claude.com/docs/en/changelog diff --git a/06-hooks/README.md b/06-hooks/README.md index 064ab9e..5762cea 100644 --- a/06-hooks/README.md +++ b/06-hooks/README.md @@ -119,6 +119,8 @@ The `if` field sits at the **hook-handler level** — a sibling of `type` and `c Examples of valid `if` patterns: `Edit(src/**)` (edits under `src/`), `Read(~/.ssh/**)` (reads of any SSH key), `Read(.env)` (any `.env` at or below the current directory), `Bash(git push *)` (only `git push` subcommands). +> **v2.1.214 update**: A single-segment `dir/**` pattern in a hook `if` condition (like `Edit(src/**)`) now matches only `/dir` — not that directory at any depth in the tree. Previously `src/**` also matched `foo/src/**`. Use `**/dir/**` if you need any-depth matching. **Important**: this narrowing applies only to hook `if:` conditions and allow-rule auto-approval — deny/ask permission rules still match `dir/**` at any depth. + ## Hook Types Claude Code supports five hook types: @@ -237,7 +239,7 @@ Claude Code supports **30 hook events**: | Event | When Triggered | Matcher Input | Can Block | Common Use | |-------|---------------|---------------|-----------|------------| -| **SessionStart** | Session begins/resumes/clear/compact | startup/resume/clear/compact | No | Environment setup | +| **SessionStart** | Session begins/resumes/clear/compact | startup/resume/clear/compact/fork | No | Environment setup | | **Setup** | Initial environment setup (one-time per session) | (none) | No | Provision tooling, install deps | | **InstructionsLoaded** | After CLAUDE.md or rules file loaded | (none) | No | Modify/filter instructions | | **UserPromptSubmit** | User submits prompt | (none) | Yes | Validate prompts | @@ -450,7 +452,9 @@ Runs when a subagent begins execution. The matcher input is the agent type name, Runs when session starts or resumes. Can persist environment variables. -**Matchers:** `startup`, `resume`, `clear`, `compact` +**Matchers:** `startup`, `resume`, `clear`, `compact`, `fork` + +> **v2.1.214 update**: A forked session now reports source `"fork"` — previously it reported `"resume"`. **Special feature:** Use `CLAUDE_ENV_FILE` to persist environment variables (also available in `CwdChanged` and `FileChanged` hooks): @@ -1505,15 +1509,8 @@ Edit `~/.claude/settings.json` or `.claude/settings.json` with the hook configur --- -**Last Updated**: July 11, 2026 -**Claude Code Version**: 2.1.206 +**Last Updated**: 2026-07-22 +**Claude Code Version**: 2.1.217 **Sources**: - https://code.claude.com/docs/en/hooks -- https://code.claude.com/docs/en/permissions -- https://code.claude.com/docs/en/changelog -- https://code.claude.com/docs/en/changelog#2-1-176 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.139 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.145 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.152 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.153 -**Compatible Models**: Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5 +- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md diff --git a/08-checkpoints/README.md b/08-checkpoints/README.md index 92c4973..6e6b093 100644 --- a/08-checkpoints/README.md +++ b/08-checkpoints/README.md @@ -241,6 +241,8 @@ Checkpoints have the following limitations: - **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 +> **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. + ## Troubleshooting ### Missing Checkpoints @@ -328,8 +330,8 @@ Remember: checkpoints are not a replacement for git. Use checkpoints for rapid e --- -**Last Updated**: July 11, 2026 -**Claude Code Version**: 2.1.206 +**Last Updated**: 2026-07-22 +**Claude Code Version**: 2.1.217 **Sources**: - https://code.claude.com/docs/en/checkpointing - https://code.claude.com/docs/en/settings diff --git a/09-advanced-features/README.md b/09-advanced-features/README.md index 32f9c85..aab0569 100644 --- a/09-advanced-features/README.md +++ b/09-advanced-features/README.md @@ -1976,6 +1976,7 @@ claude --no-sandbox # Disable sandboxing | `sandbox.socatPath` | (v2.1.133+, Linux/WSL) Path to the `socat` binary. Default: `$PATH` lookup. | | `sandbox.credentials` | (v2.1.187+) Block sandboxed commands from reading credential files and secret environment variables. | | `sandbox.allowAppleEvents` | (v2.1.181+, macOS) Opt in to let sandboxed commands send Apple Events. | +| `sandbox.filesystem.disabled` | (v2.1.216+) Skip filesystem isolation entirely while keeping network isolation enforced — useful when file sandboxing breaks tooling but network egress control must stay active. Only honored from user settings, managed settings, or `--settings`; project settings can't set it. | **Linux/WSL binary paths** (v2.1.133+) — point Claude Code at non-standard install locations: @@ -2425,24 +2426,8 @@ For more information about Claude Code and related features: --- -**Last Updated**: July 18, 2026 -**Claude Code Version**: 2.1.212 +**Last Updated**: 2026-07-22 +**Claude Code Version**: 2.1.217 **Sources**: -- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md -- https://docs.anthropic.com/en/docs/claude-code/settings -- https://code.claude.com/docs/en/troubleshooting -- https://code.claude.com/docs/en/changelog#2-1-175 -- https://code.claude.com/docs/en/permission-modes -- https://code.claude.com/docs/en/interactive-mode - https://code.claude.com/docs/en/settings -- https://code.claude.com/docs/en/cli-reference -- https://code.claude.com/docs/en/model-config -- https://www.anthropic.com/news/claude-opus-4-8 -- https://claude.com/blog/introducing-routines-in-claude-code -- https://github.com/anthropics/claude-code/releases/tag/v2.1.117 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.139 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.154 -- https://code.claude.com/docs/en/overview -- https://code.claude.com/docs/en/sub-agents -- https://code.claude.com/docs/en/commands -**Compatible Models**: Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5 +- https://code.claude.com/docs/en/sandboxing diff --git a/09-advanced-features/config-examples.json b/09-advanced-features/config-examples.json index 183a2c4..354a49b 100644 --- a/09-advanced-features/config-examples.json +++ b/09-advanced-features/config-examples.json @@ -1,30 +1,25 @@ { - "description": "Example Claude Code configurations for different use cases", + "description": "Example Claude Code settings.json configurations for different use cases", "examples": { "development": { "name": "Development Environment", - "description": "Configuration for active development work", + "description": "Configuration for active development work: auto-accept edits, prompt for commands, format/lint on write", "config": { - "general": { - "model": "claude-sonnet-4-6", - "temperature": 0.7 - }, - "planning": { - "autoEnter": true, - "complexityThreshold": 3, - "requireApproval": true - }, + "model": "claude-sonnet-5", "permissions": { - "mode": "unrestricted" - }, - "backgroundTasks": { - "enabled": true, - "maxConcurrentTasks": 3 + "defaultMode": "acceptEdits", + "allow": ["Bash(npm run *)", "Bash(git diff:*)", "Bash(git status:*)"] }, "hooks": { - "PreToolUse:Write": "prettier --write ${file_path}", - "PostToolUse:Write": "eslint ${file_path}" + "PostToolUse": [ + { + "matcher": "Write|Edit", + "hooks": [ + { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/format-and-lint.sh" } + ] + } + ] } } }, @@ -33,46 +28,28 @@ "name": "Code Review Mode", "description": "Configuration for reviewing code without modifications", "config": { - "general": { - "model": "claude-sonnet-4-6", - "temperature": 0.3 - }, + "model": "claude-sonnet-5", "permissions": { - "mode": "plan" + "defaultMode": "plan" }, - "extendedThinking": { - "enabled": true, - "showThinkingProcess": true - }, - "planning": { - "autoEnter": false + "env": { + "CLAUDE_CODE_EFFORT_LEVEL": "high" } } }, "learning": { "name": "Learning Mode", - "description": "Configuration for learning and experimentation", + "description": "Configuration for learning and experimentation: prompt before every action, checkpoint often", "config": { - "general": { - "model": "claude-sonnet-4-6", - "temperature": 0.5 - }, + "model": "claude-sonnet-5", "permissions": { - "mode": "confirm" + "defaultMode": "default" }, - "extendedThinking": { - "enabled": true, - "showThinkingProcess": true + "env": { + "CLAUDE_CODE_EFFORT_LEVEL": "high" }, - "planning": { - "autoEnter": true, - "requireApproval": true, - "showTimeEstimates": true - }, - "checkpoints": { - "autoCheckpoint": true - } + "fileCheckpointingEnabled": true } }, @@ -80,50 +57,36 @@ "name": "Production Deployment", "description": "Configuration for production operations with safety checks", "config": { - "general": { - "model": "claude-opus-4-7", - "temperature": 0.1 - }, + "model": "claude-opus-4-8", "permissions": { - "mode": "confirm", - "requireConfirmationFor": ["Bash", "Git", "Write", "Edit"] + "defaultMode": "default", + "deny": ["Bash(git push --force*)", "Bash(rm -rf*)"] }, "hooks": { - "PreToolUse": "~/.claude/hooks/pre-commit.sh" + "PreToolUse": [ + { + "matcher": "Bash", + "hooks": [ + { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/pre-commit.sh" } + ] + } + ] }, - "checkpoints": { - "autoCheckpoint": true - }, - "planning": { - "autoEnter": true, - "requireApproval": true - } + "fileCheckpointingEnabled": true } }, "ci_cd": { "name": "CI/CD Pipeline", - "description": "Configuration for automated CI/CD operations", + "description": "Configuration for automated CI/CD operations, run non-interactively via `claude -p`", "config": { - "general": { - "model": "claude-sonnet-4-6", - "temperature": 0 - }, + "model": "claude-sonnet-5", "permissions": { - "mode": "unrestricted" + "defaultMode": "acceptEdits", + "allow": ["Bash(npm test:*)", "Bash(npm run build:*)", "Bash(npm run lint:*)"] }, - "headless": { - "exitOnError": true, - "verbose": true, - "timeout": 3600 - }, - "logging": { - "level": "debug", - "file": "./ci-claude.log" - }, - "planning": { - "autoEnter": false, - "requireApproval": false + "env": { + "CI": "true" } } }, @@ -132,20 +95,22 @@ "name": "Security Audit", "description": "Configuration for security-focused code analysis", "config": { - "general": { - "model": "claude-opus-4-7", - "temperature": 0.2 - }, + "model": "claude-opus-4-8", "permissions": { - "mode": "plan" + "defaultMode": "plan" }, - "extendedThinking": { - "enabled": true, - "showThinkingProcess": true, - "minThinkingTime": 10 + "env": { + "CLAUDE_CODE_EFFORT_LEVEL": "max" }, "hooks": { - "PostToolUse:Read": "~/.claude/hooks/security-scan.sh ${file_path}" + "PostToolUse": [ + { + "matcher": "Read", + "hooks": [ + { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/security-scan.sh" } + ] + } + ] } } }, @@ -154,21 +119,11 @@ "name": "Performance Optimization", "description": "Configuration for performance analysis and optimization", "config": { - "general": { - "model": "claude-sonnet-4-6", - "temperature": 0.4 + "model": "claude-sonnet-5", + "permissions": { + "defaultMode": "acceptEdits" }, - "planning": { - "autoEnter": true, - "requireApproval": true - }, - "backgroundTasks": { - "enabled": true, - "maxConcurrentTasks": 5 - }, - "checkpoints": { - "autoCheckpoint": true - } + "fileCheckpointingEnabled": true } }, @@ -176,73 +131,58 @@ "name": "Pair Programming", "description": "Configuration for collaborative development", "config": { - "general": { - "model": "claude-sonnet-4-6", - "temperature": 0.6 - }, + "model": "claude-sonnet-5", "permissions": { - "mode": "confirm" + "defaultMode": "default" }, - "planning": { - "autoEnter": true, - "requireApproval": true, - "showTimeEstimates": true - }, - "extendedThinking": { - "enabled": true, - "showThinkingProcess": true - }, - "ui": { - "compactMode": false, - "showProgress": true + "env": { + "CLAUDE_CODE_EFFORT_LEVEL": "high" } } }, "refactoring": { "name": "Large Refactoring", - "description": "Configuration for major refactoring work", + "description": "Configuration for major refactoring work: backup before edits, run related tests after", "config": { - "general": { - "model": "claude-opus-4-7", - "temperature": 0.3 - }, - "planning": { - "autoEnter": true, - "requireApproval": true, - "showTimeEstimates": true - }, - "checkpoints": { - "autoCheckpoint": true - }, - "hooks": { - "PreToolUse:Edit": "~/.claude/hooks/backup-file.sh ${file_path}", - "PostToolUse:Edit": "npm test -- --findRelatedTests ${file_path}" - }, + "model": "claude-opus-4-8", "permissions": { - "mode": "confirm" + "defaultMode": "default", + "allow": ["Bash(npm test -- --findRelatedTests *)"] + }, + "fileCheckpointingEnabled": true, + "hooks": { + "PreToolUse": [ + { + "matcher": "Edit", + "hooks": [ + { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/backup-file.sh" } + ] + } + ], + "PostToolUse": [ + { + "matcher": "Edit", + "hooks": [ + { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/run-related-tests.sh" } + ] + } + ] } } }, "autonomous": { "name": "Autonomous Development", - "description": "Configuration for autonomous work with auto mode safety checks", + "description": "Configuration for autonomous work with auto mode's background safety classifier plus a filesystem/network sandbox", "config": { - "general": { - "model": "claude-sonnet-4-6", - "temperature": 0.5 - }, + "model": "claude-sonnet-5", "permissions": { - "mode": "auto" + "defaultMode": "auto" }, "sandbox": { "enabled": true, "failIfUnavailable": false - }, - "backgroundTasks": { - "enabled": true, - "maxConcurrentTasks": 3 } } }, @@ -251,15 +191,20 @@ "name": "Documentation Writing", "description": "Configuration for writing documentation", "config": { - "general": { - "model": "claude-sonnet-4-6", - "temperature": 0.7 - }, + "model": "claude-sonnet-5", "permissions": { - "mode": "unrestricted" + "defaultMode": "acceptEdits", + "allow": ["Write(**/*.md)"] }, "hooks": { - "PostToolUse:Write": "markdownlint ${file_path}" + "PostToolUse": [ + { + "matcher": "Write", + "hooks": [ + { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/markdownlint.sh" } + ] + } + ] } } } diff --git a/10-cli/README.md b/10-cli/README.md index 0d7e2f3..83c4e42 100644 --- a/10-cli/README.md +++ b/10-cli/README.md @@ -83,7 +83,7 @@ The older JavaScript bundle is still produced for Windows and for environments t | `--teammate-mode` | Agent team display mode | `claude --teammate-mode tmux` | | `--bare` | Minimal mode (skip hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` | | `--safe-mode` | Start with all customizations disabled (CLAUDE.md, plugins, skills, hooks, MCP) to isolate config problems; also `CLAUDE_CODE_SAFE_MODE=1` (v2.1.169) | `claude --safe-mode` | -| `--enable-auto-mode` | Unlock auto permission mode (no longer required for Max subscribers on Opus 4.7) | `claude --enable-auto-mode` | +| `--permission-mode auto` | Start in auto permission mode (replaces the removed `--enable-auto-mode` flag, gone since v2.1.111) | `claude --permission-mode auto` | | `--channels` | Subscribe to MCP channel plugins | `claude --channels discord,telegram` | | `--chrome` / `--no-chrome` | Enable/disable Chrome browser integration | `claude --chrome` | | `--effort` | Set thinking effort level | `claude --effort high` | @@ -199,7 +199,8 @@ claude -p --system-prompt-file ./prompts/code-reviewer.txt "review main.py" | `--dangerously-skip-permissions` | Skip all permission prompts | `claude --dangerously-skip-permissions` | | `--permission-mode` | Begin in specified permission mode | `claude --permission-mode auto` | | `--permission-prompt-tool` | MCP tool for permission handling | `claude -p --permission-prompt-tool mcp_auth "query"` | -| `--enable-auto-mode` | Unlock auto permission mode | `claude --enable-auto-mode` | + +> **v2.1.111 update**: `--enable-auto-mode` was removed; auto mode is now in the `Shift+Tab` cycle by default — use `--permission-mode auto` to start in it directly. > **Glob / Grep footnote (v2.1.113+)**: On native macOS/Linux builds, `Glob` and `Grep` are provided as the embedded `bfs` and `ugrep` binaries invoked through the Bash tool rather than as separate first-class tools. Windows and npm-bundled (JS) installs still expose them as standalone tools. For subagent `allowedTools` / `disallowedTools` lists the backend substitution is transparent — you can keep referring to `Glob` / `Grep` in your configuration on every platform. @@ -207,6 +208,8 @@ claude -p --system-prompt-file ./prompts/code-reviewer.txt "review main.py" > **`--permission-mode` honored on resume (v2.1.132+)**: `claude -p --continue --permission-mode plan` (and `--resume`) now respects the flag. Earlier versions silently dropped `--permission-mode` when resuming a session, so a plan-mode session resumed without re-passing the flag would silently downgrade — that's fixed. +> **Permission hardening (v2.1.214)**: Docker/Podman commands using daemon-redirect flags (e.g. `--url`, `--connection`, `--identity`) now require a permission prompt instead of running automatically. `file` commands using `-m`/`--magic-file` or `-f`/`--files-from` also now require permission. Bash commands over 10,000 characters always prompt for permission, regardless of allow rules. + ### Permission Examples ```bash @@ -234,7 +237,7 @@ claude --disallowedTools "Bash(rm -rf:*)" "Bash(git push --force:*)" | `--verbose` | Enable verbose logging | | `claude --verbose` | | `--include-partial-messages` | Include streaming events | Requires `stream-json` | `claude -p --output-format stream-json --include-partial-messages "query"` | | `--json-schema` | Get validated JSON matching schema | | `claude -p --json-schema '{"type":"object"}' "query"` | -| `--max-budget-usd` | Maximum spend for print mode | | `claude -p --max-budget-usd 5.00 "query"` | +| `--max-budget-usd` | Maximum spend for print mode. Since v2.1.217, hitting the cap also halts running background subagents and denies new spawns (previously background agents kept running past the cap) | | `claude -p --max-budget-usd 5.00 "query"` | ### Output Format Examples @@ -261,7 +264,7 @@ claude -p --json-schema '{"type":"object","properties":{"bugs":{"type":"array"}} | `--setting-sources` | Comma-separated setting sources | `claude --setting-sources user,project` | > **`/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 | `claude --settings ./settings.json` | +| `--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` | ### Multi-Directory Example @@ -362,13 +365,12 @@ claude project purge --all --interactive | `--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` | -| `--enable-auto-mode` | Unlock auto permission mode | `claude --enable-auto-mode` | | `--effort` | Set thinking effort level | `claude --effort high` | | `--bare` | Minimal mode (skip hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` | | `--channels` | Subscribe to MCP channel plugins | `claude --channels discord` | | `--tmux` | Create tmux session for worktree | `claude --tmux` | | `--fork-session` | Create new session ID when resuming | `claude --resume abc --fork-session` | -| `--max-budget-usd` | Maximum spend (print mode) | `claude -p --max-budget-usd 5.00 "query"` | +| `--max-budget-usd` | Maximum spend (print mode); also halts background subagents when hit (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` | | `--json-schema` | Validated JSON output | `claude -p --json-schema '{"type":"object"}' "q"` | | `--ax-screen-reader` | Plain-text rendering mode for screen readers (v2.1.208) | `claude --ax-screen-reader` | @@ -842,6 +844,8 @@ The "ultrathink" keyword in prompts activates deep reasoning. The `/effort` menu | `CLAUDE_CODE_SESSION_ID` | Set in every Bash tool subprocess launched by Claude Code; equals the `session_id` in hook input JSON. Use to correlate bash logs with hook telemetry (v2.1.132+). | | `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL` | Set to `1` to re-enable Anthropic's session-quality survey for organizations capturing OpenTelemetry data. Off by default in OTEL deployments (v2.1.136+). | | `OTEL_LOG_TOOL_DETAILS` | Set to `1` to unredact custom and MCP command names in OpenTelemetry events (v2.1.117+). Redaction remains the default. | +| `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH` | Configures the truncation limit (default 60 KB) applied to OpenTelemetry content attributes (v2.1.214) | +| `FORCE_HYPERLINK` | Set to `0` to opt out of clickable PR-badge hyperlinks in the footer, which now render even when terminal support can't be auto-detected (v2.1.217) | | `ANTHROPIC_BEDROCK_SERVICE_TIER` | Selects the Bedrock service tier: `default`, `flex`, or `priority` (v2.1.122+) | | `AI_AGENT` | Set automatically on subprocesses so external CLIs (e.g., `gh`) can attribute traffic to Claude Code (v2.1.120+) | | `CLAUDE_CODE_FORCE_SYNC_OUTPUT` | Set to `1` to force synchronous output for terminals where auto-detection misses (e.g., Emacs `eat`) (v2.1.129+) | @@ -850,6 +854,8 @@ The "ultrathink" keyword in prompts activates deep reasoning. The `/effort` menu | `CLAUDE_CODE_ENABLE_AUTO_MODE` | Legacy opt-in for auto mode on Bedrock, Vertex, and Foundry (v2.1.158–v2.1.206). As of v2.1.207, auto mode is available by default on those providers for Sonnet 5, Opus 4.7/4.8, and Fable 5 — this variable is accepted for compatibility but has no effect | | `CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION` | Cap on WebSearch tool calls per session, to stop runaway search loops. Default 200 (v2.1.212) | | `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION` | Cap on subagent spawns per session, to stop runaway delegation loops. Default 200; `/clear` resets the budget (v2.1.212) | +| `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` | Cap on subagents running concurrently. Default 20 (v2.1.217) | +| `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` | Controls how deep nested subagent spawns can go. Nesting is now off by default; set this to opt back in to deeper nesting (v2.1.217) | | `CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS` | Threshold, in milliseconds, before a long-running MCP tool call auto-backgrounds. Default 120000 (2 minutes) (v2.1.212) | | `CLAUDE_AX_SCREEN_READER` | Set to `1` to enable plain-text screen reader rendering mode. Same effect as `--ax-screen-reader` or `"axScreenReader": true` in settings (v2.1.208) | | `CLAUDE_CLIENT_PRESENCE_FILE` | Point at a marker file to suppress mobile push notifications while you're at the machine (v2.1.181+). Note: the name is `CLAUDE_CLIENT_PRESENCE_FILE`, not `CLAUDE_CODE_CLIENT_PRESENCE_FILE`. | @@ -873,6 +879,8 @@ These keys live in a `settings.json` file (`~/.claude/settings.json` for user sc | `wheelScrollAccelerationEnabled` | (v2.1.174) Set to `false` to disable mouse-wheel scroll acceleration in the fullscreen renderer. Useful when fast wheel flicks overshoot. | | `footerLinksRegexes` | (v2.1.176) Array of regexes that render matched links as badges in the footer row. Configurable in user or managed settings. | | `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. | ```json { @@ -912,7 +920,7 @@ claude -p --output-format json "query" | Quick code review | `cat file \| claude -p "review"` | | Structured output | `claude -p --output-format json "query"` | | Safe exploration | `claude --permission-mode plan` | -| Autonomous with safety | `claude --enable-auto-mode --permission-mode auto` | +| Autonomous with safety | `claude --permission-mode auto` | | CI/CD integration | `claude -p --max-turns 3 --output-format json` | | Resume work | `claude -r "session-name"` | | Custom model | `claude --model opus "complex task"` | @@ -986,8 +994,8 @@ claude -p --output-format json "query" --- -**Last Updated**: July 18, 2026 -**Claude Code Version**: 2.1.212 +**Last Updated**: July 22, 2026 +**Claude Code Version**: 2.1.217 **Sources**: - https://code.claude.com/docs/en/cli-reference - https://code.claude.com/docs/en/env-vars diff --git a/CATALOG.md b/CATALOG.md index ec98161..8e5af03 100644 --- a/CATALOG.md +++ b/CATALOG.md @@ -144,7 +144,7 @@ Claude Code supports 6 permission modes that control how tool use is authorized. Specialized AI assistants with isolated contexts for specific tasks. -> **Nested spawning (v2.1.172)**: Subagents can spawn their own subagents, nested up to 5 levels deep. Earlier versions did not allow nesting. See [04-subagents/README.md](04-subagents/README.md#restrict-spawnable-subagents) for the `Agent(agent_type)` syntax that restricts which subagents a given subagent may spawn. +> **Nested spawning is opt-in (v2.1.217)**: As of v2.1.217, subagents do not spawn their own subagents by default. Set `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` to allow nesting, up to the depth you configure. (From v2.1.172 through v2.1.216, subagents nested by default, up to 5 levels deep; v2.1.217 made that opt-in.) See [04-subagents/README.md](04-subagents/README.md#restrict-spawnable-subagents) for the `Agent(agent_type)` syntax that restricts which subagents a given subagent may spawn. ### Built-in Subagents @@ -545,9 +545,11 @@ chmod +x ~/.claude/hooks/*.sh --- -**Last Updated**: July 18, 2026 -**Claude Code Version**: 2.1.212 +**Last Updated**: July 22, 2026 +**Claude Code Version**: 2.1.217 **Sources**: +- https://code.claude.com/docs/en/sub-agents +- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md - https://code.claude.com/docs/en/overview - https://code.claude.com/docs/en/commands - https://code.claude.com/docs/en/hooks diff --git a/CHANGELOG.md b/CHANGELOG.md index 62ba6fd..d0c08b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,98 @@ # Changelog +## [v2.1.217] — 2026-07-22 + +### Synced to Claude Code v2.1.217 + +Bumps tutorial coverage from the v2.1.212 baseline (2026-07-18 sync) to +v2.1.217 (v2.1.213 was skipped upstream — the changelog and GitHub releases +both jump 2.1.212 → 2.1.214), plus a repo-internal accuracy audit. + +### Fixed + +- **Nested-subagent-spawning claim reversed (v2.1.217)** — `04-subagents/README.md` + and `CATALOG.md` stated as current behavior that "subagents can spawn their + own subagents, nested up to 5 levels deep" (true v2.1.172–v2.1.216). As of + v2.1.217 this is off by default; opt in with + `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`. Both files now lead with current + behavior and keep the historical note. +- **Stale `--enable-auto-mode` flag** — removed in v2.1.111 (auto mode moved + into the default `Shift+Tab` cycle; `--permission-mode auto` is the current + way to start in it), but `10-cli/README.md` still presented it as a live + flag in four spots and `QUICK_REFERENCE.md` used it in three. All seven + updated to `--permission-mode auto`. +- **Import-depth contradiction ("5 levels" vs "4 hops")** — two "5 levels" + instances survived in `02-memory/README.md`'s Best Practices area after the + 2026-07-18 sync fixed two others; both now read "4 hops," matching the rest + of the file. +- **Sonnet-5-less models table** — `claude_concepts_guide.md`'s "Models & + Reasoning Effort" table omitted Claude Sonnet 5 despite the file's own + footer already listing it as compatible. Added as the default row for + Pro/Team Standard/Enterprise. +- **`config-examples.json` fabricated schema** — all 11 example configs used + invented fields (`mode: "unrestricted"/"confirm"`, `planning.*`, + `extendedThinking.*`, `headless.*`, `checkpoints.autoCheckpoint`) that don't + exist in the real settings schema, plus a stale `claude-opus-4-7` model ID. + Rewritten to use real `settings.json` keys (`permissions.defaultMode`, + `permissions.allow`/`deny`, `env`, `hooks`, `fileCheckpointingEnabled`, + `sandbox.*`) and current model IDs. +- **`brand-voice` skill vs. its README example** — the actual + `03-skills/brand-voice/SKILL.md` (`name: brand-voice-consistency`, + user-invocable) contradicted `03-skills/README.md`'s "Example 4" walkthrough + (`name: brand-voice`, `user-invocable: false`). Aligned the skill file to + the README's background-knowledge framing. +- **CLAUDE.md length guidance conflict** — `03-skills/claude-md/SKILL.md` + ("<300 lines, ideally <100") vs. `02-memory/README.md` ("<500 lines"). + Unified on "keep it under a few hundred lines; shorter is better" in both + files (no official specific limit exists — both prior numbers were + editorial). + +### Added + +- **New subagent caps (v2.1.217)** — a cap on concurrently running subagents + (default 20, `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`) alongside the nesting + depth control above. Documented in `04-subagents/README.md`, + `10-cli/README.md`, and `QUICK_REFERENCE.md`. +- **`--max-budget-usd` now halts background subagents (v2.1.217)** — the spend + cap previously only blocked new spawns; it now also halts already-running + background subagents. Documented in `10-cli/README.md`. +- **Hook `if:` glob scope narrowed (v2.1.214)** — single-segment `dir/**` hook + `if:` conditions now match only `/dir` (use `**/dir/**` for any-depth); + deny/ask permission rules are unaffected. Documented in `06-hooks/README.md`. +- **SessionStart `"fork"` source (v2.1.214)** — forked sessions now report + source `"fork"` instead of `"resume"`. Documented in `06-hooks/README.md`. +- **`sandbox.filesystem.disabled` (v2.1.216)** — skips filesystem isolation + while keeping network egress control enforced. Documented in + `09-advanced-features/README.md` and `10-cli/README.md`. +- **`/rewind` symlink/hard-link protection (v2.1.216)** — no longer restores + or deletes files through symlinks or hard links at tracked paths; reports + how many paths were skipped. Documented in `08-checkpoints/README.md`. +- **Auto-memory `modified` timestamp + non-blocking `/memory` editor** — an + ISO `modified` timestamp on memory-file frontmatter (v2.1.214), and `/memory` + no longer blocking the session while its GUI editor is open (v2.1.216). + Documented in `02-memory/README.md`. +- **CLI/settings batch (v2.1.214–v2.1.217)** — `emojiCompletionEnabled`, + `FORCE_HYPERLINK=0`, `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`, `--settings` + files capped at 2 MiB, and permission hardening (Docker/Podman + daemon-redirect flags, `file -m`/`--magic-file`/`-f`/`--files-from`, + 10,000+ character commands) documented in `10-cli/README.md`. `/context`'s + over-context-window warning and `/compact` failures now displaying as + errors (v2.1.216) documented in `01-slash-commands/README.md`. +- **`/verify` and `/code-review` explicit-invocation-only (v2.1.215)** — + additive note in `03-skills/README.md` and `QUICK_REFERENCE.md`; the repo + never claimed auto-invocation. + +### Notes + +- `QUICK_REFERENCE.md`'s `--enable-auto-mode` / `--permission-mode auto` + inconsistency was resolved in favor of the latter after confirming against + the live CLI reference that the former was removed in v2.1.111. +- Translation mirrors (`vi`/`ja`/`zh`/`uk`) were checked for the P0/P1 claims + above; most translated `04-subagents/README.md` and `CATALOG.md` copies + either predate the nested-spawning feature or don't carry the affected + section, so no mirrored edit was needed there. `10-cli/README.md`'s + `--max-budget-usd` clarifier was mirrored into all four languages. + ## [v2.1.212] — 2026-07-18 ### Synced to Claude Code v2.1.212 diff --git a/QUICK_REFERENCE.md b/QUICK_REFERENCE.md index bbd8a9c..4f575ab 100644 --- a/QUICK_REFERENCE.md +++ b/QUICK_REFERENCE.md @@ -131,7 +131,7 @@ claude -r "session" # Resume session by name/ID | **Git Worktrees** | Built-in | `/worktree` | | **Auto Memory** | Built-in | Auto-saves to CLAUDE.md | | **Task List** | Built-in | `/task list` | -| **Bundled Skills (10)** | Built-in | `/batch`, `/claude-api`, `/code-review`, `/simplify` *(cleanup-only review; distinct from `/code-review` again since v2.1.154)*, `/debug`, `/fewer-permission-prompts`, `/loop`, `/run` *(v2.1.145+)*, `/run-skill-generator` *(v2.1.145+)*, `/verify` *(v2.1.145+)* | +| **Bundled Skills (10)** | Built-in | `/batch`, `/claude-api`, `/code-review` *(explicit invocation only since v2.1.215 — Claude won't trigger this on its own)*, `/simplify` *(cleanup-only review; distinct from `/code-review` again since v2.1.154)*, `/debug`, `/fewer-permission-prompts`, `/loop`, `/run` *(v2.1.145+)*, `/run-skill-generator` *(v2.1.145+)*, `/verify` *(v2.1.145+; explicit invocation only since v2.1.215 — Claude won't trigger this on its own)* | --- @@ -201,7 +201,7 @@ chmod +x ~/.claude/hooks/*.sh # - Security scanning: security-scan.sh # Auto Mode for fully autonomous workflows -claude --enable-auto-mode -p "Refactor and test the auth module" +claude --permission-mode auto -p "Refactor and test the auth module" # Or cycle modes interactively with Shift+Tab ``` @@ -232,7 +232,7 @@ claude -p "Run all tests and generate report" claude -p "Run tests" --permission-mode dontAsk # With Auto Mode for fully autonomous CI tasks -claude --enable-auto-mode -p "Run tests and fix failures" +claude --permission-mode auto -p "Run tests and fix failures" # With hooks for automation # See 09-advanced-features/README.md @@ -407,10 +407,10 @@ cp -r 03-skills/code-review-specialist ~/.claude/skills/ | **Keyboard Customization** | Custom keybindings | `/keybindings` command | | **/usage-credits** | Configure extra usage limits (renamed from `/extra-usage` in v2.1.144; old name still works as alias) | `/usage-credits` | | **/run** *(v2.1.145+)* | Launch this project's app to see a change running | `/run` | -| **/verify** *(v2.1.145+)* | Build, run, and observe the app to confirm a fix works | `/verify` | +| **/verify** *(v2.1.145+)* | Build, run, and observe the app to confirm a fix works (explicit invocation only since v2.1.215 — Claude won't trigger this on its own) | `/verify` | | **/run-skill-generator** *(v2.1.145+)* | Teach `/run`/`/verify` how to handle a specific project | `/run-skill-generator` | | **Subagent Output Scanning** *(v2.1.210+)* | Scans subagent reports for prompt-injection patterns and neutralizes them | On by default, no opt-out | -| **Session-Wide Spawn Caps** *(v2.1.212)* | 200/session limits on WebSearch calls and subagent spawns, to stop runaway loops | `CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION`, `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION`; `/clear` resets | +| **Session-Wide Spawn Caps** *(v2.1.212, extended v2.1.217)* | 200/session limits on WebSearch calls and subagent spawns; v2.1.217 added a concurrent-subagent cap (default 20) and turned nested subagent spawning off by default (previously allowed up to 5 levels since v2.1.172) | `CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION`, `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION`, `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` (default 20), `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` (opt back into nesting); `/clear` resets | | **Screen Reader Mode** *(v2.1.208)* | Plain-text rendering mode for screen readers | `--ax-screen-reader` flag, `CLAUDE_AX_SCREEN_READER=1`, or `"axScreenReader": true` in settings | --- @@ -456,7 +456,7 @@ echo $GITHUB_TOKEN | Event automation | Hook (29 events, 5 types) | `06-hooks/pre-commit.sh` | | Complete solution | Plugin (+ LSP support) | `07-plugins/pr-review/` | | Safe experiment | Checkpoint | `08-checkpoints/checkpoint-examples.md` | -| Fully autonomous | Auto Mode | `--enable-auto-mode` or `Shift+Tab` | +| Fully autonomous | Auto Mode | `--permission-mode auto` or `Shift+Tab` | | Chat integrations | Channels | `--channels` (Discord, Telegram) | | CI/CD pipeline | CLI | `10-cli/README.md` | @@ -513,14 +513,10 @@ Getting started checklist: **This Card**: Keep it handy for quick reference! --- -**Last Updated**: July 18, 2026 -**Claude Code Version**: 2.1.212 + +**Last Updated**: 2026-07-22 +**Claude Code Version**: 2.1.217 **Sources**: -- https://code.claude.com/docs/en/overview -- https://code.claude.com/docs/en/hooks -- https://code.claude.com/docs/en/commands -- https://code.claude.com/docs/en/permission-modes +- https://code.claude.com/docs/en/cli-reference - https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md -- https://github.com/anthropics/claude-code/releases/tag/v2.1.153 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.154 **Compatible Models**: Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5 diff --git a/README.md b/README.md index 72cd48a..89bdc51 100644 --- a/README.md +++ b/README.md @@ -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.212-brightgreen)](CHANGELOG.md) +[![Version](https://img.shields.io/badge/version-2.1.217-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.212, July 2026) +- **Actively maintained** — synced with every Claude Code release (latest: v2.1.217, July 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.212 (July 2026), compatible with Claude Code 2.1+. +Actively. The guide is synced with every Claude Code release. Current version: v2.1.217 (July 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. @@ -872,8 +872,8 @@ MIT License - see [LICENSE](LICENSE). Free to use, modify, and distribute. The o --- -**Last Updated**: July 18, 2026 -**Claude Code Version**: 2.1.212 +**Last Updated**: 2026-07-22 +**Claude Code Version**: 2.1.217 **Sources**: - https://code.claude.com/docs/en/overview - https://code.claude.com/docs/en/changelog diff --git a/claude_concepts_guide.md b/claude_concepts_guide.md index 4199e7d..12200db 100644 --- a/claude_concepts_guide.md +++ b/claude_concepts_guide.md @@ -3129,6 +3129,7 @@ Claude Code supports the following models with adaptive reasoning effort: | Model | Context Window | Effort Levels | Default Effort (Claude Code) | |-------|----------------|---------------|------------------------------| +| Claude Sonnet 5 | 1M tokens (native) | `low`, `medium`, `high`, `max` | `high` — default model for Pro/Team Standard/Enterprise since v2.1.197 | | Claude Opus 4.8 | 1M tokens (native) | `low`, `medium`, `high`, `xhigh`, `max` | `high` (since v2.1.154) | | Claude Opus 4.7 (legacy) | 1M tokens (native) | `low`, `medium`, `high`, `xhigh`, `max` | `xhigh` (since Opus 4.7 launch, 2026-04-16) | | Claude Sonnet 4.6 | 1M tokens | `low`, `medium`, `high`, `max` | `high` for Pro/Max subscribers (raised from `medium` in v2.1.117) | @@ -3148,16 +3149,9 @@ Claude Code supports the following models with adaptive reasoning effort: - [Anthropic Cookbook](https://github.com/anthropics/anthropic-cookbook) --- -**Last Updated**: July 11, 2026 -**Claude Code Version**: 2.1.206 +**Last Updated**: 2026-07-22 +**Claude Code Version**: 2.1.217 **Sources**: -- https://code.claude.com/docs/en/overview -- https://code.claude.com/docs/en/hooks -- https://code.claude.com/docs/en/model-config -- https://code.claude.com/docs/en/permission-modes -- https://code.claude.com/docs/en/skills -- https://code.claude.com/docs/en/changelog#2-1-172 -- https://platform.claude.com/docs/en/about-claude/models/overview -- https://www.anthropic.com/news/claude-opus-4-8 -- https://github.com/anthropics/claude-code/releases/tag/v2.1.154 +- https://www.anthropic.com/news/claude-sonnet-5 +- https://code.claude.com/docs/en/cli-reference **Compatible Models**: Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5 diff --git a/ja/02-memory/README.md b/ja/02-memory/README.md index 7be7b79..b344d41 100644 --- a/ja/02-memory/README.md +++ b/ja/02-memory/README.md @@ -187,7 +187,7 @@ See @docs/architecture.md for system design **インポート機能:** - 相対パスと絶対パスの両方をサポート(例: `@docs/api.md`、`@~/.claude/my-project-instructions.md`) -- 再帰的インポートをサポート(最大ネスト深さ 5) +- 再帰的インポートをサポート(最大深度 4 ホップ) - 外部ロケーションからの初回インポートはセキュリティのため承認ダイアログが出る - インポートディレクティブは Markdown のコードスパンやコードブロック内では評価されない(例として記述しても安全) - 既存ドキュメントを参照することで重複を避けられる @@ -1174,7 +1174,7 @@ Claude はどのメモリファイルを更新するかを尋ねる。 - 外部コンテンツの取り込みに `@path/to/file` を使う(例: `@~/.claude/my-project-instructions.md`) - 相対パスと絶対パスの両方をサポート -- 再帰的インポートをサポート(最大ネスト深さ 5) +- 再帰的インポートをサポート(最大深度 4 ホップ) - 外部からの初回インポートは承認ダイアログが出る - Markdown のコードスパンやコードブロック内では評価されない - 参照されたコンテンツが Claude のコンテキストに自動で含まれる diff --git a/ja/03-skills/brand-voice/SKILL.md b/ja/03-skills/brand-voice/SKILL.md index 2768790..cff3afe 100644 --- a/ja/03-skills/brand-voice/SKILL.md +++ b/ja/03-skills/brand-voice/SKILL.md @@ -3,8 +3,9 @@ --- -name: brand-voice-consistency +name: brand-voice description: すべてのコミュニケーションがブランドボイスとトーンのガイドラインに沿うことを保証する。マーケティングコピー、顧客向け連絡、公開コンテンツの作成時、またはブランドボイス、トーン、文体について言及がある場合に使用する。 +user-invocable: false --- # ブランドボイス・スキル diff --git a/ja/06-hooks/README.md b/ja/06-hooks/README.md index b714d4f..3ea6aec 100644 --- a/ja/06-hooks/README.md +++ b/ja/06-hooks/README.md @@ -183,7 +183,7 @@ Claude Code は **28 種類のフックイベント** をサポートする。 | イベント | 発火タイミング | マッチャー入力 | ブロック可否 | 用途例 | |----------|---------------|---------------|-------------|--------| -| **SessionStart** | セッション開始/再開/clear/compact | startup/resume/clear/compact | 不可 | 環境セットアップ | +| **SessionStart** | セッション開始/再開/clear/compact/fork | startup/resume/clear/compact/fork | 不可 | 環境セットアップ | | **InstructionsLoaded** | CLAUDE.md やルールファイルが読み込まれた後 | (なし) | 不可 | 指示の修正/フィルタ | | **UserPromptSubmit** | ユーザーがプロンプトを送信 | (なし) | 可 | プロンプト検証 | | **UserPromptExpansion** | ユーザープロンプトが展開(`@` メンション、スラッシュコマンド解決など) | (なし) | 可 | 展開後のプロンプトを変換/検査 | @@ -356,7 +356,9 @@ Claude が応答を終えたとき(Stop)、サブエージェントが完了 セッション開始または再開時に動作する。環境変数を永続化できる。 -**マッチャー:** `startup`、`resume`、`clear`、`compact` +**マッチャー:** `startup`、`resume`、`clear`、`compact`、`fork` + +> **v2.1.214 の更新**: フォークされたセッションは、以前の `"resume"` ではなく `"fork"` をソースとして報告するようになった。 **特別な機能:** `CLAUDE_ENV_FILE` を使って環境変数を永続化できる(`CwdChanged` と `FileChanged` フックでも利用可能)。 diff --git a/ja/10-cli/README.md b/ja/10-cli/README.md index 0051693..d3b82cf 100644 --- a/ja/10-cli/README.md +++ b/ja/10-cli/README.md @@ -223,7 +223,7 @@ claude --disallowedTools "Bash(rm -rf:*)" "Bash(git push --force:*)" | `--verbose` | 詳細ログを有効化 | | `claude --verbose` | | `--include-partial-messages` | ストリーミングイベントを含める | `stream-json` が必要 | `claude -p --output-format stream-json --include-partial-messages "query"` | | `--json-schema` | スキーマに沿って検証された JSON を取得 | | `claude -p --json-schema '{"type":"object"}' "query"` | -| `--max-budget-usd` | プリントモードでの最大支出額 | | `claude -p --max-budget-usd 5.00 "query"` | +| `--max-budget-usd` | プリントモードでの最大支出額。v2.1.217以降、上限に達するとバックグラウンドで実行中のサブエージェントも停止し、新規のサブエージェント起動も拒否される(以前はバックグラウンドエージェントは上限を超えても実行され続けていた) | | `claude -p --max-budget-usd 5.00 "query"` | ### 出力フォーマットの例 @@ -342,7 +342,7 @@ claude -r "feature-auth" --fork-session "test with different architecture" | `--channels` | MCP チャンネルプラグインを購読 | `claude --channels discord` | | `--tmux` | ワークツリー用に tmux セッションを作成 | `claude --tmux` | | `--fork-session` | 再開時に新しいセッション ID を作成 | `claude --resume abc --fork-session` | -| `--max-budget-usd` | 最大支出額(プリントモード) | `claude -p --max-budget-usd 5.00 "query"` | +| `--max-budget-usd` | 最大支出額(プリントモード)。上限に達するとバックグラウンドのサブエージェントも停止する (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` | | `--json-schema` | 検証付き JSON 出力 | `claude -p --json-schema '{"type":"object"}' "q"` | ### プラットフォームとテーマの注記(v2.1.112) diff --git a/uk/02-memory/README.md b/uk/02-memory/README.md index d3a5421..03b46fa 100644 --- a/uk/02-memory/README.md +++ b/uk/02-memory/README.md @@ -905,7 +905,7 @@ graph LR - **Directory memory**: правила та перевизначення для конкретних модулів - **Використовуйте імпорти**: синтаксис `@шлях/до/файлу` для посилання на наявну документацію - - Підтримує до 5 рівнів рекурсивного вкладення + - Підтримує максимум 4 хопи рекурсивного вкладення - Уникає дублювання між файлами пам'яті - Приклад: `See @README.md for project overview` @@ -933,7 +933,7 @@ graph LR - **Не забувайте оновлювати**: застаріла пам'ять може спричинити плутанину та використання застарілих практик -- **Не перевищуйте ліміти вкладення**: імпорти пам'яті підтримують до 5 рівнів вкладення +- **Не перевищуйте ліміти вкладення**: імпорти пам'яті підтримують максимум 4 хопи рекурсивного вкладення ### Поради з управління пам'яттю diff --git a/uk/03-skills/brand-voice/SKILL.md b/uk/03-skills/brand-voice/SKILL.md index b3e2cde..5391377 100644 --- a/uk/03-skills/brand-voice/SKILL.md +++ b/uk/03-skills/brand-voice/SKILL.md @@ -1,6 +1,7 @@ --- -name: brand-voice-consistency +name: brand-voice description: Забезпечення відповідності всіх комунікацій голосу та тону бренду. Використовуйте при створенні маркетингових текстів, клієнтських комунікацій, публічного контенту, або коли користувачі згадують голос бренду, тон чи стиль написання. +user-invocable: false --- # Навичка голосу бренду diff --git a/uk/06-hooks/README.md b/uk/06-hooks/README.md index 7e4fdbf..42966ed 100644 --- a/uk/06-hooks/README.md +++ b/uk/06-hooks/README.md @@ -159,7 +159,7 @@ Claude Code підтримує **26 подій хуків**: | Подія | Коли спрацьовує | Вхід matcher | Може блокувати | Типове використання | |-------|----------------|-------------|----------------|---------------------| -| **SessionStart** | Початок/відновлення/очищення/компакція сесії | startup/resume/clear/compact | Ні | Налаштування середовища | +| **SessionStart** | Початок/відновлення/очищення/компакція/форк сесії | startup/resume/clear/compact/fork | Ні | Налаштування середовища | | **InstructionsLoaded** | Після завантаження CLAUDE.md або файлу правил | (немає) | Ні | Модифікація/фільтрація інструкцій | | **UserPromptSubmit** | Користувач подає промпт | (немає) | Так | Валідація промптів | | **PreToolUse** | Перед виконанням інструмента | Назва інструмента | Так (allow/deny/ask) | Валідація, модифікація вхідних даних | @@ -322,7 +322,9 @@ Claude Code підтримує **26 подій хуків**: Запускається при старті або відновленні сесії. Може зберігати змінні оточення. -**Matcher:** `startup`, `resume`, `clear`, `compact` +**Matcher:** `startup`, `resume`, `clear`, `compact`, `fork` + +> **Оновлення v2.1.214**: сесії, створені через форк, тепер повідомляють джерело `"fork"` замість попереднього `"resume"`. **Спеціальна можливість:** Використовуйте `CLAUDE_ENV_FILE` для збереження змінних оточення (також доступно в хуках `CwdChanged` та `FileChanged`): diff --git a/uk/10-cli/README.md b/uk/10-cli/README.md index 72252df..eef8fc7 100644 --- a/uk/10-cli/README.md +++ b/uk/10-cli/README.md @@ -203,7 +203,7 @@ claude --disallowedTools "Bash(rm -rf:*)" "Bash(git push --force:*)" | `--verbose` | Увімкнути детальне логування | | `claude --verbose` | | `--include-partial-messages` | Включити потокові (streaming) події | Потребує `stream-json` | `claude -p --output-format stream-json --include-partial-messages "query"` | | `--json-schema` | Отримати валідований JSON за схемою | | `claude -p --json-schema '{"type":"object"}' "query"` | -| `--max-budget-usd` | Максимальні витрати для print mode | | `claude -p --max-budget-usd 5.00 "query"` | +| `--max-budget-usd` | Максимальні витрати для print mode. Починаючи з v2.1.217, після досягнення ліміту також зупиняються фонові subagent-и, що виконуються, і забороняється запуск нових (раніше фонові агенти продовжували працювати після перевищення ліміту) | | `claude -p --max-budget-usd 5.00 "query"` | ### Приклади формату виводу @@ -320,7 +320,7 @@ claude -r "feature-auth" --fork-session "test with different architecture" | `--channels` | Підписка на MCP channel plugins | `claude --channels discord` | | `--tmux` | Створити tmux-сесію для worktree | `claude --tmux` | | `--fork-session` | Створити новий ID сесії при відновленні | `claude --resume abc --fork-session` | -| `--max-budget-usd` | Максимальні витрати (print mode) | `claude -p --max-budget-usd 5.00 "query"` | +| `--max-budget-usd` | Максимальні витрати (print mode); також зупиняє фонові subagent-и при досягненні ліміту (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` | | `--json-schema` | Валідований JSON-вивід | `claude -p --json-schema '{"type":"object"}' "q"` | ### Приклади розширених функцій diff --git a/vi/02-memory/README.md b/vi/02-memory/README.md index 9899e6d..de49dc3 100644 --- a/vi/02-memory/README.md +++ b/vi/02-memory/README.md @@ -904,7 +904,7 @@ graph LR - **Directory memory**: Các quy tắc và ghi đè cụ thể theo module - **Tận dụng imports**: Sử dụng cú pháp `@path/to/file` để tham khảo tài liệu hiện có - - Hỗ trợ lên đến 5 cấp lồng ghép đệ quy + - Hỗ trợ tối đa 4 chặng đệ quy (recursive hops) - Tránh nhân đôi qua các file bộ nhớ - Ví dụ: `See @README.md for project overview` @@ -932,7 +932,7 @@ graph LR - **Đừng quên cập nhật**: Bộ nhớ cũ có thể gây nhầm lẫn và thực hành lỗi thời -- **Đừng vượt quá giới hạn lồng**: Bộ nhớ import hỗ trợ lên đến 5 cấp lồng +- **Đừng vượt quá giới hạn lồng**: Bộ nhớ import hỗ trợ tối đa 4 chặng đệ quy ### Mẹo Quản Lý Bộ Nhớ diff --git a/vi/03-skills/brand-voice/SKILL.md b/vi/03-skills/brand-voice/SKILL.md index ac5277d..741e2d5 100644 --- a/vi/03-skills/brand-voice/SKILL.md +++ b/vi/03-skills/brand-voice/SKILL.md @@ -1,6 +1,7 @@ --- -name: brand-voice-consistency +name: brand-voice description: Đảm bảo tất cả các truyền thông phù hợp với hướng dẫn giọng điệu và phong cách thương hiệu. Sử dụng khi tạo bản sao marketing, truyền thông khách hàng, nội dung công khai, hoặc khi người dùng đề cập đến giọng điệu thương hiệu, ngữ điệu, hoặc phong cách viết. +user-invocable: false --- # Brand Voice Skill diff --git a/vi/06-hooks/README.md b/vi/06-hooks/README.md index 5a779d6..0035277 100644 --- a/vi/06-hooks/README.md +++ b/vi/06-hooks/README.md @@ -147,7 +147,7 @@ Claude Code hỗ trợ **25 sự kiện hook**: | Sự Kiện | Khi Được Kích Hoạt | Matcher Input | Có Chặn | Sử Dụng Phổ Biến | |-------|---------------|---------------|-----------|------------| -| **SessionStart** | Phiên bắt đầu/tiếp tục/xóa/dồn | startup/resume/clear/compact | Không | Thiết lập môi trường | +| **SessionStart** | Phiên bắt đầu/tiếp tục/xóa/dồn/fork | startup/resume/clear/compact/fork | Không | Thiết lập môi trường | | **InstructionsLoaded** | Sau khi CLAUDE.md hoặc file rules được tải | (none) | Không | Sửa đổi/bộ lọc hướng dẫn | | **UserPromptSubmit** | Người dùng gửi prompt | (none) | Có | Xác thực prompts | | **PreToolUse** | Trước khi thực thi công cụ | Tên công cụ | Có (allow/deny/ask) | Xác thực, sửa đổi đầu vào | @@ -309,7 +309,9 @@ Chạy khi một subagent bắt đầu thực thi. Matcher input là tên loại Chạy khi phiên bắt đầu hoặc tiếp tục. Có thể persist các biến môi trường. -**Matchers:** `startup`, `resume`, `clear`, `compact` +**Matchers:** `startup`, `resume`, `clear`, `compact`, `fork` + +> **Cập nhật v2.1.214**: Các phiên được tạo qua fork giờ báo cáo nguồn là `"fork"` thay vì `"resume"` như trước đây. **Tính năng đặc biệt:** Sử dụng `CLAUDE_ENV_FILE` để persist các biến môi trường (cũng có sẵn trong các hooks `CwdChanged` và `FileChanged`): diff --git a/vi/10-cli/README.md b/vi/10-cli/README.md index 8387f69..4f26abb 100644 --- a/vi/10-cli/README.md +++ b/vi/10-cli/README.md @@ -199,7 +199,7 @@ claude --disallowedTools "Bash(rm -rf:*)" "Bash(git push --force:*)" | `--verbose` | Bật ghi nhật chi tiết | | `claude --verbose` | | `--include-partial-messages` | Bao gồm các sự kiện streaming | Yêu cầu `stream-json` | `claude -p --output-format stream-json --include-partial-messages "query"` | | `--json-schema` | Nhận JSON được validate theo schema | | `claude -p --json-schema '{"type":"object"}' "query"` | -| `--max-budget-usd` | Giới hạn chi phí tối đa cho chế độ in | | `claude -p --max-budget-usd 5.00 "query"` | +| `--max-budget-usd` | Giới hạn chi phí tối đa cho chế độ in. Kể từ v2.1.217, khi đạt giới hạn, các subagent chạy nền cũng bị dừng và các subagent mới bị từ chối khởi chạy (trước đây các subagent chạy nền vẫn tiếp tục chạy sau khi vượt giới hạn) | | `claude -p --max-budget-usd 5.00 "query"` | ### Ví Dụ Định Dạng Đầu Ra / Output Format Examples @@ -316,7 +316,7 @@ Session gốc vẫn không thay đổi, và fork trở thành một session đ | `--channels` | Đăng ký các plugin kênh MCP | `claude --channels discord` | | `--tmux` | Tạo tmux session cho worktree | `claude --tmux` | | `--fork-session` | Tạo session ID mới khi resume | `claude --resume abc --fork-session` | -| `--max-budget-usd` | Chi phí tối đa (chế độ in) | `claude -p --max-budget-usd 5.00 "query"` | +| `--max-budget-usd` | Chi phí tối đa (chế độ in); cũng dừng các subagent chạy nền khi đạt giới hạn (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` | | `--json-schema` | Validate JSON output | `claude -p --json-schema '{"type":"object"}' "q"` | ### Ví Dụ Nâng Cao / Advanced Examples diff --git a/zh/03-skills/brand-voice/SKILL.md b/zh/03-skills/brand-voice/SKILL.md index 9450d62..f4304c5 100644 --- a/zh/03-skills/brand-voice/SKILL.md +++ b/zh/03-skills/brand-voice/SKILL.md @@ -1,6 +1,7 @@ --- -name: brand-voice-consistency +name: brand-voice description: 确保所有沟通内容都符合品牌语气和风格指南。适用于撰写营销文案、客户沟通、对外内容,或用户提到品牌语气、tone、写作风格的场景。 +user-invocable: false --- # 品牌语气技能 diff --git a/zh/10-cli/README.md b/zh/10-cli/README.md index 0f2fcf8..6ef3a83 100644 --- a/zh/10-cli/README.md +++ b/zh/10-cli/README.md @@ -199,7 +199,7 @@ claude --disallowedTools "Bash(rm -rf:*)" "Bash(git push --force:*)" | `--verbose` | 启用详细日志 | | `claude --verbose` | | `--include-partial-messages` | 包含流式事件 | 需要 `stream-json` | `claude -p --output-format stream-json --include-partial-messages "query"` | | `--json-schema` | 获取符合 schema 的 JSON 输出 | | `claude -p --json-schema '{"type":"object"}' "query"` | -| `--max-budget-usd` | 打印模式最大花费 | | `claude -p --max-budget-usd 5.00 "query"` | +| `--max-budget-usd` | 打印模式最大花费。自 v2.1.217 起,达到上限后也会停止正在运行的后台子代理,并拒绝新的子代理生成请求(此前后台代理在超出上限后仍会继续运行) | | `claude -p --max-budget-usd 5.00 "query"` | ### 输出格式示例