mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-09-26 13:20:42 +02:00
docs: sync to Claude Code v2.1.257 (#180)
* docs: sync to Claude Code v2.1.257 Audit against Claude Code v2.1.257 (repo baseline was v2.1.245, 12 releases behind). Facts verified against the official docs and cross-checked against the locally installed 2.1.257 binary. Critical (P0): - lesson-quiz L06 Q9 asked how many hook events exist, offering 16/25/31/40. With the real answer now 33, no option was correct. Option C 31 -> 33; answer letter unchanged. - 03-skills taught SKILL.md `name`/`description` as required. Official docs now state all frontmatter fields are optional and `name` defaults to the directory name. Corrected in all five languages. Hook events 31 -> 33 (PreModelSwitch/PostModelSwitch, v2.1.251) across 30 occurrences in 22 files, including three that read 25. Delta proved by set-diff against the official event table: no phantom events. Both events added to the 06-hooks tables with matcher, blocking behavior and 30s timeout, plus detailed per-event sections. CLI corrections verified against the binary: - `claude plugin tag` takes a path, not a version - `claude plugin init` / `validate` require their arguments - `plugin init` scaffolds at ~/.claude/skills/<name>/, not project-local - `--channels` entries must be tagged plugin:<name>@<marketplace> - `--remote` is a deprecated alias for `--cloud` - no `claude remote-control` subcommand exists, only the --remote-control flag Also: CATALOG summary-table totals recomputed in all five languages (column 4 is a derived total, so the count change invalidated it); stale Opus 4.6/4.7 rosters aligned to canonical; self-assessment Advanced Features rescored 0-3 to stop a real gap being graded as mastery; 9 dangling quiz Review pointers repaired; new features documented (--restricted, Fable 5.1, experimental.cacheTtl, CLAUDE_CODE_SUBAGENT_MODEL_FORCE). Deliberately out of scope: pre-existing translation staleness whose fix is translation authorship rather than correction (ja/uk April-2026 root-doc bodies, zh stubs, vi/README stub, translated CATALOG "New Features"). Claude-Session: https://claude.ai/code/session_01128xfEd8W7c2cMRw6N7uiF * fix(hooks): complete the 31 → 33 hook-event propagation across all languages The v2.1.257 sync bumped the hook-event count in the lesson and catalog summaries but left 14 files still asserting 31, four of which the same commit restamped 2.1.257. It also bumped the prose count in claude_concepts_guide.md without adding the two rows, making that file contradict itself where it had been internally consistent before. Adds PreModelSwitch and PostModelSwitch (v2.1.251) everywhere an exhaustive enumeration exists, and corrects the count wherever a list is deliberately partial: - README.md / INDEX.md in en, ja, zh, uk and vi/INDEX.md — count 31 → 33 and both events added to the lifecycle group - resources.md in all five languages — count only; these lists end in "and more" and are partial by design - claude_concepts_guide.md — the two missing table rows Also brings every hook-event table up to the 33 its own summary row claims. The English CATALOG.md listed 29; the translated catalogs listed 25 and the ja/uk concept guides 27 and 28. Completing them required translating six events that had never reached the mirrors: Setup, UserPromptExpansion, PermissionDenied, PostToolBatch, MessageDisplay and DirectoryAdded. Summary-table arithmetic is untouched — those columns count example scripts, not events. Verified: no stale count survives outside CHANGELOG history, every exhaustive enumeration lists exactly 33, and pre-commit passes 23/23. Claude-Session: https://claude.ai/code/session_01UXmqJZNk1BR4uerJA85NiW
This commit is contained in:
+11
-8
@@ -40,7 +40,7 @@ graph TD
|
||||
| `claude mcp serve` | Chạy Claude Code như một MCP server | `claude mcp serve` |
|
||||
| `claude agents` | Liệt kê tất cả các subagents được cấu hình | `claude agents` |
|
||||
| `claude auto-mode defaults` | In các quy tắc mặc định chế độ tự động như JSON | `claude auto-mode defaults` |
|
||||
| `claude remote-control` | Bắt đầu server Remote Control | `claude remote-control` |
|
||||
| `claude --remote-control [name]` | Khởi động Remote Control (đây là một flag, không phải subcommand; alias `--rc`) | `claude --rc` |
|
||||
| `claude plugin` | Quản lý plugins (cài đặt, kích hoạt, vô hiệu hóa) | `claude plugin install my-plugin` |
|
||||
| `claude auth login` | Đăng nhập (hỗ trợ `--email`, `--sso`) | `claude auth login --email user@example.com` |
|
||||
| `claude auth logout` | Đăng xuất khỏi tài khoản hiện tại | `claude auth logout` |
|
||||
@@ -57,13 +57,14 @@ graph TD
|
||||
| `-w, --worktree` | Bắt đầu trong git worktree cô lập | `claude -w` |
|
||||
| `-n, --name` | Tên hiển thị session | `claude -n "auth-refactor"` |
|
||||
| `--from-pr <number>` | Resume sessions được liên kết đến GitHub PR | `claude --from-pr 42` |
|
||||
| `--remote "task"` | Tạo session web trên claude.ai | `claude --remote "implement API"` |
|
||||
| `--cloud [description\|session_id\|url]` | Tạo session cloud trên claude.ai với mô tả đã cho, hoặc gắn vào một session sẵn có bằng session ID hoặc URL claude.ai/code | `claude --cloud "implement API"` |
|
||||
| `--remote "task"` | **Alias không dùng nữa của `--cloud`**, bao gồm cả dạng gắn vào session sẵn có. Hãy dùng `--cloud` | `claude --remote "implement API"` |
|
||||
| `--remote-control, --rc` | Session tương tác với Remote Control | `claude --rc` |
|
||||
| `--teleport` | Resume session web cục bộ | `claude --teleport` |
|
||||
| `--teammate-mode` | Chế độ hiển thị agent team | `claude --teammate-mode tmux` |
|
||||
| `--bare` | Chế độ tối thiểu (bỏ qua hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` |
|
||||
| `--enable-auto-mode` | Mở khóa chế độ quyền tự động | `claude --enable-auto-mode` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP | `claude --channels discord,telegram` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP. Mỗi mục phải được gắn thẻ `plugin:<name>@<marketplace>`; tên trần sẽ bị từ chối | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--chrome` / `--no-chrome` | Bật/tắt tích hợp trình duyệt Chrome | `claude --chrome` |
|
||||
| `--effort` | Đặt mức độ suy nghĩ | `claude --effort high` |
|
||||
| `--init` / `--init-only` | Chạy các hooks khởi tạo | `claude --init` |
|
||||
@@ -243,7 +244,7 @@ claude --settings '{"model":"opus","verbose":true}' "complex task"
|
||||
|------|-------------|---------|
|
||||
| `--mcp-config` | Tải MCP servers từ JSON | `claude --mcp-config ./mcp.json` |
|
||||
| `--strict-mcp-config` | Chỉ sử dụng MCP config được chỉ định | `claude --strict-mcp-config --mcp-config ./mcp.json` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP | `claude --channels discord,telegram` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP. Mỗi mục phải được gắn thẻ `plugin:<name>@<marketplace>`; tên trần sẽ bị từ chối | `claude --channels plugin:discord@my-marketplace` |
|
||||
|
||||
### Ví Dụ MCP / MCP Examples
|
||||
|
||||
@@ -313,7 +314,7 @@ Session gốc vẫn không thay đổi, và fork trở thành một session đ
|
||||
| `--enable-auto-mode` | Mở khóa chế độ quyền tự động | `claude --enable-auto-mode` |
|
||||
| `--effort` | Đặt mức độ suy nghĩ | `claude --effort high` |
|
||||
| `--bare` | Chế độ tối thiểu (bỏ qua hooks, skills, plugins, MCP, auto memory, CLAUDE.md) | `claude --bare` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP | `claude --channels discord` |
|
||||
| `--channels` | Đăng ký các plugin kênh MCP (gắn thẻ `plugin:<name>@<marketplace>`) | `claude --channels plugin:discord@my-marketplace` |
|
||||
| `--tmux` | Tạo tmux session cho worktree | `claude --tmux` |
|
||||
| `--fork-session` | Tạo session ID mới khi resume | `claude --resume abc --fork-session` |
|
||||
| `--max-budget-usd` | Chi phí tối đa (chế độ in); cũng dừng các subagent chạy nền khi đạt giới hạn (v2.1.217) | `claude -p --max-budget-usd 5.00 "query"` |
|
||||
@@ -833,6 +834,8 @@ claude -p --output-format json "query"
|
||||
|
||||
---
|
||||
|
||||
**Cập Nhật Lần Cuối**: Tháng 4 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1+
|
||||
**Các Mô Hình Tương Thích**: Claude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
|
||||
**Cập Nhật Lần Cuối**: Ngày 2 tháng 9 năm 2026
|
||||
**Phiên Bản Claude Code**: 2.1.257
|
||||
**Nguồn**:
|
||||
- https://code.claude.com/docs/en/cli-reference
|
||||
**Các Mô Hình Tương Thích**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
|
||||
|
||||
Reference in New Issue
Block a user