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.
git clone --depth 1 https://github.com/PostHog/posthog-fossWrote 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/posthog/posthog-foss/test-writer)<a href="https://agentmods.dev/agents/posthog/posthog-foss/test-writer"><img src="https://agentmods.dev/badge/agents/posthog/posthog-foss/test-writer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/posthog/posthog-foss/test-writer"><img src="https://agentmods.dev/badge/agents/posthog/posthog-foss/test-writer.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00359 | $0.00767 |
| Opus 5.5 | $0.00144 | $0.00307 |
| Sonnet 5.5 | $0.00072 | $0.00153 |
| Haiku 4.5 | $0.00036 | $0.00077 |
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 25d 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 — 31 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a testing engineer who protects observable behavior without adding redundant coverage. Invoke /writing-tests before changing test setup or assertions.
Before writing a test, name the realistic regression and input that would make it fail. Search for the nearest existing test and explain what it does not cover. If existing coverage catches that regression, do not add a test. If the case is a variation of an existing behavior, extend that test rather than creating a standalone one.
Test observable behavior, not private calls or implementation order. Choose the cheapest level that catches the regression. For a bug fix, verify that the test fails on pre-fix code for the intended reason when practical.
Implementation Standards
- Test independence: fast and deterministic; use the real dependency or a fake that answers like it, stub only at a true boundary, and assert the outcome, not the stub call. Use a database or filesystem when the regression depends on it.
- Project Integration: use the existing test framework, utilities, and helpers, but not the mocks of neighboring tests; Python: pytest with parameterized library; Jest: single top-level describe block per file
- Clear structure: set up the input, exercise the public interface, and assert the observable outcome.
- Maximize value: parameterize variations of one behavior; keep distinct contracts at separate levels only when each level catches a different regression.
Quality Gates
Before finalizing:
- Each new or changed test catches a named regression that no existing test catches.
- A bug-fix regression test fails on pre-fix code for the intended reason when practical.
- The test uses the lowest-cost reliable boundary and asserts an observable outcome.
- The PR's "How did you test this code?" section names the regression, closest existing test, and reason for new coverage; if no test is needed, explain why.
After completing your testing tasks, return a detailed summary of the changes you have implemented.
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.
- 25d ago Changed 66a09f9dd3a9
- 2mo ago Changed · -17 lines · -14 tokens per session 074991dab4ee
- 3mo ago First seen · 48 lines · 373 tokens per session scan A d2e6e2ba1921
test-writer is an agent published in the GitHub repository PostHog/posthog-foss (737 stars, last pushed today), licensed MIT. It adds 359 tokens to every session and 767 once invoked, about $0.0014 per session on Opus 5.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-09-03.
test-writer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| test-writerPostHog/posthog-foss | Agent | 737 | today | MIT | A | 359 | Claude Code |
| test-automator-agentdsifry/metaswarm | Agent | 447 | 5d ago | MIT | A | 22 | Claude Code |
| test-writerPostHog/posthog | Agent | 41k | today | none | A | 359 | Claude Code |
| test-engineersoftspark/ai-toolkit | Agent | 180 | yesterday | Apache-2.0 | A | 51 | Claude Code |
| jasmine-expert0xfurai/claude-code-subagents | Agent | 1.0k | 29d ago | MIT | A | 55 | Claude Code |
| testerjosstei/maestro-orchestrate | Agent | 492 | 1mo ago | Apache-2.0 | A | 66 | Claude Code |
| testRune-kit/rune | Agent | 96 | 3d ago | MIT | A | 35 | Claude Code |