code-review
Review someone else's open GitHub PR — posts a real review with line-anchored inline comments; verdict computed mechanically; mandatory preview gate. Workspace-aware. For your OWN working diff, prefer the bundled /code-review instead.
- License 许可
- MIT
- 所属仓库
- HigorAlves/orc
- 最近更新
- 2026-11-14
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- code-review
- effort
- high
- description
- Review someone else's open GitHub PR — posts a real review with line-anchored inline comments; verdict computed mechanically; mandatory preview gate. Workspace-aware. For your OWN working diff, prefer the bundled /code-review instead.
- allowed-tools
- [ "Read", "Glob", "Grep", "Skill", "Task", "AskUserQuestion", "Bash(gh pr view:*)", "Bash(gh pr diff:*)", "Bash(gh pr list:*)", "Bash(gh issue view:*)", "Bash(gh api:*)", "Bash(command -v gitleaks:*)", "Bash(gitleaks:*)", "Bash(gh api repos:*/pulls:*/reviews:*)", "Bash(jq:*)", "Bash(orc-workspace-detect:*)" ]
- argument-hint
- <pr-number-or-url> [--prs a#1,b#2,...] [--context <description>] [--summary-only] [--soft-tests] [--dry-run] [--include-nits] [--audit]
02 资源文件 7
- 参考文档references/AUDIT.md1.3 KB
- 参考文档references/PHASE-1-SCOPE.md1.5 KB
- 参考文档references/PHASE-3-DISPATCH.md1.4 KB
- 参考文档references/PHASE-4-MERGE.md1.5 KB
- 参考文档references/PHASE-5-COMPOSE.md1.3 KB
- 参考文档references/PHASE-6-POST.md2.2 KB
- 参考文档references/PHASE-8-SUMMARY.md670 B
03 SKILL.md 正文
/orc:code-review
Review a pull request someone else authored. Post a real GitHub review: inline comments anchored to changed lines, one-click suggestion blocks, and an event computed from finding severities.
orc-pr-reviewer and orc-security-reviewer return JSON findings. This command merges them, checks verdict against severity, previews, then posts via gh api or the GitHub MCP.
Arguments
<pr-number-or-url>— required unless--prsis given:123,org/repo#123, or a URL.--prs a#1,b#2,...— workspace mode: review linked PRs as one change. Excludes the positional ref.--context <description>— what the PR is meant to do; feeds spec-conformance findings.--summary-only— print a markdown summary instead of posting. Skips P5–P6.--soft-tests—testfindings become COMMENT instead of REQUEST_CHANGES.--dry-run— run through the preview, print the payload as JSON, post nothing.--include-nits— keepnitfindings (default: drop them). Never changes the event.--audit— repo-wide security audit, no PR. See the Audit module.
Preconditions
🛑 Outward write
P6 posts to GitHub. The preview gate before it is hard-outward: no flag and no autopilot level skips it.
--auditexcludes the positional ref,--prs,--soft-testsand--dry-run.- A bad ref or an empty diff stops the run in P1, never inside a sub-agent.
Phases
Modules live beside this file under references/ (ADR 0008 pilot). Entering a phase, Read exactly its module, per the orc:phases protocol.
| Phase | Module | Skipped when |
|---|---|---|
| 0 Detect context | resident, below | never |
| 1 Scope: eligibility, diff, standards, spec | orc:code-review/P1 |
--audit |
| 3 Dispatch reviewers | orc:code-review/P3 |
--audit |
| 4 Merge and compute the event | orc:code-review/P4 |
--audit |
| 5 Compose the review | orc:code-review/P5 |
--summary-only, --audit |
| 6 Preview gate, then post | orc:code-review/P6 |
--summary-only, --audit |
| 8 Summary-only output | orc:code-review/P8 |
posted in P6 |
| Audit | orc:code-review/AUDIT |
not --audit |
Phase 0 — Detect context
!orc-workspace-detect --banner
- Read the banner above;
ORC_*vars are exported. Do not re-run detection. - If
--audit, Read the Audit module and stop here. - Decide single-PR or multi-PR:
--prsgiven, or an in-progress session'slinkedPRsmatches the ref. - In multi-PR mode, resolve the full PR set before P1.
NOTE: multi-PR mode reviews each PR with its own orc-pr-reviewer instance, tags findings [repo:<name>], and posts to each PR independently (orc:code-review/P3, P6).
Iron rules
- The event is computed from severities (
orc:review-contract). Agents never decide it. - The preview gate is mandatory. No flag bypasses it.
- At most 15 inline comments; the overflow is the user's choice to drop.
- Comment only on lines the PR modified.
- Suggestion blocks follow
orc:inline-review: at most 6 lines, complete, valid. - No AI attribution in the review body or any comment.
Output
- A GitHub PR review with inline comments and the computed event, or a markdown summary.
- The review URL, when posted.
${ORC_STATE_DIR}/<branch>/files/review-findings.json, written in P4 for resume.
04 同仓库更多 Skills
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering
writing-plans
Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps
writing-for-agents
orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md/CLAUDE.md, reference docs
workspace-mode
Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos/--repo/--all-repos/--this-repo precedence, per-repo dispatch, and linked-PR mechanics.
wizard
Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations
wait-what
Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.