From shipshitdev-library
Runs tests at the right scope (changed-only, focused, full, type-check, e2e), detects the runner and package manager, and on failure reads output, applies minimal fixes, and reruns until green or blocked.
How this skill is triggered — by the user, by Claude, or both
Slash command
/shipshitdev-library:test-runnerThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run the right tests, not all the tests — then make red go green. This skill picks a
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.
npx claudepluginhub shipshitdev/skills --plugin worktreeContext-aware test orchestration: smart test selection via git diff mapping, progressive test ladder (unit→integration→E2E), failure triage with root cause analysis, and safe auto-fixers.
Runs tests with minimal scope: targeted file-first, full suite only when needed. Saves verbose logs and summarizes failures for fast debugging.
Identifies and fixes failing tests using smart grouping strategies. Groups errors by type and root cause, prioritizes infrastructure fixes before logic bugs.