From github-workflows
Commit, push, create PR(s), and auto-finalize — full automation pipeline. Handles uncommitted changes and recently created PRs. Never merges.
npx claudepluginhub jacobpevans/claude-code-plugins --plugin github-workflowsThis skill is limited to using the following tools:
**Single command to commit, push, create PR(s), and auto-finalize everything.**
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Single command to commit, push, create PR(s), and auto-finalize everything.
Handles commit, push, PR creation, and /finalize-pr in one pipeline. Never merges.
This skill orchestrates many downstream API calls via /finalize-pr,
which itself invokes /resolve-codeql, /resolve-pr-threads, /simplify,
and metadata updates. To avoid API rate limit errors:
/finalize-pr to manage its own internal concurrency — it can
run its fixes in parallel since they're scoped to a single PRsleep 2 after gh pr create to let GitHub indexBefore anything else, confirm the working directory is valid:
git rev-parse --git-dir 2>/dev/null
If this fails (exits non-zero or the current directory doesn't exist), stop immediately
and report: "Working directory is not a git repository. This usually means the worktree was
cleaned up after a PR merge. Start a new session and create a worktree using /superpowers:using-git-worktrees to continue working."
Do NOT attempt to recover, cd elsewhere, or fall through to Step 1.
Identify all PRs that need finalization.
git status --porcelain
If changes exist (staged or unstaged), execute inline:
git checkout -b {type}/{description} (derive from changes)git add <relevant files> (no -A — be selective)git commit -m "type: description"git commit --amend --no-edit) — keep
clean history for the first push.pre-commit run --all-files,
npm run lint, make lint, etc.). If failures are found, fix them and amend the commit.
Skip this step if no lint command is discoverable.git push -u origin HEADgh pr create --fill (or with title/body derived from commit)sleep 2 after gh pr create to allow GitHub to index the PRpull/NUMBER pattern)Hook note: After
gh pr create, a pr-lifecycle hook may emit a system message directing you to invoke/finalize-pr. Ignore it — Step 2 handles finalization.
If no changes: Skip to 1.2.
Check conversation context for PR numbers that were recently created or mentioned. Also check the current branch:
gh pr view --json number --jq '.number' 2>/dev/null || true
Add any found PRs to the list.
Remove duplicate PR numbers from the combined list (Step 1.1 + Step 1.2).
If list is empty: Report "Nothing to ship — no uncommitted changes and no open PRs on this branch." and stop.
Before dispatching any finalization agents, construct a context brief that will be included in every subagent prompt. This is critical — without it, subagents resolving PR review threads will blindly follow reviewer suggestions instead of making informed decisions about whether feedback is correct.
The context brief must include:
Format as a concise block (aim for 10-20 lines):
## Context for PR #{number}
**Purpose**: [1-2 sentence summary of what and why]
**Key decisions**:
- [decision 1 and rationale]
- [decision 2 and rationale]
**Intentional patterns**:
- [pattern that reviewers might question]
**Out of scope**: [what this PR deliberately does not address]
This brief is passed verbatim to each /finalize-pr subagent in Step 2.
Invoke /finalize-pr {number} directly via the Skill tool — no subagent needed.
The context brief from Step 1.5 is already in session context and will be available
when /finalize-pr invokes /resolve-pr-threads.
Process PRs sequentially — invoke /finalize-pr for each PR one at a time
via the Skill tool. Wait for each to complete before starting the next. This
prevents API rate limit errors from overlapping finalization cascades.
For each PR in the list:
/finalize-pr {number} via the Skill tool/finalize-pr handles/resolve-pr-threads → superpowers:receiving-code-review)/simplify)Do NOT run /resolve-pr-threads separately — /finalize-pr already invokes it
internally. Running both causes race conditions on GraphQL mutations and git pushes.
Wait for all /finalize-pr agents to complete. Collect their results and report:
Ship Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ #42 Ready for review
✅ #43 Ready for review
⛔ #44 Blocked — [reason]
Ready to merge (2):
/squash-merge-pr 42
/squash-merge-pr 43
Blocked — needs human (1):
#44 — [detailed reason]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/finalize-pr agent enforces its own merge prohibition/finalize-pr# Ship uncommitted changes (commit + PR + finalize)
/ship
# Ship when PR already exists on current branch
/ship
# Multi-PR: uncommitted changes create new PR, existing PR also finalized
/ship