Skip to content
On this page

Claude Code Best Practice

是什么

进阶实践指南,提供 Claude Code 各个特性的具体实现示例,与 Claude How To 互补——How To 带你入门,Best Practice 带你进阶到生产级别。

解决啥

  • 文档只讲特性,不教组合:知道 slash commands 存在,但不知道怎么和 hooks、memory 串成工作流
  • 没有进阶路径:基础会用之后不知道接下来学什么
  • 缺具体代码示例:需要能直接 copy 的实现代码,不是泛泛的理论

怎么跑

Step 1:克隆项目

bash
git clone https://github.com/shanraisshan/claude-code-best-practice

Step 2:看目录结构

best-practice/       # 最佳实践文档
implementation/      # 具体实现示例
orchestration-workflow/  # 编排工作流

Step 3:按需查阅

特性位置说明
Subagents.claude/agents/<name>.md独立上下文,可自定义工具/权限/模型
Commands.claude/commands/<name>.mdSlash 命令
Skills.claude/skills/<name>.md技能系统

好在哪

  • ✅ 有具体的 implementation 示例代码
  • ✅ 涉及编排工作流(orchestration workflow)
  • ✅ 整理了各特性的具体位置和使用方式
  • ✅ 与 Claude How To 互补:入门 + 进阶组合使用

怎么用

场景 1:学 Subagents 编排

参考 orchestration-workflow/ 里的示例,把多个 Agent 串成流水线。

场景 2:自定义 Commands

.claude/commands/ 下写自己的 slash 命令,配合 hooks 实现自动化。

场景 3:构建 Skills

参考 .claude/skills/ 下的示例,写团队共享的技能库。


💡 推荐路径:先用 Claude How To 入门,再用 Best Practice 进阶,两者配合使用效果最佳。