‹ 首页

captain-review

@the-agency-ai · 收录于 昨天 · 上游提交 2 个月前

Captain-only. Review all draft PRs (or a specified PR / project) and generate per-workstream dispatch files routing findings to worktree agents. Formerly `/captain-review` v1 — v2 migration preserves semantics.

适合你,如果需要批量审查PR并自动分派审查结果给不同工作代理

/ 通过 npx 安装 校验哈希
npx oh-my-skill add the-agency-ai/the-agency/captain-review
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- the-agency-ai/the-agency/captain-review
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify the-agency-ai/the-agency/captain-review
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
36GitHub stars
~1.7K上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 dd2430b · 表述以原文为准
它做什么

审查所有草稿PR(或指定的单个PR/项目),对每个PR运行代码评审,将评审结果按工作流生成调度文件,供工作区代理处理。

什么时候触发

当您作为Captain在master分支上,使用/captain-review命令(可指定PR编号、项目名或--all)审查草稿PR时触发。

装好后可以这样说
生成调度文件到对应工作流。
只审查该项目下的PR。
只评审该单个PR。
技能原文 SKILL.md作者撰写 · MIT · dd2430b

<!-- Flag #62/#63: allowed-tools removed. Inherits Bash(*) from .claude/settings.json. Restricting to specific subcommand patterns at the skill level silently blocks agents on permission prompts the agent cannot see — see dispatch #171 for the devex incident that surfaced this trap. -->

Captain Review

Captain-only multi-PR review pass. For each draft PR in scope, invoke /code-review and materialize the findings as a dispatch file under the owning workstream so the worktree agent picks up the review as part of its normal dispatch flow.

Why this exists

Draft PRs accumulate. A worktree agent cannot self-review their own open work with the captain's fleet-wide lens, and posting review comments directly on each PR floods worktree agents with low-signal noise when the same findings could be routed as a single coherent dispatch.

This skill:

  • Surveys the draft-PR queue (fleet-wide, per-project, or per-PR).
  • Runs /code-review on each — the 7-agent confidence-scored local review, not GitHub PR comments.
  • Lands findings as a per-workstream dispatch file so the recipient worktree processes them through its ordinary ISCP inbox.
  • Commits the dispatch files as coordination artifacts (no QG — they are not application code).

The boundary is deliberate: this is a captain-side triage pass, not a gate. Boundary gates with the fix cycle live in /iteration-complete, /phase-complete, and /pr-prep.

Required reading

Before running, Read the files listed in required_reading: frontmatter.

  • agency/REFERENCE-CODE-REVIEW-LIFECYCLE.md — distinguishes the review tools, PR lifecycle, review/dispatch file conventions.
  • agency/REFERENCE-ISCP-PROTOCOL.md — dispatch format, filenames, addressing; this skill emits dispatches.
Usage
/captain-review                    # fleet-wide (all open draft PRs)
/captain-review --all              # same as above, explicit
/captain-review 123                # single PR by number
/captain-review mdpal              # all draft PRs on the mdpal project
  • $ARGUMENTS (optional): one of
  • a PR number — review that single PR,
  • a project/workstream name — review all draft PRs on that workstream,
  • --all or empty — review every open draft PR.
Preconditions
  1. You are the captain on the main checkout (master). This skill is scoped to the captain family — paths: [] keeps it out of worktree autocomplete and the captain-family name signals scope. The captain must verify main-checkout/master before running; this skill has no Step-1 runtime refuse-from-wrong-context check yet (follow-up tracked). Do not run from a worktree.
  2. gh is authenticated against the repo's origin.
  3. Working tree is clean or contains only coordination-artifact edits — this skill writes dispatch files and commits them, so incidental code changes would be swept into the coord commit.
  4. /code-review is available (Batch 4 v2 skill).
Flow / Steps
Step 1: Identify PRs to review

Resolve $ARGUMENTS:

  • If a PR number: review that specific PR.
  • If a project/workstream name: gh pr list --state open --draft filtered to PRs whose branch prefix matches the project.
  • If --all or empty: gh pr list --state open --draft — every open draft PR.

If the scope resolves to zero PRs, stop and report "no draft PRs in scope" — do not emit empty dispatch files.

Step 2: Review each PR

For each PR in scope, invoke /code-review via the Skill tool with the PR number. /code-review handles the 7-agent confidence-scored local review; this skill does not re-implement it.

Step 3: Generate dispatch files

For each workstream that produced findings, create a dispatch file at:

agency/workstreams/{workstream}/code-reviews/{workstream}-dispatch-{YYYYMMDD-HHMM}.md

Contents:

  • PR reference (number, title, branch).
  • Findings grouped by file.
  • Suggested fixes.
  • Priority ordering (from the /code-review confidence score).

The workstream is derived from the PR branch name (segment before /).

Step 4: Present dispatch report

Show a summary table of all reviews performed this pass:

Captain Review Complete:

Project          PR    Findings   Dispatch
─────────────────────────────────────────────
mdpal            #12   8 issues   agency/workstreams/mdpal/code-reviews/mdpal-dispatch-20260401-1430.md
mock-and-mark    #15   3 issues   agency/workstreams/mock-and-mark/code-reviews/mock-and-mark-dispatch-20260401-1430.md
Step 5: Commit review and dispatch files

Stage and commit the review and dispatch files as coordination artifacts via /git-safe-commit --force (or /coord-commit if the caller prefers the wrapper). These are coordination artifacts — not application code — so the commit does not route through the full QG.

Failure modes
  • No draft PRs in scope (Step 1): stop and report. Do not write an empty dispatch.
  • /code-review fails on a PR (Step 2): record the failure in the summary and continue with the remaining PRs. A single-PR failure does not abort the pass — other worktrees still benefit from their dispatches.
  • gh not authenticated / network error: surface the error verbatim; this skill has no offline mode.
  • Dispatch path collides with an existing file for the same minute: the timestamp is minute-precision; re-running within the same minute for the same workstream would overwrite. Wait 60s or append a disambiguator manually.
  • Commit fails in Step 5 (pre-commit hook): fix the underlying issue and re-commit. Never --no-verify. The dispatch files exist on disk regardless; do not delete them to make the commit clean.
What this does NOT do
  • Does not post comments on GitHub. Findings route via dispatch, not PR comments. For human-approved PR comments, use /pr-review.
  • Does not make code changes. The worktree agent reading the dispatch decides how to act.
  • Does not run the quality gate. Boundary gates are /iteration-complete, /phase-complete, and /pr-prep.
  • Does not merge, close, or re-request review on any PR. It is a triage pass, not a lifecycle action.
  • Does not push. Push is a separate discipline via /sync or /release.
Status

active (v2 migrated from v1 in the sister-repo v1→v2 Batch 8+9 captain cluster). Surface preserved from v1; behavior identical. Composes /code-review + dispatch file emission + coord commit.

Related
  • /code-review — the per-PR review this skill invokes in a loop.
  • /pr-review — ad-hoc single-PR review with human-approved comments posted to GitHub.
  • /pr-respond — respond to existing review threads on a PR.
  • /dispatch — dispatch lifecycle; the recipient worktree processes what this skill writes.
  • /captain-sync-all — fleet-wide sync that often precedes or follows a review pass.

OFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!

按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。