11---
22description : Create a PR on GitHub for the current branch
3- argument_hint : " [branch] [--dry] [--draft]"
3+ argument_hint : " [branch] [--dry] [--draft] [-- instructions] "
44allowed_tools : Bash, Read, Glob, Grep, Write, AskUserQuestion, mcp__github__create_pull_request, mcp__github__list_pull_requests, mcp__github__get_file_contents, mcp__github__issue_read
55---
66
@@ -12,6 +12,8 @@ Create a PR on GitHub using the `gh` CLI for the currently checked-out branch.
1212- ` /pr --dry ` - Generate description only, save to ` .ai/ `
1313- ` /pr --draft ` - Create as draft PR
1414- ` /pr develop --draft ` - Draft PR against non-default branch
15+ - ` /pr -- focus on commit abc123 ` - With custom instructions for description
16+ - ` /pr master --draft -- describe migration test in QA ` - Combined with all options
1517
1618## Steps
1719
@@ -24,6 +26,7 @@ Run `gh pr view --json number,url 2>/dev/null` to check if a PR already exists f
2426- ` --dry ` : Skip PR creation, only generate and save description
2527- ` --draft ` : Create PR as draft
2628- First non-flag argument: base branch (default: auto-detected, see Step 2.5)
29+ - Everything after ` -- ` separator (if present): Custom instructions for PR generation
2730- ** If no flags provided** : Use ` AskUserQuestion ` to prompt user:
2831 - Open PR (create and publish)
2932 - Draft PR (create as draft)
@@ -42,6 +45,10 @@ If no base branch argument provided, detect the repo's default branch:
4245- Fetch 10 most recent PRs (open or closed) from the extracted repo for writing style reference
4346- Run ` git log $base..HEAD --oneline ` for commit messages
4447- Run ` git diff $base...HEAD --stat ` for understanding scope of changes
48+ - ** If custom instructions provided:**
49+ - If instructions reference a specific commit SHA (pattern like ` commit [a-f0-9]{7,40} ` ):
50+ - Read full commit message: ` git log -1 --format='%B' <commit_sha> `
51+ - Store instructions for use in description generation
4552
4653### 4. Extract Linked Issues
4754Scan commits for issue references:
@@ -102,6 +109,14 @@ This PR adds support for...
102109- Minimize code and file references like `TheClassName` or `someFunctionName`, `thisFileName.ext`
103110- Exception: for refactoring PRs (1:10 ratio of functionality to code changes), more technical detail is ok
104111
112+ **Custom Instructions (if provided):**
113+ When the user provides custom instructions after `--`:
114+ - Parse any referenced commit SHAs and read their full messages
115+ - Focus the description content on areas the user emphasizes
116+ - Structure QA Notes according to user's specific testing instructions
117+ - Custom instructions take priority over default generation rules for sections they address
118+ - Preserve exact testing steps provided by the user (don't summarize or omit details)
119+
105120**QA Notes / Testing Scenarios:**
106121- Structure with numbered headings and steps
107122- Make steps easily referenceable
0 commit comments