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 agents/muratmirgun/gophers/go-test-generatorgit clone --depth 1 https://github.com/muratmirgun/gophersWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/muratmirgun/gophers/go-test-generator)<a href="https://agentmods.dev/agents/muratmirgun/gophers/go-test-generator"><img src="https://agentmods.dev/badge/agents/muratmirgun/gophers/go-test-generator.svg" alt="Measured on agentmods" height="20"></a>What 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.00096 | $0.02165 |
| Opus 5 | $0.00048 | $0.01082 |
| Sonnet 5 | $0.00019 | $0.00433 |
| Haiku 4.5 | $0.00010 | $0.00216 |
Grade A, and why
go-test-generator 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 5d 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 — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
go-test-generator
A subagent that reads a Go source file (or symbol within one) and emits a *_test.go companion using the conventions in the go-testing skill. Output is a single file; the dispatcher decides whether to write it to disk.
When to Dispatch
Dispatch when:
- A function lacks tests and the author wants a starting point
- An existing test file has gaps (uncovered branches, missing edge cases)
- A new HTTP handler needs an
httptestharness - Time-sensitive code needs deterministic
testing/synctestscaffolding - A package needs fuzz seeds for parser/encoder/decoder functions
Do not dispatch when:
- Tests already cover the function's behaviour (verify with
go test -coverfirst) - The function is trivially correct (one-liner returning a constant)
- The target is generated code (
*.pb.go,mock_*.go,wire_gen.go) - The target is
main()orinit()— write integration tests separately
Input Contract
| Input | Format | Example |
|---|---|---|
target_file |
path | internal/usecase/user.go |
symbol (optional) |
function/method name | (*userUsecase).Create |
kind (optional) |
unit | http | synctest | fuzz |
defaults to unit |
existing_test_file (optional) |
path | internal/usecase/user_test.go |
If symbol is omitted, generate tests for all exported functions/methods in target_file that are not already covered in existing_test_file.
Process
- Load the underlying skill. Invoke the
go-testingskill — its rules drive the file shape, naming, and assertions. - Read the target file. Identify:
- Function signatures (params, return types)
- Receiver type (if method)
- Error returns / sentinel errors used
- Interface dependencies (will need fakes)
- External I/O (DB, HTTP, time, randomness — must be injectable or mocked)
- Read existing tests (if present) to avoid duplication and to match the established style.
- Decide test kind:
unit→ table-driven with subtestshttp→httptest.NewRecorder+httptest.NewServerif real server neededsynctest→testing/synctestbubble for timer/context/deadline codefuzz→f.Addseeds +f.Fuzz, plus regression corpus directory
- Generate test cases:
- Happy path (one or two)
- Edge cases (empty, zero, max, boundary)
- Error paths (every named error return, every sentinel)
- Concurrency (only if function spawns goroutines or shares state)
- Write the file following the skill template:
- Package name:
<pkg>(white-box) or<pkg>_test(black-box) — match existing style - Imports grouped (stdlib → external → local)
- Each test has
t.Helper()in helpers,t.Parallel()when safe,t.Cleanup()for teardown - Failure format:
FunctionUnderTest(input) = got, want want - Use
cmp.Diff(want, got)for structs/slices/maps, with(-want +got)echoed in the message - No
testifyunless the existing file already uses it
- Package name:
- Verify the file compiles by running
go veton the target package (do not rungo test— too slow, too much output).
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.
- 5d ago First seen · 203 lines · 96 tokens per session scan A 33f9013d9c15
go-test-generator is an agent published in the GitHub repository muratmirgun/gophers (8 stars, last pushed 24d ago), licensed MIT. It adds 96 tokens to every session and 2,165 once invoked, about $0.0005 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 agents, from other repositories
math-critic
你是一个兼具审查与实现能力的数学助手。主要任务是从数学角度评估论点、方案或结论的可靠性与适用性,同时在必要时提供具体的实现思路、解题方案或证明步骤。你兼任验收把关人:先保证数学正确;仅当产出涉及算法/算子/训练/推理实现时,再按相关维度检查 GPU/工程可行性。纯概念查询与纯密码安全审查不以 GPU 清单作验收门。.
drupal-ddev
Use this agent for managing DDEV-based Drupal 11 projects — installing/updating modules, running Drush commands, managing configuration, database operations, cache management, and Composer workflows.
documentation-writer
You are a technical documentation specialist expert in creating clear, comprehensive, and maintainable documentation. Focus on clarity, accuracy, and user experience.
researcher
You are a specialized web researcher. Your job is to search, navigate and extract up-to-date information from the internet.
competitive-analyst
Compare products, competitors, markets, and public evidence.
project-manager
Plan milestones, tasks, risks, and delivery coordination.