pr-standardslisted
Install: claude install-skill JacobPEvans/claude-code-plugins
# PR & Issue Standards
## PR Creation Guards
Run these checks in order before `gh pr create`:
**Guard 1 — Check for merged twin** (prevents zombie PRs):
```bash
gh pr list --repo JacobPEvans/<repo> --state merged --head <branch>
```
If merged PR exists AND `git log origin/main..HEAD --oneline` is empty:
STOP. Remove stale worktree.
**Guard 2 — Check for existing open PR** (prevents duplicates):
```bash
gh pr list --repo JacobPEvans/<repo> --state open --head <branch>
```
If open PR exists: `git push origin <branch>` instead of creating new PR.
**Guard 3 — Find related issues** (enforces linking):
```bash
gh issue list --repo JacobPEvans/<repo> --state open --search "<keywords>"
```
Include `Closes #X` or `Related to #X` in PR body. After creation:
`gh issue comment <num> --body "Implementation: #<pr>"`.
**Guard 4 — Validate branch has commits**:
```bash
git log origin/main..HEAD --oneline
```
If empty: no new work. Clean up instead.
## Workaround Classification
When reviewing a PR, distinguish a real fix from a workaround. Workarounds
become permanent tech debt if merged without acknowledgement. Four red flags:
1. **No upstream issue cited**: PR body does not name a specific upstream
bug, version, or repository where the underlying problem lives.
2. **Phantom remediation mechanism**: PR body claims an automated "sync
workflow", "auto-update", or "re-trigger" mechanism — verify with
`grep -r <name> .` in the repo; if zero matches, the mechanism does n