create-pr-github
Skill174 starsChanged 2 months agoMITView on GitHub
Create and (optionally) merge a GitHub pull request using wrapper scripts (preferred) or GitHub CLI (fallback), following the repo policy for rebase and merge.
- Deletes or force-pushes
- Commits and pushes
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-runtimeSkill
- arc42-documentationSkill
- authoring-rolesSkill
- context-packSkill
- create-agent-skillSkill
- create-pr-azdoSkill
- detect-diagram-crossingsSkill
- flowchart_layout_optimizerSkill
- generate-demo-artifactsSkill
- generate-release-screenshotsSkill
- git-rebase-mainSkill
- merge-conflict-resolutionSkill
- next-issue-numberSkill
- pre-pr-checklistSkill
- retrospective-evidenceSkill
- run-dotnet-testsSkill
- run-uatSkill
- run-workflowSkill
- update-test-snapshotsSkill
- update-workflow-diagramSkill
- view-pr-githubSkill
- watch-uat-azdo-prSkill
- watch-uat-github-prSkill
- website-accessibility-checkSkill
- website-create-examplesSkill
- website-devtoolsSkill
- website-quality-checkSkill
- website-visual-assetsSkill
- agent-runtimeSkill
- arc42-documentationSkill
- authoring-rolesSkill
- context-packSkill
- create-agent-skillSkill
- create-pr-azdoSkill
- create-pr-githubSkill
- detect-diagram-crossingsSkill
- flowchart_layout_optimizerSkill
- generate-demo-artifactsSkill
- generate-release-screenshotsSkill
- git-rebase-mainSkill
- merge-conflict-resolutionSkill
- next-issue-numberSkill
- pre-pr-checklistSkill
- retrospective-evidenceSkill
- run-dotnet-testsSkill
- run-uatSkill
- run-workflowSkill
- update-test-snapshotsSkill
- update-workflow-diagramSkill
- view-pr-githubSkill
- watch-uat-azdo-prSkill
- watch-uat-github-prSkill
- website-accessibility-checkSkill
- website-create-examplesSkill
- website-devtoolsSkill
- website-quality-checkSkill
- website-visual-assetsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
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 11
Create a GitHub pull request in a consistent, policy-compliant way, and include the repo's preferred merge method guidance (rebase and …
- Very specific: line 15
FIRST: Use scripts/pr-github.sh wrapper script (designed for permanent approval)
- Distinctive: line 16
SECOND: Use GitHub MCP tools (if available and wrapper doesn't fit)
- Very specific: line 17
LAST: Use gh CLI as final fallback
- Distinctive: line 24
Ensure the working tree is clean before creating a PR
- Distinctive: line 26
Before creating the PR, post the exact Title and Description in chat
- Distinctive: line 27
Use the standard PR body template (Problem / Change / Verification)
- Very specific: line 28
Use Rebase and merge for merging PRs to maintain a linear history (see docs/development.md)
- Distinctive: line 32
Create PRs from main
- Distinctive: line 33
Use "Squash and merge" or "Create a merge commit"
- Very specific: line 34
Use --fill or any heuristic that guesses title/body (not supported by the wrapper)
- Distinctive: line 40
Before running any PR creation command, provide in chat:
- Distinctive: line 79
Create and merge (only when explicitly requested):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 PR (GitHub)
Purpose
Create a GitHub pull request in a consistent, policy-compliant way, and include the repo's preferred merge method guidance (rebase and merge).
Priority order:
- FIRST: Use
scripts/pr-github.shwrapper script (designed for permanent approval) - SECOND: Use GitHub MCP tools (if available and wrapper doesn't fit)
- LAST: Use
ghCLI as final fallback
Hard Rules
Must
- Work on a non-
mainbranch - Ensure the working tree is clean before creating a PR
- Push the branch to
originbefore creating the PR - Before creating the PR, post the exact Title and Description in chat
- Use the standard PR body template (Problem / Change / Verification)
- Use Rebase and merge for merging PRs to maintain a linear history (see
docs/development.md)
Must Not
- Create PRs from
main - Use "Squash and merge" or "Create a merge commit"
- Use
--fillor any heuristic that guesses title/body (not supported by the wrapper)
Actions
0. Title + Description (Required)
Before running any PR creation command, provide in chat:
- PR title (exact)
- PR description (exact), using this template:
## Problem
<why is this change needed?>
## Change
<what changed?>
## Verification
<how was it validated?>1. Pre-flight Checks
git branch --show-current
git status --short2. Push the Branch
git push -u origin HEAD3. Create the PR
Preferred: Wrapper Script
Create a PR:
echo "## Summary\n\nPR description" | scripts/pr-github.sh create --title "<type(scope): summary>" --body-from-stdinCreate and merge (only when explicitly requested):
echo "## Summary\n\nPR description" | scripts/pr-github.sh create-and-merge --title "<type(scope): summary>" --body-from-stdinFallback: gh CLI (if wrapper unavailable)
echo "## Summary\n\nPR description" | PAGER=cat gh pr create \
--base main \
--head "$(git branch --show-current)" \
--title "<type(scope): summary>" \
--body-file -4. Merge (Only When Explicitly Requested)
This repository requires rebase and merge.
Preferred: Wrapper Script
scripts/pr-github.sh merge <pr-number>Or combined create-and-merge:
echo "## Summary\n\nPR description" | scripts/pr-github.sh create-and-merge --title "<type(scope): summary>" --body-from-stdinFallback: gh CLI (if wrapper unavailable)
PAGER=cat gh pr merge <pr-number> --rebase --delete-branch5. If Rebase-Merge Is Blocked (Conflicts)
git pull --rebase origin main
# resolve conflicts
git push --force-with-leaseThen retry the merge.
Why Prefer the Wrapper Script?
- Designed for permanent approval in VS Code (reduces friction)
- Enforces repo policies (rebase and merge, standard templates)
- Handles edge cases consistently
- Provides clear error messages
- Can be easily reproduced by Maintainers
Note on GitHub MCP Tools
GitHub MCP tools may be available for PR creation in the future, but currently the wrapper script is the most reliable approach. If GitHub MCP tools add PR creation support, they would become the preferred option (with wrapper as fallback).
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.

