An agent skill for Claude Code, Codex, Grok, Hermes and other coding agents that has the agent add real, runnable tests to a copy of a repository, then runs everything and produces an evidence pack: a test catalogue, per-test PASS/FAIL/SKIP logs, environment, commands, durations, coverage before and after, and a script that reproduces the run. The original repository is never modified.
The goal is to make a codebase more valuable as training and evaluation data, and to give buyers a verifiable test log.
Requires Python 3.9+ and git, plus each project's own toolchain (Node, Go, .NET, Unity editor, ...). No pip packages.
This is a plain agent skill: SKILL.md holds the instructions and scripts/ holds the tools, so any coding agent that can read files and run Python can use it.
- Claude Code: clone it into your skills folder and it is picked up as the
add-testsskill:git clone https://github.com/october-dev/add-tests ~/.claude/skills/add-tests - Codex: clone it into the Codex skills folder:
Or clone it anywhere and point Codex at
git clone https://github.com/october-dev/add-tests ~/.codex/skills/add-testsSKILL.md. When Codex works inside the repo, it readsAGENTS.md, which points toSKILL.md. - Grok, Hermes and other agents: clone it anywhere and tell the agent: "Read
<path>/SKILL.mdand follow it."
The commands below use $SKILL for the folder you cloned into, for example SKILL=~/.claude/skills/add-tests.
Start in simple mode. It surveys the stacks and writes a plan, and nothing is run or changed:
Use add-tests in simple mode on ~/code/my-game
S=$SKILL/scripts/add_tests.py
python3 $S prepare ~/code/my-game --work ~/add-tests/my-game # local clone on branch add-tests/<date>
python3 $S survey --work ~/add-tests/my-game --mode simple # writes .add-tests/PLAN.mdFull mode, in your coding agent (Claude Code, Codex, Grok, Hermes ...):
Use add-tests on ~/code/my-game in full mode, fork it into my-org, and push the branch when done
The agent follows SKILL.md: baseline run, write tests in the project's own framework, after run, catalogue, commits, evidence pack, verify, and optionally publish to the fork.
| command | does |
|---|---|
prepare <original> --work DIR [--fork-owner O] |
make the copy (local clone, or clone of a fork), new branch, record the original commit; pushing to the original is disabled |
survey --work DIR [--mode simple|full] |
detect stacks, frameworks, existing tests and the largest untested files; write PLAN.md |
run --work DIR --label before|after [--coverage] [--install] [--unity-editor P] |
run every suite, time-boxed; per-test JUnit XML, JSON and Markdown, raw logs, environment, commands; write run_tests.sh / .ps1 |
catalog --work DIR |
TESTS.md: new tests (what each checks, expected outcome, status), before/after metrics, regression and weakening guard, commits |
evidence --work DIR --out DIR |
copy the evidence pack |
verify --work DIR |
prove the original checkout's HEAD, working tree (file contents included) and refs are unchanged |
publish --work DIR --remote fork |
push the branch to the fork; refuses the original |
| stack | runner and log format |
|---|---|
| Node / TypeScript | Jest (JSON), Vitest (JUnit), Mocha (xunit), node --test (JUnit) |
| Python | pytest (JUnit, coverage with pytest-cov), unittest (parsed) |
| Go | go test -json, coverage profile |
| Rust | cargo test (parsed) |
| Java | Gradle and Maven (JUnit XML reports) |
| PHP | PHPUnit (JUnit) |
| Dart / Flutter | dart test / flutter test JSON reporter |
| .NET | dotnet test TRX |
| Unity | Unity Test Framework EditMode and PlayMode in batch mode (NUnit XML); needs --unity-editor |
| Cocos Creator, Colyseus | detected and planned; tested through the project's Node runner |
TESTS.md # catalogue + metrics + safety checks + commits
run_tests.sh / run_tests.ps1 # reproduce the run
add-tests-evidence/
before/ results.md results.json junit.xml *.log
after/ results.md results.json junit.xml *.log
.add-tests/ # state, survey, PLAN.md, new_tests.json, raw runs (git-ignored)
See examples/ for an evidence pack from a synthetic repo.
- The original is never written to.
verifychecks it, and the selftest proves it. - Pushing to the original is disabled in the copy. Commands refuse to run if a remote can push to the original, unless you opt in at prepare time.
- No network except dependency installs (
--install), the optional fork, and the optional push. - Logs are scrubbed of common secret formats.
bash tests/selftest.shIt builds a synthetic JavaScript + Python repo, adds tests in a copy, runs both suites, checks the logs, TESTS.md and the run script, and proves the original is untouched.
MIT
0.2.3: every file is read and written as UTF-8 whatever the system locale (a new_tests.json with non-ASCII test names no longer fails on Windows), and console output never crashes on a Windows code page.