npx claudepluginhub pactkit/claude-code-plugin --plugin pactkit# Command: PR (v1.4.0)
- **Usage**: `/project-pr`
- **Agent**: Repo Maintainer
## ๐ง Phase 0: Pre-flight Check
1. **Branch Check**:
- Run `git branch --show-current` to get current branch name
- If branch is `main` or `master`: print "Skipping PR: working on main branch" โ STOP
2. **Existing PR Check**:
- Run `gh pr list --head <branch> --state open --json number` to check for existing PR
- If PR exists: print "PR already open: <URL>" โ STOP
- If `gh` CLI unavailable: print "โ ๏ธ gh CLI not available โ cannot create PR" โ STOP
3. **Story Detection**: Infer active Story.../project-prgit branch --show-current to get current branch namemain or master: print "Skipping PR: working on main branch" โ STOPgh pr list --head <branch> --state open --json number to check for existing PRgh CLI unavailable: print "โ ๏ธ gh CLI not available โ cannot create PR" โ STOPfeature/STORY-051-desc โ STORY-051).git push -u origin <branch>.{type}({scope}): {spec_title}
type: feat for STORY, fix for BUG/HOTFIXscope: infer from primary modified directoryspec_title: extract from # {ID}: {Title} heading in Spec (strip the ID prefix)## Summary
{1-3 sentences from Spec ## Background}
## Changes
{R1, R2, ... from Spec ## Requirements, one bullet each with MUST/SHOULD/MAY}
## Acceptance Criteria
{AC1, AC2, ... as checklist items โ mark [x] if a test for it passed}
## Test Results
- Unit: {N} passed, {N} failed
- E2E: {N} passed, {N} failed
## Spec
- [{STORY_ID}](docs/specs/{STORY_ID}.md)
๐ค Generated with [Claude Code](https://claude.com/claude-code)
yes โ execute gh pr create --title "..." --body "..."no โ skipedit โ accept user feedback, regenerate, ask again