github-pr-creation
Skill35 starsChanged 8 months agoMITView on GitHub
Creates GitHub Pull Requests with automated validation and task tracking. Use when user wants to create PR, open pull request, submit for review, or check if ready for PR. Analyzes commits, validates task completion, generates Conventional Commits title and description, suggests labels. NOTE - for merging existing PRs, use github-pr-merge instead.
- Installs packages
- Commits and pushes
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- agent-protocolSkill
- context-health-checkSkill
- layered-contextSkill
- muse-commandsSkill
- semantic-searchSkill
- strategic-compactSkill
- using-superpowersSkill
- verification-before-completionSkill
- growth-distributionSkill
- api-design-principlesSkill
- architect-agentSkill
- brainstormingSkill
- build-error-resolverSkill
- changelog-generatorSkill
- code-documentationSkill
- code-refactoringSkill
- code-reviewer-agentSkill
- coding-standardsSkill
- context7-mcpSkill
- coordinator-modeSkill
- creating-skillsSkill
- deep-diveSkill
- dispatching-parallel-agentsSkill
- doc-coauthoringSkill
- doc-updaterSkill
- e2e-runnerSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- git-commitSkill
- github-pr-mergeSkill
- github-pr-reviewSkill
- git-security-guardSkill
- iterative-retrievalSkill
- markitdownSkill
- planner-agentSkill
- ralph-wiggumSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- sciomcSkill
- security-reviewSkill
- skill-creatorSkill
- skills-updaterSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- theme-factorySkill
- traceSkill
- ui-ux-pro-maxSkill
- using-git-worktreesSkill
- webapp-testingSkill
- writing-plansSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 9 are distinctive, and 6 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.
6
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
- Very specific: line 36
If not installed: brew install gh then gh auth login
- Distinctive: line 70
Look for task files in these locations (in order):
- Very specific: line 86
Task references: look for task X.Y, Task X, #X.Y patterns
- Distinctive: line 93
If task documentation exists:
- Distinctive: line 96
Check which sub-tasks are referenced in commits
- Distinctive: line 99
If tasks incomplete: STOP and inform user with:
- Very specific: line 110
If Makefile with test target: make test
- Very specific: line 112
If Python project: pytest
- Very specific: line 128
Use appropriate template from references/pr_templates.md based on PR type.
- Very specific: line 149
Check available labels: gh label list
- Distinctive: line 164
Before generating PR, ensure you have:
- Distinctive: line 189
ALWAYS: run tests before creating PR
- Distinctive: line 191
NEVER: create PR without user confirmation
- Distinctive: line 192
ALWAYS: use HEREDOC for body to preserve formatting
- Distinctive: line 196
git-commit: - Commit message format and conventions
≈ “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
GitHub PR Creation
Creates Pull Requests with task validation, test execution, and Conventional Commits formatting.
Quick Start
# 1. Verify GitHub CLI
gh --version && gh auth status
# 2. Gather information (Claude does this directly)
git log develop..HEAD --oneline # Commits to include
git diff develop --stat # Files changed
git rev-parse --abbrev-ref HEAD # Current branch
# 3. Run project tests
make test # or: pytest, npm test
# 4. Create PR (after generating content)
gh pr create --title "..." --body "..." --base develop --label featureCore Workflow
1. Verify Environment
gh --version && gh auth statusIf not installed: brew install gh then gh auth login
2. Confirm Target Branch
Always ask user:
I'm about to create a PR from [current-branch] to [target-branch]. Is this correct?
- feature branch → develop (90% of cases)
- develop → master/main (releases)3. Gather Information
Execute these commands and analyze results directly:
# Current branch
git rev-parse --abbrev-ref HEAD
# Commits since base branch
git log [base-branch]..HEAD --pretty=format:"%H|%an|%ai|%s"
# Commits with full details (for context)
git log [base-branch]..HEAD --oneline
# Files changed
git diff [base-branch] --stat
# Remote tracking status
git status -sb4. Search for Task Documentation
Look for task files in these locations (in order):
.kiro/specs/*/tasks.mddocs/specs/*/tasks.mdspecs/*/tasks.md- Any
tasks.mdin project root
Extract from task files:
- Task IDs (format:
Task XorTask X.Y) - Task titles and descriptions
- Requirements (format:
Requirements: X, Y, Z)
5. Analyze Commits
For each commit, identify:
- Type: feat, fix, refactor, docs, test, chore, ci, perf, style
- Scope: component/module affected (kebab-case)
- Task references: look for
task X.Y,Task X,#X.Ypatterns - Breaking changes: exclamation mark after type/scope, or
BREAKING CHANGEin body
Map commits to documented tasks when task files exist.
6. Verify Task Completion
If task documentation exists:
- Identify main task from branch name (e.g.,
feature/task-2-*→ Task 2) - Find all sub-tasks (e.g., Task 2.1, 2.2, 2.3)
- Check which sub-tasks are referenced in commits
- Report missing sub-tasks
If tasks incomplete: STOP and inform user with:
✗ Task 2 INCOMPLETE: 1/3 sub-tasks missing
- Task 2.1: ✓ Implemented
- Task 2.2: ✓ Implemented
- Task 2.3: ✗ MISSING7. Run Tests
Detect and run project tests:
- If Makefile with
testtarget:make test - If package.json:
npm test - If Python project:
pytest
Tests MUST pass before creating PR.
8. Determine PR Type
| Branch Flow | PR Type | Title Prefix |
| feature/* → develop | Feature | feat(scope): |
| fix/* → develop | Bugfix | fix(scope): |
| hotfix/* → main | Hotfix | hotfix(scope): |
| develop → main | Release | release: |
| refactor/* → develop | Refactoring | refactor(scope): |
9. Generate PR Content
Use appropriate template from references/pr_templates.md based on PR type.
Title format: <type>(<scope>): <description>
- Type: dominant commit type (feat > fix > refactor)
- Scope: most common scope from commits, or task-related scope (kebab-case)
- Description: imperative, lowercase, no period, max 50 chars
Body: Select template based on PR type and populate with gathered data.
10. Suggest Labels
| Commit Type | Labels |
| feat | feature, enhancement |
| fix | bug, bugfix |
| refactor | refactoring, tech-debt |
| docs | documentation |
| ci | ci/cd, infrastructure |
| security | security |
| hotfix | urgent, priority:high |
Check available labels: gh label list
11. Create PR
Show content to user first, then:
gh pr create --title "[title]" --body "$(cat <<'EOF'
[body content]
EOF
)" --base [base_branch] --label [labels]Information Gathering Checklist
Before generating PR, ensure you have:
- Current branch name
- Base branch confirmed with user
- List of commits with types and scopes
- Files changed summary
- Task documentation (if exists)
- Task completion status
- Test results (must pass)
- Available labels in repo
Error Handling
Missing GitHub CLI: brew install gh && gh auth login
Incomplete Tasks: Show status, ask user to complete or proceed anyway.
Failed Tests: Show failures, ask user to fix before PR.
No tasks.md: Proceed with commit-based PR, generate content from commits only.
Important Rules
- NEVER modify repository files (read-only analysis)
- ALWAYS confirm target branch with user
- ALWAYS run tests before creating PR
- ALWAYS show PR content for approval before creating
- NEVER create PR without user confirmation
- ALWAYS use HEREDOC for body to preserve formatting
Related Skills
- git-commit - Commit message format and conventions
References
references/pr_templates.md- Complete PR templates for all typesreferences/conventional_commits.md- Commit format guide
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.

