mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-06-01 10:31:33 +02:00
fix: apply 2026-04-09 documentation accuracy updates
P0 Critical: - Remove /vim (removed in v2.1.92) from CATALOG.md, zh/CATALOG.md active tables - Move /vim to deprecated section in zh/01-slash-commands/README.md - Fix fake hook events (PreCommit/PrePush/PostPush) in config-examples.json - Replace with real PreToolUse hook pattern - Update deprecated model IDs: claude-sonnet-4-5 → claude-sonnet-4-6 (x4) - Fix notify-team.sh comment: PostPush → PostToolUse with explanation - Mark # memory shortcut as discontinued in 02-memory/README.md P2 Conflicts resolved: - effort:max confirmed valid in current CLI; no changes needed - Remove WebSocket MCP transport (not supported; only stdio/sse/http valid) from 05-mcp/README.md, CATALOG.md, QUICK_REFERENCE.md P4 Cosmetic: - Update hook count 25 → 26 in QUICK_REFERENCE.md Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
+19
-31
@@ -25,9 +25,7 @@ The memory system operates at multiple levels, from global personal preferences
|
|||||||
|---------|---------|-------|-------------|
|
|---------|---------|-------|-------------|
|
||||||
| `/init` | Initialize project memory | `/init` | Starting new project, first-time CLAUDE.md setup |
|
| `/init` | Initialize project memory | `/init` | Starting new project, first-time CLAUDE.md setup |
|
||||||
| `/memory` | Edit memory files in editor | `/memory` | Extensive updates, reorganization, reviewing content |
|
| `/memory` | Edit memory files in editor | `/memory` | Extensive updates, reorganization, reviewing content |
|
||||||
| `#` prefix | Quick single-line memory add | `# Your rule here` | Adding quick rules during conversation |
|
| `#` prefix | ~~Quick single-line memory add~~ **Discontinued** | — | Use `/memory` or ask conversationally instead |
|
||||||
| `# new rule into memory` | Explicit memory addition | `# new rule into memory<br/>Your detailed rule` | Adding complex multi-line rules |
|
|
||||||
| `# remember this` | Natural language memory | `# remember this<br/>Your instruction` | Conversational memory updates |
|
|
||||||
| `@path/to/file` | Import external content | `@README.md` or `@docs/api.md` | Referencing existing documentation in CLAUDE.md |
|
| `@path/to/file` | Import external content | `@README.md` or `@docs/api.md` | Referencing existing documentation in CLAUDE.md |
|
||||||
|
|
||||||
## Quick Start: Initializing Memory
|
## Quick Start: Initializing Memory
|
||||||
@@ -82,49 +80,39 @@ CLAUDE_CODE_NEW_INIT=1 claude
|
|||||||
- Git workflow conventions
|
- Git workflow conventions
|
||||||
```
|
```
|
||||||
|
|
||||||
### Quick Memory Updates with `#`
|
### Quick Memory Updates
|
||||||
|
|
||||||
You can quickly add information to memory during any conversation by starting your message with `#`:
|
> **Note**: The `#` shortcut for inline memory was discontinued. Use `/memory` to edit memory files directly, or ask Claude conversationally to remember something (e.g., "remember that we always use TypeScript strict mode").
|
||||||
|
|
||||||
**Syntax:**
|
The recommended ways to add information to memory are:
|
||||||
|
|
||||||
```markdown
|
**Option 1: Use `/memory` command**
|
||||||
# Your memory rule or instruction here
|
|
||||||
|
```bash
|
||||||
|
/memory
|
||||||
```
|
```
|
||||||
|
|
||||||
**Examples:**
|
Opens your memory files in your system editor for direct editing.
|
||||||
|
|
||||||
```markdown
|
**Option 2: Ask conversationally**
|
||||||
# Always use TypeScript strict mode in this project
|
|
||||||
|
|
||||||
# Prefer async/await over promise chains
|
```
|
||||||
|
Remember that we always use TypeScript strict mode in this project.
|
||||||
# Run npm test before every commit
|
Please add to memory: prefer async/await over promise chains.
|
||||||
|
|
||||||
# Use kebab-case for file names
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**How it works:**
|
Claude will update the appropriate CLAUDE.md file based on your request.
|
||||||
|
|
||||||
1. Start your message with `#` followed by your rule
|
**Historical reference** (no longer functional):
|
||||||
2. Claude recognizes this as a memory update request
|
|
||||||
3. Claude asks which memory file to update (project or personal)
|
|
||||||
4. The rule is added to the appropriate CLAUDE.md file
|
|
||||||
5. Future sessions automatically load this context
|
|
||||||
|
|
||||||
**Alternative patterns:**
|
The `#` prefix shortcut previously allowed adding rules inline:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
# new rule into memory
|
# Always use TypeScript strict mode in this project ← no longer works
|
||||||
Always validate user input with Zod schemas
|
|
||||||
|
|
||||||
# remember this
|
|
||||||
Use semantic versioning for all releases
|
|
||||||
|
|
||||||
# add to memory
|
|
||||||
Database migrations must be reversible
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you relied on this pattern, switch to the `/memory` command or conversational requests.
|
||||||
|
|
||||||
### The `/memory` Command
|
### 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.
|
||||||
|
|||||||
@@ -105,14 +105,6 @@ Server-Sent Events transport is deprecated in favor of `http` but still supporte
|
|||||||
claude mcp add --transport sse legacy-server https://example.com/sse
|
claude mcp add --transport sse legacy-server https://example.com/sse
|
||||||
```
|
```
|
||||||
|
|
||||||
### WebSocket Transport
|
|
||||||
|
|
||||||
WebSocket transport for persistent bidirectional connections:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
claude mcp add --transport ws realtime-server wss://example.com/mcp
|
|
||||||
```
|
|
||||||
|
|
||||||
### Windows-Specific Note
|
### Windows-Specific Note
|
||||||
|
|
||||||
On native Windows (not WSL), use `cmd /c` for npx commands:
|
On native Windows (not WSL), use `cmd /c` for npx commands:
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Send notifications on events
|
# Send notifications on events
|
||||||
# Hook: PostPush
|
# Hook: PostToolUse (matcher: Bash) — run after bash commands; filter for git push in script logic
|
||||||
|
# Note: Claude Code has no native PostPush event. To trigger on git push, check the bash command
|
||||||
|
# string for "git push" using a matcher or conditional logic within this script.
|
||||||
|
|
||||||
REPO_NAME=$(basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null)
|
REPO_NAME=$(basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null)
|
||||||
COMMIT_MSG=$(git log -1 --pretty=%B 2>/dev/null)
|
COMMIT_MSG=$(git log -1 --pretty=%B 2>/dev/null)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"description": "Configuration for active development work",
|
"description": "Configuration for active development work",
|
||||||
"config": {
|
"config": {
|
||||||
"general": {
|
"general": {
|
||||||
"model": "claude-sonnet-4-5",
|
"model": "claude-sonnet-4-6",
|
||||||
"temperature": 0.7
|
"temperature": 0.7
|
||||||
},
|
},
|
||||||
"planning": {
|
"planning": {
|
||||||
@@ -24,8 +24,7 @@
|
|||||||
},
|
},
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"PreToolUse:Write": "prettier --write ${file_path}",
|
"PreToolUse:Write": "prettier --write ${file_path}",
|
||||||
"PostToolUse:Write": "eslint ${file_path}",
|
"PostToolUse:Write": "eslint ${file_path}"
|
||||||
"PreCommit": "npm test"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -35,7 +34,7 @@
|
|||||||
"description": "Configuration for reviewing code without modifications",
|
"description": "Configuration for reviewing code without modifications",
|
||||||
"config": {
|
"config": {
|
||||||
"general": {
|
"general": {
|
||||||
"model": "claude-sonnet-4-5",
|
"model": "claude-sonnet-4-6",
|
||||||
"temperature": 0.3
|
"temperature": 0.3
|
||||||
},
|
},
|
||||||
"permissions": {
|
"permissions": {
|
||||||
@@ -56,7 +55,7 @@
|
|||||||
"description": "Configuration for learning and experimentation",
|
"description": "Configuration for learning and experimentation",
|
||||||
"config": {
|
"config": {
|
||||||
"general": {
|
"general": {
|
||||||
"model": "claude-sonnet-4-5",
|
"model": "claude-sonnet-4-6",
|
||||||
"temperature": 0.5
|
"temperature": 0.5
|
||||||
},
|
},
|
||||||
"permissions": {
|
"permissions": {
|
||||||
@@ -90,9 +89,7 @@
|
|||||||
"requireConfirmationFor": ["Bash", "Git", "Write", "Edit"]
|
"requireConfirmationFor": ["Bash", "Git", "Write", "Edit"]
|
||||||
},
|
},
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"PreCommit": "npm test && npm run lint && npm run build",
|
"PreToolUse": "~/.claude/hooks/pre-commit.sh"
|
||||||
"PrePush": "npm run test:e2e",
|
|
||||||
"PostPush": "~/.claude/hooks/notify-team.sh"
|
|
||||||
},
|
},
|
||||||
"checkpoints": {
|
"checkpoints": {
|
||||||
"autoCheckpoint": true
|
"autoCheckpoint": true
|
||||||
@@ -109,7 +106,7 @@
|
|||||||
"description": "Configuration for automated CI/CD operations",
|
"description": "Configuration for automated CI/CD operations",
|
||||||
"config": {
|
"config": {
|
||||||
"general": {
|
"general": {
|
||||||
"model": "claude-sonnet-4-5",
|
"model": "claude-sonnet-4-6",
|
||||||
"temperature": 0
|
"temperature": 0
|
||||||
},
|
},
|
||||||
"permissions": {
|
"permissions": {
|
||||||
@@ -158,7 +155,7 @@
|
|||||||
"description": "Configuration for performance analysis and optimization",
|
"description": "Configuration for performance analysis and optimization",
|
||||||
"config": {
|
"config": {
|
||||||
"general": {
|
"general": {
|
||||||
"model": "claude-sonnet-4-5",
|
"model": "claude-sonnet-4-6",
|
||||||
"temperature": 0.4
|
"temperature": 0.4
|
||||||
},
|
},
|
||||||
"planning": {
|
"planning": {
|
||||||
@@ -180,7 +177,7 @@
|
|||||||
"description": "Configuration for collaborative development",
|
"description": "Configuration for collaborative development",
|
||||||
"config": {
|
"config": {
|
||||||
"general": {
|
"general": {
|
||||||
"model": "claude-sonnet-4-5",
|
"model": "claude-sonnet-4-6",
|
||||||
"temperature": 0.6
|
"temperature": 0.6
|
||||||
},
|
},
|
||||||
"permissions": {
|
"permissions": {
|
||||||
@@ -255,7 +252,7 @@
|
|||||||
"description": "Configuration for writing documentation",
|
"description": "Configuration for writing documentation",
|
||||||
"config": {
|
"config": {
|
||||||
"general": {
|
"general": {
|
||||||
"model": "claude-sonnet-4-5",
|
"model": "claude-sonnet-4-6",
|
||||||
"temperature": 0.7
|
"temperature": 0.7
|
||||||
},
|
},
|
||||||
"permissions": {
|
"permissions": {
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ Commands are user-invoked shortcuts that execute specific actions.
|
|||||||
| `/login` | Authenticate with Anthropic | Access features |
|
| `/login` | Authenticate with Anthropic | Access features |
|
||||||
| `/logout` | Sign out | Switch accounts |
|
| `/logout` | Sign out | Switch accounts |
|
||||||
| `/sandbox` | Toggle sandbox mode | Safe command execution |
|
| `/sandbox` | Toggle sandbox mode | Safe command execution |
|
||||||
| `/vim` | Toggle vim mode | Vim-style editing |
|
|
||||||
| `/doctor` | Run diagnostics | Troubleshoot issues |
|
| `/doctor` | Run diagnostics | Troubleshoot issues |
|
||||||
| `/reload-plugins` | Reload installed plugins | Plugin management |
|
| `/reload-plugins` | Reload installed plugins | Plugin management |
|
||||||
| `/release-notes` | Show release notes | Check new features |
|
| `/release-notes` | Show release notes | Check new features |
|
||||||
@@ -453,7 +452,6 @@ cp 02-memory/personal-CLAUDE.md ~/.claude/CLAUDE.md
|
|||||||
| **Agent Hook Type** | Hooks that spawn a subagent instead of running a shell command | Set `"type": "agent"` in hook configuration |
|
| **Agent Hook Type** | Hooks that spawn a subagent instead of running a shell command | Set `"type": "agent"` in hook configuration |
|
||||||
| **Prompt Hook Type** | Hooks that inject prompt text into the conversation | Set `"type": "prompt"` in hook configuration |
|
| **Prompt Hook Type** | Hooks that inject prompt text into the conversation | Set `"type": "prompt"` in hook configuration |
|
||||||
| **MCP Elicitation** | MCP servers can request user input during tool execution | Handle via `Elicitation` and `ElicitationResult` hook events |
|
| **MCP Elicitation** | MCP servers can request user input during tool execution | Handle via `Elicitation` and `ElicitationResult` hook events |
|
||||||
| **WebSocket MCP Transport** | WebSocket-based transport for MCP server connections | Use `"transport": "websocket"` in MCP server config |
|
|
||||||
| **Plugin LSP Support** | Language Server Protocol integration via plugins | Configure LSP servers in `plugin.json` for editor features |
|
| **Plugin LSP Support** | Language Server Protocol integration via plugins | Configure LSP servers in `plugin.json` for editor features |
|
||||||
| **Managed Drop-ins** | Organization-managed drop-in configurations (v2.1.83) | Admin-configured via managed policies; auto-applied to all users |
|
| **Managed Drop-ins** | Organization-managed drop-in configurations (v2.1.83) | Admin-configured via managed policies; auto-applied to all users |
|
||||||
|
|
||||||
|
|||||||
+3
-4
@@ -389,9 +389,8 @@ cp -r 03-skills/code-review ~/.claude/skills/
|
|||||||
| **Auto Mode** | Fully autonomous operation with background classifier | `--enable-auto-mode` flag, `Shift+Tab` to cycle modes |
|
| **Auto Mode** | Fully autonomous operation with background classifier | `--enable-auto-mode` flag, `Shift+Tab` to cycle modes |
|
||||||
| **Channels** | Discord and Telegram integration | `--channels` flag, Discord/Telegram bots |
|
| **Channels** | Discord and Telegram integration | `--channels` flag, Discord/Telegram bots |
|
||||||
| **Voice Dictation** | Speak commands and context to Claude | `/voice` command |
|
| **Voice Dictation** | Speak commands and context to Claude | `/voice` command |
|
||||||
| **Hooks (25 events)** | Expanded hook system with 4 types | command, http, prompt, agent hook types |
|
| **Hooks (26 events)** | Expanded hook system with 4 types | command, http, prompt, agent hook types |
|
||||||
| **MCP Elicitation** | MCP servers can request user input at runtime | Auto-prompted when server needs clarification |
|
| **MCP Elicitation** | MCP servers can request user input at runtime | Auto-prompted when server needs clarification |
|
||||||
| **WebSocket MCP** | WebSocket transport for MCP connections | Configure in `.mcp.json` with `ws://` URLs |
|
|
||||||
| **Plugin LSP** | Language Server Protocol support for plugins | `userConfig`, `${CLAUDE_PLUGIN_DATA}` variable |
|
| **Plugin LSP** | Language Server Protocol support for plugins | `userConfig`, `${CLAUDE_PLUGIN_DATA}` variable |
|
||||||
| **Remote Control** | Control Claude Code via WebSocket API | `claude --remote` for external integrations |
|
| **Remote Control** | Control Claude Code via WebSocket API | `claude --remote` for external integrations |
|
||||||
| **Web Sessions** | Browser-based Claude Code interface | `claude web` to launch |
|
| **Web Sessions** | Browser-based Claude Code interface | `claude web` to launch |
|
||||||
@@ -444,8 +443,8 @@ echo $GITHUB_TOKEN
|
|||||||
| Team standards | Memory | `02-memory/project-CLAUDE.md` |
|
| Team standards | Memory | `02-memory/project-CLAUDE.md` |
|
||||||
| Auto workflow | Skill | `03-skills/code-review/` |
|
| Auto workflow | Skill | `03-skills/code-review/` |
|
||||||
| Specialized task | Subagent | `04-subagents/code-reviewer.md` |
|
| Specialized task | Subagent | `04-subagents/code-reviewer.md` |
|
||||||
| External data | MCP (+ Elicitation, WebSocket) | `05-mcp/github-mcp.json` |
|
| External data | MCP (+ Elicitation) | `05-mcp/github-mcp.json` |
|
||||||
| Event automation | Hook (25 events, 4 types) | `06-hooks/pre-commit.sh` |
|
| Event automation | Hook (26 events, 4 types) | `06-hooks/pre-commit.sh` |
|
||||||
| Complete solution | Plugin (+ LSP support) | `07-plugins/pr-review/` |
|
| Complete solution | Plugin (+ LSP support) | `07-plugins/pr-review/` |
|
||||||
| Safe experiment | Checkpoint | `08-checkpoints/checkpoint-examples.md` |
|
| Safe experiment | Checkpoint | `08-checkpoints/checkpoint-examples.md` |
|
||||||
| Fully autonomous | Auto Mode | `--enable-auto-mode` or `Shift+Tab` |
|
| Fully autonomous | Auto Mode | `--enable-auto-mode` or `Shift+Tab` |
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ Claude Code 目前提供 55+ 个内置命令和 5 个内置 Skills。你可以
|
|||||||
| `/tasks` | 列出/管理后台任务 |
|
| `/tasks` | 列出/管理后台任务 |
|
||||||
| `/terminal-setup` | 配置终端快捷键 |
|
| `/terminal-setup` | 配置终端快捷键 |
|
||||||
| `/theme` | 更改颜色主题 |
|
| `/theme` | 更改颜色主题 |
|
||||||
| `/vim` | 切换 Vim/Normal 模式 |
|
|
||||||
| `/voice` | 切换按住说话语音输入 |
|
| `/voice` | 切换按住说话语音输入 |
|
||||||
|
|
||||||
### 内置 Skills
|
### 内置 Skills
|
||||||
@@ -103,6 +102,7 @@ Claude Code 目前提供 55+ 个内置命令和 5 个内置 Skills。你可以
|
|||||||
| `/review` | 已弃用,已被 `code-review` 插件替代 |
|
| `/review` | 已弃用,已被 `code-review` 插件替代 |
|
||||||
| `/output-style` | 自 v2.1.73 起弃用 |
|
| `/output-style` | 自 v2.1.73 起弃用 |
|
||||||
| `/fork` | 已重命名为 `/branch`(别名仍可用,v2.1.77) |
|
| `/fork` | 已重命名为 `/branch`(别名仍可用,v2.1.77) |
|
||||||
|
| `/vim` | 自 v2.1.92 起移除;改用 `/config → Editor mode` |
|
||||||
|
|
||||||
### 最近变化
|
### 最近变化
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,6 @@
|
|||||||
| `/login` | 通过 Anthropic 认证 | 访问功能 |
|
| `/login` | 通过 Anthropic 认证 | 访问功能 |
|
||||||
| `/logout` | 登出 | 切换账号 |
|
| `/logout` | 登出 | 切换账号 |
|
||||||
| `/sandbox` | 切换 sandbox 模式 | 安全执行命令 |
|
| `/sandbox` | 切换 sandbox 模式 | 安全执行命令 |
|
||||||
| `/vim` | 切换 vim 模式 | 类 Vim 编辑 |
|
|
||||||
| `/doctor` | 运行诊断 | 排查问题 |
|
| `/doctor` | 运行诊断 | 排查问题 |
|
||||||
| `/reload-plugins` | 重新加载已安装的 plugins | 插件管理 |
|
| `/reload-plugins` | 重新加载已安装的 plugins | 插件管理 |
|
||||||
| `/release-notes` | 显示更新说明 | 查看新功能 |
|
| `/release-notes` | 显示更新说明 | 查看新功能 |
|
||||||
|
|||||||
Reference in New Issue
Block a user