About pre-merge-gate
pre-merge-gate is a project skill that runs a set of checks and produces a PASS/FAIL/SKIP report before code is merged. It is intended for QA and agents verifying that required checks pass before approving or merging a PR.
Key features
- 01Runs configured project checks
- 02Produces PASS/FAIL/SKIP report
- 03Exits nonzero when a check fails
- 04Supports optional audit skips
Use cases
- 01Checking readiness before merging to main or dev
- 02Verifying fixes after review feedback
- 03Providing a QA gate report for a PR
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ heyeddi-com/ heyeddi-skills --skill pre-merge-gateAfter installing, type/pre-merge-gatein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
manifest.jsoncontext/ANTI_PATTERNS.mdEXAMPLES.mdPROSE_ANTI_SLOP.mdVOCABULARY.mdreference/subagents.mdscripts/_skill_cli.pypre_merge_gate.pyDetails
From the project READMEPre-merge Gate
Subagents (default)
Run gate via Task shell subagent: pre_merge_gate.py. Main chat triages FAIL lines and re-delegates fixes. See reference/subagents.md.
When to use
- QA wants a single green/red report before approving a PR
- Before merging to
main/dev - After addressing review feedback: confirm all gates pass
Hard stop
The script exits 1 if any check is FAIL. Do not treat a markdown BLOCKED report with exit 0 as merge-ready — that bug is fixed. Agents must not merge (or say merge-ready) unless the process exits 0.
Instructions
- Run
python .agents/skills/pre-merge-gate/scripts/pre_merge_gate.py --project-root <root>. - Read the markdown report: each check shows PASS/FAIL/SKIP.
- Fix failing checks and re-run until exit code is 0.
Eval / harness turns: When the eval harness captures Playwright proof separately, run with --skip-visual-audit so the gate does not invoke contrast audit (no Playwright in agent turn).
Checks
Required when the tree exists
- setup audit (
@heyeddi-setupverify_setup --check: incomplete prefs fail) - npm test + production build (
package.json) vue-tsc --noEmitwhennode_modulesis present (FAIL if frontend exists but toolchain missing)backendpytest (backend/tests, prefersbackend/.venv)- ruff F821 on
backend/app(undefined names / dropped imports) - engineering audit (
@engineering-excellenceaudit_engineering --check: errors fail; warns advisory)
Optional (SKIP allowed if skill/tool missing; FAIL still hard-stops)
- duplicate UI scan (
no-duplicate-ui) - prose audit (
heyeddi-designverify_prose.py) — always-on for copy; skip only in emergency - contrast audit on product routes (
visual-auditor; SKIP if Playwright missing)
Flags: --skip-duplicate-ui, --skip-prose-audit, --skip-engineering-audit, --skip-setup-audit, --skip-visual-audit. --skip-backend, --skip-engineering-audit, and --skip-setup-audit are emergency-only and must not be used for merge sign-off.
When the task is complete: suggest next skills
When you have finished the user's request for this skill (not after every tool call or subagent phase), suggest what to run next:
-
Run:
python .agents/skills/heyeddi/scripts/suggest_next_skill.py --current-skill pre-merge-gate --project-root .Add
--route /pathif you worked a specific route. -
Include the script's
### Next stepblock in your final reply. The user copies the Prompt line into chat (e.g.@heyeddi-design craft /settings).
Pass --mode shape (or craft, audit, etc.) when you know which sub-command just finished.
See @heyeddi → reference/next-skill-handoff.md.