rails-cto-production-pr
The production release skill. Creates a PR that merges staging into main to cut a production release.
What it does
When it's time to ship what's on staging to production, this skill:
- Verifies there are no uncommitted changes anywhere
- Checks that the local
mainandstagingbranches are up to date with the remote - Runs
git log main..stagingto see every commit that will land in production - Drafts a release-style PR description that lists each change grouped by type (features, fixes, refactors, docs, chores)
- Creates the PR with
gh pr createtargetingmainfromstaging - Returns the PR URL
The PR description is written for a mixed audience — engineers, product, and whoever reviews releases. Each change is described in plain language, not commit-message shorthand. A release PR might look like:
markdown
## What's shipping
### Features
- Cursor-based pagination on the bookmarks API — lets mobile clients
page through large result sets efficiently.
### Fixes
- Onboarding autosubmit loop: the form no longer re-fires when users
tab back from a popup.
### Refactors
- Consolidated two near-duplicate PDF exporters into a single command.
## Deploy checklist
- [ ] Database migrations reviewed (none in this release)
- [ ] Feature flags audited
- [ ] Sentry dashboard cleanRules:
- Never auto-merges — the release PR is a deliberate step
- Never force-pushes main or staging
- Flags risky changes in the description (data migrations, config changes, dependency bumps)
- Groups commits by type so reviewers can scan quickly
When it triggers
- When you say release to production, production PR, deploy this, ship to prod, create a production PR, or merge staging to main
- When you invoke
/production-pr
Does not create feature PRs into staging — use rails-cto-pull-request for those.
Example
You: Cut a production release
Agent: [invokes /rails-cto-production-pr]
[preflight: clean]
[analyzes 12 commits between main and staging]
[groups them: 3 features, 5 fixes, 2 refactors, 2 chores]
[drafts the release description]
[creates the PR]
✓ Production PR created: #418
https://github.com/myorg/myapp/pull/418
Target: main ← staging
Commits: 12
Reviewers auto-requested: @matt, @release-managers