Files
knowledge-base/4 - Resources/Claude-Code/Everything Claude Code 用法速查.md
Yaojia Wang 232b045e03 vault: align ECC docs with current repo and add orchestration manual
Updated ECC notes to match the current state of affaan-m/everything-claude-code
docs/token-optimization.md and docs/SKILL-PLACEMENT-POLICY.md:

- Drop CLAUDE_AUTOCOMPACT_PCT_OVERRIDE recommendations (now warned against
  upstream — variable can only lower threshold, opposite of intent)
- Add CLAUDE_CODE_SUBAGENT_MODEL=haiku as the new core token-saving setting
- Flag the default `memory` MCP for disablement (no skill/agent/hook references)
- Add Skill Placement Policy section (curated/learned/imported/evolved + provenance)
- Cover missing commands: /checkpoint, /sessions, /security-scan, /claw, /projects

Add new resource: ECC 编排实战手册.md (721 lines). Six orchestration patterns
(dmux+worktree, sequential claude -p, continuous-claude, Ralphinho RFC-DAG,
santa-loop, Task in-process) with real commands, real plan.json structures,
real CLI flags, and explicit "could not verify online" markers for /multi-*
and /feature-dev. All sourced to specific commands/*.md or skills/*.md files.

Cross-link the new manual from 完整指南 and 用法速查.
2026-04-26 12:17:47 +02:00

9.3 KiB
Raw Blame History

created, type, tags, source
created type tags source
2026-03-08 22:10 resource
resource
claude-code
AI-tools
development-workflow
cheatsheet
https://github.com/affaan-m/everything-claude-code

Everything Claude Code 用法速查

按使用场景分类的快速参考手册。组件完整列表见 Everything Claude Code 完整指南。方法论深度分析见 Everything Claude Code 方法论与最佳实践编排深度实战见 ECC 编排实战手册(6 种模式真实命令 + 决策树)。

命名空间: 通过插件安装的 ECC命令需加 everything-claude-code: 前缀。本文用短名书写,实际使用时如 /plan/everything-claude-code:plan。完整映射表见 Everything Claude Code 方法论与最佳实践#命令名映射速查


一、按开发阶段分类

1. 规划阶段

场景 用什么 怎么用
复杂功能设计 /plan 命令 → planner agent 输入需求,生成分阶段实施计划,等用户确认后再动手
系统架构决策 architect agent 自动启用,做 trade-off 分析、模式推荐、可扩展性评审
多模型并行规划 /multi-plan Claude + Codex + Gemini 并行出方案,对比择优
研究优先 search-first skill 先搜 GitHub/npm/PyPI 找现有实现,再决定是否自己写

2. 编码阶段

场景 用什么 怎么用
新功能开发 /tdd 命令 → tdd-guide agent 强制 RED→GREEN→REFACTOR 流程,先写测试再实现,验证 80%+ 覆盖率
修 Bug tdd-guide agent自动启用 先写复现测试,再修复,确保不回归
构建失败 /build-fix → build-error-resolver agent 最小改动修复编译/类型错误,不动架构
Go 构建报错 /go-build 专门处理 go build、go vet、linter 问题

3. 质量保障阶段

场景 用什么 怎么用
代码审查 /code-review → code-reviewer agent 写完代码后必须用,检查安全性、质量、可维护性
安全审查 security-reviewer agent自动启用 涉及用户输入/认证/API/敏感数据时自动触发,检测 OWASP Top 10
E2E 测试 /e2e → e2e-runner agent 生成 Playwright 测试,截图/录屏/trace自动隔离 flaky 测试
死代码清理 /refactor-clean → refactor-cleaner agent 用 knip/depcheck 扫描未使用代码并安全删除
快速质量门禁 /quality-gate 提交前快速检查,轻量级

4. 语言专用审查

语言 命令 检查内容
Python /python-review PEP 8、类型提示、安全、ruff/mypy/pylint
Go /go-review 惯用 Go 模式、并发安全、error handling、staticcheck
Go 测试 /go-test 表驱动测试、覆盖率分析
TypeScript 自动 hook 保存后自动 Prettier 格式化 + TypeScript 类型检查
SQL/数据库 database-reviewer agent 查询优化、RLS 安全、连接池、Supabase 最佳实践

二、按自动化机制分类Hooks

时机 Hook 效果
执行 Bash 前 auto-tmux-dev 自动在 tmux 中启动 dev server
执行 Bash 前 tmux-reminder 长时间命令提醒用 tmux
执行 Bash 前 git-push-reminder git push 前提醒 review
写文件前 doc-file-warning 阻止创建非标准文档文件
编辑后 prettier-format 自动格式化 JS/TS 文件
编辑后 typecheck .ts/.tsx 文件编辑后自动类型检查
编辑后 console-log-warning 警告残留的 console.log
编辑后 quality-gate 编辑后快速质量检查
会话开始 session-start 加载上次上下文、检测包管理器
会话结束 session-end 持久化会话状态
会话结束 evaluate-session 提取可复用模式(持续学习)

控制方式:

  • ECC_HOOK_PROFILE=minimal|standard|strict — 按级别启用
  • ECC_DISABLED_HOOKS=hook1,hook2 — 禁用特定 hook

三、按高级场景分类

1. 编排模式选择(优先看)

详见 ECC 编排实战手册。决策树:

想要 用什么 备注
单功能全流程 /feature-dev 7 阶段:Discovery → Exploration → Clarifying → Architecture → Implementation → Review → Summary
顺序分步 /plan/tdd/code-review 最朴素也最稳
双评审兜底 /santa-loop Claude Opus + Codex/Gemini 双独立评审,3 轮收敛
多 worktree 并行 node scripts/orchestrate-worktrees.js plan.json --execute 需 tmux,看 dmux 多Agent并行编排
多日 PR 自治 continuous-claude 外部工具 不属于 ECC,看 Autonomous Loops 自主循环模式
大 RFC + DAG ralphinho 外部工具 不属于 ECC
启动 ECC 内置循环 /loop-start [pattern] [--mode safe|fast] pattern: sequential / continuous-pr / rfc-dag / infinite

⚠️ /orchestratelegacy shim,转发到 dmux-workflows skill。新项目优先用 /feature-dev 或上面的组合。

2. 多模型协作 (需外部 CLI)

⚠️ /multi-* 系列依赖 ~/.claude/bin/codeagent-wrapper + 外部 codex/gemini CLI(ccg 协议),不是 ECC 标配。装不上就用编排手册里的模式 1-3、5、6 替代。

命令 用途
/multi-plan Claude + Codex + Gemini 并行规划
/multi-execute 跨多个模型后端并行执行
/multi-frontend 多前端框架并行开发(React/Vue/Svelte/Angular)
/multi-backend 多后端栈并行开发(Node/Python/Go/Java)
/multi-workflow 复杂多服务编排

2. 自主循环

命令 用途
/loop-start 启动自主循环sequential / continuous-pr / rfc-dag / infinite
/loop-status 监控循环进度、检测卡住
/harness-audit 评估 harness 配置:工具覆盖、上下文效率、质量门禁、成本

3. 持续学习

命令 用途
/learn 从当前会话提取可复用模式,保存为 skill
/learn-eval 从 eval 会话中提取模式
/skill-create 分析 git 历史自动生成 SKILL.md
/instinct-status 查看所有已学习的 instinct 及置信度
/instinct-export 导出 instinct 给队友共享
/instinct-import 导入其他项目的 instinct

4. 模型路由

模型 适合场景
Haiku 4.5 轻量 agent、pair programming、高频调用省 3x 成本)
Sonnet 4.6 主力开发、编排多 agent、复杂编码
Opus 4.6 架构决策、深度推理、研究分析

/model-route 自动路由到合适模型。


四、安装方式

# 安装通用 + 语言规则到 ~/.claude/rules/
./install.sh typescript python golang swift

# 安装到 Cursor
./install.sh --target cursor typescript

# 安装到 Antigravity
./install.sh --target antigravity golang

五、MCP 外部集成(建议不超过 10 个)

服务 用途 需要 Key
github PR/Issue/Repo 操作 GITHUB_PERSONAL_ACCESS_TOKEN
supabase 数据库操作 project-ref
vercel 部署管理 -
firecrawl 网页抓取 FIRECRAWL_API_KEY
exa-web-search 研究搜索 EXA_API_KEY
clickhouse 分析查询 -
context7 实时文档查询 -
sequential-thinking 链式推理 -

六、一句话速查表

我想...
规划一个大功能 /plan
写功能并保证测试覆盖 /tdd
审查刚写的代码 /code-review
修编译错误 /build-fix
跑端到端测试 /e2e
清理死代码 /refactor-clean
更新文档 /update-docs
审查 Python 代码 /python-review
审查 Go 代码 /go-review
多模型并行出方案 /multi-plan(需外部 CLI)
启动自主循环 /loop-start
评估 harness 质量 /harness-audit
从会话中学习模式 /learn
单功能全流程一条龙 /feature-dev
上线前对抗式双评审 /santa-loop
多任务 worktree 并行 node scripts/orchestrate-worktrees.js plan.json --execute

Resources

Zettelkasten

Source