rails-cto-pull-request
Skill15 starsChanged 7 months agoMITView on GitHub
Create a pull request targeting the staging branch using the gh CLI. Use this skill whenever the user asks to create a PR, open a pull request, submit for review, or says things like "create a PR", "open a pull request", "submit this for review", "PR this", or "send this to staging". Also triggers for "/pull-request" or "/pr". Do NOT use for merging PRs, reviewing PRs, or creating production releases.
- Commits and pushes
In this repository17 other files it gives its agents.
- claude/CLAUDE.mdCLAUDE.md
- rails-cto-apiSkill
- rails-cto-architectSkill
- rails-cto-commitSkill
- rails-cto-engineerSkill
- rails-cto-erbSkill
- rails-cto-minitestSkill
- rails-cto-production-prSkill
- rails-cto-qaSkill
- rails-cto-restfulSkill
- rails-cto-securitySkill
- rails-ctoSkill
- rails-cto-static-analysisSkill
- rails-cto-stimulusSkill
- rails-cto-tailwindSkill
- rails-upgradeSkill
- rails-viewcomponentsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 11 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
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
- Very specific: line 8
Create a pull request from the current branch into staging using the gh CLI.
- Very specific: line 20
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 …
- Very specific: line 28
If a PR already exists for this branch targeting staging, warn the user with the existing PR link and stop.
- Very specific: line 32
If there are any uncommitted or unstaged changes, commit them first using the rails-cto-commit skill before continuing.
- Distinctive: line 43
If there are merge conflicts:
- Distinctive: line 46
After resolving, stage the files and commit the merge
- Distinctive: line 47
If the conflicts are complex or ambiguous, ask the user how to resolve them before proceeding
- Distinctive: line 49
If the merge is clean (no conflicts), continue to the next step.
- Distinctive: line 59
If it already tracks a remote, a simple git push is fine.
- Distinctive: line 70
Read the commit messages and the actual diffs to understand what changed and why.
- Distinctive: line 74
Write a short, plain-language title (under 72 characters) that describes what this branch accomplishes.
- Distinctive: line 83
Write the description in plain language.
- Distinctive: line 85
Do NOT include co-authorship lines or reference "Claude" or any AI tool anywhere.
- Distinctive: line 106
If there are only major changes, omit the "Minor Changes" section.
- Distinctive: line 124
After creation, show the user the PR URL so they can view it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Pull Request
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.
Workflow
1. Preflight checks
Check the current branch:
git branch --show-currentIf 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 openIf a PR already exists for this branch targeting staging, warn the user with the existing PR link and stop. Do not create a duplicate.
2. Commit outstanding changes
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.
3. Sync with staging
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/stagingIf there are merge conflicts:
- List the conflicting files and show the conflicts to the user
- Resolve each conflict — prefer the feature branch's changes where they are intentional, and keep staging's changes where they are unrelated updates
- After resolving, stage the files and commit the merge
- If the conflicts are complex or ambiguous, ask the user how to resolve them before proceeding
If the merge is clean (no conflicts), continue to the next step.
4. Push to remote
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.
5. Gather the changes
Review what this branch has changed relative to staging:
git log staging..HEAD --oneline
git diff staging...HEAD --statRead the commit messages and the actual diffs to understand what changed and why.
6. Write the PR title
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 discount
7. Write the PR description
Write 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 reviewIf 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.
8. Create the PR
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.
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
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.

