testkit

Retrofit a verified automated test suite onto an untested working codebase.

1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/mimukit/skills --skill testkit-mimukit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testkit
Source: https://github.com/mimukit/skills/tree/main/skills/testkit
Command: npx skills add https://github.com/mimukit/skills --skill testkit-mimukit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Brownfield codebases with no tests invite coverage theater: suites that mirror the implementation, pass on the first run, and detect nothing. This Skill ranks the untested surface, crowns one slice worth covering, and writes tests that have each been observed to fail before being kept. ## Core Features & Use Cases - Audit mode: Ranks the untested surface using git churn, fan-in, failure cost, and testability cost, then writes a durable ledger at docs/tests/testplan-<repo>-<date>.md with a crowned slice and testability blockers. - Cover mode: Stands up the ecosystem's default test runner, declares a behaviour count in advance, and writes tests whose expectations come from outside the implementation, each carrying a provenance comment. - Failure gate: Every kept test is watched to fail via a semantic mutation of the source, which is then reverted by reverse-applying the recorded diff, never by restoring files. - Use Case: You inherit a payments service with zero tests. Run an audit to crown the billing slice, then run cover to stand up a runner and land eight behaviour tests, each verified red against a named mutation. ## Quick Start Ask the agent to audit this repository's untested code and then write verified tests for the highest-priority slice.

Frequently Asked Questions about testkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add tests to a codebase that has none?

Start with an audit that ranks the untested surface by churn, fan-in, failure cost, and testability cost, then crown one coherent slice. Write tests for that slice only, sourcing each expectation from documentation, issues, or caller usage rather than the implementation itself.

How do I verify a test actually tests something?

Apply a semantic mutation to the source, such as flipping a comparison or changing a returned value, then run the narrowest test selection and watch the target test fail while its neighbours stay green. A test that stays green under its mutation is deleted and reported.

What should I test first in a legacy project?

Rank files by git churn and fan-in from git log output, weight by failure cost such as money, auth, or data loss, and divide by testability cost. Group the top of the ranking into coherent slices along co-change clusters and crown exactly one.

Can tests be written against a production database?

No. Tests may only run against verified disposable targets: localhost, a container started for the purpose, or an explicitly named test URL. A value inherited from an ambient .env file never qualifies, however the file is named.

What happens when a test reveals a bug in existing code?

The bug is reported, never fixed. Write the test asserting the intended behaviour, mark it skipped or expected-to-fail with a one-line pointer, and route the contradiction to a debugging skill or the user for a decision.

When should code be restructured to make it testable?

Not during test retrofitting. Untestable code is logged as a testability blocker in the ledger and routed to a refactoring skill, since extracting interfaces or injecting dependencies mid-run conflates two separate decisions.