agentleFS
mattsearsmattsears/rails-cto/skills/rails-cto-production-pr/SKILL.md

rails-cto-production-pr

Skill15 starsChanged 7 months agoMITView on GitHub

Create a production pull request merging staging into main using the gh CLI. Use this skill whenever the user asks to create a production PR, deploy to production, cut a release, or says things like "release to production", "production PR", "deploy this", "ship to prod", "create a production PR", or "merge staging to main". Also triggers for "/production-pr". Do NOT use for creating feature PRs to staging — use rails-cto-pull-request for that.

  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create a pull request to merge staging into main for a production release using the gh CLI.

    line 8
  2. Distinctive:

    If there are any uncommitted or unstaged changes, warn the user and stop.

    line 18
  3. Very specific:

    If an open PR from staging to main already exists, warn the user with the existing PR link and stop.

    line 32
  4. Very specific:

    Before creating the PR, merge main into staging so the branches stay in sync and the PR is clean.

    line 36
  5. Very specific:

    Check out staging and merge main into it:

    line 44
  6. Distinctive:

    If there are merge conflicts, try to resolve them.

    line 51
  7. Distinctive:

    If you cannot resolve the conflicts, abort the merge, return to the original branch, and tell the user which files have conflicts so they …

    line 58
  8. Distinctive:

    After a successful merge, push staging:

    line 65
  9. Distinctive:

    Read the commit messages and diffs to understand what changed and why.

    line 80
  10. Distinctive:

    Use this exact format with today's date:

    line 84
  11. Distinctive:

    Write the description in plain language that anyone can understand.

    line 92
  12. Distinctive:

    Do NOT include co-authorship lines or reference "Claude" or any AI tool anywhere.

    line 94
  13. Distinctive:

    If there are only major changes, omit the "Minor Changes" section.

    line 121
  14. Distinctive:

    After creation, show the user the PR URL.

    line 142

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Production Release

Create a pull request to merge staging into main for a production release using the gh CLI.

Workflow

1. Check for uncommitted changes

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.

2. Fetch the latest

git fetch origin

3. Check for an existing release PR

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.

4. Sync staging with main

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

5. Gather the changes

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.

6. Write the PR title

Use this exact format with today's date:

Production Release: mm-dd-yyyy

7. Write the PR description

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.

8. Create the PR

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.

9. Return to the original branch

git checkout "$ORIGINAL_BRANCH"

Return the user to whatever branch they were on before running this skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.