test-runner-debugger
Skill0 starsChanged 2 months agoMITView on GitHub
Guides agents through executing, filtering, and debugging automated test suites across Jest, Vitest, Pytest, Go test, and Cargo test.
In this repository49 other files it gives its agents.
- bug-reproducerSkill
- claim-checkerSkill
- command-failure-diagnoserSkill
- config-risk-reviewerSkill
- csv-validatorSkill
- deployment-checklist-makerSkill
- diff-reviewerSkill
- factual-summarizerSkill
- field-extractorSkill
- api-contract-testerSkill
- database-migration-helperSkill
- security-vulnerability-fixerSkill
- git-commit-stagerSkill
- git-conflict-resolverSkill
- github-actions-debuggerSkill
- github-issue-triagerSkill
- github-pr-creatorSkill
- github-pr-reviewerSkill
- go-code-qualitySkill
- go-lint-and-vetSkill
- go-testingSkill
- json-schema-converterSkill
- lint-and-typecheckSkill
- meaning-preserving-editorSkill
- meeting-notes-to-actionsSkill
- minimal-bug-fixSkill
- option-comparatorSkill
- py-code-qualitySkill
- py-lint-and-typecheckSkill
- py-testingSkill
- readme-writerSkill
- regression-test-writerSkill
- release-notes-drafterSkill
- repo-inspectorSkill
- research-briefSkill
- reversible-cleanup-plannerSkill
- rust-clippy-checkSkill
- rust-code-qualitySkill
- rust-testingSkill
- small-refactorSkill
- status-updateSkill
- step-by-step-tutorialSkill
- step-decomposerSkill
- tabular-analyzerSkill
- task-briefSkill
- ts-code-qualitySkill
- ts-lint-and-typecheckSkill
- ts-testingSkill
- skill-templateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use this skill when:
- Very specific: line 21
Do not use to write new regression test cases from scratch.
- Very specific: line 22
Do not use to create standalone reproduction scripts.
- Very specific: line 23
Do not use to lint or type-check.
- Very specific: line 30
If target_test_file is not specified: inspect package.json -> scripts.test, pytest.ini, or Makefile to discover the default test runner.
- Distinctive: line 31
If the entire test suite is slow (> 30s): identify changed files and run only the test files directly covering those files.
- Distinctive: line 32
Never modify test assertions to make a test pass unless the requirement itself has changed.
- Distinctive: line 35
Follow these numbered actions:
- Very specific: line 58
If test fails due to timeout: check for unclosed database connections, dangling HTTP requests, or missing await.
- Distinctive: line 59
If test fails on mock: check whether mock return value matches the expected schema of the real dependency.
- Distinctive: line 60
If all tests pass: state count of passed tests and execution duration.
- Distinctive: line 100
Stop and ask the user when:
- Distinctive: line 101
Test failures are caused by missing external infrastructure (e.g., real Redis, PostgreSQL) not present in the local container.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test Runner Debugger
Guides agents through executing test suites, filtering to isolated failing test cases, diagnosing test assertion errors, and verifying green runs.
1. Purpose
Empower agents to locate, run, and debug automated tests efficiently. An "Assertion Failure" occurs when expected output does not match actual output (expected X, got Y). A "Test Runner" is the framework executing tests (e.g. Jest, Vitest, Pytest, Go test, Cargo test).
2. When to Use
Use this skill when:
- Running tests before and after making code modifications.
- Isolating a single failing test case in a large test suite without running all 500 tests.
- Diagnosing mock failures, unhandled promise rejections, or timeout errors in tests.
- User requests: "Run tests", "Debug failing test", or "Check why test X fails".
3. When Not to Use
- Do not use to write new regression test cases from scratch; use
regression-test-writer. - Do not use to create standalone reproduction scripts; use
bug-reproducer. - Do not use to lint or type-check; use
lint-and-typecheck.
4. Required Inputs
workspace_root: Directory of the project.target_test_file: Specific test file or test pattern to run (e.g.tests/test_auth.pyor*.test.ts).
5. Missing-Input Behavior
- If
target_test_fileis not specified: inspectpackage.json -> scripts.test,pytest.ini, orMakefileto discover the default test runner. - If the entire test suite is slow (> 30s): identify changed files and run only the test files directly covering those files.
- Never modify test assertions to make a test pass unless the requirement itself has changed.
6. Procedure
Follow these numbered actions:
- Action 1: Identify Test Framework & Command Pattern
- Jest / Vitest:
npm test -- <path>ornpx vitest run <path> -t "<test_name>". - Pytest:
pytest <path> -k "<test_name>" -v. - Go:
go test -v -run "^TestName$" ./<pkg>. - Cargo (Rust):
cargo test <test_name> -- --nocapture.
- Jest / Vitest:
- Action 2: Run Targeted Test in Isolation
- Execute only the failing test file or case first to minimize diagnostic noise.
- Action 3: Classify Test Failure Mode
Assertion Error: Value mismatch (expected 200, got 500).Exception / Crash: Unhandled runtime exception before assertion.Timeout: Asynchronous operation did not complete within threshold (e.g., 5000ms).Mock Misconfiguration: Mock function not called or called with unexpected arguments.
- Action 4: Trace Root Cause to Source Code
- Inspect the exact line in source code triggered by the test stack trace.
- Action 5: Re-Run Targeted Test
- Confirm targeted test turns green.
- Action 6: Run Full Test Suite
- Confirm no collateral test failures were caused.
- Action 7: Emit Test Execution Report
- Format per Section 8.
7. Decision Rules
- If test fails due to timeout: check for unclosed database connections, dangling HTTP requests, or missing
await. - If test fails on mock: check whether mock return value matches the expected schema of the real dependency.
- If all tests pass: state count of passed tests and execution duration.
8. Output Format
Emit the test report using this template:
### Test Execution Report
- **Framework**: [e.g., Vitest | Pytest | Go test | Cargo test]
- **Command Executed**: `[Exact CLI command]`
- **Target**: `[Test file or test case name]`
- **Status**: [PASSED | FAILED]
- **Duration**: [e.g., 0.42s]
#### Test Results Summary
- **Tests Run**: [Total]
- **Passed**: [Count]
- **Failed**: [Count]
#### Failure Diagnosis (if any)
- **Failing Test**: `[Test name]`
- **Expected**: `[Expected value]`
- **Actual**: `[Actual value]`
- **Stack Trace Location**: `[file:line]`
- **Prescribed Source Fix**: `[Target source line and fix]`9. Verification Checklist
- Test was executed using the project's native runner.
- Specific test case was isolated and verified.
- Full test suite was executed to confirm no collateral regressions.
- Assertions were not altered or disabled to force a pass.
10. Common Failures and Recovery
| Failure Symptom | Cause | Recovery Action |
| Running all 1,000 tests on every edit | Missing filter flag | Use -k (pytest), -t (vitest/jest), or -run (go). |
| Flaky network test | Calling real external endpoint | Verify test environment has mock server or offline flag enabled. |
| Hanging test runner | Unclosed handle or event loop | Add --detectOpenHandles (Jest) or inspect background servers. |
11. Stop or Escalation Conditions
Stop and ask the user when:
- Test failures are caused by missing external infrastructure (e.g., real Redis, PostgreSQL) not present in the local container.
12. Examples
Example 1: Successful Execution
Input:
Project: Node.js / Vitest
Command: npx vitest run tests/auth.test.ts -t "validates token"Output:
### Test Execution Report
- **Framework**: Vitest
- **Command Executed**: `npx vitest run tests/auth.test.ts -t "validates token"`
- **Target**: `tests/auth.test.ts` ("validates token")
- **Status**: PASSED
- **Duration**: 0.18s
#### Test Results Summary
- **Tests Run**: 1
- **Passed**: 1
- **Failed**: 0
#### Final Verification Status
- Targeted test passed cleanly. Full suite `npm test` verified: 34 passed, 0 failed.Example 2: Ambiguous or Missing Input
Input:
Run tests.
Context: No test runner specified, tests/ directory has .py and .ts files.Output:
### Test Execution Report: Ambiguous Test Setup
- **Status**: Halted
The workspace contains both Python and TypeScript files. Please specify:
1. Which test suite you want to run (e.g. Python pytest or Node.js vitest).
2. The specific target test file or feature.Example 3: Expected Final Output
Output:
### Test Execution Report
- **Framework**: Pytest
- **Command Executed**: `pytest tests/test_orders.py -k test_calculate_tax -v`
- **Target**: `tests/test_orders.py::test_calculate_tax`
- **Status**: PASSED
- **Duration**: 0.08s
#### Test Results Summary
- **Tests Run**: 1
- **Passed**: 1
- **Failed**: 0
#### Final Verification Status
- Verified 1 test passed in 0.08s.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.

