项目简介
结构化视觉指南,涵盖 Claude Code 的斜杠命令、记忆、钩子、子代理等功能,提供可复制模板和测验。
README 预览
\n \n \n\n\n\n \n \n \n\n\n[](https://github.com/luongnv89/claude-howto/stargazers)\n[](https://github.com/luongnv89/claude-howto/network/members)\n[](LICENSE)\n[](CHANGELOG.md)\n[](https://code.claude.com)\n\n🌐 **Language / Ngôn ngữ / 语言 / Мова:** [English](README.md) | [Tiếng Việt](vi/README.md) | [中文](zh/README.md) | [Українська](uk/README.md) | [日本語](ja/README.md)\n\n# Master Claude Code in a Weekend\n\nGo from typing `claude` to orchestrating agents, hooks, skills, and MCP servers — with visual tutorials, copy-paste templates, and a guided learning path.\n\n**[Get Started in 15 Minutes](#get-started-in-15-minutes)** | **[Find Your Level](#not-sure-where-to-start)** | **[Browse the Feature Catalog](CATALOG.md)**\n\n---\n\n## Table of Contents\n\n- [The Problem](#the-problem)\n- [How Claude How To Fixes This](#how-claude-how-to-fixes-this)\n- [How It Works](#how-it-works)\n- [Not Sure Where to Start?](#not-sure-where-to-start)\n- [Get Started in 15 Minutes](#get-started-in-15-minutes)\n- [What Can You Build With This?](#what-can-you-build-with-this)\n- [FAQ](#faq)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## The Problem\n\nYou installed Claude Code. You ran a few prompts. Now what?\n\n- **The official docs describe features — but don't show you how to combine them.** You know slash commands exist, but not how to chain them with hooks, memory, and subagents into a workflow that actually saves hours.\n- **There's no clear learning path.** Should you learn MCP before hooks? Skills before subagents? You end up skimming everything and mastering nothing.\n- **Examples are too basic.** A "hello world" slash command doesn't help you build a production code review pipeline that uses memory, delegates to specialized agents, and runs security scans automatically.\n\nYou're leaving 90% of Claude Code's power on the table — and you don't know what you don't know.\n\n---\n\n## How Claude How To Fixes This\n\nThis isn't another feature reference.
常见问题 (5)
故障排除如何修复运行 `ruff check scripts/` 时 Ruff 检查到零个文件的问题?
在 scripts/pyproject.toml 中,Ruff 会相对于配置文件所在的目录解析 include 模式,因此 scripts/**/*.py 会变成 scripts/scripts/**/*.py。请将其修改为:
[tool.ruff]
include = ["**/*.py"]
或者,将 Ruff 配置移动到根目录下的 `pyproject.toml`,在该文件中 `scripts/**/*.py` 是正确的。同时检查附近的 `include`/`exclude` 设置,确认是否存在同样的相对路径错误。
使用以下命令验证:bashruff check scripts/ --show-files
``
该命令应列出
scripts/` 下的 Python 文件。修复或显式忽略新启用的检查所报告的任何问题。informationalClaude Code settings.json 文件的正确优先级顺序是什么?
正确的优先级从高到低依次为:Managed/Policy → CLI arguments → Local → Project → User。对于设置文件,这意味着:.claude/settings.local.json(本地)覆盖 .claude/settings.json(项目),而后者又覆盖 ~/.claude/settings.json(用户)。托管策略/MDM 设置具有最高优先级,其次是 CLI 标志,如 --model 或 --settings。文档中显示的 project → local → policy → user 或 user → project → local 是错误的,已修正为 policy → local → project → user。
故障排除**Short answer:** This is almost certainly a stale quiz question, not something you're doing wrong. Claude Code's hook system has expanded across releases, so a question written months ago may have an answer key that no longer matches reality. (I can't see your specific quiz options, but this is the common cause.)
**Current state:** As of recent versions, Claude Code supports 9 hook events:
1. `PreToolUse`
2. `PostToolUse`
3. `UserPromptSubmit`
4. `Notification`
5. `Stop`
6. `SubagentStop`
7. `PreCompact`
8. `SessionStart`
9. `SessionEnd`
Earlier versions had fewer — `SessionStart` and `SessionEnd` were added later — so courses written against older versions often say 6, 7, or 8.
**How to verify for yourself:**
- Run `/hooks` inside Claude Code to open the hook configuration UI, which lists all supported event types.
- Check the official hooks reference in the Claude Code docs — that count is authoritative and version-specific.
**How to "fix" the quiz:**
- If you're taking the course: pick the closest plausible option (usually the highest number offered, or the one matching the course's publication date) to get past it, then report the broken question to the course provider. Many courses also publish errata or updated modules — check for a newer version.
- If you maintain the quiz: update the answer key to the current count and reword the question to pin it to a version (e.g., "as of Claude Code v2.x"), since this list may keep growing.
Claude Code v2.1.251 新增了 PreModelSwitch 和 PostModelSwitch,使 hook 事件总数从 31 增加到 33。因此,在 v2.1.257 中,正确答案是 **33**,而不是 16、25、31 或 40。请更新测验选项和答案键以包含 33,将这两个新事件添加到每个 hook 事件列表中,替换掉过时的 31 引用(以及越南语和中文文档中残留的 25 引用),并重新计算每种语言的 CATALOG.md 中的派生总数。在教程更新之前,无法从所提供的选项中正确回答该测验题目。
故障排除如何修复 Lesson 08 Checkpoints 测验将当前的 rewind 和 checkpoint 设置标记为错误的问题?
更新第 08 课的 .claude/skills/lesson-quiz/references/question-bank.md。对于 Q3,将答案从 5 改为 **6 个回退选项**,并在 "Summarize from here" 之外添加 **"Summarize up to here"**;这与 README v2.1.216+ 一致。对于 Q8,将 autoCheckpoint: false 替换为 fileCheckpointingEnabled: false;该设置默认为 true,也可以通过环境变量 CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING 禁用,此内容自 v2.1.119 起已有文档记载。在该测验修正之前,即使过时的测验将其判为错误,也请按照当前的 08-checkpoints/README.md 作答。
故障排除Claude Code 总共支持多少个 hook 事件?
截至 Claude Code v2.1.257,正确的总数为 **31 种 hook 事件类型**。答案 **25** 适用于 v2.1.245 前后的旧内容,现已过时。如果课程测验不接受 31,请将测验和 Hooks README 更新/同步至 v2.1.257 文档;该修复已包含在关闭此 issue 的文档同步 PR 中。请使用 claude --version 验证你所安装的版本。