qa-gate
Run this project's full local quality gate (lint/typecheck/test commands from .harness/project.json) and report pass/fail. Use before opening a PR, or whenever asked to run the full check/test suite.
SKILL.mdskills/first-party/pvmalove/qa-gate/SKILL.md
GitHubRun this project's quality gate and report the result. Nothing else — no restating the commands, no unrelated commentary.
Find the harness root. It is the current checkout when it has
.harness/project.json. A linked worktree lacks the gitignored.harness/: when the file is absent there, use the main worktree — the firstworktreeentry ofgit worktree list --porcelain— as the harness root. Take only.harness/project.jsonand.harness/skills/qa-gate/scripts/test_summary.pyfrom it; run every command with the current checkout as the working directory, never the main worktree. Readqa_gate_commandsfrom that.harness/project.json— an ordered list of shell commands (e.g.["make check", "make test"]or["ruff check .", "mypy .", "pytest"]). If the file or field is missing, tell the user to fill it in (runharness init/updateagain, or edit.harness/project.jsondirectly) and stop.Read the optional
shellfield from the same file —"bash"(or the field absent) means this checkout runs commands through bash (Linux, macOS, or a Windows checkout wherebashonPATHis really Git Bash/WSL and not the System32 WSL launcher stub);"powershell"means run them through PowerShell instead — pick this on a native Windows checkout where a barebashresolves to that stub and fails with no WSL distro configured, even for a command that needs no shell at all. Run each command in order through the installed agent-facing wrapper, choosing the shell argv accordingly:# shell: "bash" (default) python <harness-root>/.harness/skills/qa-gate/scripts/test_summary.py -- bash -lc '<exact command from qa_gate_commands>' # shell: "powershell" python <harness-root>/.harness/skills/qa-gate/scripts/test_summary.py -- powershell -NoProfile -NonInteractive -Command '<exact command from qa_gate_commands>'<harness-root>is.in a normal checkout and the absolute path of the main worktree in a linked one.On the first failure, stop. Return the wrapper's bounded summary — status, pytest totals, failed node IDs, structured diagnostics (traceback endings, explicit error messages, and compiler/linter errors), and its sanitized local log path — rather than command output or an arbitrary tail of the log. Do not run the remaining commands. Read a failure log only when the developer needs that particular diagnostic evidence. The wrapper works with every quality command; do not add a pytest JSON/XML reporting flag unless that command already owns and documents that artifact.
If every command succeeds, record the pass marker yourself: run
bash "$CLAUDE_PROJECT_DIR/.claude/hooks/record-qa-gate-pass.sh". Don't rely on themark-qa-gate-passed.shPostToolUse hook alone for this — this skill runs forked (seecontext: forkabove), and the hook isn't guaranteed to fire for Bash calls made inside that fork.Report a compact one-line PASS summary only — do not paste the passing output.