/rails-cto:rails-cto-production-prfrom rails-cto
Creates a production pull request from staging to main using gh CLI. Checks for clean working tree, syncs branches, resolves merge conflicts, and writes a human-readable PR description.
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 to merge staging into main for a production release using the gh CLI.
git status --porcelain
If there are any uncommitted or unstaged changes, warn the user and stop. Production releases should start from a clean working tree.
git fetch origin
gh pr list --head staging --base main --state open
If an open PR from staging to main already exists, warn the user with the existing PR link and stop.
Before creating the PR, merge main into staging so the branches stay in sync and the PR is clean.
Save the current branch so you can return to it later:
ORIGINAL_BRANCH=$(git branch --show-current)
Check out staging and merge main into it:
git checkout staging
git merge origin/main
If there are merge conflicts, try to resolve them. Read the conflicting files, understand both sides, and make the appropriate fix. After resolving, stage the resolved files and complete the merge:
git add -A
git merge --continue
If you cannot resolve the conflicts, abort the merge, return to the original branch, and tell the user which files have conflicts so they can handle it manually:
git merge --abort
git checkout "$ORIGINAL_BRANCH"
After a successful merge, push staging:
git push origin staging
Review what staging has that main doesn't:
git log origin/main..origin/staging --oneline
git diff origin/main...origin/staging --stat
Read the commit messages and diffs to understand what changed and why.
Use this exact format with today's date:
Production Release: mm-dd-yyyy
Write the description in plain language that anyone can understand. Use emojis for section headers. Organize changes 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. Do NOT list individual files changed.
Use this structure:
## 🚀 Summary
A 1-2 sentence overview of what this release includes and why it matters.
## 🔥 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
## 🧪 Test Plan
- Describe what should be tested before deploying
- List specific areas to verify based on the changes
- Do not use checkboxes — use plain bullet points
If there are only major changes, omit the "Minor Changes" section. If everything is minor, omit "Major Changes." Use your judgment.
gh pr create --base main --head staging --title "Production Release: mm-dd-yyyy" --body "$(cat <<'EOF'
## 🚀 Summary
...
## 🔥 Major Changes
...
## 🔧 Minor Changes
...
## 🧪 Test Plan
...
EOF
)"
After creation, show the user the PR URL.
git checkout "$ORIGINAL_BRANCH"
Return the user to whatever branch they were on before running this skill.
What SKILL.md sets; muted values are Claude Code's defaults
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