review
Reviews code changes or PRs across 11 perspectives, reporting via JSON structured output plus a human-readable report. Supports switching between quick and deep modes. Takes a PR number or working-tree diff as input.
- License 许可
- MIT
- 所属仓库
- ozzy-labs/skills
- 最近更新
- 2026-07-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- description
- Reviews code changes or PRs across 11 perspectives, reporting via JSON structured output plus a human-readable report. Supports switching between quick and deep modes. Takes a PR number or working-tree diff as input.
- allowed-tools
- Bash, Read, Edit, Write, Grep, Glob, Agent, AskUserQuestion, Workflow
- argument-hint
- <#PR-number | (blank for working tree changes)> [--axes=<axis,...>] [--deep]
- disable-model-invocation
- true
02 资源文件 13
- 参考文档perspectives/architecture.md2.3 KB
- 参考文档perspectives/compatibility.md2.2 KB
- 参考文档perspectives/conventions.md2.0 KB
- 参考文档perspectives/correctness.md1.9 KB
- 参考文档perspectives/documentation.md2.1 KB
- 参考文档perspectives/maintainability.md2.0 KB
- 参考文档perspectives/observability.md2.1 KB
- 参考文档perspectives/performance.md2.0 KB
- 参考文档perspectives/README.md3.6 KB
- 参考文档perspectives/security.md2.0 KB
- 参考文档perspectives/testing.md2.1 KB
- 参考文档perspectives/usability.md2.2 KB
- 脚本review.mjs18.5 KB
03 SKILL.md 正文
review
Read .agents/skills/review/SKILL.md and follow its workflow steps.
Claude Code-specific additions
Argument parsing
Parse $ARGUMENTS:
- A number or
#N→ treated as a PR number --axes=<axis,...>→ explicit specification of perspectives to apply--deep→ run in deep mode (launchAgent({subagent_type: "code-reviewer"})per perspective in parallel, via multiple tool calls in the same message)
Parallel launch in deep mode
In deep mode, launch a worker per perspective in parallel. Prefer the Workflow approach when the Workflow tool is available, falling back to the Agent tool approach when it is not.
Workflow approach (recommended)
Pass the perspectives via args.axes, and structurally validate findings with schema (mismatches are automatically retried, so there is no dropped output from parse failures):
export const meta = {
name: 'review-deep',
description: 'review: 観点別 worker を並列起動して findings を収集する',
phases: [{ title: 'Review' }],
}
// canonical の findings JSON schema(Schema v1)を JSON Schema 化したもの
const FINDINGS_SCHEMA = { /* axis / findings[]: {file, line, severity, message, ...} */ }
const results = await parallel(args.axes.map(axis => () =>
agent(
`axis: ${axis}\nmode: deep\ncontext:\n base: ${args.base}\n head: ${args.head}\n pr_number: ${args.pr_number ?? ''}\n\n${args.diff}`,
{ label: axis, phase: 'Review', agentType: 'code-reviewer', schema: FINDINGS_SCHEMA }
)
))
return { findings: results.filter(Boolean) }
- Reuse the existing subagent definition via
agentType: 'code-reviewer' - Aggregation (duplicate merging, cross-perspective conflicts, grouping) is not done inside the workflow; after return, the caller passes the findings to
review.mjs renderand leaves it to the engine (canonical step 3). Do not add an aggregation agent inside the workflow - Pass the diff via
args(do not have the worker fetch it)
Agent tool approach (fallback)
Agent({
subagent_type: "code-reviewer",
prompt: "axis: <axis>\nmode: deep\ncontext:\n base: <base>\n head: <head>\n pr_number: <N>\n\n<diff>"
})
- Independent subagents within the same wave are launched in parallel via multiple tool calls in a single message
- Aggregation is done by the caller passing findings to
review.mjs render(do not add an LLM call) - Merge the subagents' return values (JSON) and push them into
findings[]
After the completion report
Call AskUserQuestion immediately after the completion report (do not set the answers parameter).
When there are findings:
- "Fix the findings" → Fix the code based on Critical / Warning findings (Info is out of scope)
- "Proceed as-is" → exit
When there are no findings:
- "Run through commit and PR in one go" → Read
.claude/skills/ship/SKILL.mdand follow its steps - "Proceed as-is" → exit
04 同仓库更多 Skills
verify
An integrated skill that runs the combined validation of build / typecheck / test / lint in one shot. The `verify.mjs` engine auto-discovers validation commands via a discovery chain (AGENTS.md's 「検証」 section → package.json scripts → justfile/Makefile/lefthook → language heuristics), executes them serially with their source attached, and returns a result summary. If a higher-priority stage produces a hit, only that stage is executed (no crossing stages).
usage-guard
Monitors Claude Code's Usage Limit (5-hour = Current / weekly = Weekly), pauses work when it exceeds 95%, and automatically resumes once the reset restores headroom. Bundles an engine form that a caller such as drive Reads at a checkpoint, and a standalone form, `/usage-guard "<continuation command>"`, that guards arbitrary work. Claude-only (depends on the OAuth usage-rate endpoint + ScheduleWakeup).
topics
Selects GitHub topic candidates by having the `topics.mjs` engine perform constraint validation, popularity measurement, broad+narrow / singular-plural comparison, and hardcoded ozzy-labs conventions, then applies them via `gh repo edit --add-topic` following the policy's `externally-visible` gate (default batch-confirm). Scope is limited to use within ozzy-labs.
skill-observability
Defines the skill observability event contract (event.schema.json) and emit substrate (obs-emit.mjs). The SSOT for the measurement layer of the skill improvement loop. Referenced by other skills and hooks.
skill-metrics
Aggregates the local observability event log (~/.agents/observability/events.jsonl) and presents, read-only, per-skill invocation counts and notable events (fallback / HITL rejection / loop cap reached / abort). Fires on "show me the skill metrics," "aggregate the observability results," "which skills get used the most?" Does not send anything.
ship
Runs verification, commit, and PR creation all at once. An integrated pipeline that runs verify (build + type + test + lint) → commit → PR creation in sequence against the changes.