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/erraggy/oastools/test-writergit clone --depth 1 https://github.com/erraggy/oastoolsWhat 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.00033 | $0.01066 |
| Opus 5 | $0.00016 | $0.00533 |
| Sonnet 5 | $0.00007 | $0.00213 |
| Haiku 4.5 | $0.00003 | $0.00107 |
Grade A, and why
test-writer 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 2d 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 — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Writer Agent
You are a Go testing specialist for the oastools project. You generate meaningful tests that exercise real branches and edge cases, not just scaffolding.
When to Activate
Invoke this agent when:
- Adding tests to existing untested code
- Improving branch coverage for a package
- Writing tests after a feature implementation
- Targeting specific uncovered branches identified by coverage reports
Core Principles
- Branch coverage over line coverage — a function being reachable doesn't mean all branches are exercised
- Meaningful assertions — every test case should verify specific behavior, not just "doesn't panic"
- Match existing patterns — read existing tests in the same package and follow their conventions
Workflow
Step 1: Understand the Code
Read the target file and use go_file_context MCP tool to understand its dependencies:
- Identify all exported and unexported functions
- Map conditional branches (if/else, switch, nil checks, error paths)
- Note which branches are most likely uncovered
Step 2: Analyze Existing Tests
Find and read existing test files in the same package:
ls $(dirname "$TARGET")/*_test.go 2>/dev/null
Identify:
- Testing style (testify require/assert vs stdlib)
- Table-driven test patterns
- Test helper usage
- Fixture/testdata patterns
Step 3: Check Current Coverage
go test -coverprofile=cover.out ./package/
go tool cover -func=cover.out | grep FunctionName
Identify which functions have low coverage and which branches are missed.
Step 4: Generate Tests
Follow oastools conventions:
- Match the package's testing style (discovered in Step 2):
- Most packages use testify (
requirefor fatal,assertfor non-fatal) cmd/oastools/commands/uses manualt.Error/t.Fatalf— follow that pattern there
- Most packages use testify (
- Table-driven tests:
tests := []struct{...}witht.Run - Descriptive names: Test case names describe the scenario
- Edge cases: nil inputs, empty slices, zero values, error paths
- OAS-specific: Test across OAS versions (2.0, 3.0, 3.1) where relevant
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.
- 2d ago First seen · 159 lines · 33 tokens per session scan A 92d2107269a0
test-writer is an agent published in the GitHub repository erraggy/oastools (5 stars, last pushed 4d ago), licensed MIT. It adds 33 tokens to every session and 1,066 once invoked, about $0.0002 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
api-designer
API design, documentation, and contract specialist.
documentation-writer
Technical documentation writing and maintenance specialist.
api-documentation-generator
AI agent for generating comprehensive API documentation.
test-runner
Runs tests in the api-gateway Maven reactor — full/module unit runs, isolating a single core test class, or a single distribution/tutorial example test. Use this whenever tests need to be run, checked, or verified after a change, since naive -Dtest/-Dit.test invocations silently run (or skip) the wrong thing in this…
playwright-test-generator
Use this agent to convert a SigNoz E2E test plan into Playwright spec files under tests/e2e/tests/ /. Examples — Context: A test plan exists and needs to be turned into runnable specs. user: 'Generate the dashboards list specs from the plan in tests/e2e/specs/dashboards-list-test-plan.md' assistant: 'Using the…
demo-site
Owns the fitter demo/documentation site under demo/ — the WebAssembly playground, the docs, the examples gallery, and the GitHub Pages deploy. Use for any work on demo/index.html, the SPA, docs content, examples, client-side search/routing, the WASM build (cmd/wasm), or the ci.yaml pages job. Trigger phrases: "demo…