githubprlisted
Install: claude install-skill SoluDevTech/ai-driven
# GitHub PR Skill
Full lifecycle: branch → push → PR → CI → merge.
## 1. Branch naming convention
```
<JIRA-ID>/<simple-description>
```
Rules:
- `JIRA-ID`: exact ticket ID, uppercase — e.g. `PROJ-123`
- `simple-description`: 2–5 words, kebab-case, lowercase, no articles — e.g. `add-user-auth`
- Separator: `/`
Valid examples:
```
PROJ-123/add-user-auth
PROJ-456/fix-null-pointer-login
PROJ-789/update-dependencies
```
Create and switch to the branch:
```bash
git checkout main && git pull origin main
git checkout -b PROJ-123/add-user-auth
```
## 2. Create the PR
→ Load `references/pr-template.md` for the `gh pr create` command, the PR body template, and the full agent flow script.
> Always open as **draft** by default. Mark as "ready for review" only once CI is green.
## 3. Check CI status
```bash
# Quick overview
gh pr checks <PR_NUMBER>
# JSON output for agent parsing
gh pr checks <PR_NUMBER> --json name,state,conclusion
```
Possible states:
- `SUCCESS` → ✅
- `IN_PROGRESS` / `QUEUED` → ⏳ wait
- `FAILURE` → ❌ stop, investigate
## 4. CI polling (agent script)
→ Load `references/ci-polling-script.md` for `wait-ci.sh` (polls `gh pr checks`, exit codes: 0=green, 1=red, 3=timeout).
## 5. Merge
Two distinct scenarios — **load `references/merge-commands.md` before merging**:
- **A. Feature → `dev`** (or `main` if no `dev`): `gh pr merge --rebase --delete-branch`
- **B. `dev` → `main`**: **NEVER use `gh pr merge`**. Use CLI `git merge --ff-only dev` + `git push origin