Skip to content

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:

  1. Verifies there are no uncommitted changes anywhere
  2. Checks that the local main and staging branches are up to date with the remote
  3. Runs git log main..staging to see every commit that will land in production
  4. Drafts a release-style PR description that lists each change grouped by type (features, fixes, refactors, docs, chores)
  5. Creates the PR with gh pr create targeting main from staging
  6. 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 clean

Rules:

  • 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

View source

skills/rails-cto-production-pr/SKILL.md on GitHub →

Released under the MIT License.