Create pr
Shared AI agent skills
npx -y skills add flurdy/agent-skills --skill create-prAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Create a pull request from the current branch following project conventions. Uses the branch name to find the Jira ticket, generates a PR with the standard template, pushes to origin, and closes the associated bead.
SKILL.md
4.1 KB, as published. Nobody here has run it
Create Pull Request
Create a pull request from the current branch using project conventions.
Usage
/create-pr
Instructions
1. Gather Context
Run these commands to understand the current state:
# Get current branch name
git branch --show-current
# Check if branch needs pushing
git status -sb
# Get commits on this branch not on main
git log main..HEAD --oneline
# Get diff summary against main
git diff main...HEAD --stat
2. Extract Jira Ticket from Branch Name
Parse the branch name to find the ticket number:
- Pattern:
{type}/{TICKET-NUMBER}-{description} - Example:
feat/AB-123-sanitize-input→AB-123 - Ticket format: 2-4 uppercase letters, dash, numbers (e.g.,
AB-123,SSP-456)
If no ticket found, ask the user.
3. Look Up Jira Ticket
Use the /jira-ticket skill or the Jira MCP tools directly to get ticket details for the PR description:
mcp__jira__jira_get with:
path: /rest/api/3/issue/{ticketNumber}
jq: "{key: key, summary: fields.summary, description: fields.description}"
4. Generate PR Title
Use conventional commit format based on branch prefix:
| Branch Prefix | PR Title Format |
|---|---|
feat/ | feat(<scope>): <description> |
fix/ | fix(<scope>): <description> |
refactor/ | refactor(<scope>): <description> |
chore/ | chore(<scope>): <description> |
docs/ | docs(<scope>): <description> |
perf/ | perf(<scope>): <description> |
Infer the scope from changed files (e.g., offers-cms, web, api).
5. Generate PR Body
Analyze the actual code changes (use git diff main...HEAD) to write a meaningful description.
Check for a repo-specific PR template at .github/pull-request-template.md or .github/pull_request_template.md. If found, use that format. If not, ask user for confirmation on generating the body ourselves.
6. Push and Create PR
# Push branch with upstream tracking
git push -u origin {branch-name}
Create the PR targeting main:
~/.agents/skills/create-pr/scripts/gh-pr-create.sh --base main --title "{title}" --body "$(cat <<'EOF'
{body}
EOF
)"
If the script is unavailable, fall back to:
gh pr create --base main --title "{title}" --body "$(cat <<'EOF'
{body}
EOF
)"
7. Close the Associated Bead
Once the PR is created, close the bead for this work — this is the preferred close point in a PR workflow (the commit was done in /complete-task, which deliberately left the bead open for this step). Reopen later if review demands major changes.
Skip this whole step silently if bd is unavailable or the repo has no beads database.
-
Find the in-progress bead for this work:
bd list --status=in_progressMatch by the Jira key from §2 appearing in the bead title/description, or an obvious 1:1 correspondence to the branch.
-
If exactly one bead matches, close it, referencing the PR:
bd close <bead-id> --reason="PR #<number> created: <pr-title>" -
If multiple beads plausibly match, ask the user which (if any) to close with
AskUserQuestion. If none match, skip silently — don't invent one. -
Tell the user the bead was closed and how to reopen it if review requires major changes:
bd update <bead-id> --status=in_progress
Note: /ready-to-merge already closes a bead only "if still in_progress" post-merge, so closing here is compatible — by merge time it's normally already closed and that step no-ops.
8. Return Result
Output the PR URL so the user can view it, and note the bead that was closed (or left open, if none matched).