skills/requesting-code-review/SKILL.md
派遣审查子代理对代码进行独立评审,及早发现问题。强制触发:完成重大功能后、合并到 main 前。可选触发:卡住时需要新鲜视角、重构前需要基线检查、修复复杂 bug 后。subagent-driven-development 场景中使用专用 reviewer 而非本技能的标准流程。
npx skillsauth add Chikage0o0/opencode requesting-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
使用 task 工具派遣 OpenCode 审查子代理,在问题扩散之前捕获它们。审查者获得精心构建的评估上下文 —— 绝不包含你的会话历史。这让审查者专注于工作产出,而非你的思考过程,同时保留你自己的上下文以便继续工作。
核心原则: 及早审查,频繁审查。
强制要求:
可选但很有价值:
subagent-driven-development 例外:
对于提交前任务审查,请勿使用下方的已提交范围流程。在该工作流中,控制器应等待规格合规性通过后,再派遣任务特定的提示词,提示词位于 skills/subagent-driven-development/code-reviewer-dispatch-prompt.md,用于审查当前工作树与 BASE_SHA 的差异。
审查已提交的范围(例如合并前的重大功能)时,请使用以下步骤。
1. 获取 git SHA:
BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
HEAD_SHA=$(git rev-parse HEAD)
2. 派遣审查子代理:
使用 OpenCode 的 task 工具,并设置 subagent_type: "code-reviewer",然后填写 code-reviewer-dispatch-prompt.md 中的提示词模板。
需提供的字段:
review_goal —— 审查应支持什么决策full_context —— 你构建了什么以及它的重要性requirements_context —— 代码应满足的计划或需求diff_base —— 起始提交diff_target —— 已提交范围审查的结束提交3. 根据反馈采取行动:
[Just completed a major feature and want review before merge]
You: Let me request code review before proceeding.
BASE_SHA=$(git merge-base HEAD origin/main)
HEAD_SHA=$(git rev-parse HEAD)
[Dispatch reviewer subagent via OpenCode `task`]
review_goal: Confirm the search indexing and repair feature is ready to merge
full_context: Added indexing, verification, and repair flows for conversation search
requirements_context: Task 2 from docs/plans/active/deployment-plan.md
diff_base: a7981ec
diff_target: 3df7661
[Subagent returns]:
Status: CHANGES_REQUIRED
Findings:
[Important] Missing progress indicators for long-running repair operations
[Minor] Magic number (100) for reporting interval
Summary: Ready after fixing the important issue
You: [Fix progress indicators]
[Continue to Task 3]
Subagent-Driven Development:
BASE_SHA 的差异skills/subagent-driven-development/code-reviewer-dispatch-prompt.md(单个未提交任务审查),而非 skills/requesting-code-review/code-reviewer-dispatch-prompt.md(已提交范围审查)Executing Plans:
Ad-Hoc Development:
切勿:
如果审查者错了:
查看模板:./code-reviewer-dispatch-prompt.md
data-ai
Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
development
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
development
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
development
Simplifies code for clarity without changing behavior. Use for readability, maintainability, and complexity reduction after behavior is understood.