跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 review

Review

审查当前分支的代码更改,在审计diff前使用检查记录上下文来理解开发者的意图. 当用户要求代码审查时使用,想要审查分支更改,或者要求在合并前审计近期的工作.

361 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

在审计 diff 之前, 使用检查记录上下文审查当前分支的代码更改, 以了解开发者的意图

何时用

用户请求代码审查, 想要审查分支更改, 或在合并前要求审计最近的工作

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Review、Response Format、Rules、Process、1. Verify environment、2. Detect base ref。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/review-rules.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Review code changes on the current branch using checkpoint transcript context to understand developer intent before auditing the diff. Use when the user asks for a code review, wants to review branch changes, or asks to audit recent work before merging.

ReviewResponse FormatRulesProcess1. Verify environment2. Detect base ref3. Compute scope4. Gather checkpoint intent (skip in degraded mode)5. Read the diff6. Perform the review7. Output findingspath/to/file.ts

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
review
description
Review code changes on the current branch using checkpoint transcript context to understand developer intent before auditing the diff. Use when the user asks for a code review, wants to review branch changes, or asks to audit recent work before merging.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 1
  • references/review-rules.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「review」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-90db844b82a52396-%E5%AE%A1%E6%9F%A5.html
请存为 .cursor/skills/review/SKILL.md 或 .claude/skills/review/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/entireio/skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/entireio/skills' --list

npx skills add 'https://github.com/entireio/skills' --skill 'review'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: review description: > Review code changes on the current branch using checkpoint transcript context to understand developer intent before auditing the diff. Use when the user asks for a code review, wants to review branch changes, or asks to audit recent work before merging. --- # Review Review code changes on the current branch by first reading checkpoint transcripts to understand the intent behind each change, then auditing the actual diff for issues. This produces an intent-aware review that catches mismatches between what the developer wanted and what the code actually does. ## Response Format Begin the first response to this skill invocation with the line: `Entire Review:` followed by a blank line, then the content. - Apply the header to the **first response of the invocation only.** Do not re-print it on follow-up turns within the same invocation. - Do **not** include the header on error or early-exit responses (e.g. "not a git repository", "no commits found between branch and base"). ## Rules 1. This is a **read-only audit**. Do not modify any files during the review. 2. Always show a scope banner before findings so the user knows what is being reviewed. 3. If checkpoint context is unavailable, still perform the review using only the diff and commit messages. Clearly state that the review lacks intent context. 4. Group findings by file. Within each file, order by severity (Critical > High > Medium > Low). 5. Every finding must include a concrete suggestion or explanation, not just flag the issue. 6. After presenting findings, ask the user if they want a fix plan. Do not auto-fix. 7. Do not review generated files, lock files, or binary files unless the user explicitly asks for them. ## Process ### 1. Verify environment Run `entire version` to check if the CLI is available. If it is not installed, note that the review will proceed without checkpoint intent context (degraded mode). ### 2. Detect base ref Find the mainline branch to diff against. Try these refs in order and use the first that exists: ```bash git rev-parse --verify origin/HEAD 2>/dev/null git rev-parse --verify origin/main 2>/dev/null git rev-parse --verify origin/master 2>/dev/null git rev-parse --verify main 2>/dev/null git rev-parse --verify master 2>/dev/null ``` If none exist, tell the user no base ref was found and ask them to specify one. ### 3. Compute scope ```bash git rev-list --count ..HEAD git diff --stat ..HEAD ``` Record the number of commits and files changed. This forms the scope banner. ### 4. Gather checkpoint intent (skip in degraded mode) ```bash git log --format='%H%x00%s%x00%b' ..HEAD ``` Extract `Entire-Checkpoint:` trailer values from commit bodies. Deduplicate checkpoint IDs. For each unique checkpoint ID (up to 20): ```bash entire checkpoint explain --checkpoint --json --no-pager ``` Parse the JSON to extract session metadata. For each non-review session in the checkpoint, prefer the summary (intent + outcome). If no summary is available, fall back to the latest user prompt. Truncate each checkpoint detail to 320 characters. If `--json` fails for a checkpoint, fall back to the bare human-readable output: ```bash entire checkpoint explain --checkpoint --no-pager ``` Do not use `--full` in the review workflow — it produces long narrative text harder for agents to parse in bulk. If that also fails, skip the checkpoint and note it was unavailable. Additionally, read the current in-progress session (if any) for uncommitted work context: ```bash entire session current --json ``` If this returns valid JSON, extract `last_prompt` and `files_touched` — these represent the intent behind uncommitted changes that are not yet captured in any checkpoint. Build an intent map: for each file in the diff (committed + uncommitted), collect the relevant intent context from all checkpoints and the active session that touched it. ### 5. Read the diff ```bash git diff ..HEAD ``` Also include uncommitted changes: ```bash git diff HEAD ``` For large diffs (>5000 lines total), focus on the most critical files: - Files with the most changes - Files mentioned in checkpoint intents - Source files over generated/config files Read individual file diffs as needed rather than loading the entire diff at once. ### 6. Perform the review Read the review rules: ``` references/review-rules.md ``` For each file in the diff, review it considering: **With checkpoint context:** - Does the implementation match the stated intent? - Were the constraints from the transcript respected? - Did the agent miss edge cases it discussed? - Are there leftover debugging artifacts or TODOs? **Always (with or without context):** - Logic errors, off-by-one, null safety - Security issues (injection, auth bypass, data exposure) - Performance concerns (N+1 queries, unnecessary allocations) - Error handling gaps - API contract violations - Dead code or unreachable branches ### 7. Output findings Present findings using severity prefixes that align with the `entire review --fix` parser: ``` Entire Review: Reviewing vs : N commits, M files changed [Intent context: available from K checkpoints | unavailable — reviewing diff only] ## path/to/file.ts Critical: Intent: Actual: Fix: High: Intent: Actual: Fix: Medium: Issue: Fix: ## path/to/other-file.ts Low: --- Found N issues (X critical, Y high, Z medium, W low). Would you like me to create a fix plan for the critical and high issues? ``` When checkpoint context is unavailable for a finding, omit the `Intent:` line and use `Issue:` / `Fix:` instead. ### 8. Offer follow-up After presenting findings, wait for the user's response: - If they say yes to a fix plan, outline specific steps to address each critical/high issue. - If they ask to fix directly, switch to implementation mode and address the issues. - If they decline, the review is complete. ## Degraded Mode (no Entire CLI or no checkpoints) When checkpoint context is unavailable: 1. Skip step 4 entirely 2. In the scope banner, state: "Intent context unavailable — reviewing diff only" 3. Omit the "Intent:" line from findings 4. Still perform the full code-level review from step 6 5. Note at the end: "This review was performed without Entire checkpoint context. With checkpoints enabled, the review would also verify that implementation matches the original developer intent." ## Failure Modes - **No commits between base and HEAD**: Tell the user the branch has no changes relative to the base. Do not output a review. - **Cannot detect base ref**: Ask the user to specify the base branch or commit. - **Diff too large (>100 files)**: Ask the user if they want to review all files or focus on a subset. Suggest reviewing only source files or files with checkpoint context. - **`entire checkpoint explain` fails**: Note the specific checkpoint was unavailable, continue reviewing remaining files without that context.

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…