/rails-cto:rails-cto-pull-requestfrom rails-cto
Creates a pull request targeting the staging branch using the gh CLI. Handles preflight checks, commits outstanding changes, syncs with staging, resolves merge conflicts, and writes a plain-language PR title.
Ships in rails-cto. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create a pull request from the current branch into staging using the gh CLI. The PR should be easy to understand for anyone — technical or not.
Check the current branch:
git branch --show-current
If the current branch is staging, stop and tell the user: "You're on the staging branch — this skill creates PRs that target staging from a feature branch. Switch to your working branch first."
Check for an existing PR:
gh pr list --head "$(git branch --show-current)" --base staging --state open
If a PR already exists for this branch targeting staging, warn the user with the existing PR link and stop. Do not create a duplicate.
If there are any uncommitted or unstaged changes, commit them first using the rails-cto-commit skill before continuing. This ensures everything is captured in the PR.
Pull the latest changes from staging into the current branch to ensure there are no merge conflicts before creating the PR. This saves the integration manager from dealing with conflicts during review.
git fetch origin staging
git merge origin/staging
If there are merge conflicts:
If the merge is clean (no conflicts), continue to the next step.
Push the branch to the remote repository. If the branch has no upstream, set one:
git push -u origin "$(git branch --show-current)"
If it already tracks a remote, a simple git push is fine.
Review what this branch has changed relative to staging:
git log staging..HEAD --oneline
git diff staging...HEAD --stat
Read the commit messages and the actual diffs to understand what changed and why.
Write a short, plain-language title (under 72 characters) that describes what this branch accomplishes. Same rules as commit messages — no jargon, no technical shorthand, readable by anyone.
Good examples:
Add password reset flow for logged-out usersFix checkout button not working on mobileUpdate pricing page with annual discountWrite the description in plain language. Organize changes into two sections so readers can quickly tell what's significant and what's minor.
Do NOT include co-authorship lines or reference "Claude" or any AI tool anywhere.
Use this structure:
## Summary
A 1-2 sentence overview of what this branch does and why.
## Major Changes
- Describe significant changes here — new features, important fixes, behavior changes
- Each bullet should explain what changed from a user or product perspective
- Include enough context that someone unfamiliar with the code understands the impact
## Minor Changes
- Small tweaks, formatting fixes, config updates, copy changes
- Things that are good to know about but don't need close review
If there are only major changes, omit the "Minor Changes" section. If everything is minor, omit "Major Changes." Use your judgment — the point is to help the reader focus their attention.
gh pr create --base staging --title "the pr title" --body "$(cat <<'EOF'
## Summary
...
## Major Changes
...
## Minor Changes
...
EOF
)"
After creation, show the user the PR URL so they can view it.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub mattsears/rails-cto --plugin rails-cto17 skills in this plugin
/rails-ctoOrchestrator skill for Ruby on Rails projects. Initializes sessions, routes to specialized skills, enforces mandatory QA gates, and runs the completion checklist. Invoke at the start of every Rails session./rails-cto-apiHow to build RESTful JSON APIs in a Rails 8 application following OpenAPI standards. Use when creating, modifying, or debugging API endpoints, serializers, authentication, documentation, or any code under the Api:: namespace. Also use when the user mentions "api", "endpoint", "api key", "serializer", "openapi", "swagger", "api documentation", "cors", "rate limit", "pagination cursor", "api versioning", or asks about exposing data to external consumers. Proactively apply these rules whenever touching API controllers, routes, or serializers, even if the user doesn't explicitly ask.
/rails-cto-architectHow to write comprehensive implementation plans for multi-step Rails features before any code is written. Use when the user has a spec, feature request, or multi-step task and wants to plan the approach before touching code. Also use when the user mentions "create a plan", "write a plan", "plan this", "plan a feature", "implementation plan", "build a new feature", "new feature", "how should I build", "how do I build", "architect this", "design this", "design a feature", "feature design", "spec", "requirements", or pastes long-form requirements. Proactively invoke this skill BEFORE writing any code for multi-file or multi-step work, even if the user doesn't explicitly say "plan" — every multi-step feature goes through architect first. Produces a bite-sized, task-by-task plan optimized for rails-cto-engineer to execute. Never writes code, never commits, and never generates plans that contain commit steps.
/rails-cto-commitStage and commit all outstanding code changes with a clear, human-friendly commit message. Use this skill whenever the user asks to commit, save their work, push changes, or says things like "commit this", "save my progress", "push this up", "ship it", "commit all", or "commit and push". Also triggers for "/commit-all". Do NOT use for cherry-picking, rebasing, or other advanced git operations./rails-cto-engineerThis file provides guidance to Claude Code (claude.ai/code) when working with Ruby on Rails projects./rails-cto-erbHow to write clean, well-formatted ERB templates for this Rails 8 project. Use when creating or modifying any ERB view, partial, layout, or component template. Also use when the user mentions "erb", "views", "partials", "templates", "html formatting", "attribute alignment", or asks about view-layer code. Proactively apply these rules whenever touching .html.erb files, even if the user doesn't explicitly ask for formatting help.
Other plugins' skills for the same job