quick-pr
Skill19 starsChanged 9 months agoMITView on GitHub
Split a minor change from the current work into a separate worktree and open a PR without interrupting your flow. Use when an unrelated small fix (typo, lint rule, config tweak) is sitting in a feature branch and the user wants it shipped on its own — \"quick PR\", \"split this out\", \"ship this separately\". Requires Claude Code (uses EnterWorktree, ExitWorktree, AskUserQuestion).
- Commits and pushes
In this repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- code-historySkill
- code-review-reportSkill
- commit-fixupSkill
- commit-splitSkill
- create-qa-listSkill
- decision-boardSkill
- django-ticket-triageSkill
- docsSkill
- html-visualSkill
- instruction-evalSkill
- ralph-loop-templateSkill
- worth-buildingSkill
- write-prSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 52
File path arg: Run git diff HEAD -- <file>, show the diff.
- Distinctive: line 54
Empty arg: Ask what to split out.
- Distinctive: line 60
Check the project's commit style: git log --oneline -10.
- Very specific: line 88
Use EnterWorktree to create a worktree based on the chosen base branch.
- Distinctive: line 95
Before entering the worktree, note the original worktree path.
- Distinctive: line 118
Check templates in parallel:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Quick PR
Split an unrelated minor change (convention fix, typo, config tweak) from the current working tree into an independent PR — without leaving the current branch.
This is a Claude Code skill. It requires Claude Code built-in tools: EnterWorktree, ExitWorktree, and AskUserQuestion.
Use this skill when
- A small fix (typo, lint, config) is mixed into a larger feature branch
- The user wants to ship a trivial change immediately without polluting the current PR
- The user says "quick PR", "split this out", or "ship this separately"
Do not use this skill when
- The change is part of the current feature work
- The user only wants a PR description (use
/write-prinstead) - The change requires review or testing beyond a simple visual check
Input
$ARGUMENTSArgument interpretation:
- File path (e.g.,
src/config.py) — extract the current diff for that file and apply it in the worktree - Description text (e.g.,
"fix typo in README") — make the edit directly in the worktree - Empty — ask the user what to split out
Tools
Fetch these tools via ToolSearch before use:
| Purpose | Tool |
| Enter isolated worktree | EnterWorktree |
| Exit/remove worktree | ExitWorktree |
| Ask the user | AskUserQuestion |
Procedure
Step 1: Determine Change Scope
File path arg: Run git diff HEAD -- <file>, show the diff.
Description arg: Propose which files to modify and how.
Empty arg: Ask what to split out.
→ Use AskUserQuestion to confirm the scope before continuing.
Step 2: Choose Branch Name and Commit Message
Check the project's commit style: git log --oneline -10.
Propose up to 5 candidates for each:
- Branch: kebab-case, prefix
fix/chore/docs/feat/ - Commit: match dominant pattern (Conventional Commits, ticket prefix, etc.); default to Conventional Commits if unclear
→ Use AskUserQuestion with the numbered options. User picks or writes their own.
Step 3: Choose Base Branch, Create Worktree, Apply Changes
git fetch originDetect the default branch as the recommended base:
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/nullFallback: check which of main, master, develop exists.
Gather recent remote branches as additional candidates:
git for-each-ref --sort=-committerdate refs/remotes/ \
--format='%(refname:short)' | grep -v HEAD | head -5→ Use AskUserQuestion to pick the base branch. Present the detected default as the recommended option, followed by the recent branches. User can write their own. This base is reused as the PR target in Step 4.
Use EnterWorktree to create a worktree based on the chosen base branch. Then rename the branch:
git branch -m <chosen-branch-name>File-based mode: Before entering the worktree, note the original worktree path. After entering, copy the changed file from the original path:
cp <original-worktree-path>/<file> <current-worktree-path>/<file>Description-based mode: Make the edit directly in the worktree.
Step 4: Commit, Push, Create PR
git add <changed-files>
git commit -m "<chosen-commit-message>"→ Use AskUserQuestion to confirm push. On approval:
git push -u origin <branch-name>Build the PR body inline (do not delegate to another skill):
- Check templates in parallel:
.github/PULL_REQUEST_TEMPLATE.md.github/pull_request_template.mddocs/pull_request_template.mdPULL_REQUEST_TEMPLATE.md.github/PULL_REQUEST_TEMPLATE/directory
- Template exists: preserve structure exactly. Fill sections from the diff. Leave unfillable sections (Screenshots, Related Issues) with their original placeholders.
- No template:
## Summary <what and why — 1-3 sentences> ## Changes <bullet list of key changes> - PR title: match
gh pr list --state merged --limit 5 --json title 2>/dev/null. Fallback togit log --oneline -10. Default to Conventional Commits if unclear.
→ Use AskUserQuestion with the draft title + body + target branch (defaults to the base from Step 3). Do not run gh pr create until approved.
gh pr create --base <target-branch> --title "<title>" --body "<body>"Step 5: Confirm and Clean Up
Show PR created: <URL>.
→ Use AskUserQuestion: "Remove the worktree?"
- Yes →
ExitWorktreewithaction: "remove",discard_changes: true(safe — the commit is already on origin from Step 4) - No →
ExitWorktreewithaction: "keep"
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.

