跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
浏览器与自动化

ship

Push, open a PR, and watch CI; land mode merges and cleans branches. Triggers "ship it", "create PR", "babysit CI", "land it", "fix CI and merge".

darkroomengineering · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add darkroomengineering/cc-settings --skill ship

技能说明


name: ship description: Push, open a PR, and watch CI; land mode merges and cleans branches. Triggers "ship it", "create PR", "babysit CI", "land it", "fix CI and merge". context: fork

Ship Pipeline

Standalone Codex

Skip Claude's !command interpolation below. Run git branch --show-current, git status --porcelain, and git log --oneline -5 explicitly. Create a new reviewer with spawn_agent, continue it while live with send_message, trigger another turn once it is idle with followup_task, wait with wait_agent, and stop its current turn with interrupt_agent only when necessary. Never spawn codex-verifier and never run codex-run.ts from inside Codex.

Writers share the working tree unless the live host explicitly offers isolation. Assign non-overlapping ownership and serialize any implementer and test-writer fixes; only read-only reviewers may overlap. Codex implementers are not promised Claude worktree isolation. Codex also skips TLDR and uses git diff --name-only, direct import searches, and test-name searches to choose affected tests.

You are in Maestro orchestration mode. Execute the shipping checklist in order.

Claude current state

  • Branch: !git branch --show-current 2>/dev/null || echo "unknown"
  • Working tree: !git status --porcelain 2>/dev/null | head -20
  • Recent commits: !git log --oneline -5 2>/dev/null || echo "no commits"

Pipeline (All Steps Mandatory)

Step 0: Preflight

ssh-add -l

If no identities loaded: Unlock 1Password and retry — git signing will fail otherwise. Agent drops mid-flow are a recurring cause of failed pushes; catch it now, not after the commit.

Read and validate package.json before choosing commands. Invalid JSON or invalid script declarations block the pipeline. Do not commit until all applicable gates in Steps 1–4 (typecheck/build/test/lint) are green; record an absent build script as N/A with its reason. Skipping ahead is where amend churn comes from — --amend to fix a lint error you would have caught in 30 seconds invalidates signatures and CI runs.

Step 1: Type Check

bunx tsc --noEmit

If errors: fix them. Do not proceed until clean.

Step 2: Build

Inspect the validated manifest: if scripts.build is a nonempty string, run:

bun run build

If the configured build fails, fix it; do not proceed until clean. If build is absent, record N/A — no build script and continue with the applicable typecheck, test, and lint gates. An empty, whitespace-only, or non-string build declaration is invalid and blocks the pipeline. Do not add a dummy build script or silently replace a failing build with typecheck. A proof runner that only detects typecheck/test/lint does not replace this configured-build gate.

Step 3: Test (if tests exist)

3a. Affected tests first. In Claude, use TLDR when available. Standalone Codex uses the native searches in its host branch. Run only the tests touched by your changes before the full suite.

tldr change-impact --project . 2>/dev/null

If TLDR returns a list, run those tests first (bun test <file> or vitest run <file>). If they fail, fix before the full run — don't waste cycles on the rest.

3b. Full suite.

Select one configured runner before executing it. Never treat a second runner as a fallback after a real test failure:

if bun -e 'const p = await Bun.file("package.json").json(); process.exit(typeof p.scripts?.test === "string" ? 0 : 1)'; then
  bun run test
elif bun -e 'const p = await Bun.file("package.json").json(); process.exit(p.devDependencies?.vitest || p.dependencies?.vitest ? 0 : 1)'; then
  ./node_modules/.bin/vitest run
else
  bun test
fi

If no tests or runner are configured, record the evidence and skip this step. If the selected runner fails, stop and fix that failure. Do not run a narrower suite to turn a real failure green.

Step 4: Lint

biome check .

If errors: fix or justify.

Step 5: Web Quality Gate

Quick sanity check before review:

  • No loading="lazy" on above-fold/LCP images
  • Images have explicit dimensions or fill prop
  • No console.log left in production code
  • Meta tags present on new pages (title, description, canonical)
  • Structured data valid on new content pages

If issues found: fix them before proceeding to review.

Step 6: Review Changes

Spawn reviewer agent:

Agent(reviewer, "Review all staged changes for quality, TypeScript strictness, a11y, and performance issues.")

Standalone Codex branch: follow the native lifecycle above and use a fresh read-only reviewer. Skip the Claude bridge branch below.

When the Codex bridge is available, run a cross-model review in parallel — a different model family catches what Claude self-review misses, and this is right before a commit lands, the cheapest place to catch a Critical:

Agent(codex-verifier, "Cross-model review of the staged diff. Report findings by severity.")

If Claude and Codex disagree on a Critical/HIGH finding, surface it to the user as a gate before Step 7 — don't auto-commit through a cross-model disagreement. The bridge is gated and fails open: if Codex is unavailable, proceed with the Claude review alone.

If the codex-verifier spawn fails, or it reports that Bash was stripped (forked skill contexts), run bun "$HOME/.claude/src/scripts/codex-run.ts" review directly instead — never skip the cross-model pass.

Step 7: Commit (Bisectable)

Analyze the diff to decide commit strategy:

git diff --cached --stat | tail -1

Small diff (<50 lines changed across <4 files): Single commit.

git add <relevant files>
git commit -m "<type>: <description>"

Larger diff: Split into ordered commits by dependency layer. Each commit must be independently valid — no broken imports, no forward references.

Commit order (skip layers with no changes):

  1. Infrastructure — config
阅读完整来源 ↗