test-runner
Skill9 starsChanged 8 months agoMITView on GitHub
Run tests, fix failures, and re-run until the suite passes.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- mekiki-io/mekiki-open-skillstheir own version, first seen Sep 30, 2026
- caseyng/Claude-skillstheir own version, first seen May 22, 2026
- shivae372/claude-bootstraptheir own version, first seen Apr 8, 2026
- AskExe/exe-build-skillstheir own version, first seen Mar 17, 2026
- claude-world/director-mode-litetheir own version, first seen Mar 13, 2026
- zircote/subcogtheir own version, first seen Feb 22, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- claude-world/director-mode-lite★ 80same name
- zircote/subcog★ 29same name
- Azure/sap-automation-qa★ 14same name
- AskExe/exe-build-skills★ 4same name
- caseyng/Claude-skills★ 1same name
- shivae372/claude-bootstrap★ 1same name
- EffortlessMetrics/demo-swarm★ 0same name
- mekiki-io/mekiki-open-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- codex-reviewSkill
- cost-reviewSkill
- coverage-reviewSkill
- db-reviewSkill
- functionalSkill
- learnifySkill
- mermaidSkill
- object-orientedSkill
- perf-reviewSkill
- proofreadSkill
- roast-reviewSkill
- testifySkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 11 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run the project's test suite (or specific test files), diagnose failures, fix them, and re-run until all tests pass.
- Distinctive: line 18
Before running anything, determine the test framework and runner by inspecting the project:
- Distinctive: line 30
If multiple frameworks exist, run the one most relevant to the specified files — or all of them if no files are specified.
- Distinctive: line 44
When no arguments are provided, run the full test suite.
- Very specific: line 56
Detect the framework: read package.json, pyproject.toml, Cargo.toml, go.mod, pom.xml, Gemfile, or equivalent to identify the test runner …
- Distinctive: line 57
Determine scope: if the user specified files or directories, run only those.
- Distinctive: line 60
No colour codes where possible (cleaner parsing)
- Distinctive: line 70
If the source code is wrong, fix the source code
- Distinctive: line 71
If the test is stale or incorrect, update the test
- Distinctive: line 72
If mocks or fixtures are missing, add them — following existing patterns in the codebase (search for how other tests mock the same …
- Distinctive: line 73
If the user explicitly said what to fix (e.g.
- Distinctive: line 74
Re-run the tests: after applying fixes, re-run the failing tests to verify they pass.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test Runner
Run the project's test suite (or specific test files), diagnose failures, fix them, and re-run until all tests pass.
Files and instructions: $ARGUMENTS
What to detect
Before running anything, determine the test framework and runner by inspecting the project:
- JavaScript/TypeScript:
jest,vitest,mocha,ava,tap,playwright,cypress— checkpackage.jsonscripts, config files (jest.config.*,vitest.config.*,.mocharc.*), and dev dependencies - Python:
pytest,unittest,nose2,tox— checkpyproject.toml,setup.cfg,tox.ini,Makefile, orpytest.ini - Go:
go test— check for*_test.gofiles - Rust:
cargo test— check forCargo.toml - Java/Kotlin:
mvn test,gradle test— checkpom.xmlorbuild.gradle - Ruby:
rspec,minitest— checkGemfile,.rspec,Rakefile - Shell:
bats— check for*.batsfiles - Elixir:
mix test— checkmix.exs - PHP:
phpunit— checkphpunit.xml,composer.json
If multiple frameworks exist, run the one most relevant to the specified files — or all of them if no files are specified.
How to interpret arguments
The arguments are free-form and flexible. They may contain:
- File references of any type and in any format:
@service.test.ts,tests/unit/,test_*.py,*_test.go - Additional natural language instructions alongside file references, such as:
- "only run the unit tests"
- "run with coverage"
- "focus on the auth module tests"
- "run the tests I just changed"
- "fix the source code, not the tests"
When no arguments are provided, run the full test suite.
Examples
/test-runner— detect the framework and run the full suite/test-runner @service.test.ts— run a specific test file/test-runner tests/unit/— run all tests in a directory/test-runner only the tests related to authentication— find and run auth tests/test-runner fix the source code, not the tests— fix implementation bugs instead of updating test expectations
How to proceed
- Detect the framework: read
package.json,pyproject.toml,Cargo.toml,go.mod,pom.xml,Gemfile, or equivalent to identify the test runner and its configuration. Check for custom test scripts (e.g.npm test,make test) - Determine scope: if the user specified files or directories, run only those. Otherwise run the full suite. If the user said "run the tests I just changed", use
git diff --name-onlyto find recently modified test files - Build the command: construct the appropriate test command for the detected framework. Include flags for:
- Verbose output (to capture individual test names and statuses)
- No colour codes where possible (cleaner parsing)
- Coverage only if explicitly requested
- Fail-fast only if explicitly requested
- Run the tests: execute via Bash. Set a reasonable timeout (default 120s, extend for large suites)
- Diagnose failures: for each failing test, read the test file and the source code it exercises. Determine whether the failure is caused by:
- A bug in the source code (the test expectation is correct but the implementation is wrong)
- A stale or incorrect test (the implementation is correct but the test needs updating)
- A missing mock, fixture, or setup issue
- An environment or configuration problem
- Fix the failures: apply the appropriate fix:
- If the source code is wrong, fix the source code
- If the test is stale or incorrect, update the test
- If mocks or fixtures are missing, add them — following existing patterns in the codebase (search for how other tests mock the same dependencies before creating new mocks)
- If the user explicitly said what to fix (e.g. "fix the source code, not the tests"), respect that
- Re-run the tests: after applying fixes, re-run the failing tests to verify they pass. If new failures appear, repeat steps 5–7. Stop after 3 full iterations to avoid infinite loops — if tests still fail after 3 rounds, report the remaining failures
- Report back: present results in the format below
Output format
All tests pass (no fixes needed)
## Test Results: PASS
Ran **42 tests** in 3.2s — all passed.All tests pass (after fixes)
## Test Results: PASS (after fixes)
Ran **42 tests** in 4.1s — all passed after fixing 3 failures.
### Fixes applied
1. **`src/services/user.ts:52`** — added uniqueness check before insert (was missing, causing `UserService.create › should reject duplicate emails` to fail)
2. **`src/handlers/__tests__/auth.test.ts:102`** — updated expected status from `429` to `200` (rate limiter was removed in v2.3)
3. **`src/repos/order.ts:34`** — passed `limit` parameter to the query builder (was being ignored)Tests still failing (after 3 rounds)
## Test Results: FAIL (after 3 fix rounds)
Ran **42 tests** in 6.2s — **1 still failing**, 2 fixed, 39 passed.
### Remaining failures
1. **`IntegrationTest.externalAPI › should retry on timeout`**
`tests/integration/api.test.ts:89`
Requires a running mock server on port 8080 — cannot fix automatically.
### Fixes applied
1. **`src/services/user.ts:52`** — added uniqueness check before insert
2. **`src/handlers/__tests__/auth.test.ts:102`** — updated expected status codeCannot determine framework
## Test Results: UNKNOWN
Could not detect a test framework. Looked for: package.json, pyproject.toml, Cargo.toml, go.mod, pom.xml, Gemfile.
Please specify how to run tests (e.g. `/test-runner npm test` or `/test-runner pytest tests/`).Important notes
- Never run tests in watch mode — it requires interactive input. If the user asks for watch mode, explain why it cannot run in this context and offer to run once instead
- Prefer fixing source code over weakening tests — unless the test expectation is clearly wrong or the user says otherwise, assume the test is correct and fix the implementation
- Search for existing patterns before adding mocks — use Grep to find how other tests mock the same dependency. Reuse the established approach
- Timeout handling — if tests exceed the timeout, report which tests completed and that the run was interrupted
- 3-round limit — stop after 3 fix-and-rerun cycles. Report remaining failures without further attempts
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

