Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/sefaertunc/worclaude/test-coveragegit clone --depth 1 https://github.com/sefaertunc/WorclaudeWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00010 | $0.01193 |
| Opus 5 | $0.00005 | $0.00596 |
| Sonnet 5 | $0.00002 | $0.00239 |
| Haiku 4.5 | $0.00001 | $0.00119 |
Grade A, and why
test-coverage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze test coverage and fill gaps in the most critical areas. Delegates to the test-writer agent for test creation.
Process
-
Read project coverage thresholds
Before measuring, read the project's configured threshold so the gap baseline is the project's standard, not a guess. Check in this order and use the first one that exists:
- Vitest:
vitest.config.ts/vitest.config.js(test.coverage.thresholds) - Jest:
jest.config.{ts,js,cjs}orpackage.jsonjest.coverageThreshold - Pytest:
pytest.ini/pyproject.toml([tool.coverage.report] fail_under) - Go: a
// coverage:directive inMakefileor CI config - Fallback: 80% line coverage if no threshold is configured
Report the threshold up front so the gap analysis has a clear bar.
- Vitest:
-
Measure current coverage
Run the coverage tool for the project:
- Node.js:
npx vitest run --coverageornpx jest --coverage - Python:
pytest --cov=src --cov-report=term-missing - Go:
go test -coverprofile=coverage.out ./... && go tool cover -func=coverage.out - Read CLAUDE.md for project-specific coverage commands
- Node.js:
-
Identify gaps, anchored to the last release
Focus on files with coverage below the configured threshold that contain:
-
Business logic (core domain functions)
-
Error handling paths
-
Integration points (DB, API, filesystem)
-
Recently changed code, anchored to the last release tag (not an arbitrary
HEAD~10). Run the helper as a single command — do not unpack the script body:bash .claude/scripts/test-coverage-changed-files.shThe helper prints one filename per line — files changed since the last release tag, or the last 10 commits when no tag exists. This makes "recently changed" mean "since the last release," not "since some arbitrary cutoff," so coverage gaps reflect what actually ships next.
-
-
Prioritize by risk
Don't aim for 100% everywhere. Prioritize:
- HIGH: untested error handling, auth logic, data validation
- MEDIUM: untested business rules, state transitions
- LOW: untested getters, formatters, simple delegation
- SKIP: generated code, framework boilerplate, config files
-
Confirm-then-delegate (do NOT write tests inline)
Present the prioritized gap list to the user as a table:
| # | File | Coverage | Risk | Suggested tests | |---|-----------------------|----------|------|------------------------------------------| | 1 | src/core/merger.js | 62% | HIGH | conflict-resolution edge cases (3 tests) | | 2 | src/utils/hash.js | 45% | HIGH | empty input + non-UTF8 encoding (2 tests)| | 3 | src/commands/init.js | 78% | MED | scenario-C edge case (1 test) | ...Then ask the user which to close. Use
AskUserQuestionwhen the list has 2-4 candidates (its native option limit). For >4 candidates, present a numbered list and ask the user to reply with the numbers they want closed (e.g., "1, 3, 4").AskUserQuestion: "Which gaps should I close?" - <up to 4 file/test descriptions, one per option>Delegate confirmed gaps to the
test-writeragent in a worktree. Do NOT write tests inline:Agent({ subagent_type: "test-writer", description: "Close coverage gaps in <files>", prompt: "Coverage gaps to close:\n<confirmed list>\n Project threshold: <threshold>%. Follow existing test patterns. Name tests as specifications. Verify each new test passes; report any that don't and why." })The worktree isolation keeps the main session clean if test-writer's exploration touches many files.
-
Report results
After the agent returns:
File Before After Tests Added Notes src/core/merger.js 62% 88% 7 Added conflict edge cases src/utils/hash.js 45% 91% 4 Added empty input + encoding src/commands/init.js 78% 78% 0 Already well-covered
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 129 lines · 10 tokens per session scan A 13873f9c6e36
test-coverage is a command published in the GitHub repository sefaertunc/Worclaude (4 stars, last pushed 24d ago), licensed MIT. It adds 10 tokens to every session and 1,193 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
build
Run full verification pipeline.
fest-show
Show festival progression (in-progress tasks, roadmap, and dependency view).
camera-ready
Convert an accepted anonymous-submission LaTeX paper (AAAI/AIES/ACM-style) to camera-ready and implement the accepted reviews. Use when a paper is accepted with no rebuttal and you need to de-anonymize, add copyright, turn on section numbering, implement each reviewer's minor revisions, optionally move proofs to a…
superpowers-execute
Execute the current GSD phase plan with Superpowers instead of gsd-execute-phase.
generate-rules
Generate development rules and standards into RULES.md.
config
Command "config" from sdebruyn/fabric-dw-mcp-cli, covering configuration & defaults, http retry budget, sql retry budget, mcp workspace allowlist {#mcp-workspace-allowlist} and mcp server log level.