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:
- Verifies you're not already on
mainorstaging(feature branches only) - Checks
git statusto make sure there are no uncommitted changes - Checks that your branch is pushed and up to date with the remote
- Runs
git diff staging...HEADandgit log staging..HEADto see the full branch history - Analyzes all commits on the branch — not just the latest one — to draft a PR title and body
- Creates the PR with
gh pr createtargetingstaging - 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 verifyRules:
- 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
/pror/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