/rails-consultant:pr [--auto [--screenshots <url>...]] [base branch, optional]from rails-consultant
Opens a pull request with a user-written description, suggested title, and light proofreading. Guides the user through recon, drafting, and sign-off.
Ships in rails-consultant. 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.
The LLM wrote the commits. The user owns the feature, so the user writes the
description. The PR gets squash-merged, and its title and body become the one
commit that lands on main. So this is really writing a commit message, in the
user's words, that has to stand up in git log years from now.
Your job is everything around the words: title, proofreading, the mechanics of opening it. The failure to avoid is drafting the description yourself. Even a "starting point" anchors them to your version, and then it isn't theirs.
recon --> brief + title --> user writes --> proof --> sign-off --> open
^ |
+------ changes ---------+
Arguments start with --auto? Nobody will write or approve the description.
Read Autonomous mode first; it replaces steps 2 through 6.
Base branch is $ARGUMENTS (minus --auto and --screenshots), or the repo default (gh repo view --json defaultBranchRef, falling back to main).
Read, don't ask:
git status. Uncommitted changes or sitting on the base branch: stop and say
so. Committing and branching are other jobs.git log <base>..HEAD and git diff <base>...HEAD --stat. What the branch
does, so you can title it and later check their description against it.gh pr list --state merged --limit 15 --json title,body, plus
git log <base> --oneline -20 for repos without gh history. Look at mood
("Add" vs "Added"), prefixes (feat:, [JIRA-123]), capitalization, how code
names are marked (backticks?), length, and where bodies put issue links.pull_request_template.md, any case, in .github/, the repo
root, or docs/. A .github/PULL_REQUEST_TEMPLATE/ folder holds several;
pick the one that fits the branch.42-shipping-emails, issue-42), the commits, or a SPEC the branch adds
or names. Only what those say; don't search the tracker for a match.If gh isn't available, say which checks you skipped and carry on with git.
The user didn't write this code, and they're about to put their name on a
description of it. Before they write, give them a fast read of what they're
describing — a two-minute version of /diff-explainer, in chat, no artifact.
Start from the commits: subjects and bodies are the cheapest source, and the LLM that wrote them often left its reasoning there. Then skim `git diff
...HEAD` to check the commits against the code and find what they left out. Skip generated files and lockfiles.Three short groups, fragments not sentences, a handful of bullets total:
orders_controller.rb."Only what the code or commits show. Don't guess at why; a wrong reason is worse than none, because the user may repeat it in the description. Leave a group out if there's nothing real to put in it. A trivial branch (a copy change, a version bump) gets one line.
Keep it as notes, not paragraphs. Prose here turns into their description.
Same message as the brief:
(#123) and it becomes a commit subject. Name the
observable change, not the mechanism. Offer one alternate at most.Closes #42) so it closes on merge.Then stop and wait. Don't draft a description, a template, or an example.
If they hand back notes or fragments and say "clean this up", that's their content, so turning it into sentences is fine. If they ask you to write it from scratch, remind them once that the skill exists so the description is theirs, then do what they say.
Fix what's wrong, leave what's theirs. Wrong means typos, grammar, broken markdown, unclear sentences, a code name that should be in backticks. Theirs means word choice, tone, structure, length, opinions, humor. A proofread that reads like you wrote it has failed, even if every sentence got "better".
Also:
If it's already clean, say so and change nothing. Churn on good prose is the opposite of help.
Show:
teh → the, wrapped lines, backticked
User#email). Not a diff of every line.Ask for a yes. Any edit they request, apply it and show the full final version again. The yes has to be to the exact text that goes out; approving "the title change" isn't approving the body you haven't re-shown.
Only after a yes to the text you last showed.
Push if the branch has no upstream (git push -u origin HEAD). Write the body
to a temp file and pass it with --body-file, so backticks and newlines
survive the shell:
gh pr create --base <base> --title "<title>" --body-file <tmpfile>
Reply with the PR URL.
Only when the arguments start with --auto. Nobody is there: a human finds
the draft PR later, rewrites the description, and marks it ready. Without
--auto, ignore this section.
You write the description, since nobody else will. It does
/diff-explainer's job as a PR: the why, not the what. Read its steps 3 and 4
(../diff-explainer/SKILL.md) for what earns a note and the rule against
inventing rationale. Short beats thorough; a reviewer skims a long PR.
InvoicesController#show (a3e96d0)."**Risk:**,
**Tradeoff:**, or **Open question:**. One to two sentences, for the
engineer. Most branches get two to four; a typo fix gets none./eli5 explains (steps 3 and 4 of
../eli5/SKILL.md): what happens to a person, then one everyday analogy.
No code names or programmer words like job or callback. When order or
flow is the point, add a small drawing in a code block, under 60
characters wide, since GitHub's comment column is narrow. Real values
from the branch only; no drawing beats an invented one. Read that
skill, don't run it; it sends out agents, and this is a paragraph.
Where the two disagree, this bullet wins: no drawing unless order
matters, and no real name after the plain version.<!-- -->). Tick a box only when the
branch backs it. A section nothing on the branch speaks to gets "Not
recorded." No template: lay it out like recent merged PRs. Neither: use
the default.Closes #42
(owner/repo#42 for another repo), where the template or recent PRs put
it, else last before the attribution line. Refs #42 instead when the
commits or SPEC say the branch does only part of it. None found: no line.--screenshots takes image URLs the
caller already hosted. Embed each one; don't take, upload, or commit any
yourself. None passed: no screenshots section.The default body:
```markdown
{what changed for the people using it, and why, one to three sentences}
{each --screenshots URL as . Leave out when none were passed.}
{Closes #N. Leave out when recon found no issue.}
{the attribution line}
```
A note:
**Risk:** We charge the card before saving the `Payment`, so a failed
save leaves a charge with no record. We might want to save it first.
The customer pays, but their invoice still says unpaid, and support
has nothing to look up. It's a cashier who runs your card and then
drops the receipt in the bin.
```
card charged $40 --> saving the payment fails
|
v
invoice still "unpaid", no payment on file
```
_Claude Opus 5.5 (claude-opus-5-5)_
Name the model from your system prompt: its name and exact ID, like
Claude Opus 5.5 (claude-opus-5-5). Don't know it? Write Claude alone.
Never guess a model.
_Written by Claude Opus 5.5 (claude-opus-5-5) with /pr --auto. No human has edited this yet.__Claude Opus 5.5 (claude-opus-5-5)_.
Notes show up one at a time on GitHub, so each one needs it.This is the only attribution. No "Generated with Claude Code" line or co-author trailer on top of it.
The body and the notes should sound like thoughtbot, not one person. This follows thoughtbot's voice and tone guide.
Both:
The body:
this [discussion][1],
then [1]: https://....Prior to this, support resent old invoices by hand a few times a week.
Now customers can download any past invoice as a PDF, so we can stop
resending them.
For the time being, invoices from before 2020 aren't included.
The notes, like a teammate's review comment:
rescue catches all errors. We
might want to rescue only CardDeclined."Only the voice. Every claim still comes from the branch.
Push (git push -u origin HEAD), whatever the host: the remote needs every
commit before anyone can open or review a PR from it. Then, on GitHub with
gh:
gh pr create --draft --base <base> --title "<title>" --body-file <tmpfile>
Inline notes go up as one review, so the PR gets one notification, not ten:
gh api repos/{owner}/{repo}/pulls/<n>/reviews --input review.json
# {"event": "COMMENT", "commit_id": "<head sha>", "comments": [
# {"path": "app/models/order.rb", "line": 4, "side": "RIGHT",
# "body": "**Risk:** ...\n\n{plain paragraph}\n\n_Claude Opus 5.5 (claude-opus-5-5)_"}]}
line has to be a line in the diff, numbered in the new file.
Not GitHub, no CLI, or a call fails: don't look for a workaround. The reply is the handoff.
The reply: the PR URL, or why it wasn't opened plus the title and body in a
fenced block. Any notes that didn't get posted go there too, as path:line
bullets with their attribution line, ready to paste. Fence each note with
~~~, so a drawing's ``` doesn't close it early. Then what the check changed, one line each.
What SKILL.md sets; muted values are Claude Code's defaults
15 skills in this plugin
/ask-claudeRecommend the best way to have Claude do something, checked against Anthropic's current docs, then write the prompt and run it once approved. Use when someone asks how they should prompt you, what the best way to ask for something is, or which Claude feature fits a job (CLAUDE.md, skill, hook, subagent, workflow, plan mode, /goal, MCP, headless, the API), even if they don't name a feature./commitCommit the current changes as atomic commits, recording risks, tradeoffs, and alternatives considered./diff-explainerBuilds a shareable HTML walkthrough of the current changes, highlighting risks, tradeoffs, and alternatives considered.rails-consultant@skills is listed by thoughtbot/skills — review the source before installing
npx claudepluginhub thoughtbot/skills --plugin rails-consultantOther plugins' skills for the same job