gh-pr

Originally fromakiojin/skills
Installation
SKILL.md

GH PR

Overview

Create or update GitHub Pull Requests with the gh CLI using a detailed body template and strict same-branch rules.

Decision rules (must follow)

  1. Do not create or switch branches. Always use the current branch as the PR head.
  2. Check for an existing PR for the current head branch.
    • gh pr list --head <head> --state all --json number,state,mergedAt,updatedAt,url,title,mergeCommit
  3. If no PR exists → create a new PR.
  4. If any PR exists and is NOT merged (mergedAt is null) → push only and finish (do not create a new PR).
    • This applies to OPEN or CLOSED (unmerged) PRs.
    • Only update title/body/labels if the user explicitly requests changes.
  5. If all PRs for the head are merged → check for post-merge commits (see below).
  6. If multiple PRs exist for the head → use the most recently updated PR for reporting, but the create vs push decision is based on mergedAt.

Post-merge commit check (critical)

Related skills

More from akiojin/llmlb

Installs
15
Repository
akiojin/llmlb
GitHub Stars
6
First Seen
Jan 29, 2026