git-pr-ops-core
Coordinates the gated review, preparation, and merge process for GitHub pull requests.
Install
mkdir -p .claude/skills/git-pr-ops-core && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11576" && unzip -o skill.zip -d .claude/skills/git-pr-ops-core && rm skill.zipInstalls to .claude/skills/git-pr-ops-core
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Shared reference for the git-pr-ops cluster: the gated review→prepare→merge pipeline, the `.local/` artifact handoff (review.json findings), head-SHA pinning, the push/merge safety rules (force-with-lease, no auto-merge, never push main), and the finding-severity contract. USE WHEN preparing or merging a GitHub PR, resolving review findings, or wiring the issue→PR flow — the interlocking rules every spoke shares.Key capabilities
- →Enforce a three-gated pipeline for PR review, prepare, and merge
- →Produce `.local/` artifacts for handoff between stages
- →Resolve findings based on severity contract (BLOCKER, IMPORTANT, NIT/MINOR)
- →Ensure push and merge safety rules are followed (e.g., force-with-lease)
- →Perform head-SHA pinned squash merges
- →Generate a changelog as a mandatory part of the workflow
How it works
The skill orchestrates a three-stage pipeline (review, prepare, merge) where each stage produces artifacts consumed by the next, ensuring findings are resolved and safety rules are met before merging.
Inputs & outputs
When to use git-pr-ops-core
- →Resolving PR review findings
- →Preparing a PR for merge
- →Enforcing merge safety rules
About this skill
git-pr-ops Core
Shared model for the git-pr-ops cluster. The review, prepare, and merge spokes all depend on these
interlocking conventions — keep them consistent here so no spoke contradicts another.
1. The pipeline (this cluster's defining feature)
Work moves through three gated stages, each producing an artifact the next stage consumes. The stages are ordered and not optional: a later stage refuses to run without the prior artifact.
review-pr ──review.json──> prepare-pr ──prep.env──> merge-pr ──> MERGED
(read-only) (resolve + push) (squash + pin)
review-pris read-only: it analyzes the diff against the merge-base and emits both a human report (.local/review.md, sections A–J) and machine-readable findings (.local/review.json). It never pushes, merges, or keeps code changes. →review-prprepare-prconsumesreview.json, resolves every required finding (see §3), runs the gates, and pushes the fixes to the PR head with--force-with-lease. It emits.local/prep.env(carryingPREP_HEAD_SHA) and ends by printingPR is ready for /merge-pr. →prepare-prmerge-prconsumesprep.env, verifies required checks, and performs a deterministic squash merge pinned toPREP_HEAD_SHA(--match-head-commit), with co-author trailers and post-merge verification. It ends inMERGED. →merge-pr
Rule: never skip a stage or hand-edit past the artifact gate. The artifacts in .local/ are the
contract between stages — they live in the PR worktree (.worktrees/pr-<PR>) and must exist and be
valid before the next stage runs.
2. The .local/ artifact set
| Artifact | Produced by | Consumed by | Purpose |
|---|---|---|---|
review.md | review-pr | human | readable review, sections A–J |
review.json | review-pr | prepare-pr | structured findings + recommendation |
prep.md | prepare-pr | human | resolved-findings + gate summary |
prep.env | prepare-pr | merge-pr | PREP_HEAD_SHA + merge context |
pr-meta.env / *-context.env | wrapper scripts | the stages | PR metadata, merge-base, mode |
The wrapper scripts (scripts/pr-review, scripts/pr-prepare, scripts/pr-merge, scripts/pr) are
cwd-agnostic — run them from the repo root or inside the PR worktree.
3. Finding-severity contract
review.json carries findings with a severity. The prepare stage's obligation is severity-driven:
- BLOCKER — must be resolved before prepare can push. Hard gate.
- IMPORTANT — must be resolved before prepare can push. Hard gate.
- NIT / MINOR — optional; resolve if cheap, otherwise note and move on.
Minimum review.json shape: a recommendation (e.g. READY FOR /prepare-pr), a findings[] array
(id, severity, title, area, fix), a tests object (ran, gaps, result), a docs
status, and changelog (changelog is mandatory in this workflow). Keep prepare's scope tight —
resolve the findings, update the changelog/docs, nothing gratuitous.
4. Push & merge safety (default-deny)
The base branch is sacred; the PR head is the only writable target, and only carefully:
- Never
git pushdirectly, and never push tomain/the base branch. - Prepare pushes only to the PR head, only with
--force-with-leaseagainst the known head SHA (idempotent if local prep HEAD already equals the remote PR head; one automatic rebase + gate-rerun- lease-retry is allowed).
- Merge is head-SHA pinned (
--match-head-commit) so a race can't merge unreviewed commits. - Never
gh pr merge --autoin this flow. - Merge ends in
MERGED, neverCLOSED; cleanup (worktree/branch) happens only after a confirmed merge. Do not delete the worktree mid-pipeline.
5. The other two lanes
Two spokes feed or report on the pipeline rather than walking it:
gh-issues— autonomous issue→PR engine. Fetches issues via the GitHub REST API (curl + a repo-scopedGH_TOKEN), spawns parallel sub-agents that each branchfix/issue-<N>, implement a minimal fix, test, open a PR, and (in a later phase) address review comments. Supports fork mode,--watch, and--cron. Each sub-agent uses a confidence gate (skip if < 7/10) and never force-pushes or touches the base branch. →gh-issuesgithub-next-wave-orchestrator— read-only repo scan → a Status Report (repo pulse, issue landscape, PR/CI health, Green/Yellow/Red readiness) + a ranked Next Wave plan. Executes only on explicit approval; never fabricates state, never closes issues or merges PRs unprompted. →github-next-wave-orchestrator
Both ultimately feed the review→prepare→merge pipeline once a PR exists.
6. The gh CLI vs the REST API
ghCLI (githubspoke) is the default for interactive/ad-hoc work — issues, PRs, CI runs,gh apifor anything the subcommands don't cover. Always pass--repo owner/repowhen outside a git dir, or use URLs directly. →github- curl + REST is used by
gh-issuesprecisely because it runs in environments whereghmay be absent; it carriesGH_TOKENas a Bearer token. The pipeline wrappers (review/prepare/merge) useghunder the hood for metadata and diffs.
7. Shared guardrails
- The pipeline is gated, not optional:
review-pr→prepare-pr→merge-pr, each blocked on the prior.local/artifact. - Review is read-only; resolve all BLOCKER + IMPORTANT findings before pushing.
- Push only to the PR head, only with
--force-with-lease; never push the base branch. - Merge is head-SHA pinned, required-check gated, squash, and ends in
MERGED. No--auto. - Changelog is mandatory; state every required finding resolved and every gate result.
- Cleanup only after a confirmed merge; never delete a worktree mid-pipeline.
- Autonomous lanes (
gh-issues, next-wave) never close issues, merge PRs, or fabricate state without explicit approval; sub-agents stop below their confidence threshold rather than guess.
When not to use it
- →When the user needs to skip any stage of the pipeline
- →When the user needs to push directly to the main branch
- →When the user needs to merge PRs without resolving required findings
Limitations
- →The pipeline stages are ordered and not optional.
- →Prepare pushes only to the PR head, only with `--force-with-lease`.
- →Merge is head-SHA pinned (`--match-head-commit`) to prevent merging unreviewed commits.
How it compares
This skill enforces a strict, artifact-gated pipeline for PR operations, providing a more controlled and auditable merge process than typical manual or less structured workflows.
Compared to similar skills
git-pr-ops-core side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| git-pr-ops-core (this skill) | 0 | 2mo | Caution | Advanced |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| git-commits | 21 | 4mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by Sheshiyer
View all by Sheshiyer →You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
git-commits
bonny
Create well-structured git commits in logical chunks following best practices
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
github-multi-repo
ruvnet
Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration
git-workflow-enforcer
CrazyDubya
Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.