pr
Skill5 starsChanged 52 days agoMITView on GitHub
Draft a pull request title and body for the current branch. Follows the repo's own PR convention when it has one, and otherwise writes a visual Summary, before-and-after Evidence, and Merge Danger. Drafts only, unless the user asks to push or open the PR.
- Commits and pushes
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- commitSkill
- review-replySkill
- rules-checkSkill
- setupSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Distinctive: line 58
Never check out, stash, reset, or switch branches to produce evidence, since that can move or lose the user's work.
- Distinctive: line 64
When git status --porcelain shows uncommitted changes, any check run now tests that uncommitted code, not the committed branch.
- Very specific: line 70
Read ${CLAUDE_SKILL_DIR}/conventions.md and run its lookup for two destinations: the PR body and the PR title.
- Very specific: line 75
When a source covers the body, follow it as conventions.md says, and fill each section from what you gathered.
- Distinctive: line 78
When nothing covers it, write these three sections in this order:
- Distinctive: line 91
Evidence: Before and after: what failed, was missing, or printed wrong before the change, and what the same check shows now.
- Distinctive: line 100
Every section has content from this change.
- Distinctive: line 105
Follow the convention the lookup found for titles.
- Very specific: line 125
When the comparison ref isn't origin/<name>, name it in one line, such as "Compared against upstream/main".
- Very specific: line 128
When the user asked to open the PR, run gh pr view --json url -q .url first.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Katharsis PR body
You write the title and body of a pull request for the branch checked out in the current folder. The reviewer reads it without this session's context, so everything it says comes from the branch, the repo, and checks that ran.
What the user typed after the command, empty when they typed nothing:
$ARGUMENTSIt may name a base branch, an issue, or something more to do, such as pushing the branch or opening the PR. Do only what it asks. When it asks for nothing beyond the body, draft and stop: push nothing and open nothing.
1. Gather the change
Find the base branch and keep it in two forms. The bare name, such as main, is what
gh pr create --base takes: the branch the user named with any remote prefix, such as origin/,
stripped, else the default from gh repo view --json defaultBranchRef -q .defaultBranchRef.name,
else git symbolic-ref --short refs/remotes/origin/HEAD with its origin/ stripped, else main
or master, whichever exists.
The comparison ref is what git log and git diff compare against, so a stale local copy of the
base doesn't add commits already merged. It is <remote>/<name>, where <remote> is the remote
in git remote -v whose URL names the same owner and repo as gh repo view --json url -q .url,
over SSH or HTTPS. In a fork clone that is the base repo's remote, such as upstream. With no
match, <remote> is origin. When that remote-tracking ref doesn't exist
(git rev-parse --verify --quiet <remote>/<name> prints nothing), the comparison ref is the local
branch <name>. Then read the change:
git log --format='%h %s%n%b' <comparison ref>..HEAD
git diff --stat <comparison ref>...HEAD
git diff <comparison ref>...HEADThe PR carries commits only. When git status --porcelain shows uncommitted changes, leave them
out of the body and tell the user they are not in it.
Find the issue the change answers: one the user named, a #123 or ticket key in the commits or
the branch name. Read it with gh issue view when gh can reach it, for the problem in its own
words.
Find the evidence: checks that ran in this session after the last change, with their commands and result lines. When none ran, run the checks the repo documents for a PR, such as its CI commands or the commands in its template's checklist. A check you could not run is reported as not run, never as passing.
Never check out, stash, reset, or switch branches to produce evidence, since that can move or lose
the user's work. The "before" result comes from checks that ran earlier in this session, the
issue's description of the failure, the commits, or CI runs on the base branch
(gh run list --branch <name> --limit 5). When none of those has one, say the "before" wasn't
measured.
When git status --porcelain shows uncommitted changes, any check run now tests that uncommitted
code, not the committed branch. Either say so beside each such result in the Evidence section, or
report those checks as not run for the committed branch.
2. Find the convention
Read ${CLAUDE_SKILL_DIR}/conventions.md and run its lookup for two destinations: the PR body
and the PR title. Stop at the first source that covers each.
3. Write the body
When a source covers the body, follow it as conventions.md says, and fill each section from
what you gathered.
When nothing covers it, write these three sections in this order:
## Summary
## Evidence
## Merge Danger- Summary. Open with the smallest sketch that makes the change clear, in a code block of at
most 12 lines: a
diffsketch of the structure that changed, a file tree with each file's job, a call flow, or an output before and after. Pick the one that matches the change's shape. Follow it with one or two sentences: the problem, then what the change does about it. Link the issue, such asCloses #123. - Evidence. Before and after: what failed, was missing, or printed wrong before the change, and what the same check shows now. Give each command and its result line. Take the "before" only from the sources step 1 names, and say when it wasn't measured. Say plainly which checks did not run, and which results came from uncommitted code.
- Merge Danger. Say whether merging is a two-way door, which a revert undoes, or a one-way door, such as a data migration, a published release, a changed public API, or deleted data. Then the blast radius: who and what the change reaches once merged, such as every installer on the next update or one internal script.
Every section has content from this change. A section with nothing to say says so in one line rather than filling space.
4. Write the title
Follow the convention the lookup found for titles. With none, write the title in the imperative, under 72 characters, naming the effect on the user rather than the edit.
5. Check before showing
- No reference codes. The body and title hold no code this chat defined, such as
F3,AT2,NA2, orQ1. Write what the item says in its place. Reviewers never saw this chat, so a code means nothing to them. - Every claim traces to the branch. Each file, behavior, and number in the body is in the diff, the commits, the issue, or a check's output.
- Ticks match runs. A ticked checklist box names a check that ran and passed after the last change.
6. Hand it over
Show the title and the body in the reply, the body in one fenced markdown block so the user can
copy it, and the one line from conventions.md naming the source you followed. Make that fence
one backtick longer than the longest fence inside the body, so the body's own code blocks stay
intact.
When the comparison ref isn't origin/<name>, name it in one line, such as "Compared against
upstream/main".
When the user asked to open the PR, run gh pr view --json url -q .url first. When it prints a
URL, the branch already has a PR: report the URL, and replace its body with
gh pr edit --body-file <body file> only when the user asked to update it.
Otherwise, write the body and the title each to a file from mktemp, never in the work tree, so
neither lands in a later git add. A request to open the PR also allows pushing the current
branch, since gh pr create can't push without a terminal. When the branch has no upstream
(git rev-parse --abbrev-ref @{upstream} fails), run git push -u <push remote> HEAD, where the
push remote is git config remote.pushDefault when set, else origin; in a fork clone, that is
the fork, not the comparison remote. When git rev-list --count @{upstream}..HEAD prints more
than 0, run git push. Never force a push, and push nothing else. Then open the PR with the bare
base name:
gh pr create --base <name> --title "$(cat <title file>)" --body-file <body file>Report the PR's URL. Push only when the user asked to open the PR or to push.
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.

