agentleFS
patronus-protectpatronus-protect/patronus-security-cli/.claude/skills/qa-run/SKILL.md

qa-run

Skill2 starsChanged 2 months agoApache-2.0View on GitHub

Run the Patronus QA and UX routine (hooks, SDKs, docs, control dashboard, integrations), propose findings as issues for the person to approve and open up to three draft PRs with fixes. Use for the scheduled QA runs or when asked to "run QA".

  • Reads credentials
  • Commits and pushes

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. a-saven/agent-skills★ 2same name
    2. aneskurtovic/qa-orchestrator★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the areas in the order above.

    line 24
  2. Very specific:

    Read ~/.patronus-qa/runs/<date>/e2e.json.

    line 28
  3. Distinctive:

    If the baseline check fails, the scenario itself is broken.

    line 34
  4. Distinctive:

    Before proposing, re-check any finding that seems surprising (rerun the one command).

    line 48
  5. Very specific:

    Never publish on your own: this repository is public.

    line 49
  6. Very specific:

    Only after the person agrees in the chat: node qa/lib/issues.mjs --publish creates one issue per new fingerprint or group and comments on …

    line 53
  7. Very specific:

    Create a branch qa/<date>-<slug> from main.

    line 63
  8. Very specific:

    Commit, push, and run gh pr create --draft --label qa.

    line 65
  9. Distinctive:

    Do not attempt detection-quality changes in the scanner (Ark) or anything on control.patronus.studio or docs.patronus.studio.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Patronus QA run

You orchestrate one QA run. Measure first, then improve. Never merge anything.

Areas

Parse --areas from the arguments (default all = hooks, e2e, integrations, sdk, dx, dashboard).

AreaHow
hooksFollow .claude/skills/qa-hooks/SKILL.md
e2enode qa/e2e/run.mjs (scripted, Claude, Codex and emulated Cursor, daily); with --live also node qa/e2e/run.mjs --hosts claude --mode live (weekly, paid turns). Then review its findings, see below
integrationsFollow .claude/skills/qa-integrations/SKILL.md
sdknode qa/sdk.mjs (deterministic), then review its findings
dxFollow .claude/skills/qa-dx/SKILL.md (docs, examples, SDK readability)
dashboardFollow .claude/skills/qa-dashboard/SKILL.md (control.patronus.studio in Chrome)

Run the areas in the order above. One failing area must not stop the others.

e2e review

Read ~/.patronus-qa/runs/<date>/e2e.json. metrics.hosts.<host>.matrix has one row per step (first receipt, protocol trail, final status, latency, leaks); the live run writes e2e-live.json (under metrics.live), so it does not replace the scripted report.

  • Leaks (critical): a canary, secret or PII value reached a model request. The row names the step whose output first carried it; check which tool result shape the hook did not scan.
  • False positives and recovery: false_positives counts benign and mixed steps that were withheld first, how many the protocol recovered, the extra calls and the extra latency. An unrecovered one is high; a recovery that leaks is critical.
  • Consent: consent-deny must keep every value masked; consent-approve must reveal exactly the requested type (emails) while IBANs stay masked.
  • Prompt gate: prompt_gate_phases must read first:blocked, resend:sent, reuse:blocked, other-text:blocked (ignore_once is single-use and bound to the text). The gate session enables analysis.user_prompt_pii.
  • Live: whether the real model followed the receipt protocol on its own (protocol, consent.reveal_requested), task success, turns and cost.
  • If the baseline check fails, the scenario itself is broken; fix the fixture before trusting the protected numbers.

Setup

  1. Work from an up-to-date main: git fetch origin && git switch main && git pull --ff-only. If the tree is dirty, stop and report: another session is working here.
  2. Build what the scripts use: cargo build --release -q (the QA always measures the release scanner; debug builds are ~25x slower) and node plugins/native/scripts/build.mjs.
  3. Today's run directory is ~/.patronus-qa/runs/<YYYY-MM-DD>/. All scripts write their <area>.json there.
  4. Secrets come from ~/.patronus-qa/env (PATRONUS_QA_API_KEY). Never print, log or paste the key anywhere, including issues and PRs.

Findings

  • Deterministic scripts produce findings in their report JSON. Agentic areas add findings by writing ~/.patronus-qa/runs/<date>/<area>.json in the same shape (schema: patronus.qa.report.v1; findings use area, severity = critical|high|medium|low, a stable fingerprint of the form qa:<area>:<slug>, title, evidence, suggestion).
  • A fingerprint must be stable across runs. Derive it from what is wrong, not from today's values.
  • One root cause is one proposed issue. When the same problem shows on several hosts or steps (same scanner, same protocol path), give the findings a shared group ({ key, title }, see finding() in qa/lib/common.mjs); the upsert merges them into one issue once it is published. Documented host limitations (plugins/<host>/README.md) are not findings; record them in the report metrics.
  • Before proposing, re-check any finding that seems surprising (rerun the one command). Drop findings you cannot reproduce.
  • Never publish on your own: this repository is public. Run the dry run node qa/lib/issues.mjs and list the planned issues in your reply, grouped by target:
    • this repository: real bugs in the CLI, SDKs or hooks;
    • the control-plane repository: control plane, dashboard and docs site, with the file and line you located;
    • internal, summary only and never an issue: the QA login, browser session and machine, noise just over a threshold, unannounced features.
  • Only after the person agrees in the chat: node qa/lib/issues.mjs --publish creates one issue per new fingerprint or group and comments on open ones.

Improvements (draft PRs)

At most 3 draft PRs per run, each small and focused. Pick the highest-severity findings that can be fixed inside this repository with confidence:

  • Hook behaviour or messages in plugins/native/src/ and plugins/deepseek/src/, with a test in plugins/native/tests/. Rebuild with node plugins/native/scripts/build.mjs and commit the bundles.
  • docs/*.md, SDK READMEs, INSTALL.md files, examples/.
  • Version pins such as .github/release-host-versions.env, but only after the hook QA passed against the newer host.

For each PR:

  1. Create a branch qa/<date>-<slug> from main.
  2. Make the change and run the relevant tests (cargo test, node plugins/native/scripts/test.mjs <file>, SDK tests).
  3. Commit, push, and run gh pr create --draft --label qa. Reference an existing issue with Refs #<n>, not Fixes; when there is none yet, describe the finding in the PR.
  4. Switch back to main.

Do not attempt detection-quality changes in the scanner (Ark) or anything on control.patronus.studio or docs.patronus.studio. Those are proposed issues for the control-plane repository only, because their source is not in this repository.

Summary

Finish by writing ~/.patronus-qa/runs/<date>/summary.md. It contains:

  • one line per area with the check pass rate,
  • the key metrics with their delta to the previous run (~/.patronus-qa/history.jsonl),
  • the proposed issues per target and the draft PRs opened.

Reply with that summary.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.