/github-workflows:shipfrom github-workflows
Commit, push, create PR(s), and auto-finalize — full automation pipeline. Handles uncommitted changes and recently created PRs.
Ships in github-workflows. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Single command to commit, push, create PR(s), and auto-finalize everything.
Handles commit, push, PR creation, and /finalize-pr in one pipeline.
⛔ NOT RESUMABLE — run from Step 0 on every
/shipinvocation. Do not refer to "the PR I just finalized" or "already verified" from any earlier message in this session — those are stale snapshots. The world changes between invocations: CodeQL completes async, required reviewers post async, Renovate force-pushes, branch protection re-evaluates. Re-run everything from Step 0.
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:
Claim check (session-coordination rule): before creating a new PR, search for a competing claim — an open PR (draft or ready) from another session covering the same issue or files:
gh pr list --state open --json number,title,isDraft,headRefName,body
If one exists, do NOT create a duplicate: stop, report the competing PR, and offer consolidation (comment with your session id; earliest claim wins). Otherwise continue.
If on the default branch, follow the
Git Town rule
to create {type}/{sid8}-{description} (derive from changes; {sid8} = session id per session-coordination).
Stage changes: git add <relevant files> (no -A — be selective)
Commit with conventional commit message: git commit -m "type: description"
Simplify: Invoke /simplify on all changes in the commit. If /simplify produces
changes, stage them and amend the commit (git commit --amend --no-edit) — keep
clean history for the first push.
Validate locally: Run project linters/tests if available (check for 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.
Push: git push -u origin HEAD
Create a PR: gh pr create --fill (or with title/body derived from the commit).
Use a draft if it must wait for a person. Include the
session id (<runtime>-<host>-<8hex>) in the PR body. The org pr-automerge
workflow arms non-draft PRs; agents never arm auto-merge.
It uses a merge commit for PRs into main on git-flow repos and squash otherwise.
Never assume the PR merged;
verify its state before reporting.
Pacing: Run sleep 2 after gh pr create to allow GitHub to index the PR
Capture PR number from output (look for pull/NUMBER pattern)
Add it to the PR list
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 #<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 <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.
[!IMPORTANT] If the repo uses Git Flow (default branch is
develop), once the feature PR is merged intodevelopand validated, you must drive thepromote/<version>promotion intomainusing/promote-release. The shared promotion workflow opens that PR automatically on the next release commit or push tomain; never create adevelop-headed PR intomainby hand. Add a reminder to the active session checklist to perform this merge before completing the session.
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 <PR_NUMBER> via the Skill toolClaude project route: run one project thread per repository instead of the local fan-out; see the claude-projects rule.
/finalize-pr handles/resolve-pr-threads → /agentops:research)/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.
Before printing any PR as "Ready to merge": re-verify live state.
Subagent self-reports from Step 2 are snapshots — not current truth. For each PR
that Step 2 reported as ready, run both gates from /gh-cli-patterns. For gate 1,
use the canonical PR-readiness gate
and PR feedback ledger,
including zero unaddressed feedback items and every required status context reported.
If a context is absent, report required check never reported: <context> and
follow github-actions-silent-failures.
Run gate 2 separately because CodeQL is not included in statusCheckRollup.
mergeStateStatus MUST be CLEAN or HAS_HOOKS)0 — NOT included in statusCheckRollup)If either gate fails, re-invoke /finalize-pr <PR_NUMBER>, wait for completion,
then re-run both gates. Only list a PR as "Ready to merge" after both gates pass.
After both gates pass for a PR, record the evidence (commit status +
validated:* label mirror) so a later session can trust the change
without re-verifying (refs dryvist/ai-assistant-instructions#749). The
commit status is machine truth, bound to the exact head SHA; the label is
only a human-visible mirror and goes stale on new commits. Exact commands:
references/validation-evidence.md.
Then emit the Canonical PR Status Summary as defined in /gh-cli-patterns, titled
Ship Summary. Affected repos = current repo. Fetch each PR's full URL via:
gh pr view <PR_NUMBER> --json url --jq '.url'
Section 1 lists the PRs targeted by this /ship invocation. Section 2 lists all open
PRs in the current repo (including unrelated ones).
# 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
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jacobpevans-ai/claude-code-plugins --plugin github-workflowsOther plugins' skills for the same job
18 skills in this plugin
/finalize-prAutomatically finalize pull requests for merge by resolving CodeQL violations, PR feedback, merge conflicts, and CI failures. Handles single PR (current branch or by number), all open PRs in the repo, or all open PRs across the org. Includes bot-authored PRs in all modes./gh-cli-patternsCanonical reference for all gh CLI command shapes used by skills in this plugin. Defines the placeholder convention, default-branch (trunk vs git-flow) detection, allowed --json fields, GraphQL fallback rules, -f/-F/--raw-field flag semantics, the PR-readiness gate, required status contexts, the feedback ledger, code-scanning alert query, review-thread fetch/count/resolve mutations, and heredoc bodies. Prevents Unknown JSON field errors and divergent query shapes./