- Home
- Skills
- Codyswanngt
- Lisa
- Mutation Testing
mutation-testing_skill
- TypeScript
1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill codyswanngt/lisa --skill mutation-testing- SKILL.md11.1 KB
Overview
This skill performs AI-powered mutation testing to evaluate and improve unit test quality for TypeScript projects. It generates focused code mutants guided by risk factors, runs targeted tests to find surviving mutants, and strengthens or creates tests to kill those survivors. Use it against a file path, directory, or the default set of changed files from git diff.
How this skill works
The skill identifies target source files, gathers context (source, tests, coverage, git history, and risk factors), and detects the project test runner. It creates an experimental branch, generates 3–5 realistic, buildable mutants per file, and validates each with a build check and test run. Surviving, non-equivalent mutants trigger automated test strengthening or new test generation, validated by running tests on both original and mutated code before finalizing changes and producing a mutation testing report.
When to use it
- Assess test completeness for recently changed code (default: git diff changed files)
- Validate critical code paths (security, integrations, database, performance)
- Before a release to find fragile or missing assertions
- As part of QA to reduce regression risk in shared modules or utilities
- When improving test suites to increase confidence in refactors and deployments
Best practices
- Limit mutants to 3–5 per file and keep each change atomic and realistic
- Run a build/typecheck after every mutant to avoid untestable mutations
- Prioritize risk factors (security, integrations, historic defects) when selecting mutation operators
- Never alter tests just to make mutants pass; strengthen assertions or create targeted new tests
- Keep mutant commits on an experimental branch and revert mutants before merging test improvements
Example use cases
- Harden authentication logic tests by generating security-related mutants that remove auth checks
- Expose flaky integration error handling by mutating retry and timeout behavior
- Detect missing boundary checks in numeric algorithms by value and decision mutations
- Improve coverage of recently modified utility functions found in git diff
- Automatically generate and validate tests that demonstrate concrete behavioral gaps revealed by surviving mutants
FAQ
You can pass a single file path, a directory (excluding test files), or omit arguments to default to changed files from git diff.
How does the skill avoid equivalent or untestable mutants?
It runs AST and behavioral checks to detect equivalence and performs build/typechecks; equivalent or build-failing mutants are discarded and logged for human review.