test-suite
Skill8 starsChanged 48 days agoMITView on GitHub
Generates a test suite by analyzing coverage gaps, prioritizing critical and untested code paths, then writing tests in parallel that match the project's existing patterns. Use when the user wants to write tests, add test coverage, generate test cases, improve testing, or analyze coverage gaps. Supports pytest, vitest, jest, and all major test frameworks. Not for debugging a specific failing test (use fix-bug).
3 other projects use a version of this.
Adopted by
Most recently taken up by
- poorvith-mp/skills-developertheir own version, first seen Aug 19, 2026
- Kastalien-Research/thoughtboxtheir own version, first seen Jul 3, 2026
- jasonmichaelbell78-creator/sonash-v0their own version, first seen Feb 8, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Kastalien-Research/thoughtbox★ 64same name
- jasonmichaelbell78-creator/sonash-v0★ 2same name
- poorvith-mp/skills-developer★ 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 repository53 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- anything-to-skillSkill
- ci-generateSkill
- ci-localSkill
- clotho-researchSkill
- codex-imagegenSkill
- create-ruleSkill
- create-skillSkill
- db-migrateSkill
- docker-initSkill
- docs-adrSkill
- docs-checkSkill
- docs-diagramSkill
- docs-initSkill
- docs-rfcSkill
- docs-updateSkill
- env-setupSkill
- find-skillsSkill
- fix-bugSkill
- git-commitSkill
- git-create-prSkill
- gitflowSkill
- git-releaseSkill
- git-syncSkill
- i18n-checkSkill
- implement-featureSkill
- improve-skillSkill
- inject-docsSkill
- jira-cliSkill
- motion-studioSkill
- optimize-ai-setupSkill
- orchestrateSkill
- oss-launchSkill
- prd-to-issuesSkill
- product-design-specSkill
- product-design-tokensSkill
- product-prdSkill
- project-illustratorSkill
- project-plannerSkill
- refactorSkill
- renderSkill
- review-codeSkill
- review-depsSkill
- review-designSkill
- review-perfSkill
- review-planSkill
- review-securitySkill
- shipSkill
- stopslopSkill
- vrt-checkSkill
- wtfSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. 0 are common, 14 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Test generation must be grounded in code you actually read and patterns you actually verified: a test for a method that doesn't exist, or a …
- Distinctive: line 28
Read the source file before writing any test for it.
- Distinctive: line 31
Run every generated test: a test that has never executed is unverified.
- Distinctive: line 32
Only reference methods and functions that exist in the code you read, along with their real interfaces.
- Distinctive: line 33
Every test needs a meaningful assertion, not just "does not throw."
- Distinctive: line 44
If unsure, default to Small and escalate only if the target turns out to span several modules.
- Distinctive: line 65
Create the phase tasks per "Task structure" in references/subagent-template.md, then discover the test workflow with the Haiku Explore …
- Distinctive: line 73
Run the discovered coverage command to get the current state:
- Distinctive: line 95
If the user specified target files/modules, prioritize those.
- Very specific: line 101
Use AskUserQuestion to present the plan and get approval:
- Distinctive: line 134
No subagent tool? Take the groups one at a time and write the tests yourself, applying the same template requirements: read the source and …
- Distinctive: line 140
Run the discovered test command once:
- Very specific: line 156
Use the cc-arsenal:git-commit skill to create the commit where available.
- Distinctive: line 204
Run Phase 0 first, every time, never assume which test framework a project uses.
- Distinctive: line 207
All existing tests must keep passing.
- Very specific: line 208
When scope or approach is genuinely unclear, ask via AskUserQuestion (or its text fallback) rather than guessing.
- Distinctive: line 209
Prefer one clean commit with all tests over many small commits.
“Common” is measured: kept by at least 6 in 10 of the 3 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 Suite Generator
Generate comprehensive test suites with coverage gap analysis and parallel test writing, following testing best practices across any project type and framework.
Target
$ARGUMENTS
Anti-hallucination guidelines
Test generation must be grounded in code you actually read and patterns you actually verified: a test for a method that doesn't exist, or a coverage number you didn't measure, is worse than no test at all:
- Read the source file before writing any test for it.
- Discover the test framework from the project itself (Phase 0) rather than assuming pytest/vitest/jest.
- Match the project's existing test style exactly, down to its fixtures and other conventions.
- Run every generated test: a test that has never executed is unverified.
- Only reference methods and functions that exist in the code you read, along with their real interfaces.
- Every test needs a meaningful assertion, not just "does not throw."
- Target untested code paths; don't duplicate coverage that already exists.
- Any coverage percentage or baseline you report must come from a command you actually ran; the same goes for any file path. Never estimate or invent one, even under time pressure.
A Stop hook re-runs the discovered test/coverage/lint commands automatically before letting the session end (see frontmatter). Phase 4 below exists only to catch failures before that automatic gate fires, not to duplicate it.
Scope: pick a track before starting
- Small (1-2 tests, a single file, a quick fix): skip task creation and the approval gate. Discover the test command (Phase 0), write the tests, run them, done. Don't spin up task ceremony for a two-test add.
- Large (multiple files/modules, a coverage push, anything needing parallel subagents): use the full Phase 0-5 workflow with the checklist below.
If unsure, default to Small and escalate only if the target turns out to span several modules.
Portability: No Task/TaskCreate tools in this environment? Skip task tracking and the parallel subagent fan-out in Phase 3: do discovery and gap analysis yourself with Read/Grep/Glob, and write the tests for each module group yourself, one group at a time. The phase structure is the contract; parallelism is just a speedup. All Task, Explore and subagent boilerplate lives in references/subagent-template.md.
Implementation Workflow (Large track)
Copy this checklist and tick it as you go:
- [ ] Phase 0: discover test, coverage and lint commands and 2-3 existing test files
- [ ] Phase 1: run coverage baseline, rank targets
- [ ] Phase 2: user approves the test plan (no approval -> do not start Phase 3)
- [ ] Phase 3: write tests per module group
- new tests fail for the wrong reason (import error, wrong interface) -> back to the Phase 3 writing step, re-read the source
- existing suite breaks -> stop, find the side effect, report before going on
- [ ] Phase 4: run the full test command (max 3 fix rounds, then report what still fails)
- [ ] Phase 5: commit with measured coverage numbersPhase 0: Project Discovery
Create the phase tasks per "Task structure" in references/subagent-template.md, then discover the test workflow with the Haiku Explore prompt in Discovery prompt. Without subagent tools, read CLAUDE.md, the task runner files and 2-3 existing test files yourself.
Store the discovered test, coverage and lint commands plus the style patterns for later phases.
Phase 1: Coverage Gap Analysis
Goal: Identify what code lacks test coverage and prioritize test generation targets.
Run the discovered coverage command to get the current state:
# Examples (use the ACTUAL discovered command):
pytest --cov --cov-report=term-missing
vitest --coverage
jest --coverage
make coverageCapture the output. If no coverage tooling exists, map untested code with the Gap-analysis prompt, or by comparing source and test file lists yourself.
Rank files/modules for test generation by:
| Priority | Signal |
| 1 | Critical business logic: authentication, payments, data processing |
| 2 | Untested code: files with zero test coverage |
| 3 | Complex code: high cyclomatic complexity, many branches |
| 4 | Recently changed: code modified in recent commits (use git log --oneline -20 --name-only) |
| 5 | Error-prone areas: code with known bugs or frequent changes |
If the user specified target files/modules, prioritize those. Otherwise, use the ranking above.
Phase 2: Test Plan (User Approval)
Goal: Present a test plan for user review before generating tests.
Use AskUserQuestion to present the plan and get approval:
AskUserQuestion:
question: "Here's the test generation plan based on coverage analysis. Which approach do you prefer?"
header: "Test Plan"
options:
- label: "Full coverage (Recommended)"
description: "Generate tests for all [N] identified gaps: [list of modules]. Estimated [M] test files."
- label: "Critical paths only"
description: "Focus on [top modules] with highest business impact. Estimated [K] test files."
- label: "Specific modules"
description: "Let me specify which modules to test."No AskUserQuestion tool available? Present the same plan as plain text and wait for the user's reply before moving on to Phase 3.
The plan should include, for each target:
| Field | Content |
| File/module path | The path being tested |
| Functions/methods | Which ones to cover |
| Test types | Unit tests, integration tests, edge cases |
| Estimated test count | Per file |
| Test file location | Following project conventions |
Phase 3: Parallel Test Generation
Goal: Write tests for each approved module group, in parallel where subagents exist.
Group approved targets into logical units (module, feature area, related files). For each group, create a child task (Parallel child tasks) and spawn a Sonnet subagent with the Test-writer subagent template, spawning independent groups at once. Review each subagent's test files against project conventions as it finishes.
No subagent tool? Take the groups one at a time and write the tests yourself, applying the same template requirements: read the source and existing tests first, follow the Test Quality Principles, run the test command after each group.
Phase 4: Quality Verification
Goal: Catch failures before the Stop hook's automatic final check.
Run the discovered test command once:
# Use the ACTUAL discovered command, e.g.:
make test
pytest
npm test
bun testIf a test fails, figure out whether it's a new test (fix the test, it made a wrong assumption about behavior) or an existing test (the new code introduced a side effect, investigate and fix). Re-run until everything passes, at most 3 rounds; then report what still fails instead of looping.
That's it: the Stop hook already re-runs tests, coverage, and lint automatically before the session ends, so don't duplicate a full separate coverage-and-lint pass here. This step exists only so failures surface while you're still working, not at the very last gate.
Phase 5: Final Commit
Use the cc-arsenal:git-commit skill to create the commit where available; otherwise create a conventional commit manually, using the actual coverage numbers from the command you ran in Phase 4/Phase 1, never an estimate:
git add [test files created/modified]
git commit -m "test: add comprehensive tests for [modules]
- [N] test files, [M] test cases added
- Coverage: [X]% → [Y]% (+[diff]%)
- Covers: [brief list of modules/features tested]
- Frameworks: [test framework used]"Output Summary
Provide a summary including:
| Field | Content |
| Tests generated | Number of test files and test cases |
| Coverage improvement | Baseline to new coverage percentage (from the commands actually run, not estimated) |
| Modules covered | List of modules/files that received new tests |
| Test types | Unit, integration, edge cases breakdown |
| Remaining gaps | What still lacks coverage and recommendations |
| Commit | Reference to the commit created |
Test Quality Principles
Generated tests must follow these principles:
| Principle | Detail |
| Arrange-Act-Assert | Clear structure in every test |
| Single responsibility | Each test verifies one behavior |
| Descriptive names | Test name explains the scenario and expected outcome |
| Independence | Tests do not depend on execution order or shared state |
| Deterministic | Same result every time, no flaky tests |
| Fast | Unit tests run quickly; minimize I/O and external calls |
| Readable | Tests serve as documentation for the code under test |
| Maintainable | Avoid testing implementation details; test behavior and contracts |
| Lean coverage | Over-testing is the failure mode in the other direction. Skip trivial getters and pure pass-throughs, as well as framework-guaranteed behavior. Don't add a snapshot test or an assert-nothing test just to move a coverage number. The one exception: never skip a test for a security or validation path, or one touching data loss, just because it's tedious to set up; that risk is always worth the test. |
Additional Resources
- references/subagent-template.md - Task setup, Explore prompts and the test-writer subagent template for the Large track.
- references/framework-patterns.md - pytest, vitest/jest, Go, and Rust idioms (file layout, naming, fixtures, mocking, common anti-patterns). Load it when writing tests for a framework whose conventions you're not confident about, or when the Phase 0 discovery didn't surface enough existing test files to infer the pattern yourself.
Important Notes
- Run Phase 0 first, every time, never assume which test framework a project uses.
- Match the project's existing test style exactly; don't introduce a new convention alongside the old one.
- Coverage is a guide, not a goal: a meaningful test beats a percentage bump.
- All existing tests must keep passing; a new test that breaks an old one is a regression, not progress.
- When scope or approach is genuinely unclear, ask via
AskUserQuestion(or its text fallback) rather than guessing. - Prefer one clean commit with all tests over many small commits.
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.

