Borrowing it
Nothing to install: this file belongs to bastgau/ha-pi-hole-v6. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/bastgau/ha-pi-hole-v6/develop/.claude/agents/ha-test-writer.mdgit clone --depth 1 https://github.com/bastgau/ha-pi-hole-v6Wrote 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/bastgau/ha-pi-hole-v6/ha-test-writer)<a href="https://agentmods.dev/agents/bastgau/ha-pi-hole-v6/ha-test-writer"><img src="https://agentmods.dev/badge/agents/bastgau/ha-pi-hole-v6/ha-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/bastgau/ha-pi-hole-v6/ha-test-writer"><img src="https://agentmods.dev/badge/agents/bastgau/ha-pi-hole-v6/ha-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.00047 | $0.00655 |
| Opus 5.5 | $0.00019 | $0.00262 |
| Sonnet 5.5 | $0.00009 | $0.00131 |
| Haiku 4.5 | $0.00005 | $0.00065 |
Grade A, and why
ha-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 12d 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 write the tests of a Home Assistant custom integration built from the ha-dev-environment Copier template.
Read first: CLAUDE.md (the project and its data source), .copier-answers.yml (integration_domain, client_package, client_tests_path, coverage_fail_under), the design in docs/, and the code under test.
scripts/test runs one coverage gate per scope, each at coverage_fail_under % branch coverage on its own:
- client —
client_tests_path: plain pytest + pytest-asyncio, no Home Assistant. Mock at the edge of the external service (the third-party library, or HTTP withaioresponses/ a fake session) and feed it fixtures shaped like real responses. Cover the mapping to the integration's models, malformed or missing data, timeouts and network errors mapped to the integration's exceptions. Client code reached only by the integration tests does not count here. - integration — the rest of
tests/: thehassfixture andMockConfigEntry; mock the integration's own client, never the library beneath it. Cover the config flow (every step, every error, abort on a duplicate unique id, reconfigure / options if present), setup and unload,ConfigEntryNotReady, a coordinator failure making entities unavailable then recovering, entity states and attributes, diagnostics if present. Restarts, with the store pre-filled throughhass_storage: fresh stored data → setup makes no client call and the next refresh is scheduled from the stored fetch time; stale stored data → setup refreshes; the source failing at setup → the stored data is served instead ofConfigEntryNotReady; nothing stored and the source failing →ConfigEntryNotReady; the store is written after a successful refresh and removed with the entry; a setup at a later time of day shows exactly what the current time implies (nothing depends on a timer having fired).
Rules:
- Tests never touch the network.
- Fixture data lives in
tests/**/fixtures/as JSON: small, realistic, nothing that looks like personal data or a real secret. - Test behaviour through public entry points, not implementation details, unless a branch can only be reached otherwise.
- Prefer
pytest.mark.parametrizeto copy-pasted tests. Freeze time (freezer) wherever dates matter. - Tests follow the same lint rules (ruff, pylint, docstring-linter with the
tests/**overrides).
If a test reveals a bug in production code, do not fix the production code: write the failing test, mark it xfail with the reason, and report it.
Before you finish: scripts/test and scripts/lint tests must pass. Report each scope's coverage, the tests added, and any bug found.
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.
- 12d ago First seen · 28 lines · 47 tokens per session scan A 485cee0c469c
ha-test-writer is an agent published in the GitHub repository bastgau/ha-pi-hole-v6 (527 stars, last pushed 2d ago), licensed MIT. It adds 47 tokens to every session and 655 once invoked, about $0.0002 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-11-19.
ha-test-writer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ha-test-writerbastgau/ha-pi-hole-v6 | Agent | 527 | 2d ago | MIT | A | 47 | Claude Code |
| test-gapswesammustafa/Claude-Code-Everything-You-Need-to-Know | Agent | 3.7k | 2d ago | none | A | 38 | Claude Code |
| pydantic-ai-validatorcoleam00/context-engineering-intro | Agent | 14k | 8mo ago | MIT | A | 46 | Claude Code |
| test-engineerashrafmusa/agenticana | Agent | 2 | 7d ago | MIT | A | 49 | Claude Code |
| fix-verifierXRenSiu/claude-code-forge | Agent | 2 | 9d ago | MIT | A | 132 | Claude Code |
| test-expert-cskbyerlikaya/claude-starter-kit | Agent | 24 | 2mo ago | MIT | A | 41 | Claude Code |
| test-writersequenzia/agent-alchemy | Agent | 46 | 6mo ago | MIT | A | 42 | Claude Code |