---
name: ship-check
description: Pre-deploy review of the current branch. Use before merging or deploying. Checks the diff for secrets, debug leftovers, missing error handling, untested changes, and migration risks, then returns a SHIP / HOLD verdict with a fix list. Run via /ship-check or ask "run a ship check".
---

<!--
ROBOTS ON PAYROLL / THE VAULT
What this is: an agent Skill that runs a strict pre-deploy review of your branch diff and returns a SHIP or HOLD verdict with a fix list.
How to use it: download this file and give it to your AI (Claude, ChatGPT,
Cursor, Lovable chat) as a reference. Say: "Use this as my playbook for
pre-deploy ship checks."
Latest version + full guide: https://robotsonpayroll.com/resources/zed-agent-cockpit
-->

# ship-check

You are running a pre-deploy review. Be strict. A false SHIP costs more than a false HOLD.

## Scope

Review ONLY what is about to ship: the diff between the current branch and the default branch. If the user names a different base branch or a specific commit range, use that instead.

First, establish the diff:

1. Read the current branch state (use the branch diff context if provided via @-mention).
2. If no diff context was given, list changed files against the default branch and read each changed file in full, not just the hunks. Context around a hunk is where bugs hide.

## Checks (run all, in order)

### 1. Secrets and credentials
- Scan the diff for API keys, tokens, passwords, connection strings with embedded credentials, private keys, and .env values pasted into code.
- Anything that looks like a live credential is an automatic HOLD, severity CRITICAL.

### 2. Debug leftovers
- console.log / print / dbg! / debugger statements added in this diff.
- Commented-out blocks of old code added in this diff.
- Feature flags or config hardcoded to a dev value (localhost URLs, test mode true, sandbox endpoints).

### 3. Error handling at the new edges
- Every new external call (HTTP, DB, queue, file IO) in the diff: what happens when it fails or times out?
- Swallowed exceptions (empty catch, ignored error returns) introduced by this diff.
- New user input paths without validation.

### 4. Tests
- List changed source files that have zero corresponding test changes.
- Do not demand 100% coverage. Flag only: new business logic, changed money/auth/data-deletion paths, and bug fixes without a regression test.

### 5. Migrations and data
- New or changed DB migrations: are they backward compatible with the currently deployed code (deploy order safety)?
- Destructive operations (DROP, DELETE without WHERE, column removals): automatic HOLD unless the user confirms a backup/rollback plan.

### 6. Dependency and config drift
- New dependencies added: name them and note anything unpinned.
- Changes to CI, Dockerfiles, or infra config that alter the runtime environment.

## Rules

- Read-only. Do NOT edit files, run write commands, or fix anything during the check. Report only.
- Cite file and line for every finding. No finding without a location.
- No style nitpicks. Formatting, naming, and lint-level issues are out of scope.
- If the diff is empty or you cannot determine it, say so and stop. Do not review the whole repo.

## Output format (exactly this structure)

```
SHIP-CHECK: <SHIP | SHIP WITH NOTES | HOLD>

Branch: <branch> vs <base>   Files changed: <n>

CRITICAL (blocks deploy)
- [file:line] finding + one-line fix

WARNINGS (fix soon, won't block)
- [file:line] finding

NOTES
- observations, skipped checks, assumptions

Verdict rationale: 1-2 sentences.
```

Verdict rules: any CRITICAL finding forces HOLD. Warnings only allow SHIP WITH NOTES. Clean run is SHIP.
