creating-pull-request
Skill0 starsChanged 6 months agoMITView on GitHub
Automated PR creation following the project's pull request template, with interactive prompts for checklist items, related links, and Jira validation. TRIGGER when: user asks to create/open a pull request after committing changes; user requests a PR targeting a specific branch (e.g. develop, main); user types phrases like "create pull request", "create the pull request", "create PR", "open PR", "answer yourself the questions", or the equivalent in Portuguese ("criar PR", "abrir pull request", "responda você mesmo as perguntas"). AUTONOMOUS MODE: when user says "answer yourself the questions" or "responda você mesmo as perguntas", invoke this skill and derive all answers from git context (diff, commit messages, branch name) without calling AskUserQuestion. SKIP when: user only wants to commit, push, or review an existing PR without opening a new one.
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Muriel-Salvan/x_aeon_agentstheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Muriel-Salvan/x_aeon_agents★ 2same name
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 repository4 other files it gives its agents.
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 18 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
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
- Distinctive: line 12
When user says "answer yourself the questions", "responda você mesmo as perguntas", or any equivalent instruction to avoid interactive …
- Very specific: line 14
DO NOT: call AskUserQuestion at any step
- Distinctive: line 18
Additional links: default to "None"
- Distinctive: line 20
Impact: default to no special impacts unless commit messages indicate otherwise
- Very specific: line 31
Cached value: read ~/.claude/.creating-pr-config (a simple KEY=VALUE file).
- Distinctive: line 32
Repository hints: search the repo for an existing Atlassian reference:
- Distinctive: line 38
If a single distinct subdomain appears, use it.
- Very specific: line 44
Autonomous mode fallback: if no value can be inferred and questions are disabled, leave the placeholder {{company_name}} literally in the …
- Very specific: line 54
Never hardcode master or develop.
- Distinctive: line 67
Check if changes are pushed: git status -sb
- Distinctive: line 70
Read the modified files to understand what was changed
- Very specific: line 77
Use the AskUserQuestion tool to collect information.
- Distinctive: line 102
If "No", ask follow-up question:
- Distinctive: line 196
Read assets/pull_request_template.md for the canonical template structure, section format, and a complete filled-out example.
- Distinctive: line 225
Verify branch is pushed: Check git status -sb shows tracking info
- Distinctive: line 226
If not pushed, ask user: "Branch is not on remote.
- Very specific: line 256
Ask questions one at a time using AskUserQuestion tool
- Distinctive: line 257
Use multiSelect: true only when multiple selections make sense
- Distinctive: line 261
Verify branch is pushed before creating PR
- Distinctive: line 265
Ask all questions at once (overwhelming)
- Distinctive: line 266
Use technical jargon in questions — keep it simple
- Distinctive: line 268
Create PR without user confirmation
- Distinctive: line 325
Highlight risks: Call out potential issues proactively
- Distinctive: line 327
Think about rollback: Always have a plan B
≈ “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
Autonomous Mode
When user says "answer yourself the questions", "responda você mesmo as perguntas", or any equivalent instruction to avoid interactive prompts:
- DO NOT call
AskUserQuestionat any step - Derive all answers from git context:
- PR Type: infer from commit message prefixes (
fix→ Bug fix,feat→ New feature,refactor→ Refactor, etc.) - Jira link: extract the ticket number from the branch name and resolve
{{company_name}}per the "Inferring company_name" section below - Additional links: default to "None"
- Checklist: mark "Tests run locally" and "Code reviewed line by line" as checked by default; omit items you cannot verify from context
- Impact: default to no special impacts unless commit messages indicate otherwise
- Reviewer notes: generate based on the most complex or risky changes detected in the diff
- PR Type: infer from commit message prefixes (
- Proceed directly to Step 5 (Generate PR Description) after completing Steps 1–2
- Still execute Step 6 (Create PR) normally
Inferring company_name
The Jira URL has the form https://{{company_name}}.atlassian.net/browse/{TICKET}. The company_name is the Atlassian workspace subdomain (e.g. acme for acme.atlassian.net). Resolve it in this order — stop at the first match:
- Cached value: read
~/.claude/.creating-pr-config(a simpleKEY=VALUEfile). IfJIRA_COMPANY=...is set, use it. - Repository hints: search the repo for an existing Atlassian reference:
If a single distinct subdomain appears, use it.grep -rEo '[a-z0-9-]+\.atlassian\.net' \ --include='*.md' --include='*.yml' --include='*.yaml' \ --include='*.json' --include='*.properties' . | head -5 - Recent PR descriptions:
gh pr list --state all --limit 20 --json body | grep -Eo '[a-z0-9-]+\.atlassian\.net'. If a single subdomain dominates, use it. - Ask the user once (interactive mode only): "What is your company's Atlassian subdomain? (e.g.
acmeforacme.atlassian.net)". After receiving an answer, persist it:mkdir -p ~/.claude && echo "JIRA_COMPANY={value}" >> ~/.claude/.creating-pr-config - Autonomous mode fallback: if no value can be inferred and questions are disabled, leave the placeholder
{{company_name}}literally in the PR body and warn the user in the post-creation summary so they can edit it.
Detecting base branches
This skill uses two base branches:
- Diff base (Step 1): the branch your feature branched off from. Detect via
gh repo view --json defaultBranchRef -q .defaultBranchRef.name, falling back to checkinggit rev-parse --verify mainthenmaster. - PR base (Step 6): the target branch for the PR. Default to the same default branch unless the repo follows gitflow (presence of a
developbranch — check withgit rev-parse --verify develop— in which case targetdevelop).
Never hardcode master or develop.
Workflow
Step 1: Gather Git Information
First, detect the diff base (see "Detecting base branches" above). Store it as $BASE.
- Get current branch name:
git branch --show-current - Get commit diff summary:
git diff $BASE...HEAD --stat - Get recent commit messages:
git log $BASE..HEAD --oneline - Check if changes are pushed:
git status -sb
Step 2: Analyze Changes
- Read the modified files to understand what was changed
- Identify the type of change (bug fix, feature, refactor, etc.)
- Extract key changes and their impact
- Determine affected components
Step 3: Interactive Questions
Use the AskUserQuestion tool to collect information. Ask questions one at a time for better UX.
Question 1: PR Type
Question: "What is the type of change for this PR?"
Options:
- Bug fix - A fix that resolves an issue without breaking existing functionality
- New feature - Functionality that adds a capability to the system
- Breaking change - A change that breaks backward compatibility
- Refactor - Code improvement without changing behavior
- Configuration - Changes to config, properties, Docker, etc.
- Performance - Performance improvement
- Documentation - Documentation-only changes
MultiSelect: falseQuestion 2: Jira Link Validation
Question: "Is the Jira link correct? https://{{company_name}}.atlassian.net/browse/{BRANCH-NAME}"
Options:
- Yes, it's correct
- No, I'll provide the correct link
MultiSelect: falseIf "No", ask follow-up question:
Question: "What is the correct Jira link?"
(Use free text from "Other" option)Question 3: Additional Links
Question: "Would you like to add related links? (Select all that apply)"
Options:
- Database ticket
- Security ticket
- Technical documentation
- Design/mockup link
- None
MultiSelect: trueFor each selected option (except "None"), ask:
Question: "Paste the link for: {link_type}"
(Use free text from "Other" option)Question 4: Development Checklist
Question: "Check the development checklist items that apply:"
Options:
- Tests run locally (unit, E2E, integration)
- Code reviewed line by line
- Logs are consistent (correct level)
- Sensitive data checked (no exposure)
- External variables created (secrets, feature flags)
- Required tickets executed (database, SQS, security)
MultiSelect: trueQuestion 5: Impact Sections
Question: "Are there special impacts to document?"
Options:
- Performance - There is a performance impact
- Compatibility - There are breaking changes
- Rollback - Non-standard rollback procedure
- No special impact
MultiSelect: trueFor each selected impact, ask for details:
Question: "Describe the {impact_type} impact:"
(Use free text from "Other" option)Question 6: Reviewer Notes
Question: "Would you like to add attention points for the reviewer?"
Options:
- Yes, I'll add specific points
- No, the PR is self-explanatory
MultiSelect: falseIf "Yes", ask:
Question: "Describe the attention points for the reviewer:"
(Use free text from "Other" option)Step 4: Generate PR Classification
Based on branch name and changes, generate classification in format:
{type}({scope}): {subject}Examples:
feat(PROJ-729): add support for store name in payment processingfix(PROJ-814): enhance error handling and observability in webhook processingrefactor(PROJ-901): simplify payment validation logicperf(PROJ-732): optimize database queries in order processing
type options:
feat- New functionalityfix- Bug fixdocs- Documentation onlystyle- Formatting, lintrefactor- Refactor without behavior changeperf- Performance improvementtest- Adding/fixing testschore- Maintenance, build, CI/CD tasks
Step 5: Generate PR Description
Read assets/pull_request_template.md for the canonical template structure, section format, and a complete filled-out example. The PR body MUST follow this template exactly.
Build the PR body following that template exactly. Fill each section with data collected from Steps 1-4:
- Classification:
{type}({scope}): {subject}from Step 4 - Description: Generate from git diff and commit messages. Be concise.
- Links and References: Jira link + any additional links from user answers
- Type of Change: Mark checkboxes based on user selection
- Checklist: Mark checkboxes based on user answers
- Impact and Considerations: Content from user answers, or defaults ("No impact", "100% compatible", "Safe rollback")
- For the Reviewer: Content from user answers or "N/A"
Append at the end:
## Modified Files
{output of git diff --stat}
### Technical Details
{analyze changed files and provide bullet list of key changes with line numbers}Step 6: Create PR
- Detect the PR base branch (see "Detecting base branches" above). Store it as
$PR_BASE. - Verify branch is pushed: Check
git status -sbshows tracking info - If not pushed, ask user: "Branch is not on remote. Push now?"
- If yes:
git push -u origin {branch-name} - Create PR:
gh pr create --base $PR_BASE --title "{title}" --body "{body}" - Return PR URL to user
Step 7: Post-Creation Summary
Provide clear summary:
✅ PR #{number} created successfully!
**URL:** {pr_url}
**Summary:**
- Type: {type}
- Files modified: {count}
- Checklist completed: {marked_items}/{total_items}
**Next steps:**
1. Review the PR on GitHub
2. Request appropriate reviewers
3. Wait for CI/CD to pass
4. Merge after approvalImportant Guidelines
DO:
- Ask questions one at a time using
AskUserQuestiontool - Use multiSelect: true only when multiple selections make sense
- Provide clear, concise option labels in English
- Generate smart defaults based on git history and code analysis
- Include file paths and line numbers in technical details
- Verify branch is pushed before creating PR
- Handle errors gracefully (e.g., branch not found, gh CLI not authenticated)
DON'T:
- Ask all questions at once (overwhelming)
- Use technical jargon in questions — keep it simple
- Skip analysis of changed files
- Create PR without user confirmation
- Include excessive verbosity in descriptions (the template warns against it)
Error Handling
Branch not pushed:
⚠️ Branch {branch-name} is not on remote.
Push now? (git push -u origin {branch-name})No changes committed:
❌ No commits to create a PR.
Please commit your changes first.gh CLI not authenticated:
❌ GitHub CLI is not authenticated.
Run: gh auth loginPR already exists:
ℹ️ A PR already exists for this branch: {existing_pr_url}
Would you like to update its description?Example Usage
User: /creating-pull-request or "Create a PR for this branch"
Skill Flow:
- Analyzes branch PROJ-814
- Identifies changes in 2 files (error handling)
- Asks PR type → User selects "Bug fix"
- Validates Jira link → User confirms
- Asks for additional links → User selects "None"
- Asks checklist → User marks 5/6 items
- Asks impacts → User selects "No special impact"
- Asks reviewer notes → User adds notes
- Generates classification:
fix(PROJ-814): enhance error handling - Creates PR with full description
- Returns PR URL #39
Tips for Better PRs
- Be concise: The template warns against excessive verbosity
- Focus on why: Explain motivation, not just what changed
- Add context: Help reviewers understand business impact
- Highlight risks: Call out potential issues proactively
- Test thoroughly: Mark checklist items honestly
- Think about rollback: Always have a plan B
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.

