create-pull-request
Skill1 starsChanged 5 months agoMITView on GitHub
Create a GitHub pull request with local git and the GitHub MCP server.
- Commits and pushes
13 other projects use a version of this.
Adopted by
Most recently taken up by
- JeffreyFerreiras/ai-skillstheir own version, first seen Oct 5, 2026
- Jay-1409/skillstheir own version, first seen Oct 3, 2026
- marcellocurto/skillstheir own version, first seen Oct 2, 2026
- Weixi779/skillstheir own version, first seen Aug 6, 2026
- microsoft/vscode-pull-request-githubtheir own version, first seen Jul 16, 2026
- platformplatform/PlatformPlatformtheir own version, first seen May 15, 2026
Used with
Projects with it also use commit.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 3 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- cline/cline★ 70ksame name
- microsoft/vscode-pull-request-github★ 2.6ksame name
- warpdotdev/oz-skills★ 825same name
- platformplatform/PlatformPlatform★ 440same name
- haru/redmine_ai_helper★ 106same name
- helderberto/agent-skills★ 16same name
- kimrgrey/claudini★ 9same name
- liatrio-labs/ai-prompts★ 4same name
- marcellocurto/skills★ 3same name
- dennishenle/agent-skills★ 2same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- babysitSkill
- git-commit-generatorSkill
- git-squash-rebaseSkill
- marp-presentationsSkill
- plan-visualizerSkill
- pnpm-dependency-upgrade-auditSkill
- react-useeffect-guideSkill
- split-to-prsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
4
Distinctive
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
- could be automatic: a setting could enforce it
- Distinctive: line 9
Create one pull request from the current branch.
- Distinctive: line 11
Use local git commands to inspect commits, review diffs, and publish the branch.
- Distinctive: line 12
Use the GitHub MCP server for GitHub identity, repository files, existing PRs, and PR creation.
- Distinctive: line 13
Ask before committing, stashing, discarding, rebasing, or force-pushing user work.
- Very specific: line 50
Use github_get_file_contents with owner, repo, and the base ref to check these paths:
- Very specific: line 63
Check for an existing open PR before creating one.
- Very specific: line 73
If the branch was rebased and requires a force push, pause and ask for explicit approval.
- Very specific: line 107
An open PR already exists: use github_update_pull_request only after the user asks to update it.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create a pull request
Create one pull request from the current branch. Keep local git work and GitHub API work separate:
- Use local
gitcommands to inspect commits, review diffs, and publish the branch. - Use the GitHub MCP server for GitHub identity, repository files, existing PRs, and PR creation.
- Ask before committing, stashing, discarding, rebasing, or force-pushing user work.
1. Check the repository
Run:
git status --short --branch
git branch --show-current
git remote get-url origin
git log --oneline -5Parse origin as OWNER/REPO from either git@github.com:OWNER/REPO.git or https://github.com/OWNER/REPO.git. Call github_get_me before any other GitHub MCP call.
Find the base branch from refs/remotes/origin/HEAD. If it is missing, run git fetch origin --prune, then use git remote show origin.
If the working tree has changes, show them and stop. Ask whether the user will commit them or wants the agent to commit them. Continue only after the changes are committed or the user confirms that the branch is ready. If the current branch is main or master, stop and ask the user to switch branches.
Done when OWNER, REPO, the current branch, and the base branch are known, and the branch is ready for review.
2. Understand the change
Compare the branch with its base:
git log "origin/$BASE..HEAD" --oneline --no-decorate
git diff --stat "origin/$BASE...HEAD"
git diff "origin/$BASE...HEAD"Read changed files when the diff does not explain the behaviour. Infer the PR title, summary, change type, related issue, and test procedure from the branch name, commits, diff, and conversation. Do not invent missing facts. Ask one focused question for any required fact that cannot be supported. Use N/A for a missing issue only after the user confirms it.
Done when the PR title, scope, issue value, change type, and test evidence are recorded.
3. Read the PR template
Use github_get_file_contents with owner, repo, and the base ref to check these paths:
.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE
If the directory contains multiple templates, read each candidate and choose the one that matches the changed area. Ask the user when no single template applies. If neither path exists, use the repository's documented PR format or a short body with summary, testing, and checklist sections.
Fill the selected template in place. Preserve its headings, ordering, checkboxes, and HTML comments. Replace placeholders with the gathered facts. Keep unrelated template text unchanged.
Done when the body follows one repository template exactly, or a fallback body is ready because the repository has no template.
4. Publish the branch
Check for an existing open PR before creating one. Use github_search_pull_requests with a query scoped to repo:OWNER/REPO, is:pr, and the current head branch. If a PR already exists, show its URL and ask whether the user wants to update it instead.
Publish local commits with git:
git push --set-upstream origin HEADThe GitHub MCP github_push_files operation writes file contents as a new commit. It does not publish the current local commit history, so use git push for this workflow.
If the branch was rebased and requires a force push, pause and ask for explicit approval. Do not use --force.
Done when the remote contains the current branch and no duplicate open PR exists, or the existing PR has been handed back to the user.
5. Create the PR with GitHub MCP
Call github_create_pull_request with:
{
"owner": "OWNER",
"repo": "REPO",
"head": "BRANCH",
"base": "BASE",
"title": "PR title",
"body": "Template-compliant body",
"draft": false
}Set draft to true only when the user asks for a draft. Add reviewers only when the user names reviewers. Use the exact owner, repository, branch, and base values from the repository checks.
Done when the MCP response contains the new PR number and URL.
6. Report the result
Give the user the PR URL and number. State that repository CI can now run and list any tests that were not run. Mention an existing PR instead of creating a second one when that path was taken.
Done when the user has the URL and knows the remaining checks or follow-up action.
Common cases
- No commits ahead of base: report that there is no change to submit and ask whether the user meant another branch.
- Push fails: report the exact git error. Check remote access and branch protection before suggesting another action.
- An open PR already exists: use
github_update_pull_requestonly after the user asks to update it. Otherwise return the existing URL. - The branch conflicts with base: report the conflict and ask whether the user wants to resolve or rebase it. Keep the branch unchanged until they choose.
- MCP access fails: report the failing tool and its error. Ask the user to connect or authenticate the GitHub MCP server.
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.

