项目简介
包含 Claude Code 的代理、命令、技能、工作流、记忆、MCP 服务器等最佳实践与实现示例,帮助开发者从初学到精通。
README 预览
# claude-code-best-practice\nfrom vibe coding to agentic engineering - practice makes claude perfect\n\n \n\n[](best-practice/) [](implementation/) [](orchestration-workflow/orchestration-workflow.md) [](https://code.claude.com/docs) [](#-tips-and-tricks) [](#-subscribe) \n = Agents · = Commands · = Skills\n\n\n \n \n\n\n\n \n\n\n\n \n Boris Cherny on X (tweet 1 · tweet 2 · tweet 3)\n\n\n> [!TIP]\n> Visit the [**How to Use**](#how-to-use) section to take full advantage of this repo.\n\n## 🧠 CONCEPTS\n\n| Feature | Location | Description |\n|---------|----------|-------------|\n| [**Subagents**](https://code.claude.com/docs/en/sub-agents) | `.claude/agents/.md` | [](best-practice/claude-subagents.md) [](implementation/claude-subagents-implementation.md) |\n| [**Commands**](https://code.claude.com/docs/en/slash-commands) | `.claude/commands/.md` | [](best-practice/claude-commands.md) [](implementation/claude-commands-implementation.md) |\n| [**Skills**](https://code.claude.com/docs/en/skills) | `.claude/skills//SKILL.md` | [](best-practice/claude-skills.md) [](implementation/claude-skills-implementation.md) [Official Skills](https://github.com/anthropics/skills/tree/main/skills) · [Skills for Mono-repos](reports/claude-skills-for-larger-mono-repos.md) |\n| [**Workflows**](https://code.claude.com/docs/en/common-workflows) | [`.claude/commands/weather-orchestrator.md`](.claude/commands/weather-orchestrator.md) | [](orchestration-workflow/orchestration-workflow.md) |\n| [**Hooks**](https://code.claude.com/docs/en/hooks) | `.claude/hooks/` | [](https://github.com/shanraisshan/claude-code-hooks) [](https://github.com/shanraisshan/claude-code-hooks) [Guide](https://code.claude.com/docs/en/hooks-guide) |\n| [**MCP Servers**](https://code.claude.com/docs/en/mcp) | `.claude/settings.json`, `.mcp.json` | [](best-practice/claude-mcp.md) [](.mcp.json) |\n| [**Plugins**](https://code.claude.com/docs/en/plugins) | distributable packages | [Marketp
常见问题 (1)
故障排除为什么在 Windows 上使用 winsound.PlaySound 时,钩子音效会被截断或无法完整播放?
故障排除
为什么在 Windows 上使用 winsound.PlaySound 时,钩子音效会被截断或无法完整播放?Windows 的 winsound.PlaySound 调用缺少 winsound.SND_SYNC,因此播放默认为异步。脚本随后立即退出,导致播放在完成之前被终止。请修复 .claude/hooks/scripts/hooks.py 中的该调用(如果存在等效的 .codex 钩子脚本,也一并修复),添加 SND_SYNC:
winsound.PlaySound(
str(file_path),
winsound.SND_FILENAME | winsound.SND_NODEFAULT | winsound.SND_SYNC
)
这样可以使播放变为同步,让声音在脚本退出之前播放完毕。