qa

A quality-check rule that runs tests, a build, linting, type checks, or all of them, then repeats diagnosis and fixes until the selected checks pass or five cycles are reached. TDD, or test-driven development, is a separate practice of writing tests before code; this rule does not say it uses TDD.

In plain words
What is it for?
Running test suites, builds, linters, and type checkers; diagnosing failures; applying small fixes; repeating checks; and producing either a success summary or a failure report.
Why use it?
It turns a failed check into a repeatable test-and-fix cycle and reports the remaining problems when the limit is reached. A report-only mode can inspect failures without changing files.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/jkudjo/oh-my-cursor/qa
Clone the repo
git clone --depth 1 https://github.com/Jkudjo/oh-my-cursor
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 596 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00596
Opus 5 $0.00009 $0.00298
Sonnet 5 $0.00003 $0.00119
Haiku 4.5 $0.00002 $0.00060

Measured 2d ago against content hash bd72481e3a14, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

qa scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/qa.mdc · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

@qa

Trigger: After implementing a feature, before shipping, or when tests are failing.

Modes

Flag Behavior
--tests (default) Run test suite and cycle until passing
--build Run build and cycle until it succeeds
--lint Run lint and cycle until clean
--typecheck Run type check and cycle until clean
--full Run all: typecheck → lint → build → tests
--report Report only, no fixes

Max cycles: 5. After 5 failed cycles, stop and report remaining issues.

Cycle Protocol

Per Cycle:

  1. Run — execute the relevant command(s) for the selected mode.

  2. Check — did it pass?

    • YES → exit with success summary
    • NO → continue to diagnose
  3. Diagnose — analyze the failure output:

    • What failed and why (root cause, not just symptoms)
    • Which files/lines are involved
    • Is this a real failure or a test environment issue?
  4. Fix — apply the minimum fix to resolve the root cause:

    • One root cause at a time
    • Verify the fix makes sense before applying
    • Never break passing tests to fix failing ones
  5. Repeat — go back to step 1 with updated iteration count.

  6. Call update_mode_state after each cycle with phase="cycle-N" and iteration=N.

Exit Conditions

Condition Action
All checks pass Report: PASS, N cycles used
Max cycles (5) reached Report: FAIL, list remaining issues
Unfixable issue (env/config) Report: BLOCKED, describe blocker

Final Report

## QA Report: {scope}

**Result:** PASS | FAIL | BLOCKED
**Cycles used:** N/5
**Mode:** {flags}

### Issues fixed
1. `file:line` — description of fix

### Remaining issues (if FAIL)
1. `file:line` — description, repro steps

### Health score: XX/100
(−25 per critical bug, −10 per major, −3 per minor)

Call save_artifact type=specs, slug=qa-{scope-slug}, content=the report. Call set_memory key=last-qa, value=the report.

Read the full file on GitHub · 83 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 83 lines · 17 tokens per session scan A bd72481e3a14

Subscribe to this mod's changes

qa is a cursor rule published in the GitHub repository Jkudjo/oh-my-cursor (1 stars, last pushed 5mo ago), licensed MIT. It adds 17 tokens to every session and 596 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other cursor rules, from other repositories