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 /tests.
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.
/tests — 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)/tests full — the whole suite/tests unit | integration | e2e — by type/tests coverage — full run + coverage; gate via husky-test-coverage/tests types — tsc --noEmit and clear the errors in a loop/tests <path|pattern> — focused/tests --since <ref> — tests related to a commit range/tests --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
TypeScript refactoring and modernization guidelines from a principal specialist perspective. This skill should be used when refactoring, reviewing, or modernizing TypeScript code to ensure type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving TypeScript type architecture, narrowing, generics, error handling, or migration to modern TypeScript features.
tools
Resolves TypeScript and JavaScript problems across type-level programming, performance, monorepo management, migration, and modern tooling. Invoke when diagnosing "type instantiation excessively deep" errors, migrating JS to TS, configuring strict tsconfig, debugging module resolution, or choosing between Biome/ESLint/Turborepo/Nx.
tools
Turborepo monorepo build system guidance. Triggers on: `turbo.json`, task pipelines, `dependsOn`, caching, remote cache, the `turbo` CLI, `--filter`, `--affected`, CI optimization, environment variables, internal packages, monorepo structure, and package boundaries. Use when the user configures tasks or workflows, creates packages, sets up a monorepo, shares code between apps, runs changed packages, debugs cache behavior, or works in an `apps/` plus `packages/` workspace.
tools
Provides Tailwind CSS v4 performance optimization and best practices guidelines. Triggers when writing, reviewing, or refactoring Tailwind CSS v4 code; when working with Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.