create-pr-github-git
Skill0 starsChanged 9 months agoMITView on GitHub
Create a GitHub pull request from the current branch, deriving the title and description from the branch's git history.
- Commits and pushes
In this repository32 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- action-itemsSkill
- add-spikeSkill
- changelogSkill
- commitSkill
- create-branchSkill
- create-issue-branch-githubSkill
- create-issue-githubSkill
- create-mr-gitlab-gitSkill
- create-pr-githubSkill
- decisionSkill
- emailSkill
- fix-issue-github-autoSkill
- fix-issue-githubSkill
- hldSkill
- implement-lldSkill
- jira-ticket-gitSkill
- jira-ticketSkill
- lldSkill
- prSkill
- reconcileSkill
- resolve-conflictsSkill
- resolve-open-questionsSkill
- reviewSkill
- spikeSkill
- standup-gitSkill
- standupSkill
- syncSkill
- tag-release-ansibleSkill
- tag-release-npmSkill
- tag-releaseSkill
- tldrSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 4 are distinctive, and 7 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.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 6
Create a GitHub pull request from the current branch, deriving the title and description from the branch's git history.
- Very specific: line 9
Check that gh is installed and authenticated by running gh auth status.
- Very specific: line 12
Run git rev-parse --abbrev-ref --symbolic-full-name @{upstream} to check if an upstream is set.
- Distinctive: line 13
If no upstream is set, run git push -u origin HEAD to push and set tracking.
- Distinctive: line 14
If an upstream is set, run git push to make sure the remote is up to date.
- Very specific: line 15
Run git log --oneline <base>..HEAD to list commits on this branch.
- Very specific: line 16
Run git diff <base>...HEAD --stat to understand what changed.
- Distinctive: line 21
No filler like "This PR..." or vague words without specifics
- Very specific: line 22
Check if a PR already exists for this branch: gh pr view --json url,number 2>/dev/null.
- Very specific: line 23
If no PR exists, run gh pr create --title "<title>" --body "<description>" to open one.
- Very specific: line 24
If a PR already exists, run gh pr edit --title "<title>" --body "<description>" to update it.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Create a GitHub pull request from the current branch, deriving the title and description from the branch's git history.
Steps:
- Check that
ghis installed and authenticated by runninggh auth status. If not, tell the user and stop. - Get the repo's default branch:
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'. Use this as the base for all comparisons below (referred to as<base>). - Push the current branch to the remote if needed:
- Run
git rev-parse --abbrev-ref --symbolic-full-name @{upstream}to check if an upstream is set. - If no upstream is set, run
git push -u origin HEADto push and set tracking. - If an upstream is set, run
git pushto make sure the remote is up to date.
- Run
- Run
git log --oneline <base>..HEADto list commits on this branch. - Run
git diff <base>...HEAD --statto understand what changed. - Derive a PR title (imperative tense, under 72 chars) and description from the commits and diff:
- What changed (2-4 sentences, plain English)
- Why it was needed if inferrable
- Notable implementation details as bullet points (optional)
- No filler like "This PR..." or vague words without specifics
- Check if a PR already exists for this branch:
gh pr view --json url,number 2>/dev/null.- If no PR exists, run
gh pr create --title "<title>" --body "<description>"to open one. Append any user-provided flags from $ARGUMENTS. - If a PR already exists, run
gh pr edit --title "<title>" --body "<description>"to update it.
- If no PR exists, run
- Print the PR URL.
$ARGUMENTS
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.

