Daily qa

From ariadoss/superskills · View interactive version

Daily qa is an AI agent skill from the GitHub repository ariadoss/superskills. Daily repo health check — scans recent commits, CI failures, dependency drift, performance regressions, and untested code paths. Produces a grounded report with evidence-only findings and minimal, scoped fixes. Use when asked to "run daily QA", "daily repo check", "morning standup for the repo", "da

How to use this skill

Skill file

/daily-qa

A daily, evidence-grounded sweep across the repo: recent commits, CI signals,

dependency drift, performance regressions, and test coverage gaps. Output is

a short report with observed vs suspected clearly separated, plus the

smallest viable fixes.

Hard rules (apply to every section)

file paths, diff hunks, failing test names, CI job IDs, log snippets,

lockfile entries, benchmark numbers, or trace IDs.

findings, do not speculate root causes, do not guess version numbers.

no opportunistic renames.

broader work, flag it as a follow-up — do not expand scope inline.

Step 1: Establish the window

Determine the time window for "recent":

  1. If the user passed $ARGUMENTS, use it (24h, last-run, ISO date, etc.).
  2. Else check .daily-qa-last-run at the repo root — if present, use its

timestamp (the first field) as the lower bound. The file holds

<timestamp> <HEAD sha>; an old file with only a timestamp has no sha,

which counts as no match.

  1. Else default to last 24 hours.

Record the resolved window at the top of the report.

If git rev-parse HEAD equals the stored sha, the user passed no explicit

window, and git status --porcelain is empty, nothing landed since the last

run. Still run Step 2 when gh is available (CI can change without new

commits), skip Steps 3-7, and write a one-line report: "no new commits since

<sha>; CI signals not re-checked" (or the Step 2 summary when it ran). A dirty

working tree means some later steps would read uncommitted changes, so run

normally. The skip path also rewrites .daily-qa-last-run, which only

refreshes the timestamp. Then stop.

After the report is written, update .daily-qa-last-run to

<current timestamp> <git rev-parse HEAD> so the next run picks up cleanly.

(Add to .gitignore if not already present; do not commit it.)

Step 2: CI failures and flaky tests

Goal: summarize CI failures in the window; group by likely root cause;

suggest top fixes. (Run this before the commit bug scan so the bug scan

in Step 3 can cross-reference live test/CI signal.)

  1. Try, in order:

and filter to the window.

to identify jobs, then gh per-PR or repo-specific CI tooling

mentioned in CLAUDE.md.

  1. For each failed run, fetch the log of the failing step

(gh run view <id> --log-failed) and extract:

  1. Flaky detection: a test is flaky if it fails on one run and passes

on another for the same SHA, or if its failure message includes

timing/race/network strings. Cite the two runs.

  1. Group findings by likely root cause (compile error, env/secret drift,

network/flake, assertion change, snapshot stale). Mark each group

Observed (proven by logs) or Suspected (pattern match only).

  1. Suggest top 1–3 fixes, each with a concrete file path or test name.

If CI is unreachable, write: "CI signals unavailable — skipped" and the

reason (no gh, no token, no remote).

Step 3: Recent-commit bug scan

Goal: surface likely bugs introduced in the window; propose minimal fixes.

  1. git log --since=<window> --oneline --no-merges → list candidate SHAs and

resolve the window's commit range (oldest..HEAD within the window).

  1. Primary engine — delegate to /code-review. Run /code-review scoped

to the window's diff/range at a local tier:

(>30 commits) or touches auth/crypto/payments/data paths.

auth prompt — so it is safe to auto-run, exactly like /defense.

auto-run it. Recommend it (see §7f) only when a finding here is

high-stakes and warrants a deep multi-agent cloud review.

session's working directory, not necessarily the repo under review. Put

the repo's absolute path and the commit range in its arguments, for

example high <oldest>..HEAD in /abs/path/to/repo (cd there first).

the report is due, write §2 as "pending: /code-review still running"

and put the Step 3 fallback scan under it, labeled as the fallback.

Fold /code-review's correctness findings into report §2.

  1. Fallback (only if /code-review is unavailable). /code-review is a

Claude Code built-in, so Codex, Cursor and other hosts use this path.

Apply /review's checklist to the window's diff, read-only: the first of

~/.claude/skills/gstack/review/checklist.md,

~/.codex/skills/gstack/review/checklist.md, or

vendor/gstack/review/checklist.md in the superskills install. Do not run

/review itself here: it applies fixes to the working tree and stops on the

base branch, and this sweep is report-only. Title §2 *"fallback: /review

checklist"*. If no checklist was found (gstack is not installed), invoke

/basic-review on the window's diff instead; it is read-only, so it fits

this sweep. Title §2 "fallback: /basic-review" and fold its findings in.

Whichever you use, read the diff hunks

that touch logic (skip pure docs/config-only changes unless they touch

build/CI config) and look for concrete bug signatures:

unhandled null/undefined, race-prone async, accidental await removal,

resource leaks, missing cleanup, regex backtracking, SQL with missing

parameter binding, auth/permission checks removed.

  1. Cross-reference findings with failing tests or CI jobs from Step 2 — if

a commit coincides with a new failure, escalate confidence.

  1. For each finding, output:

If no findings appear, write: *"No bug-signature findings in window — N

commits scanned."* — do not fill space with speculation.

/code-review already fans out internally; only delegate a separate wide scan

to an Explore subagent if /code-review is unavailable and the window spans

30 commits.

Step 4: Dependency / SDK drift

Goal: detect outdated deps and propose a minimal alignment plan with

explicit current → target versions taken from the repo.

  1. Identify package manifests + lockfiles present:
  1. Pull current versions directly from the lockfile (not the manifest

range). If no lockfile, say so and stop — do not invent versions.

  1. Determine target versions only via a reproducible source:

pip list --outdated --format=json, cargo outdated, etc.

do not guess.

  1. Group findings:

migration steps; cite the upstream changelog URL only if fetched

via WebFetch)

prioritize these, list any pinned model IDs or APIs that may need

updating.

  1. Propose the smallest viable upgrade set: prefer one cohesive bump

per group over many. Mark all target versions as Suggestion unless

they came from an explicit upstream pin in the repo.

  1. Vendored-tool upstream drift (always run — read-only, no billing):

The script ships with superskills, not with the repo under review, so

resolve it instead of assuming ./scripts/. Try, in order:

./scripts/check-upstream-drift.sh,

$SUPERSKILLS_DIR/scripts/check-upstream-drift.sh,

~/Sites/superskills/scripts/check-upstream-drift.sh,

~/.claude/skills/superskills/scripts/check-upstream-drift.sh,

~/.codex/skills/superskills/scripts/check-upstream-drift.sh.

```bash

for d in "$SUPERSKILLS_DIR" ~/Sites/superskills ~/.claude/skills/superskills ~/.codex/skills/superskills .; do

[ -n "$d" ] && [ -x "$d/scripts/check-upstream-drift.sh" ] && { "$d/scripts/check-upstream-drift.sh"; break; }

done

```

If none exists, do not drop the step quietly: record it in the §7 ledger as

skipped: drift script not found (tried …).

Compares the vendored pentest tools against their upstreams: Shannon's

vendored tag vs the latest stable tag, and clearwing's installed commit

vs its vendored pin vs upstream HEAD (by commit — upstream's version

string is ambiguous). Report its output verbatim in the findings table.

It never upgrades anything — when it reports an upgrade available, that is

a Suggestion with the exact scripts/sync-*.sh command it prints, and

the sync's contract tests decide whether the upgrade is safe. Offline

probes print "unverified"; report that as unverified, never as current.

Step 5: Performance / benchmark regression

Goal: compare recent changes to existing benchmarks/traces; flag regressions.

  1. Look for benchmark or trace artifacts:
  1. If found, diff the latest run's numbers against the previous baseline

for files touched in the window (the changed-file list from Step 3).

Report each regression as:

  1. If no benchmarks/traces exist for the touched code paths, write:

"No measurements found for: <paths>". Suggest 1–2 specific things

to measure next (e.g., "add a microbench for X.foo — hot path

per commit abc123"). Do not estimate impact without numbers.

For deeper analysis on a single hotspot, recommend the user run

/perf-profile or /db-optimize.

Step 6: Untested-path detection

Goal: identify code paths added/changed in the window that lack tests;

draft small, focused tests.

  1. For each file changed in the window, locate its test file via repo

convention (sibling *.test.*, parallel tests/ tree, etc.).

  1. Use coverage data if available (coverage/, lcov.info,

.coverage). If absent, fall back to a structural check: new

exported functions / new branches in if/switch / new error paths

without a corresponding assertion in any test file.

  1. For each gap, draft one small test that:
  1. Do not create PRs automatically. If the user has a yeet-style

draft-PR tool wired up, suggest the exact command; otherwise output

the test files as a code block and let the user apply them.

This step is a report-only draft — it never applies the tests it drafts.

To actually close the gaps found here — including edge/corner cases and

past-regression coverage beyond what a single drafted test covers — recommend

/test-coverage, which writes and applies the missing tests and enforces

Google's Testing on the Toilet best practices on them.

If pursuing TDD-style follow-up, recommend /tdd. To verify a fix

actually works in the running app, recommend /verify.

Step 7: Scoped deep-dives (triggered)

After Steps 2–6 produce the changed-file list for the window, decide

per-section whether to invoke a heavier command on the narrowed scope.

The goal is high-signal automation without daily noise.

7a. `/db-optimize` — auto-run if triggered

Trigger when changed files match any of:

**/migrations/**, **/queries/**, **/*repository*, **/*.sql)

in the diff

Folder names are only examples (a Python repo keeps its database code in

schema.py, statements.py). Decide with the shared helper, not by eye.

(The helper loops in this file and in /qa-full are deliberately repeated

per section instead of shared out: each section stays self-contained, and a

shared reference would add one more read to every run.)

for d in "$SUPERSKILLS_DIR" ~/Sites/superskills ~/.claude/skills/superskills ~/.codex/skills/superskills .; do
  [ -n "$d" ] && [ -x "$d/scripts/qa-triggers.sh" ] && { "$d/scripts/qa-triggers.sh" db <diff-ref>; break; }
done

Exit 0 lists the matching files: the check is triggered. Exit 1 means nothing

matched: quote its "searched ..." line in the ledger row as the not-triggered

evidence. If the script is not found, fall back to the patterns above and still

grep the diff for SQL and for template/UI files before writing not triggered.

Action: invoke /db-optimize scoped to the matched files only.

Fold its findings into the report under §4a "DB hotspots (auto-run)".

If no trigger matched: do not run it, but record not triggered in the §7 ledger with the patterns you checked. A trigger that matched and was not run is a defect (see the ledger rule).

7b. `/defense` — always auto-run (basic OWASP sweep)

/defense is the OWASP Top 10 / secrets / auth / crypto / data-protection

review. It reads code only — no external tools, no auth prompt — so it's

safe to run on every daily-qa.

Action: invoke /defense scoped to all files changed in the window

(not the whole repo — keep it fast and signal-dense). If zero code files

changed, skip.

Fold findings into the report under §4b "OWASP / defense (auto-run)" with

severity (CRITICAL / HIGH / MEDIUM / LOW) and file:line references as

/defense produces them. Only include CRITICAL and HIGH in the executive

summary; MEDIUM and LOW go in the report body.

7c. `/pentest` — recommend only (do not auto-run)

/pentest defaults to an in-harness source-code hunt (the session's own

model) but still requires an interactive authorization confirmation, and its

deeper modes — live network probes, fuzzing-backed hunts, SARIF output — run

through the external clearwing

scanner, which configures its own LLM provider and bills it per run. All of

that is the wrong shape for unattended daily runs.

Recommend /pentest when any of:

changed in the window

**/*.tf, k8s/helm manifests, .github/workflows/**, nginx/caddy/cloud

config) — a commonly-forgotten attack surface (exposed ports, broad IAM,

baked-in secrets). /iac-scan (§7i) auto-runs the static misconfig scan and

/defense (§4b) sweeps for secrets; recommend /pentest only as the deeper

hunt when those surface HIGH/CRITICAL.

Output the exact command (/pentest) plus the scoped path list. User

confirms authorization and runs it themselves.

7d. `/qa` — auto-run if frontend changed (report-only)

Frontend changes always get a browser pass. Trigger when changed files include

UI/frontend code (**/*.tsx, **/*.jsx, **/*.vue, **/*.svelte,

**/components/**, **/pages/**, app/**/page.tsx, **/*.css, route handlers

serving HTML), or when Step 3 found a bug signature in a user-facing path, or

Step 2 found a failing e2e/browser test.

Server-rendered templates (Jinja, ERB, Blade, Twig, plain .html) and

static JS/CSS count as UI. Decide with the shared helper, not by eye:

for d in "$SUPERSKILLS_DIR" ~/Sites/superskills ~/.claude/skills/superskills ~/.codex/skills/superskills .; do
  [ -n "$d" ] && [ -x "$d/scripts/qa-triggers.sh" ] && { "$d/scripts/qa-triggers.sh" ui <diff-ref>; break; }
done

Exit 0 lists the matching files: the check is triggered. Exit 1 means nothing

matched: quote its "searched ..." line in the ledger row as the not-triggered

evidence. If the script is not found, fall back to the patterns above and still

grep the diff for SQL and for template/UI files before writing not triggered.

Action: invoke /qa-only (the report-only variant: it drives the browser and

reports, and does not edit code, so it fits a sweep that never applies fixes)

scoped to the routes the changed files serve, against the project's dev URL

(check CLAUDE.md or the dev script, e.g. http://localhost:3000).

Fold the result into report §4d "Browser QA (auto-run /qa-only)".

If the app is not reachable, try the project's documented start command once.

If it still is not up, do NOT skip silently: record *skipped: app not reachable

at <url>* in the §7 ledger, list the changed routes, and put the exact

/qa command in the recommended follow-ups. Fixing what /qa-only finds is

the user's call: recommend /qa for that.

7e. `/web-perf` — recommend only (do not auto-run)

/web-perf uses Chrome DevTools MCP to measure Core Web Vitals (LCP, INP,

CLS) and trace render-blocking resources, layout shifts, and network

dependency chains against a live running app. It requires the

chrome-devtools MCP server and a URL to hit — wrong shape for unattended

runs, but high-signal when frontend code changed.

Trigger — recommend when any of:

**/*.svelte, **/components/**, **/pages/**, **/styles/**,

**/*.css, **/*.scss, layout/routing files)

config changed (can affect bundle size and load time)

Output — recommend the exact command:

/web-perf

Include the list of changed frontend files so the user can scope the audit

to the affected routes. If the project has a local dev URL (check

CLAUDE.md or common config like package.json "dev" script), include it

as context: e.g. _"Run /web-perf against http://localhost:3000 — changed

files: src/components/Hero.tsx, app/page.tsx"_.

7f. `/cso` — recommend only (threat-model backstop)

/cso is OWASP Top 10 + STRIDE threat modeling — a design-time activity

whose real home is /write-plan. daily-qa is post-merge, so this is only a

backstop: it catches a trust-boundary change that shipped without a threat

model.

Recommend /cso when a commit in the window introduces a new trust boundary

and the commit/PR shows no sign threat modeling happened:

Output the exact command and note: *"threat modeling belongs at plan time

(/write-plan → /cso) — run it now if it was skipped."* Don't recommend it for

changes that cross no trust boundary.

7g. `/design-audit` — recommend only (visual + accessibility), alongside `/qa`

Visual consistency, hierarchy, AI-slop tells, and accessibility are an

easily-forgotten layer. For any frontend feature, the design pass belongs

alongside the functional pass: recommend /design-audit (read-only visual

— does it look right + does it work. Trigger when changed files include UI

(**/*.tsx, **/*.jsx, **/*.vue, **/*.svelte, **/components/**,

**/pages/**, **/styles/**, **/*.css). Output both commands scoped to the

changed UI files, and pair with /web-perf (§7e) — together they cover

work + perf + a11y + visual.

/design-audit only finds and plans (read-only). To fix what it flags,

recommend /design-review as the follow-up — it edits source and commits

atomically, so the user runs it deliberately, not as part of the sweep.

7h. `/a11y` — recommend only (screen reader + WCAG)

Accessibility regressions are silent — they don't fail a build, they fail a

screen-reader or keyboard user. /a11y's dynamic pass needs a running app (wrong

shape for an unattended sweep), so recommend it — but only on **heavy frontend

changes likely to break assistive tech**, not every style tweak. Trigger when the

window's UI diff touches any of:

(See /a11y's trigger section for the authoritative list.) Output /a11y scoped to

the changed UI files, alongside the /design-audit + /qa recommendations

(§7g, §7d). Skip it for pure spacing/copy CSS changes.

7i. `/iac-scan` — auto-run if triggered (infra misconfig)

Trigger when changed files include infrastructure/deploy config: Dockerfile,

docker-compose*, *.tf/*.tfvars, Kubernetes/Helm manifests, .github/workflows/**,

Jenkinsfile, nginx/cloud config.

Action: invoke /iac-scan scoped to the matched infra files — it's static and

read-only (uses tfsec/checkov/hadolint/actionlint if installed, signature checks

otherwise), so it's safe to auto-run like /defense. Fold findings into the report

under §4c "Infra misconfig (auto-run /iac-scan)" with severity and file:line. Only

CRITICAL/HIGH go in the executive summary. If no infra files changed, record not triggered in the §7 ledger.

For a deeper hunt after HIGH/CRITICAL, recommend /pentest (§7c).

7j. `/humanize` — recommend only (prose drift)

Doc-heavy commits land from every branch, and merged prose is exactly what the

per-branch pipelines never re-check. Recommend /humanize when commits in the

window added or modified user-facing copy: documentation, help prose,

marketing pages, locale strings, or visible UI text (any file type

skills/humanize/toolkit/userfacing.py classify <path> does not call

none). Internal prompts, agent instructions, plans, and code comments are out of scope.

Also exclude changelogs, vendored/mirrored trees, and generated files (that

wording is deliberate or upstream's). It edits, not just reports, and rewrites

voice, so it never auto-runs unattended.

Include the list of changed prose files so the user can scope the pass, and

state it as a suggestion with the files as context: e.g. _"Run /humanize on

docs/billing.md and README.md — the window's commits touched them and the

prose has not been swept."_

7k. `/eval` — recommend only (AI-behavior drift)

Commits in the window that redefine AI behavior are behavior changes, and

unattended sweeps cannot measure behavior. Judge by content, not filename: a

prompt string edited inside code, a retrieval parameter, a judge rubric, or an

agent-loop change is a behavior change even when the file is ordinary source;

obvious signals are prompts, skill or agent instruction files, and LLM/RAG

pipeline code or configuration. Recommend /eval with the changed files

listed, stating that the run costs model calls and is launched by the user.

Never auto-run it: the spend needs a human yes.

7l. Other related commands — recommend only

surfaced a high-stakes correctness concern that warrants a deep multi-agent

cloud review. The ultra tier is billed and user-triggered, so never

auto-run it — output the exact command and let the user launch it.

architectural than the Step 3 /code-review pass. Recommend when a commit in

the window is architecturally significant or touches a critical path.

failure to root-cause.

when the untested-path list is worth closing now rather than just noting.

7z. The §7 ledger (mandatory)

Every §7 step gets one row in the report, whether or not it ran. Silence is not

an allowed status. Statuses:

(tool missing, app unreachable, authorization needed, window empty).

Before writing the report, compute the changed-file list once and match it

against every trigger in §7a to §7l, including the Step 4 drift script. A step

whose trigger matched but whose status is not ran or skipped (reason) means

the sweep is incomplete: go back and run it. Auto-run steps (§7a, §7b, §7d, §7i)

may only be skipped for a reason a reader can verify.

Step 8: Report format

Write to daily-qa-reports/YYYY-MM-DD.md (create the directory if

needed; add to .gitignore if appropriate). Structure:

# Daily QA — <YYYY-MM-DD>

Window: <from> → <to>
Commits scanned: N
CI runs scanned: N

## 1. CI failures & flaky tests
- Observed failures: …
- Suspected flakes: …
- Top fixes: …

## 2. Recent-commit bug scan (auto-run /code-review)
- Observed: …
- Suspected: …
- (or) No findings.

## 3. Dependency / SDK drift
- Safe bumps: …
- Major bumps (breaking risk): …
- SDK drift: …

## 4. Performance regressions
- Observed: …
- No-measurement gaps: …

### 4a. DB hotspots (auto-run /db-optimize)
- (only if triggered; otherwise omit section)

### 4b. OWASP / defense (auto-run /defense)
- CRITICAL: …
- HIGH: …
- MEDIUM / LOW: …
- (omit subsection only if no code files changed)

### 4c. Infra misconfig (auto-run /iac-scan)
- CRITICAL / HIGH: …
- (only if infra/deploy config changed; otherwise omit section)

### 4d. Browser QA (auto-run /qa-only)
- <result, or skipped: reason>

## 5. Untested paths
- Drafted tests: file paths + summary
- Coverage gaps without drafts: …

## 6. §7 ledger
| Step | Status | Detail |
|---|---|---|
| 4.6 drift script | ran / skipped (reason) | … |
| 7a /db-optimize | ran / not triggered / skipped | … |
| 7b /defense | … | … |
| 7c /pentest | recommended / not triggered | … |
| 7d /qa-only | … | … |
| 7e–7l | … | … |

## Recommended next actions
1. …
2. …

## Recommended follow-up commands
- `/code-review ultra` — (only if Step 3 found a high-stakes correctness concern)
- `/review` — (only if a change is architecturally significant / critical-path)
- `/cso` — (only if a trust-boundary change shipped without a threat model)
- `/web-perf` — (only if frontend files changed; include affected routes and dev URL)
- `/design-audit` + `/qa` — (only if UI changed; visual/a11y audit alongside functional QA)
- `/a11y` — (only if heavy UI likely to affect screen-reader/keyboard/contrast)
- `/design-review` — (to fix what `/design-audit`/`/a11y` flag; mutates + commits)
- `/pentest` — (only if /defense or /iac-scan found CRITICAL/HIGH, or auth/crypto changed — NOT on a bare infra change; /iac-scan §4c already covers that statically)
- `/qa` — (to fix what the auto-run `/qa-only` found, or when it was skipped because the app was unreachable)
- `/test-coverage` — (only if Step 6's untested-path list is worth closing now; writes and applies the drafted tests)

Print the report path and a 5-line executive summary to the chat.

Update .daily-qa-last-run to <current timestamp> <HEAD sha>.

Anti-patterns (do not do)

Related commands

Auto-invoked (local, diff-only — no external tools or auth prompt, safe for daily):

Recommend-only (never auto-run):

tests that Step 6 only drafts as a report; the fixer counterpart (/qa-full

Step 9 runs it automatically).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.