review-local
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLocal Review
本地审查
Review current local git changes from multiple expert perspectives using team orchestration.
通过团队编排,从多个专家视角审查当前的本地Git变更。
Arguments
参数
| Argument | Default | Description |
|---|---|---|
| | Only review staged changes ( |
| none | Write report to |
| 参数 | 默认值 | 说明 |
|---|---|---|
| | 仅审查已暂存的变更( |
| none | 将报告写入 |
Workflow
工作流程
1. Collect Changes ──► 2. Read Context ──► 3. Team Review ──► 4. Synthesize ──► 5. Report1. 收集变更 ──► 2. 读取上下文 ──► 3. 团队审查 ──► 4. 整合结果 ──► 5. 生成报告Phase 1: Collect Changes
阶段1:收集变更
Gather local changes:
bash
undefined收集本地变更:
bash
undefinedStaged changes (always collected)
已暂存的变更(始终收集)
git diff --cached
git diff --cached
Unstaged changes (skip if --staged-only)
未暂存的变更(如果设置--staged-only则跳过)
git diff
git diff
Untracked files (skip if --staged-only)
未跟踪的文件(如果设置--staged-only则跳过)
git status --porcelain | grep '^??'
If all produce empty results, inform the user: "No local changes detected. Nothing to review." and exit.
For untracked files, read the full file content as a pseudo-diff.
If more than 30 files changed, warn the user and ask whether to proceed or narrow scope.git status --porcelain | grep '^??'
如果所有命令都返回空结果,则告知用户:「未检测到本地变更,无可审查内容。」并退出。
对于未跟踪文件,读取完整文件内容作为伪差异内容。
如果变更文件数量超过30个,则向用户发出警告,并询问是否继续或缩小审查范围。Phase 2: Read Context
阶段2:读取上下文
For each changed file, read the full file to give reviewers surrounding context. Skip deleted files and binary files.
对于每个变更文件,读取完整文件内容为审查者提供上下文信息。跳过已删除文件和二进制文件。
Phase 3: Team Review
阶段3:团队审查
Create an agent team to explore this from different angles: one teammate on software architecture, one on security, one on infrastructure design, one on QA/QC, one on TDD, one on BDD, one on idempotence, and one playing devil's advocate.
Each teammate receives:
- The combined diff from Phase 1
- The file context from Phase 2
- Their perspective-specific prompt — read from
references/perspectives/<perspective>.md
Read for each teammate's detailed review prompt, questions, output format, and severity guidance.
references/perspectives/创建一个Agent团队,从不同角度审查变更:一名负责软件架构、一名负责安全、一名负责基础设施设计、一名负责QA/QC、一名负责TDD、一名负责BDD、一名负责幂等性,还有一名扮演唱反调的角色。
每个团队成员会收到:
- 阶段1收集的合并差异内容
- 阶段2的文件上下文
- 与其视角对应的提示词——从读取
references/perspectives/<perspective>.md
请查看目录下的文件,获取每个团队成员详细的审查提示、问题、输出格式和严重度指导。
references/perspectives/Phase 4: Synthesize Findings
阶段4:整合审查结果
After all teammates complete their reviews, synthesize findings. Read for the full protocol:
references/synthesis-protocol.md- Collect all findings from each teammate
- Categorize by severity: Critical, Important, Nice-to-have
- Deduplicate overlapping concerns
- Prioritize by risk and effort
所有团队成员完成审查后,整合结果。请查看获取完整的整合规则:
references/synthesis-protocol.md- 收集所有团队成员的审查结果
- 按严重度分类:严重、重要、建议优化
- 去重重叠的问题
- 按风险和修复优先级排序
Phase 5: Present Report
阶段5:生成报告
Present the consolidated report inline. If is set, write to in the current directory.
--filereview-local-YYYY-MM-DD-HHmm.mdRead for the exact report format.
references/report-template.md直接展示整合后的报告。如果设置了参数,则将报告写入当前目录下的文件。
--filereview-local-YYYY-MM-DD-HHmm.md请查看获取报告的具体格式。
references/report-template.mdBehavior Scenarios
行为场景
gherkin
Scenario: Full team review of local changes
Given the user has local changes (staged, unstaged, or untracked)
When /review-local is invoked
Then a team is created with all 8 perspectives, each reviews the diff,
findings are synthesized into a consolidated severity report inline
Scenario: Staged-only review
Given the user has staged changes ready to commit
When /review-local --staged-only is invoked
Then only the staged diff is reviewed by the team
Scenario: Write report to file
Given the user wants a persistent record
When /review-local --file is invoked
Then the report is written to review-local-YYYY-MM-DD-HHmm.md
and the file path is confirmed to the user
Scenario: No local changes
Given the working tree is clean
When /review-local is invoked
Then the user is told "No local changes detected" and the skill exits
Scenario: Large changeset warning
Given more than 30 files are changed
When /review-local is invoked
Then the user is warned and asked whether to proceed or narrow scopegherkin
Scenario: Full team review of local changes
Given the user has local changes (staged, unstaged, or untracked)
When /review-local is invoked
Then a team is created with all 8 perspectives, each reviews the diff,
findings are synthesized into a consolidated severity report inline
Scenario: Staged-only review
Given the user has staged changes ready to commit
When /review-local --staged-only is invoked
Then only the staged diff is reviewed by the team
Scenario: Write report to file
Given the user wants a persistent record
When /review-local --file is invoked
Then the report is written to review-local-YYYY-MM-DD-HHmm.md
and the file path is confirmed to the user
Scenario: No local changes
Given the working tree is clean
When /review-local is invoked
Then the user is told "No local changes detected" and the skill exits
Scenario: Large changeset warning
Given more than 30 files are changed
When /review-local is invoked
Then the user is warned and asked whether to proceed or narrow scopeReferences
参考资料
- — One file per review perspective with prompts, questions, output format, and severity guidance
references/perspectives/ - — How to merge, deduplicate, and categorize findings
references/synthesis-protocol.md - — Exact markdown format for the consolidated report
references/report-template.md
- — 每个审查视角对应一个文件,包含提示词、问题、输出格式和严重度指导
references/perspectives/ - — 如何合并、去重和分类审查结果的规则
references/synthesis-protocol.md - — 整合报告的具体Markdown格式
references/report-template.md