pr-gates

Runs pre-merge gate checks on a branch and fixes findings until all gates pass.

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/human-centric-engineering/resparkable --skill pr-gates-human-centric-engineering
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pr-gates
Source: https://github.com/human-centric-engineering/resparkable/tree/main/.claude/skills/pr-gates
Command: npx skills add https://github.com/human-centric-engineering/resparkable --skill pr-gates-human-centric-engineering

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Preparing a branch for a pull request means running type checks, lint, tests, coverage, security review, and code review — then fixing everything they flag. Doing this manually is slow and error-prone, and findings often get fixed once without re-verification. This Skill automates the full loop: it runs each gate in the right order, auto-fixes clear-cut issues, escalates judgement calls in one batched question, and re-runs until a complete pass produces nothing new. ## Core Features & Use Cases - Ordered gate execution: Runs the deterministic checklist (/pre-pr), branch coverage (/test-coverage branch), /security-review, and /code-review in sequence, skipping later gates when earlier ones fail. - Convergence loop with caps: Re-runs affected gates after every fix, stops after 3 passes or 2 fix rounds per gate, and escalates oscillating findings instead of guessing a third fix. - Repo boundary protection: Never edits upstream-owned files, hand-written Prisma migrations, reserved package.json script names, or generated output to force a gate green — it reports those instead. - Use Case: Before opening a PR on a feature branch, ask the agent to run the gates; it fixes lint, type errors, and missing tests itself, then presents security design decisions for your call, leaving the tree modified but uncommitted. ## Quick Start Ask the agent to run the gates and get this branch ready to merge, optionally naming a gate subset or code-review effort level.

Frequently Asked Questions about pr-gates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run all pre-merge checks on a git branch automatically?▼

Invoke the skill with a phrase like "run the gates" or "get this branch ready to merge". It runs the deterministic checklist, branch coverage, security review, and code review in order, auto-fixes clear-cut findings, and loops until a full pass is clean.

How to run only some PR gates or set code review effort?▼

Pass free-form arguments naming a gate subset such as pre-pr, coverage, security, or review, plus an effort level of low, medium, high, or max. Gates always run in canonical order regardless of the subset, and unknown tokens are ignored.

Does the pr-gates skill commit or open the pull request?▼

No. It never runs git commit, git push, or gh pr create. It leaves the working tree modified but uncommitted, and the final report explicitly hands the commit, push, and PR steps back to the user.

Why does Vitest hang or fail during the test gate?▼

Using npm run test can enter watch mode and hang; use npx vitest run for a single pass. Timeout-shaped failures are often load-sensitive flakes, especially after a coverage run, so re-run on a quiet machine before treating them as real.

What happens when a gate finding requires a design decision?▼

Findings that change behavior, move a security trust boundary, or touch upstream-owned files are not auto-fixed. They are batched into a single question at the end of a pass, and only the authorized fixes are applied and re-verified.

What are the limitations of the automated gate loop?▼

The loop caps at 3 full passes and 2 fix rounds per gate, then escalates the residue. A finding that reappears after a fix is treated as oscillating and escalated rather than fixed a third way, and every cap hit is reported explicitly.