Stats
Actions
Tags
From pactkit
Pushes current branch if needed and creates GitHub pull request via gh CLI. Generates title/body from specs and tests, previews for user confirmation, skips if on main or PR exists.
How this command is triggered — by the user, by Claude, or both
Slash command
/pactkit:project-prThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# 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 againnpx claudepluginhub pactkit/claude-code-plugin --plugin pactkit