kiro-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<EXTREMELY-IMPORTANT>
This skill orchestrates an external reviewer and must stay disciplined.
Non-negotiable rules:
- Read the real diff before writing the Kiro prompt.
- Make the prompt specific to the changed areas and likely risks.
- Never put secrets or credentials in the prompt.
- Carry forward exclusion lists on later rounds.
- Verify returned findings before acting on them.
<EXTREMELY-IMPORTANT>
本技能用于协调外部评审工具,必须严格遵循规则。
不可妥协的规则:
- 在编写Kiro提示词前,先读取真实的代码差异。
- 提示词需针对变更区域和潜在风险定制。
- 绝不在提示词中包含机密信息或凭证。
- 在后续评审轮次中沿用排除列表。
- 在根据评审结果采取行动前,先验证返回的发现。
Kiro Review
Kiro 评审
Inputs
输入
- : Optional scope hint such as
$request,last commit,uncommitted, orauth focusround 2
- :可选的范围提示,例如
$request(最后一次提交)、last commit(未提交变更)、uncommitted(聚焦认证模块)或auth focus(第二轮评审)round 2
Goal
目标
Use to get an external review pass that:
kiro-cli- uses the right diff scope
- focuses on the actual change surface
- returns structured findings instead of generic commentary
使用完成一次外部评审,要求:
kiro-cli- 使用正确的差异范围
- 聚焦实际变更内容
- 返回结构化的评审结果,而非泛泛的评论
Step 0: Verify Kiro availability
步骤0:验证Kiro可用性
Check:
which kiro-cli- or the minimal auth check needed in this environment
kiro-cli whoami
If the CLI is unavailable or not authenticated, explain the blocker and stop.
Success criteria: Kiro can run successfully from the current repository.
检查:
which kiro-cli- 或当前环境所需的最小化认证检查
kiro-cli whoami
如果CLI不可用或未完成认证,说明阻塞原因并停止操作。
成功标准:可从当前仓库成功运行Kiro。
Step 1: Resolve review scope
步骤1:确定评审范围
Determine whether to review:
- the full branch
- uncommitted changes
- a specific commit
Read the diff summary and changed-file list first.
If there is nothing to review, stop and say so explicitly.
Success criteria: The review target is explicit and backed by a real diff.
决定评审对象:
- 完整分支
- 未提交变更
- 特定提交
先读取差异摘要和变更文件列表。
如果没有可评审的内容,明确告知并停止操作。
成功标准:评审目标明确,且有真实的代码差异作为依据。
Step 2: Build the focused Kiro prompt
步骤2:构建聚焦的Kiro提示词
Create a compact prompt that includes:
- what changed
- the major risk areas
- any previously fixed issues to exclude on later rounds
- an instruction to verify findings against the actual code
- the expected compact output format
Avoid generic prompts. They produce weak results.
Success criteria: The prompt is specific to the change set rather than reusable boilerplate.
创建简洁的提示词,包含:
- 变更内容
- 主要风险区域
- 后续轮次中需排除的已修复问题
- 验证评审结果与实际代码一致性的指令
- 预期的简洁输出格式
避免使用通用提示词,这类提示词会导致结果质量低下。
成功标准:提示词针对当前变更集定制,而非可复用的模板。
Step 3: Run Kiro in non-interactive mode
步骤3:以非交互模式运行Kiro
Invoke with:
kiro-cli chat- -- runs without expecting user input, returns output directly
--no-interactive - (trust all tools) -- kiro needs file read access to verify findings against source
-a
Always capture stderr with (kiro logs to stderr).
2>&1Optional flags:
- -- specify a particular model if needed
--model <model> - -- use a specific agent profile for the review
--agent <agent>
If the run is likely to take a while, background execution is acceptable, but keep the scope tight enough that the review stays focused.
Success criteria: Kiro runs on the intended scope and returns parseable findings.
调用命令,参数包括:
kiro-cli chat- :无需用户输入,直接返回输出结果
--no-interactive - (信任所有工具):Kiro需要文件读取权限以验证评审结果与源代码的一致性
-a
始终通过捕获stderr(Kiro日志输出到stderr)。
2>&1可选参数:
- :如有需要,指定特定模型
--model <model> - :使用特定的Agent配置文件进行评审
--agent <agent>
如果运行时间可能较长,可后台执行,但需确保范围足够聚焦,保证评审针对性。
成功标准:Kiro在指定范围内运行,并返回可解析的评审结果。
Step 4: Summarize findings
步骤4:总结评审结果
Report:
- review scope
- findings by priority
- file and line references when available
- explicit clean result when no material findings are returned
If the user wants fixes, verify each finding locally before changing code.
Success criteria: The user gets a readable review summary instead of raw CLI logs.
报告内容包括:
- 评审范围
- 按优先级排序的评审发现
- 可用时提供文件和行号引用
- 若无实质性发现,明确给出“无问题”结果
如果用户需要修复代码,在修改前先本地验证每个评审发现。
成功标准:用户获得易读的评审摘要,而非原始CLI日志。
Step 5: Iterate only with exclusions
步骤5:仅基于排除项进行迭代
On later rounds:
- list prior fixed findings in the exclusion block
- narrow the scope to newly changed files when possible
- avoid repeated full-branch reviews unless the code changed broadly again
Success criteria: Follow-up rounds target new issues instead of recycling old ones.
后续评审轮次:
- 在排除块中列出之前已修复的问题
- 尽可能将范围缩小到新变更的文件
- 除非代码再次发生大范围变更,否则避免重复进行全分支评审
成功标准:后续轮次针对新问题,而非重复处理已修复的旧问题。
Guardrails
防护规则
- Do not run this skill proactively.
- Do not put secrets, tokens, or private config into the prompt.
- Do not trust findings blindly without local verification.
- Do not skip diff reading before prompt construction.
- 不得主动运行本技能。
- 不得在提示词中包含机密、令牌或私有配置。
- 不得盲目信任评审结果,需先本地验证。
- 在构建提示词前不得跳过读取代码差异的步骤。
Output Contract
输出约定
Report:
- the review scope
- the main focus areas given to Kiro
- findings by priority with locations when available
- explicit clean result if nothing material was found
- whether a next round should exclude previously fixed issues
报告需包含:
- 评审范围
- 提供给Kiro的主要聚焦领域
- 按优先级排序的评审发现(含位置信息,如有)
- 若无实质性发现,明确给出“无问题”结果
- 下一轮评审是否需要排除之前已修复的问题