claude-skill-testweaver
officialClaude Code skill: find surviving gremlins mutations in a Go package and generate targeted tests that catch them.
claude-skill-testweaver
A Claude Code skill that finds surviving gremlins mutations in a Go package and generates targeted tests to catch them. Each generated test is validated end-to-end (baseline → compile → clean → mutate → revert) before it’s committed on a new branch with a PR.
Install
npx claude-skill-testweaver
You’ll be asked whether to install for your user or the current project:
| Scope | Path | When to use |
|---|---|---|
| User-level | ~/.claude/skills/testweaver/ | Available in every Claude Code session. |
| Project-level | ./.claude/skills/testweaver/ | Pinned to one repo, checked into source control if you want. |
Skip the prompt with a flag:
npx claude-skill-testweaver --user
npx claude-skill-testweaver --project
npx claude-skill-testweaver --force # overwrite without asking
npx claude-skill-testweaver update # reinstall over existing
npx claude-skill-testweaver uninstall # remove
Requirements
The skill shells out to these tools — install them before running it:
gremlins— Go mutation testergh— GitHub CLI (for opening PRs)jq— JSON parsing- A working Go toolchain
Usage
Inside Claude Code, after installing:
/testweaver github.com/acme/repo/pkg/foo
/testweaver github.com/acme/repo/pkg/foo 3 # attempt up to 3 mutations this run
The skill will:
- Run
gremlins unleashagainst the package. - Pick mutations that survived (status =
LIVED). - Generate a
_test.gofor each, validating it catches the mutation on mutated code and passes on clean code. - Commit the test files on a new branch and open a PR via
gh.
Full skill documentation lives in skill/SKILL.md.
Local development
# dry-run the installer against a scratch dir
mkdir /tmp/tw-scratch && cd /tmp/tw-scratch
node /path/to/this/repo/bin/cli.js --project
ls .claude/skills/testweaver/
# verify packaging
cd /path/to/this/repo
npm pack --dry-run
Publishing
Tag a release (vX.Y.Z) and the GitHub Actions workflow publishes to npm. Requires NPM_TOKEN set as a repo secret.
License
MIT — see LICENSE.