Skip to content
Back to skills

Qa Gate

ASecurity

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.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 19, 2026
toolspythonshellbashnodegit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 19, 2026

npx -y skills add PVMalove/claude-agent-harness --skill qa-gate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Qa Gate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Qa Gate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pvmalove-qa-gate/badge)](https://www.skillsdirectory.com/skills/pvmalove-qa-gate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: qa-gate
description: 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.
context: fork
background: false
---

Run this project's quality gate and report the result. Nothing else — no restating the commands, no unrelated commentary.

1. 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 first `worktree` entry of `git worktree list --porcelain` — as the harness root. Take only
   `.harness/project.json` and `.harness/skills/qa-gate/scripts/test_summary.py` from it; run every
   command with the current checkout as the working directory, never the main worktree.
   Read `qa_gate_commands` from 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 (run `harness init`/`update` again, or edit `.harness/project.json` directly) and stop.
2. Read the optional `shell` field from the same file — `"bash"` (or the field absent) means this
   checkout runs commands through bash (Linux, macOS, or a Windows checkout where `bash` on `PATH`
   is 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 bare `bash` resolves
   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:

   ```bash
   # 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.
3. 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 the `mark-qa-gate-passed.sh` PostToolUse hook alone for this — this skill runs forked (see `context: fork` above), and the hook isn't guaranteed to fire for Bash calls made inside that fork.
4. Report a compact one-line PASS summary only — do not paste the passing output.

Files in this skill

  • SKILL.md3.2 KB
  • scripts/test_summary.py9.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.