Skip to content

rails-cto-pull-request

The pull request skill. Creates a PR from the current branch into staging using the gh CLI.

What it does

When your work is ready for review, this skill:

  1. Verifies you're not already on main or staging (feature branches only)
  2. Checks git status to make sure there are no uncommitted changes
  3. Checks that your branch is pushed and up to date with the remote
  4. Runs git diff staging...HEAD and git log staging..HEAD to see the full branch history
  5. Analyzes all commits on the branch — not just the latest one — to draft a PR title and body
  6. Creates the PR with gh pr create targeting staging
  7. Returns the PR URL

The PR description follows a standard template:

markdown
## Summary
<1–3 bullet points describing what changed and why>

## Test plan
- [ ] Bullet checklist of what to verify

Rules:

  • Title under 70 characters — details go in the body
  • Summary is concise — one to three bullets, focused on why
  • Test plan is actionable — things a reviewer can actually check
  • Looks at every commit on the branch, not just the most recent one

When it triggers

  • When you say create a PR, open a pull request, submit this for review, PR this, or send this to staging
  • When you invoke /pr or /pull-request

Does not merge PRs, review PRs, or create production releases. For production, use rails-cto-production-pr.

Example

You: Open a PR for this

Agent: [invokes /rails-cto-pull-request]
       [runs preflight checks → clean]
       [analyzes 4 commits on the branch]
       [creates the PR]

       ✓ PR created: #412
       https://github.com/myorg/myapp/pull/412

       Title:    Cursor-based pagination for bookmarks API
       Target:   staging ← matt/cursor-pagination

View source

skills/rails-cto-pull-request/SKILL.md on GitHub →

Released under the MIT License.