Ship (Commit → PR → Merge)
Use this skill when you want Codex to take a dirty working tree and turn it into a merged PR safely.
Preconditions
ghis installed and authenticated (gh auth status).- You have push + merge rights on the repo, or you’re okay with opening a PR and leaving merge for later.
Workflow
Identify the repo(s) to ship.
- If multiple git repos are present in the workspace, ask which ones to ship (or ship all, one at a time).
Sanity checks (per repo).
git status --porcelain=v1- Review diffs:
git diff --stat, then spot-check risky files. - Run the smallest relevant checks (example):
- Typecheck:
npm run typecheckornpm run type-check - Targeted tests for touched areas (avoid running everything unless needed)
- Typecheck:
Create a branch.
git switch -c codex/ship-<short-topic>-<yyyymmdd>
Stage changes deliberately.
- Prefer
git add -pwhen diffs are risky or wide. - Do not include secrets or local-only files.
- Prefer
Commit with a scoped message.
- Example:
feat(blocker3): diagnostics + billing scaffolds limits
- Example:
Push and open a PR.
git push -u origin HEADgh pr create --fill --base main- If the repo uses a different default branch, detect and use it.
Merge.
- Prefer squash merge:
gh pr merge --squash --delete-branch
- If branch protection blocks merge, report why and leave the PR open.
- Prefer squash merge:
Post-merge cleanup.
git switch maingit pull --ff-only
Output Contract
At the end, report:
- PR URL(s)
- Merge status (merged or blocked, with reason)
- Any follow-ups (failed checks, protection rules, required approvals)