bundles/testing/skills/test-runner/SKILL.md
Run a project's tests at the right scope — changed-only, focused, full, type-check, or e2e — then, on failure, read the output and traces, apply a minimal fix, and rerun until green or blocked. Detects the test runner and package manager from the repo. Use when the user asks to run tests, run the suite, run smoke/e2e tests, type-check, check the build compiles, fix failing tests, or runs /test run.
npx skillsauth add shipshitdev/library test-runnerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run the right tests, not all the tests — then make red go green. This skill picks a scope (changed-only by default, matching the "scoped tests locally, full suite in CI" discipline), detects the runner, executes, and on failure reads the actual output and traces, applies a minimal targeted fix, and reruns until the suite is stable or it hits a genuine blocker.
It subsumes the "run the smoke suite and stabilize it" and "compile and fix the type errors in a loop" workflows behind one scoped entry point.
Inputs:
changed (default), full, a focused path/pattern, --since <ref>,
or a type: unit / integration / e2e / coverage / types--no-fix to report failures without editing anythingOutputs:
--no-fix)Creates/Modifies:
--no-fix)External Side Effects:
Confirmation Required:
Delegates To:
husky-test-coverage to enforce or configure coverage thresholds and hooksplaywright-e2e-init when e2e is requested but no Playwright setup existsexecution-debugging / debug when a failure needs deeper root-cause worktypescript-expert for non-trivial type-error fixes surfaced by types modetsc --noEmit) and clear the errors in a loopDo not use this to set up a test framework (use playwright-e2e-init /
testing-cicd-init) or to enforce coverage gates in hooks (use
husky-test-coverage).
Hard rules:
--no-verify, no disabling CI checks. Fix the test or the code.test -f bun.lock && echo "pm=bun"
cat package.json | sed -n 's/.*"\(test[^"]*\)".*/\1/p' # discover test scripts
Detect the runner from package.json scripts and dev-dependencies:
vitest present; supports --changed and relatedjest present; supports --onlyChanged, --changedSince,
--findRelatedTestsbun test; no related-test detection (map by path convention)@playwright/test; e2e, no related detection (use tag grep)Prefer the repo's own scripts (bun run test, bun run test:e2e, bun run smoketest) over invoking the runner directly when they exist. Use bun/bunx,
never npm/npx.
Compute the changed set for changed (default) and --since modes:
# dirty worktree (default): all changes vs HEAD (staged + unstaged)
git diff --name-only HEAD
# commit range
git diff --name-only <base>...HEAD
Map the scope to a command:
bunx vitest related <files> --run (or vitest --changed)bunx jest --findRelatedTests <files> (or --changedSince <ref>)full and say so<path|pattern> — pass straight to the runnerhusky-test-coveragebunx tsc --noEmit (or the repo's type-check script)If a scope cannot be honored precisely (e.g. no related detection), run the closest safe superset and state what was actually run — never imply full coverage from a partial run.
Run the resolved command once. Capture full output. For e2e, ensure the app/server the suite needs is up first (use the repo's documented start command).
For each failure, work the loop:
For types mode, run the type checker, group errors by file and category, fix the
highest-confidence ones first, and re-run until clean or blocked.
If a fix made a previously failing test pass, re-run that test (and any test you touched) one extra time to confirm it is stable, not order- or timing-dependent. Flag any test that passes inconsistently rather than declaring success.
/test run — changed-only, related to your dirty worktree (default; falls back
to full on a clean tree or when related detection is unavailable, and says so)/test run full — the whole suite/test run unit | integration | e2e — by type/test run coverage — full run + coverage; gate via husky-test-coverage/test run types — tsc --noEmit and clear the errors in a loop/test run <path|pattern> — focused/test run --since <ref> — tests related to a commit range/test run --no-fix — run and report; make no editsReport the scope that ran (and what was not run), the pass/fail counts and duration, any fixes applied with the files touched, the flakiness-recheck result, and any blocker that stopped the loop.
development
Coordinates a weekly engineering review of board accuracy, recent code changes, operational health, and scoped cleanup. Use for a recurring repository health review or a review of the last several days.
testing
Audits project board configuration and prepares explicitly requested setup, copy, or normalization changes while preserving the existing workflow and provider boundaries. Use when inspecting a board's fields, columns, scope, or configuration.
testing
Reconciles a project board with current work and delivery evidence, reports incomplete coverage and metadata gaps, and applies only approved provider-supported field changes. Use when auditing board drift, reviewing blocked work, or assessing upcoming delivery.
development
Walk through how a subsystem works. Use for "how does X work", code walkthroughs before changing something, and placement or ownership questions. Explains architecture, runtime flow, and onboarding mental models. Can critique architecture. Use why for motivation.