pull-request
FreeRuns bundled scriptsNot checkedPrepare, create, or update a GitHub pull request with targeted preflight, repair commits, scoped push consent, and separate PR-write approval. Route Azure…
by microsoft★ 1,654 GitHub starsAbout this skill
Pull Request
Goal
Turn the current branch into a review-ready GitHub pull request with a short, accurate description and enough targeted local evidence to catch likely CI failures without running broad validation by default.
Success means the title and body reflect the committed branch diff, the repository template is preserved when present, changed-area preflight checks pass, any authorized preflight repairs are committed under repository conventions, and an external pull request is created or updated only after final PR-write approval. Push consent is separate and is reused for the same action.
Inputs
base: Base branch or ref. Default to the remote default branch without fetching.draft: Whether a newly created pull request is a draft. Default tofalse.action:prepare,create, orupdate. Infer from the request and default topreparewhen external write intent is unclear.
Use the current checked-out branch as the head. Ask only for an input that cannot be inferred and changes the resulting pull request.
Platform Routing
When the push remote is hosted on Azure DevOps (dev.azure.com or *.visualstudio.com), or the user
explicitly asks for an Azure DevOps pull request, load the backlog-management skill and follow its
Azure DevOps pull request reference instead of the Flow below. When backlog-management does not
resolve, report that the Azure DevOps protocol is unavailable and stop before any Azure DevOps call.
Every other remote uses the GitHub flow below unchanged.
Resolve action before delegating, then carry this skill's inputs into that reference:
- Map
basetobaseBranch, resolving its default as this skill does, and mapdrafttoisDraft. An Azure DevOps input the user supplies explicitly, such asbaseBranchorisDraft, takes precedence over its alias. Pass through other Azure DevOps inputs the user supplies, such as project, repository, work item IDs, area path, or iteration path. prepare: produce the local pull request description through the reference's Phase 1 and Phase 2, applying its Content Sanitization Guards and Untrusted Content Boundary, then stop and return the description path. Defer destination confirmation, the autonomy tier, platform readiness, work item discovery, creation, and linking, and every Azure DevOps call to a latercreate.create: run the reference's Mandatory Preflight, then its Required Phases with every destination, sanitization, and approval gate.update: the reference creates pull requests only. Report that updating an existing Azure DevOps pull request is not supported, stop before any Azure DevOps call, and offerprepareto refresh the description for a manual update.
Flow
- Run the platform-matching script in
scripts/to collect branch, commit, changed-file, diff-stat, working tree, base-divergence, and template context. Preserve the initial working-tree state as the exclusion boundary for later repairs. The script uses the local remote-tracking ref and does not fetch, merge, rebase, push, or edit the branch. - Stop if the repository, head branch, base ref, or merge base cannot be resolved. If the branch has
no committed changes from the merge base, report that there is nothing to submit. Treat
uncommitted files as excluded from the pull request and ask whether to continue only when the
user's intent appears to include them. Before an external write, stop with sync guidance when the
reported upstream push state is
behindordiverged. - Inspect the committed diff from the reported merge base. Start with changed files and diff stats, then read the diffs that determine reviewer-visible behavior. Group related files and use delegation only when a large, separable diff would materially benefit from isolated review.
- Derive the title from the branch and commits. Follow the repository's title convention when one exists; otherwise use a concise imperative title. Extract closing issue references only when they appear in branch or commit evidence.
- Build
.copilot-tracking/pr/pr.md. Use the discovered repository template and preserve its heading order, comments, and manual-review checkboxes. If no template exists, copytemplates/pull-request.md. Replace instructional placeholders with verified content while keeping unsupported human attestations unchecked. Apply any repository instructions that match the pull request artifact. - Write for a human reviewer. Open with one plain-language summary, group the material changes by reviewer concern, and include only evidence-backed impact, compatibility, security, migration, testing, and follow-up details. Omit empty optional sections in the fallback template. Avoid a commit transcript, exhaustive file inventory, implementation chronology, and claims not supported by the diff or commits.
- Apply the public-output guard from the applicable content-policy instruct
Install pull-request in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the pull-request skill do?
Prepare, create, or update a GitHub pull request with targeted preflight, repair commits, scoped push consent, and separate PR-write approval. Route Azure DevOps to backlog-management.
How do I install the pull-request skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the pull-request skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
by Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
by Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
by Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
by Anthropic