gemini_qa_loop

gemini_qa_loop is a cursor rule for Claude Code, Cursor from HomenShum/NodeBenchAI. It costs 0 tokens per session (889 once invoked), scanned A, original, MIT.

An automated interface-testing loop that builds a Vite web app, captures browser screenshots and a walkthrough video, and sends them to Gemini 3 Flash for visual quality scoring. It records the results and their history.

In plain words
What is it for?
Use it to build and preview the app, run Playwright end-to-end tests, publish screenshots, record a walkthrough, run Gemini's UI review, and inspect the generated reports.
Why use it?
It finds visual and usability problems through automated browser checks and image review instead of relying only on code tests.

Cursor rule for Claude CodeCursor

Written for Claude Code and Cursor: paths in frontmatter, but also installed under .cursor/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/ui/recordDogfoodWalkthrough.mjs --baseURL http://127.0.0.1:4173 --publish static.

Good fit Use it to build and preview the app, run Playwright end-to-end tests, publish screenshots, record a walkthrough, run Gemini's UI review, and inspect the generated reports.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/HomenShum/NodeBenchAI
agentmods
npx agentmods add rules/homenshum/nodebenchai/gemini_qa_loop

Made for: Claude Code, Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gemini_qa_loop

README.md
[![agentmods](https://agentmods.dev/badge/rules/homenshum/nodebenchai/gemini_qa_loop/github.svg)](https://agentmods.dev/rules/homenshum/nodebenchai/gemini_qa_loop)
Your own site
<a href="https://agentmods.dev/rules/homenshum/nodebenchai/gemini_qa_loop"><img src="https://agentmods.dev/badge/rules/homenshum/nodebenchai/gemini_qa_loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gemini_qa_loop

Your own site · 80×15
<a href="https://agentmods.dev/rules/homenshum/nodebenchai/gemini_qa_loop"><img src="https://agentmods.dev/badge/rules/homenshum/nodebenchai/gemini_qa_loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 889 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00889
Opus 5.5 $0.00000 $0.00356
Sonnet 5.5 $0.00000 $0.00178
Haiku 4.5 $0.00000 $0.00089

Measured 1mo ago against content hash 05b86c9342ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gemini_qa_loop 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 1mo 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.

.cursor/rules/gemini_qa_loop.mdc · 86 lines

How it starts

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

Gemini QA Loop — Automated UI/UX Quality Gate

Continuous dogfood loop using Gemini 3 Flash vision to score and fix UI/UX issues automatically.

Pipeline Steps (in order)

# 1. Build production bundle
npx vite build

# 2. Ensure preview server is running (port 4173)
npx vite preview --host 127.0.0.1 --port 4173 &

# 3. Capture screenshots via e2e test
BASE_URL=http://127.0.0.1:4173 npx playwright test tests/e2e/full-ui-dogfood.spec.ts --project=chromium --workers=1

# 4. Publish screenshots to public/dogfood/
npm run dogfood:publish

# 5. Record walkthrough video
node scripts/ui/recordDogfoodWalkthrough.mjs --baseURL http://127.0.0.1:4173 --publish static

# 6. Run Gemini QA (sends screenshots + video to Gemini 3 Flash for scoring)
BASE_URL=http://127.0.0.1:4173 node scripts/ui/runDogfoodGeminiQa.mjs

# 7. Read results
# Score + summary printed to stdout
# Full JSON: .tmp/dogfood-gemini-qa/screens-qa.json and video-qa.json
# History: public/dogfood/qa-results.json

Scoring Formula

Score = 100 - (P1_count × 6) - (P2_count × 2) - (P3_count × 1)
  • P1: Major polish (low contrast, missing focus state, misleading UI) — 6 pts each
  • P2: Minor polish (spacing, inconsistent styling, empty state copy) — 2 pts each
  • P3: Nit (alignment, minor label wording) — 1 pt each

Fix Strategy Per Severity

P1 Fixes (highest ROI — each fix recovers 6 points)

  • Low contrast text: Check dark mode. Use dark:text-gray-300 minimum.
  • Missing focus styling: Add focus-visible:ring-2 focus-visible:ring-blue-500.
  • Missing visual hierarchy: Add left border accent, font weight differentiation, size stepping.
  • Poor empty states: Add icon + descriptive copy + CTA button.
  • Misleading labels: Show exact price/data, add tooltips.

P2 Fixes (each recovers 2 points)

  • Spacing: Standardize gaps. Date formats: Use month: 'short'. Icon contrast: dark:bg-indigo-500/25 min.

Loop Protocol

while score < target:
    1. Read .tmp/dogfood-gemini-qa/screens-qa.json and video-qa.json
    2. Fix all P1s first (highest ROI), then easy P2s
    3. npx vite build && run e2e + publish + record + Gemini QA
    4. Read new score
    5. If 3 consecutive rounds without improvement → change strategy

Read the full file on GitHub · 86 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. 1mo ago First seen · 86 lines · 0 tokens per session scan A 05b86c9342ba

Subscribe to this mod's changes

gemini_qa_loop is a cursor rule published in the GitHub repository HomenShum/NodeBenchAI (15 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 889 tokens. 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-30.