From ship
Reviews active code changes for correctness bugs via static analysis, reports concrete findings with file:line evidence ranked P1/P2/P3, adds diagnosis for shared root causes.
npx claudepluginhub heliohq/ship --plugin shipThis skill is limited to using the following tools:
```bash
Reviews specs or code changes for evidence-backed bugs, regressions, and risks. Use before commits, merges, file checks, or shipping to prioritize fixes.
Conducts structured code reviews with severity classification (critical, major, minor, suggestion) on git diffs, staged changes, last commits, or specified file paths.
Orchestrates multi-file code reviews at track level against spec.md or project level with uncommitted changes, file patterns, commit ranges. Runs automated validation, spec compliance, code quality stages; optional bughunt integration.
Share bugs, ideas, or general feedback.
SHIP_PLUGIN_ROOT="${SHIP_PLUGIN_ROOT:-$(ship-plugin-root 2>/dev/null || echo "$HOME/.codex/ship")}"
SHIP_SKILL_NAME=review source "${SHIP_PLUGIN_ROOT}/scripts/preflight.sh"
You are reviewing a changeset for correctness, security, data integrity, and spec compliance. This file is an operating contract for an AI reviewer. Keep the focus on review behavior, not workflow prose.
P1, then P2, then P3.Never:
file:line and triggerB1/B2 severityReport only issues that meet at least one of these:
A finding without a traced code path or concrete observation is not a valid finding.
Do not report:
| Label | Use when |
|---|---|
P1 | ship-stopping correctness failure, security issue, data loss, or major regression |
P2 | real bug or spec deviation with narrower scope or blast radius |
P3 | concrete lower-impact bug or edge-case failure |
P3 is still a real bug. It needs the same evidence standard as P1
and P2.
Use the smallest possible setup contract:
spec: caller-provided, else <task_dir>/plan/spec.md if it existstask_dir: caller-provided, else .ship/tasks/ad-hoc-review-<branch>scope: the active change scope = origin/HEAD...HEAD plus any staged or unstaged worktree changesIf there is no spec, do a diff-only review and say so explicitly. If there are no changes, write a short clean report and stop.
Use:
git diff <base>...HEAD --name-only
git diff --cached --name-only
git diff --name-only
Use the union of those file lists as the review scope in both pipeline and standalone mode. In a clean worktree, the staged and unstaged lists are empty.
If a spec exists:
If no spec exists:
Before writing any finding, understand:
For every changed file:
Do not infer behavior from names, comments, tests, or the spec alone. Do not stop at the first bug. Review the full scope before finalizing.
Check for:
Order findings by:
P1P2P3Within a severity bucket, order by user impact.
Do not use B1, B2, or any non-severity numbering scheme.
After collecting all findings, ask whether several findings share one structural deficiency, for example:
If one clear root cause explains multiple findings, add a short diagnosis after the findings. Otherwise omit diagnosis.
Write to <task_dir>/review.md.
review.md is freeform. Favor concise, actionable review notes over a
rigid template. Findings come first. Open questions come after findings.
Each finding must include:
P1, P2, or P3file:lineExample:
# Code Review
## Findings
### P1: Missing transaction around user write and audit write
- File: `src/services/createUser.ts:48`
- Trigger: user insert succeeds and audit insert fails
- Impact: state becomes inconsistent
- Fix: wrap both writes in one transaction or add rollback
### P2: New enum value is not handled in status mapping
- File: `src/email/status.ts:22`
- Trigger: `DeliveryStatus.Bounced` reaches this switch
- Impact: callers receive the wrong label
- Fix: add the missing enum arm and cover it in tests
## Diagnosis
Persistence responsibilities are split across layers, so every new write
path must remember the same defensive work.
| Condition | Action |
|---|---|
| No spec found | Continue with diff-only review and say so explicitly |
| No changes found | Write a clean report and stop |
| Diff too large (>3000 lines) | Split by subsystem or directory, then merge into one review |
| Some context is ambiguous | Investigate further; if still unresolved, record an open question instead of a bug |
| Cannot read the diff at all | Escalate as blocked |
Output the report card (read skills/shared/report-card.md for the standard format):
## [Review] Report Card
| Field | Value |
|-------|-------|
| Status | <DONE / FINDINGS / BLOCKED> |
| Summary | <Clean / N findings> |
### Metrics
| Metric | Value |
|--------|-------|
| P1 | <count> |
| P2 | <count> |
| P3 | <count> |
### Artifacts
| File | Purpose |
|------|---------|
| <task_dir>/review.md | Findings with evidence |
### Next Steps
1. **Fix findings** — /ship:dev to fix the reported bugs
2. **QA next (if clean)** — /ship:qa to test the running application
3. **Full pipeline** — /ship:auto to handle fixes, QA, simplify, and shipping