关于 review-full
review-full 是一项通过并行 Agent 对代码库进行九个领域审查的技能,使用 repomix 打包的代码快照,并将各领域发现写入 `.llmtmp/review-full/` 后生成摘要。
主要功能
- 01并行审查九个领域
- 02使用 repomix 打包代码
- 03按领域写入审查结果
- 04验证审查输出文件
适用场景
- 01审查整个代码库
- 02审查指定的代码路径
- 03按领域整理审查发现
MCP 相关
该技能要求 Agent 使用 MCP 工具浏览和读取打包后的代码库快照。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ jimweller/ clanker-skills --skill review-full安装后在 Claude Code 中输入/review-full确认已加载。
详细介绍
STARTER_CHARACTER = 🔎
完整审查
并行审查整个代码库的 9 个重点领域。每个 Agent 都通过 MCP 从单个 repomix 打包快照中读取内容。输出写入 .llmtmp/review-full/ 下各领域对应的文件。
参数
如果用户在调用时提供了路径,则将其视为相对于仓库根目录的目标目录。否则打包整个仓库。
步骤 1:解析目标
PROJECT_ROOT=$(git rev-parse --show-toplevel)
PROJECT_ROOT=$(cd -P "$PROJECT_ROOT" && pwd -P)
TARGET_PATH="<user-provided path or empty>"
[ -z "$TARGET_PATH" ] && TARGET_PATH="$PROJECT_ROOT"
# Resolve to physical absolute path and verify it stays inside the repo (no traversal, no symlink escape).
TARGET_PATH=$(cd -P "$TARGET_PATH" 2>/dev/null && pwd -P) || { echo "TARGET_PATH does not exist"; exit 1; }
case "$TARGET_PATH" in
"$PROJECT_ROOT"|"$PROJECT_ROOT"/*) ;;
*) echo "TARGET_PATH escapes PROJECT_ROOT"; exit 1 ;;
esac
TARGET_NAME=$(basename "$TARGET_PATH")
[ "$TARGET_PATH" = "$PROJECT_ROOT" ] && TARGET_NAME="repo"
步骤 2:清理并准备输出
OUTPUT_DIR="$PROJECT_ROOT/.llmtmp/review-full"
mkdir -p "$OUTPUT_DIR"
find "$OUTPUT_DIR" -mindepth 1 -delete
使用 mkdir -p,然后使用 find -delete,而不是 rm -rf。PATH 中的 safe-rm 替代命令(某些 dotfiles 配置中会使用)会将路径移到废纸篓,并在路径不存在时即使使用了 -f 也返回非零退出状态,这会导致首次运行时清理失败。
步骤 3:打包代码库
REPOMIX_FILE="$OUTPUT_DIR/repomix.xml"
npx repomix -o "$REPOMIX_FILE" --quiet --output-show-line-numbers "$TARGET_PATH"
repomix 文件位于 OUTPUT_DIR(.llmtmp/review-full/)内,该目录已加入 git 忽略列表,并会在每次运行开始时由步骤 2 清理。不会向 /tmp 泄漏文件,也无需使用 trap。此处无法使用 trap,因为此技能中的每个 bash 代码块都在独立的 shell 进程中运行;在步骤 3 中注册的 EXIT 陷阱会在步骤 3 的 bash 代码块结束时立即触发,在步骤 4(attach_packed_output)读取文件之前将其删除。
Repomix 会自动从项目根目录读取 .repomixignore。
验证文件已创建。继续之前,请确认 REPOMIX_FILE。
步骤 4:附加打包输出
使用 filePath=REPOMIX_FILE 调用 attach_packed_output。记录返回的 outputId 字符串。这是各 Agent 将使用的代码库访问句柄。
不要将此步骤委派给子 Agent。outputId 必须由协调者负责。
步骤 5:并行派发 9 个审查 Agent
在单个工具块中发起全部 9 次 Agent 调用,并设置 run_in_background: false。子 Agent 默认在后台运行,而后台并行派发会在后续轮次才返回结果,因此步骤 6 可能会在任何 Agent 写入文件之前就去验证文件。
| Agent | 子 Agent 类型 | 输出文件 |
|---|---|---|
| 架构与设计 | reviewer-architecture | architecture.md |
| 正确性与 Bug | reviewer-correctness | correctness.md |
| 数据与信息架构 | reviewer-data | data.md |
| 运维就绪度 | reviewer-ops | ops.md |
| 性能 | reviewer-performance | performance.md |
| 代码质量 | reviewer-quality | quality.md |
| 安全性 | reviewer-security | security.md |
| SOLID 原则 | reviewer-solid | solid.md |
| 测试 | reviewer-testing | testing.md |
每个审查提示词都包含:
- 步骤 4 中的
outputId - 使用
read_repomix_output和grep_repomix_output进行导航的指示 - 指示:“通过 repomix 输出读取 AGENTS.md(或 CLAUDE.md)以及 .llmdocs/architecture.md(如果存在),以了解项目上下文。”
- 指示:“将审查结果写入
<OUTPUT_DIR>/<area>.md。使用 H2 标题,后接审查结果或 ‘No findings.’”
步骤 6:等待并验证
所有 9 个 Agent 完成后,验证 <OUTPUT_DIR> 中的每个文件:
- 文件存在且非空
- 第一行非空内容是 H2 标题(
## <Area>) - 正文至少包含一项审查结果,或者完全等于字面内容
No findings.
如果文件未通过任何一项检查,则视为 Agent 静默失败,并重新派发该 Agent。不要接受没有正文的占位文件(例如 ## Testing\n),也不要接受缺少 H2 标题的内容。
步骤 7:总结
在对话中生成总结:
# Full Review Summary
Target: <TARGET_NAME>
Files reviewed: <count from repomix>
## Findings Counts
| Area | High | Medium | Low |
| --------------------- | ---- | ------ | --- |
| Architecture & Design | <N> | <N> | <N> |
| Correctness & Bugs | <N> | <N> | <N> |
| Data & Information | <N> | <N> | <N> |
| Operational Readiness | <N> | <N> | <N> |
| Performance | <N> | <N> | <N> |
| Code Quality | <N> | <N> | <N> |
| Security | <N> | <N> | <N> |
| SOLID Principles | <N> | <N> | <N> |
| Testing | <N> | <N> | <N> |
## Output Files
- `.llmtmp/review-full/architecture.md`
- `.llmtmp/review-full/correctness.md`
- `.llmtmp/review-full/data.md`
- `.llmtmp/review-full/ops.md`
- `.llmtmp/review-full/performance.md`
- `.llmtmp/review-full/quality.md`
- `.llmtmp/review-full/security.md`
- `.llmtmp/review-full/solid.md`
- `.llmtmp/review-full/testing.md`
Read individual files for detailed findings.
不要将文件内容加载到对话中。总结就是交付物;文件会保留,以供后续跟进。