tailtest for Claude Code¶
tailtest is a Claude Code plugin. It hooks into the Claude Code session lifecycle and fires automatically every time Claude writes or edits a source file.
Install¶
Restart Claude Code after install. No other setup needed.
Update¶
claude plugin marketplace update avansaber-tailtest
claude plugin update tailtest@avansaber-tailtest
Uninstall¶
How it works¶
Three hooks run automatically inside your Claude Code session:
SessionStart -- fires when you open a session. Tailtest scans your project for test runners (pytest, vitest, jest, etc.), writes the session state to .tailtest/session.json, and injects its instructions into Claude's context via CLAUDE.md.
PostToolUse -- fires after every file write or edit. Tailtest checks whether the file is a source file (not generated, not a test, not a config). If it passes the filter, the file is queued and Claude gets a short context note: "tailtest: billing.py queued for testing."
SessionEnd -- fires when the session ends. Tailtest writes a markdown session report to .tailtest/reports/ summarising which files were tested and their outcomes.
Complexity scoring¶
tailtest scores every queued file before generating scenarios. Path signals (auth, billing, payment, checkout) and content patterns (HTTP calls, database queries, branch count, public functions) contribute to a score. Files scoring 10 or above get thorough-depth testing (10-15 scenarios) regardless of the session-level depth setting, and the agent sees a reasoning note like "billing: +4 billing +3 HTTP = 12 scenarios". Low-complexity files get 2-3 scenarios. This happens automatically on every file write with no configuration needed.
Scenario tracking¶
At session end, tailtest logs the outcome for each tested file: passed, fixed (failed but resolved within the session), unresolved, or deferred. This log feeds cross-session history so recurring failures are surfaced at the start of future sessions. See the History page and Advanced for details.
Commands¶
| Command | What it does |
|---|---|
/tailtest <file> |
Generate or update tests for any file on demand, including files tailtest would normally skip |
/summary |
Show what tailtest tested this session, what passed, what was fixed, what was deferred |
tailtest off |
Pause tailtest for the current session |
tailtest on |
Resume after pausing |
Configuration¶
Create .tailtest/config.json in your project root (optional):
See Configuration for all options.
Monorepo support¶
Tailtest automatically detects monorepo layouts (pnpm workspaces, Nx, Turborepo, Lerna, Rush, or multiple package.json/pyproject.toml files at subdirectory roots).
Each package gets its own runner and test location resolved independently. No configuration needed.
What tailtest does NOT do¶
- Security scanning
- Coverage percentages or delta tracking
- HTML reports or dashboards
- Proactive scanning of files you did not change (the first-install scan is a one-time exception)