← ClaudeAtlas

gh-create-prlisted

Create a feature branch if on the default branch, push commits, open a PR via gh CLI, and watch CI. Ask the user to run /commit first if the tree is dirty. Gate plan and relay files on the branch (Keep or Drop) and stop without deleting or committing when any are dropped. Args: none required. Use when the user asks to create a PR, open a pull request, push and PR, or mentions /gh-create-pr.
nigelng/nng-kit · ★ 1 · AI & Automation · score 77
Install: claude install-skill nigelng/nng-kit
# gh-create-pr Create a pull request for the current changes: ensure a feature branch, push, open the PR, then watch CI. Does not commit and does not delete plan or relay files. Ask the user to run `/commit` first if the tree is dirty. If they Drop a plan or Discard a relay file, print the commands, ask them to commit, and stop. ## Preconditions - User explicitly asked to create a PR (this skill does not push or open PRs on its own initiative). - Use `gh` for all GitHub operations. If `gh` is not available, inform the user and stop. ## Workflow ### 1. Inspect (parallel) `<skill-dir>` is the absolute directory of this `SKILL.md`. Run: ```bash bash <skill-dir>/../commit/scripts/git-preflight.sh state git log -5 --oneline gh pr view --json url -q .url 2>/dev/null || echo "no-pr" ``` Use `default=` as `<default>` everywhere below. Do **not** hardcode `main` / `origin/main`. If `default=` is empty, stop and ask — do not guess. `state` fetched `origin`; on stderr `WARN: git fetch failed`, stop (stale `origin`). `clean=`, `branch=`, `upstream=`, `ahead=`, and `behind=` are against that upstream. If `gh pr view` returned a URL, a PR already exists for this branch — report that URL and skip create later (still may push / watch CI as needed). Compare against the remote default (not a possibly stale local ref): ```bash git log --oneline origin/<default>...HEAD git diff origin/<default>...HEAD ``` If `clean=yes` **and** that log is empty, inform the user and stop. ### 2. Com