{"id":"94e2a073-dd75-459d-bc95-36dee084f220","shortId":"cfpGk3","kind":"skill","title":"create-pr","tagline":"Use when creating a new GitHub pull request, opening a PR for the current branch, or when another skill (like ship-it) needs a PR created for a branch that does not have one yet.","description":"# Create PR\n\nOpen a new GitHub pull request for the current branch using the repo's PR template if one exists. Defaults to `--draft`.\n\n## 1. Preconditions\n\n- Current branch must be pushed to a remote. If `git rev-parse --abbrev-ref --symbolic-full-name @{u}` fails, run `git push -u origin HEAD` first.\n- Skip creation if a PR already exists for the branch: `gh pr view --json number 2>/dev/null` returns 0. In that case the caller likely wants `gh pr edit` instead.\n\n## 2. Detect PR template\n\nCheck for a template in this order and use the first match:\n\n1. `.github/pull_request_template.md`\n2. `.github/PULL_REQUEST_TEMPLATE.md`\n3. `docs/pull_request_template.md`\n4. `pull_request_template.md` (repo root)\n5. `.github/PULL_REQUEST_TEMPLATE/*.md`. If multiple, prefer one matching the dominant commit type (`feature.md` or `feat-*` for `feat:` commits, `bugfix.md` for `fix:`, etc.). If still ambiguous, ask the user which to use.\n\nFilename matching is case-insensitive on macOS but case-sensitive on Linux; check both common cases.\n\nIf none found, use the standard body in step 4.\n\n## 3. Determine title\n\nUse [Conventional Commits](https://www.conventionalcommits.org/) format derived from the branch's commits (`git log <base>..HEAD`):\n\n- Single commit: use its subject line verbatim.\n- Multiple commits: synthesize one conventional-commit-style title covering the change. Keep under 72 chars.\n\n## 4. Generate body\n\nApply `terse-output` to the body: bullets over prose, no filler (\"just\", \"really\"), no hedge openers (\"I noticed that…\", \"You might want to consider…\"). Lead with what changed and why; skip implementation play-by-play.\n\n\n**With template**: read the template file and fill its sections from the diff (`git diff <base>...HEAD`) and commit history. Preserve the template's structure, headings, comments, and checklists exactly. Leave checklist items unchecked unless the work demonstrably satisfies them. For sections that do not apply, mark them `N/A` only if the template requires a value; otherwise leave the section body empty.\n\nDo not strip HTML comments from the template (they are often instructions to the PR author and may be intentionally rendered as hidden guidance).\n\n**Without template**, use this body:\n\n```markdown\n## Summary\n\n<1–3 bullets covering what changed and why>\n\n## Test plan\n\n- [ ] <specific verification steps>\n```\n\n## 5. Confirm and create\n\nPer [no-post-without-confirmation](../../rules/no-post-without-confirmation.md), present the title and body to the user and wait for explicit approval before creating.\n\nAfter approval, write the body to a temp file (avoids shell-escaping issues with multiline markdown) and create the PR:\n\n```bash\ngh pr create --draft --title \"<title>\" --body-file /tmp/pr-body.md\n```\n\nAlways pass `--draft` per [draft-prs](../../rules/draft-prs.md). Only omit `--draft` if the user explicitly asked for a ready/non-draft PR.\n\nPrint the resulting PR URL.","tags":["create","skill","issue","paultyng","agent-skills","ai-tools","claude-code","cursor","dotfiles"],"capabilities":["skill","source-paultyng","skill-create-pr","topic-agent-skills","topic-ai-tools","topic-claude-code","topic-cursor","topic-dotfiles"],"categories":["skill-issue"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/paultyng/skill-issue/create-pr","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add paultyng/skill-issue","source_repo":"https://github.com/paultyng/skill-issue","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (2,922 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:09:00.524Z","embedding":null,"createdAt":"2026-05-18T13:21:25.342Z","updatedAt":"2026-05-18T19:09:00.524Z","lastSeenAt":"2026-05-18T19:09:00.524Z","tsv":"'/)':218 '/../rules/draft-prs.md':458 '/../rules/no-post-without-confirmation.md':404 '/dev/null':111 '/tmp/pr-body.md':450 '0':113 '1':64,141,384 '2':110,125,143 '3':145,210,385 '4':147,209,252 '5':151,394 '72':250 'abbrev':80 'abbrev-ref':79 'alreadi':100 'alway':451 'ambigu':175 'anoth':21 'appli':255,336 'approv':417,421 'ask':176,466 'author':368 'avoid':429 'bash':441 'bodi':206,254,261,351,381,409,424,448 'body-fil':447 'branch':18,33,51,67,104,223 'bugfix.md':169 'bullet':262,386 'caller':118 'case':116,186,192,199 'case-insensit':185 'case-sensit':191 'chang':247,283,389 'char':251 'check':129,196 'checklist':319,322 'comment':317,357 'commit':161,168,215,225,230,237,242,309 'common':198 'confirm':395,403 'consid':279 'convent':214,241 'conventional-commit-styl':240 'cover':245,387 'creat':2,6,30,40,397,419,438,444 'create-pr':1 'creation':96 'current':17,50,66 'default':61 'demonstr':328 'deriv':220 'detect':126 'determin':211 'diff':304,306 'docs/pull_request_template.md':146 'domin':160 'draft':63,445,453,456,461 'draft-pr':455 'edit':123 'empti':352 'escap':432 'etc':172 'exact':320 'exist':60,101 'explicit':416,465 'fail':87 'feat':165,167 'feature.md':163 'file':297,428,449 'filenam':182 'fill':299 'filler':266 'first':94,139 'fix':171 'format':219 'found':202 'full':84 'generat':253 'gh':105,121,442 'git':75,89,226,305 'github':9,45 'github/pull_request_template':152 'github/pull_request_template.md':142,144 'guidanc':376 'head':93,228,307,316 'hedg':270 'hidden':375 'histori':310 'html':356 'implement':287 'insensit':187 'instead':124 'instruct':364 'intent':372 'issu':433 'item':323 'json':108 'keep':248 'lead':280 'leav':321,348 'like':23,119 'line':234 'linux':195 'log':227 'maco':189 'mark':337 'markdown':382,436 'match':140,158,183 'may':370 'md':153 'might':276 'multilin':435 'multipl':155,236 'must':68 'n/a':339 'name':85 'need':27 'new':8,44 'no-post-without-confirm':399 'none':201 'notic':273 'number':109 'often':363 'omit':460 'one':38,59,157,239 'open':12,42,271 'order':135 'origin':92 'otherwis':347 'output':258 'pars':78 'pass':452 'per':398,454 'plan':393 'play':289,291 'play-by-play':288 'post':401 'pr':3,14,29,41,56,99,106,122,127,367,440,443,470,474 'precondit':65 'prefer':156 'present':405 'preserv':311 'print':471 'prose':264 'prs':457 'pull':10,46 'pull_request_template.md':148 'push':70,90 'read':294 'ready/non-draft':469 'realli':268 'ref':81 'remot':73 'render':373 'repo':54,149 'request':11,47 'requir':344 'result':473 'return':112 'rev':77 'rev-pars':76 'root':150 'run':88 'satisfi':329 'section':301,332,350 'sensit':193 'shell':431 'shell-escap':430 'ship':25 'ship-it':24 'singl':229 'skill':22 'skill-create-pr' 'skip':95,286 'source-paultyng' 'standard':205 'step':208 'still':174 'strip':355 'structur':315 'style':243 'subject':233 'summari':383 'symbol':83 'symbolic-full-nam':82 'synthes':238 'temp':427 'templat':57,128,132,293,296,313,343,360,378 'ters':257 'terse-output':256 'test':392 'titl':212,244,407,446 'topic-agent-skills' 'topic-ai-tools' 'topic-claude-code' 'topic-cursor' 'topic-dotfiles' 'type':162 'u':86,91 'uncheck':324 'unless':325 'url':475 'use':4,52,137,181,203,213,231,379 'user':178,412,464 'valu':346 'verbatim':235 'view':107 'wait':414 'want':120,277 'without':377,402 'work':327 'write':422 'www.conventionalcommits.org':217 'www.conventionalcommits.org/)':216 'yet':39","prices":[{"id":"e79ffbf0-a4c7-4e3a-a37c-cf964c873e68","listingId":"94e2a073-dd75-459d-bc95-36dee084f220","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"paultyng","category":"skill-issue","install_from":"skills.sh"},"createdAt":"2026-05-18T13:21:25.342Z"}],"sources":[{"listingId":"94e2a073-dd75-459d-bc95-36dee084f220","source":"github","sourceId":"paultyng/skill-issue/create-pr","sourceUrl":"https://github.com/paultyng/skill-issue/tree/main/skills/create-pr","isPrimary":false,"firstSeenAt":"2026-05-18T13:21:25.342Z","lastSeenAt":"2026-05-18T19:09:00.524Z"}],"details":{"listingId":"94e2a073-dd75-459d-bc95-36dee084f220","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"paultyng","slug":"create-pr","github":{"repo":"paultyng/skill-issue","stars":8,"topics":["agent-skills","ai-tools","claude-code","cursor","dotfiles"],"license":"mit","html_url":"https://github.com/paultyng/skill-issue","pushed_at":"2026-05-18T18:26:54Z","description":"Personal Claude Code / Cursor agent skills, rules, and config","skill_md_sha":"bfd845a8f7913d664070bd5bcb039d90b4f23d92","skill_md_path":"skills/create-pr/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/paultyng/skill-issue/tree/main/skills/create-pr"},"layout":"multi","source":"github","category":"skill-issue","frontmatter":{"name":"create-pr","description":"Use when creating a new GitHub pull request, opening a PR for the current branch, or when another skill (like ship-it) needs a PR created for a branch that does not have one yet."},"skills_sh_url":"https://skills.sh/paultyng/skill-issue/create-pr"},"updatedAt":"2026-05-18T19:09:00.524Z"}}