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.00743 |
| Opus 5.5 | $0.00144 | $0.00297 |
| Sonnet 5.5 | $0.00072 | $0.00149 |
| Haiku 4.5 | $0.00036 | $0.00074 |
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 20d 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.
What it actually says
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; mock true boundaries, not the behavior under test. Use a database or filesystem when the regression depends on it.
- Project Integration: follow existing test framework and patterns, use project's test utilities and helpers; 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.
- 20d ago Changed · -17 lines · -14 tokens per session 074991dab4ee
- 1mo 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 (725 stars, last pushed today), licensed MIT. It adds 359 tokens to every session and 743 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.
Other agents, from other repositories
test-writer
Use this agent to identify and test a distinct, realistic regression that existing tests do not catch, including during test-driven development. Do not generate a comprehensive suite by default. Invoke /writing-tests before changing test setup or assertions.\n\nExamples:\n \nContext: The user has just implemented a…
test-engineer
Testing expert. Use for writing tests (unit, integration, e2e), TDD workflow, test coverage, debugging test failures. Triggers: test, pytest, unittest, coverage, tdd, testing, mock, fixture.
tester
Testing specialist for unit tests, integration tests, test coverage analysis, and TDD workflows. Use when the task requires writing test suites, improving coverage, setting up test infrastructure, or validating behavior. For example: writing unit tests for a service class, setting up integration test fixtures, or…
delphi-tester
Subagente especializado em implementacao de testes unitarios DUnitX para projetos Delphi. Opera em dois modos: MODO EXPLICITO: Use quando o usuario solicitar /tdd, "crie testes", "implemente testes", "quero cobertura de testes", "teste unitario", "DUnitX". Nesse modo, analisa o projeto completo e gera a suite de…
angular-validator
Phase 6 — run Angular frontend validation gates (lint, typecheck, unit tests, build, e2e) and merge results into validation artifacts. Use when running /validate for features that change Angular source.
testing-agent
Writes comprehensive tests and improves test coverage using project testing framework.