shanraisshan / claude-code-best-practice
shanraisshan / claude-code-best-practice
claude-code-best-practice from vibe coding to agentic engineering - practice makes claude perfect claude-code-best-practice 从“感觉编程”(vibe coding)到智能体工程——熟能生巧
= Agents · = Commands · = Skills = 智能体 · = 命令 · = 技能
Boris Cherny on X (tweet 1 · tweet 2 · tweet 3) Boris Cherny 在 X 上的分享(推文 1 · 推文 2 · 推文 3)
Tip: Visit the How to Use section to take full advantage of this repo. 提示:请访问“如何使用”(How to Use)部分,以充分利用本仓库。
🧠 CONCEPTS (概念)
| Feature | Location | Description |
|---|---|---|
| Subagents | .claude/agents/ | 子智能体 |
| Commands | .claude/commands/ | 命令 |
| Skills | .claude/skills/ | 技能(官方技能 · Mono-repo 专用技能) |
| Workflows | .claude/commands/weather-orchestrator.md | 工作流 |
| Hooks | .claude/hooks/ | 钩子 |
| MCP Servers | .claude/settings.json, .mcp.json | MCP 服务器 |
| Plugins | distributable packages | 插件(可分发包) |
| Marketplaces | Create Marketplaces | 市场 |
| Settings | .claude/settings.json | 设置(权限 · 模型配置 · 输出样式 · 沙盒 · 快捷键 · 自动模式配置) |
| Status Line | .claude/settings.json | 状态栏 |
| Memory | CLAUDE.md, .claude/rules/, ~/.claude/rules/, ~/.claude/projects/ | 记忆(自动记忆 · 深度解析 · 规则) |
| Checkpointing | automatic (file-edit tracking) | 检查点(自动,文件编辑追踪) |
| CLI Startup Flags | claude [flags] | CLI 启动标志 |
| Interactive Mode | Env Vars | 交互模式 · 环境变量 |
| AI Terms | Best Practices | AI 术语 · 最佳实践 |
| Prompt Engineering | Extend Claude Code | 提示词工程 · 扩展 Claude Code |
🔥 Hot (热门功能)
| Feature | Location | Description |
|---|---|---|
| Ultrareview | /code-review ultra, claude ultrareview [target] | 超级审查 |
| Tasks tracking | Devcontainers .devcontainer/ | 任务追踪 |
| Channels | —channels, plugin-based | 频道 |
| Reference | Ultraplan /ultraplan | 参考 |
| No Flicker Mode | /tui fullscreen, CLAUDE_CODE_NO_FLICKER=1 | 无闪烁模式 |
| Auto Mode | —permission-mode auto, Shift+Tab | 自动模式 |
| Blog | Power-ups /powerup | 博客 · 增强功能 |
| Fast Mode | /fast, “fastMode”: true | 快速模式 |
| Advisor | /advisor, advisorModel, —advisor | 顾问 |
| Computer Use | computer-use MCP server | 计算机使用 |
| Desktop Agent SDK | npm / pip package | 桌面智能体 SDK |
| Quickstart | Examples | 快速入门 · 示例 |
| Ralph Wiggum Loop | plugin | Ralph Wiggum 循环 |
| Chrome | —chrome, extension | Chrome 扩展 |
| Claude Code Web | claude.ai/code | Claude Code 网页版 |
| Routines | Slack @Claude in Slack | 例程 |
| Code Review | GitHub App (managed) | 代码审查 |
| Local | /code-review GitHub Actions .github/workflows/ | 本地代码审查 |
| GitLab CI/CD | Remote Control /remote-control, /rc | GitLab CI/CD · 远程控制 |
| Headless Mode | Deep Links claude-cli://open?repo=…&q=… | 无头模式 · 深层链接 |
| Dynamic Workflows | /workflows, ultracode keyword, /effort ultracode, .claude/workflows/ | 动态工作流 |
| Deep Research | Agent Teams built-in (env var) | 深度研究 · 智能体团队 |
| Agent View | claude agents, —bg, /bg | 智能体视图 |
| Scheduled Tasks | /loop, /schedule, cron tools | 定时任务 |
| Desktop scheduled tasks | Announcement | 桌面定时任务 · 公告 |
| Routines | claude.ai/code/routines, /schedule | 例程 |
| Desktop Tasks | Tasks /tasks, ~/.claude/tasks/ | 桌面任务 |
| Ultrareview tracking | Goal /goal | Ultrareview 追踪 · 目标 |
| Voice Dictation | /voice | 语音听写 |
| Bundled Skills | /code-review, /batch | 捆绑技能 |
| Git Worktrees | —worktree/-w, .worktreeinclude, EnterWorktree/ExitWorktree, isolation: “worktree”, WorktreeCreate/WorktreeRemove hooks | Git 工作树 |
See orchestration-workflow for implementation details of Command → Agent → Skill pattern. 请参阅 orchestration-workflow 以了解“命令 → 智能体 → 技能”模式的实现细节。
claude /weather-orchestrator claude /weather-orchestrator
⚙️ DEVELOPMENT WORKFLOWS (开发工作流)
All major workflows converge on the same architectural pattern: Research → Plan → Execute → Review → Ship 所有主要工作流都汇聚于同一架构模式:研究 → 计划 → 执行 → 审查 → 发布
(Table data omitted for brevity) (表格数据因篇幅省略)
Note: yellow tags are sub-loops — steps that repeat inside a parent step (e.g. per task, per story, or until a verify condition passes). 注意:黄色标签为子循环——即在父步骤中重复的步骤(例如:每个任务、每个故事,或直到验证条件通过为止)。
🔀 CROSS-MODEL WORKFLOWS (跨模型工作流)
Use Claude Code together with other models — Codex, Gemini, GPT, Kimi, DeepSeek, local — via three mechanisms: 通过以下三种机制,将 Claude Code 与其他模型(Codex、Gemini、GPT、Kimi、DeepSeek、本地模型)结合使用:
- Plugin — another model’s CLI runs inside Claude Code (slash commands like /codex:review) 插件 — 其他模型的 CLI 在 Claude Code 内部运行(如 /codex:review 等斜杠命令)
- MCP — Claude Code calls another model as a tool through Model Context Protocol MCP — Claude Code 通过模型上下文协议(MCP)将其他模型作为工具调用
- Router — Claude Code’s API endpoint is swapped to a different provider 路由 — 将 Claude Code 的 API 端点切换到不同的提供商
Methodology: Cross-Model (Claude Code + Codex) Workflow — manual two-terminal flow with Plan in Claude, QA-Review in Codex. 方法论:跨模型(Claude Code + Codex)工作流——手动双终端流程,在 Claude 中进行计划,在 Codex 中进行 QA 审查。
🧰 SKILL COLLECTIONS (技能合集)
Repos primarily known as curated libraries of SKILL.md files (distinct from full workflow methodologies above). Sorted by stars descending. 主要以精选的 SKILL.md 文件库而闻名的仓库(区别于上述完整的工作流方法论)。按星标降序排列。
🤖 AGENT COLLECTIONS (智能体合集)
Repos primarily known as curated libraries of subagent definitions (.claude/agents/.md). Sorted by stars descending. 主要以精选的子智能体定义库(.claude/agents/.md)而闻名的仓库。按星标降序排列。
💡 TIPS AND TRICKS (83) (技巧与窍门)
🚫👶 = do not babysit 🚫👶 = 不要事无巨细地监管(放手让 AI 执行)
Prompting · Planning · Context · Session · CLAUDE.md + .claude/rules · Agents · Commands · Skills · Hooks · Workflows · Advanced · Git / PR · Debugging · Utilities · Daily 提示词 · 计划 · 上下文 · 会话 · CLAUDE.md + .claude/rules · 智能体 · 命令 · 技能 · 钩子 · 工作流 · 进阶 · Git / PR · 调试 · 工具 · 日常
■ Prompting (3) ■ 提示词 (3)
Tip: Claude — “grill me on these changes and don’t make a PR until I pass your test.” or “prove to me this works” 提示:Claude — “针对这些更改对我进行盘问,在我通过你的测试之前不要提交 PR。” 或者 “向我证明这段代码有效”。