# Pr Workflow

> Use when creating PRs, managing stacked PRs, or completing feature branches.

- Skill: `erikpr1994/pr-workflow` (Agent Skill)
- Install (CLI): `npx skillmds@latest add erikpr1994/pr-workflow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/erikpr1994/pr-workflow/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: erikpr1994 (https://skillmd.com/u/erikpr1994)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/erikpr1994/pr-workflow

---


# PR Workflow

**Goal:** Clean PRs that are easy to review and merge.

## Workflow

```
PREPARE -> Verify tests, clean commits
PUSH    -> git push -u origin branch
CREATE  -> gh pr create with description
RESPOND -> Address review feedback
MERGE   -> gh pr merge --squash
CLEANUP -> Delete branch, pull main
```

## Create PR

```bash
# Prepare
npm test && npm run build && git status

# Push and create
git push -u origin feature/auth
gh pr create --title "Add authentication" --body "$(cat <<'EOF'
## Summary
- Add login/logout endpoints
- Implement JWT handling

## Test Plan
- [ ] Login with valid credentials
- [ ] Protected routes require token
EOF
)"
```

## Respond to Review

| Severity | Action |
|----------|--------|
| Critical | Fix immediately |
| Important | Fix before approval |
| Minor | Fix or discuss |

## Merge and Cleanup

```bash
gh pr merge --squash
git checkout main && git pull
git branch -d feature/auth
```

## Stacked PRs

```bash
# PR 1: Base
git checkout -b feature/auth-db && gh pr create --base main

# PR 2: Depends on PR 1
git checkout -b feature/auth-api && gh pr create --base feature/auth-db

# Merge bottom-up, rebase each after merge
```

## Decision Criteria

| Situation | Action |
|-----------|--------|
| Tests failing | Don't create. Fix first. |
| Large change | Split into stacked PRs |
| Approved + CI green | Merge immediately |

**Pairs with:** code-review, commit-discipline, verification

