Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

qa-prod-drive

БесплатноБез исполняемых скриптовНе проверен

Drive a deployed app as a real signed-in user — mint a Clerk session or one-time sign-in ticket for the project's QA account, lift and restore the ban on QA…

cromford-aiот cromford-ai★ 29 звёзд на GitHub

Об этом скилле

qa-prod-drive

Two ways into an app as a user, both backed by Clerk's backend API. No password is ever typed, and no browser is ever driven by a human on this box.

  • Session JWT (bin/qa-session.sh) — a bearer token for API calls. Fastest way to probe authz, read a route's real payload, or do incident ops.
  • Sign-in ticket (bin/qa-drive.mjs, smoke-tested by bin/qa-signin-check.mjs) — a one-time __clerk_ticket that lands a browser in a real session. This is what "tested as a user" means. It satisfies instances that enforce MFA, because the trusted backend IS the factor.

Both are gated by one thing that used to be invisible: the account's Clerk ban state. Read "Banned at rest" below before you drive anything privileged.

The honesty rule — read this before you write any claim

Never say "tested as a user" unless a browser really loaded the screens and you really observed the outcome. Build-proof is stated as exactly that: "typecheck and npm run build green". If Playwright would not install, the sign-in never landed, or you drove two of the five screens, the report says so as the headline — a pass with nothing behind it is the one outcome that must never happen. Count what you actually did (screens loaded, flows driven, shots written), never what the plan listed or what you intended.

A page that landed on /sign-in is a FAIL. Not a skip, not a pass with a caveat, not "the screen was behind auth". bin/qa-drive.mjs exits non-zero on it and bin/qa-signin-check.mjs does too (it used to print FAIL: and exit 0, so every caller that checked $? read a bounced sign-in as a working one — that is the bug this skill was rewritten around on 2026-08-29).

Guardrails

  • Previews share the PROD database. Use obviously fake inputs, on non-destructive actions only. Never trigger deletes, payments, emails, or writes to real client records.
  • Mint short, mint often. Default session TTL is 600s.
  • Privileged QA accounts are BANNED at rest (qa-owner, qa-admin, qa-administrator). That is the rest state working, not a bug — see "Banned at rest" below for the ONE sanctioned way through it, and never reach for the Clerk dashboard instead.
  • A permission wall is an observation, not a defect. Screens the QA role legitimately cannot reach get recorded as such.
  • Secrets live in /root/harness/env/<project>.env (chmod 600). Read them with set -a; . <file>; set +a — never echo a value, never paste one into a report, a commit, a board comment or a log line.

Accounts and env

/root/harness/state/qa-accounts.json maps project -> role -> {email, user_id} (project-1 carries owner/admin/read_only/ user; other projects carry their own tiers). Per-project env (env-templates/project.env.example documents all of these):

var what it unlocks
QA_CLERK_SECRET_KEY minting sessions and sign-in tokens for that app's Clerk instance
QA_TEST_USER_ID the default low-privilege QA user for browser drives
QA_TEST_EMAIL / QA_TEST_PASSWORD the same user's credentials (rarely needed — the ticket flow beats them)
VERCEL_AUTOMATION_BYPASS_SECRET getting past Deployment Protection on previews

Any of them absent = that capability is off. QA the public surface and say the authed screens were not covered. Do not invent a workaround.

Banned at rest — the trap that made drives lie

Privileged QA accounts are BANNED in Clerk by our own design: project-3's qa-administrator has been banned since 2026-08-16, project-1' qa-owner and qa-admin the same. Keep it that way; a privileged account that is live in production is a standing risk nobody is watching.

The trap is what Clerk does with a banned user:

POST /v1/sign_in_tokens for a banned user returns 200 and mints a real ticket. The refusal happens later, in the browser, when the session is refused and the app redirects to /sign-in.

So a drive minted a ticket, "signed in", bounced, screenshotted the sign-in page and reported coverage. Every authed observation in such a report was of a screen nobody ever loaded. Two things fix it and both are already wired:

1. Ask, don't assume. bin/qa-drive.mjs reads the ban state before minting and fails by name. By hand:

/root/harness/bin/qa-clerk-ban.sh <project> <user_...> status   # -> banned | active

An unreadable state is never "active" — it exits non-zero and prints nothing.

2. Lift it for the drive, and always put it back.

/root/harness/bin/qa-unbanned.sh <project> <role|user_...> -- <command…>

It reads the state, unbans only if the account was observed banned, runs your command, and re-bans from an EXIT trap — on success, on failure, on a non-zero exit, on SIGINT/SIGTERM. Three retries; if the re-ban still will not land it writes an ALERTS.log line naming the account, fires a fleet_alert beat and exits 90 whatever your command returned.

Полный SKILL.md на GitHub

Установить qa-prod-drive в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл qa-prod-drive?

Drive a deployed app as a real signed-in user — mint a Clerk session or one-time sign-in ticket for the project's QA account, lift and restore the ban on QA accounts that are banned at rest, get past Vercel Deployment Protection, drive screens headless with Playwright at 1280px and 375px, and report only what was actually observed. Use when asked to QA prod or a preview, verify a shipped feature as a user, reproduce a user-reported bug, or check a role's access.

Как установить скилл qa-prod-drive?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл qa-prod-drive запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить qa-prod-drive с