| name | ship |
| description | Ship the current changes end-to-end for ActiveCAMT — branch off main, commit, push, open a PR, merge it into main, delete the branch (local + remote), and record the day's entry in updates/ via the updates-changelog agent. Use when the user says "ship this", "commit + PR + merge", "open a PR and merge", or otherwise wants the full feature-branch → PR → merge → cleanup flow in one go. For deploys that touch the DB schema or read a new column, run /safe-deploy first. |
Ship (ActiveCAMT)
Takes working-tree changes from "done on main's worktree" to "merged into main,
branch gone" without ever pushing to main directly. The merge happens through a
PR — that is the only sanctioned path to main (see CLAUDE.md: never push to
main).
When to use
- The user asks to "ship", "commit and open a PR and merge", or lists the full
branch → PR → merge → delete-branch sequence.
- The change is already implemented and reviewed enough to land.
When NOT to use (or do something first)
- Schema / new-column changes: run /safe-deploy first — prod must be
migrated before code that reads a new column merges. This skill does not migrate.
- Unreviewed or risky diffs: run /recheck first.
- The user only wants a commit, or only a PR (no merge) — just do that step.
Preconditions (verify before branching)
- Build + lint pass. Run
npm run build and npm run lint. Pre-existing
warnings/errors in files you didn't touch are fine; do not let new ones land.
- Know what's staged.
git status --short — commit only the intended files.
Steps
-
Branch off main. Pick a descriptive name: feat/..., fix/..., chore/....
git checkout -b feat/<short-description>
-
Stage + commit. Quote any path containing [ ] — this repo has routes like
src/app/api/events/[id]/register/route.ts, and zsh glob-expands the brackets
(no matches found) unless the path is single-quoted.
git add 'src/app/api/events/[id]/.../route.ts' 'src/app/...'
Commit with a clear subject + body, ending with the trailer:
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Push and set upstream:
git push -u origin feat/<short-description>
-
Open the PR against main with gh. End the body with:
🤖 Generated with [Claude Code](https://claude.com/claude-code)
gh pr create --base main --head feat/<short-description> \
--title "<conventional commit title>" --body "<summary>"
-
Merge + delete the branch (deletes both remote and local, returns you to
main):
gh pr merge <PR#> --merge --delete-branch
Use --merge (a real merge commit, matching this repo's history) unless the user
asks for --squash or --rebase.
-
Confirm clean state:
git branch --show-current
git branch
git log --oneline -1
-
Record the changelog (always — last step). After the merge lands, launch the
updates-changelog subagent to write/extend the day's entry in updates/ for
what was just shipped (Thai house style: ฝั่งนักศึกษา + ฝั่งทีม). Pass it the merge
commit / PR number and a short summary of the change so it can derive details from
the diff. This is not optional and not automatic anywhere else — shipping without a
changelog entry is incomplete. (It creates a per-day updates/YYYY-MM-DD.md, or
extends the current period file.) The agent only writes Markdown under updates/,
so this never touches code or main history.
Notes
- If branch protection blocks
gh pr merge (required reviews/checks), stop and tell
the user — do not try to bypass it or push to main.
- If the merge is not a fast-forward and conflicts arise, stop and surface the
conflict rather than force-anything.
- This skill is git mechanics only. It does not deploy or migrate — Vercel
deploys on merge to
main, so make sure prod is already migrated (via
/safe-deploy) for any schema-dependent change before you run step 5.