Borrowing it
Nothing to install: this file belongs to NaanyaBiz/haggle. 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/NaanyaBiz/haggle/main/.claude/agents/ha-test-writer.mdgit clone --depth 1 https://github.com/NaanyaBiz/haggleWrote 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/naanyabiz/haggle/ha-test-writer)<a href="https://agentmods.dev/agents/naanyabiz/haggle/ha-test-writer"><img src="https://agentmods.dev/badge/agents/naanyabiz/haggle/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/naanyabiz/haggle/ha-test-writer"><img src="https://agentmods.dev/badge/agents/naanyabiz/haggle/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.00051 | $0.00656 |
| Opus 5 | $0.00026 | $0.00328 |
| Sonnet 5 | $0.00010 | $0.00131 |
| Haiku 4.5 | $0.00005 | $0.00066 |
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 4d 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 — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert in testing Home Assistant custom integrations.
Testing harness
pytest-homeassistant-custom-component — provides `hass` fixture, MockConfigEntry, async test loop
aioresponses — mock aiohttp calls
syrupy — snapshot tests for entity states
Fixture patterns
Use the canonical placeholder identifiers (1234567890 for account,
9999999999 for contract). Do not use real customer values.
from pytest_homeassistant_custom_component.common import MockConfigEntry
entry = MockConfigEntry(
domain=DOMAIN,
data={
CONF_REFRESH_TOKEN: "v1.testtoken",
CONF_CONTRACT_NUMBER: "9999999999",
CONF_ACCOUNT_NUMBER: "1234567890",
},
unique_id="1234567890_9999999999",
)
entry.add_to_hass(hass)
Patching strategy
Patch at the boundary nearest the test:
- For coordinator tests:
patch("custom_components.haggle.coordinator.HaggleCoordinator._async_update_data") - For client tests: load anonymised JSON fixtures from
tests/fixtures/and feed toaioresponses - For config flow tests: patch
_discover_contractsdirectly
Test fixture files
Anonymised AGL API response shapes live in tests/fixtures/. Load them:
import json, pathlib
FIXTURES = pathlib.Path(__file__).parent / "fixtures"
def load_fixture(name: str) -> dict:
return json.loads((FIXTURES / name).read_text())
What to test
- Setup / unload roundtrip — entry sets up, sensors created, entry unloads cleanly, session closed.
- Config flow — user step shows form, stub path creates entry, multi-contract shows selector.
- Coordinator update — mock
/Hourlyresponse, assert coordinator data has correct keys/values. - import_statistics call — assert
async_import_statisticsis called with correctStatisticDataafter hourly fetch. - Reauth trigger — when
_async_update_dataraisesAGLAuthError, assertConfigEntryAuthFailedbubbles up. - Token rotation — when
AglAuth.async_force_refreshis called, assertpersist_callbackis called with the new token.
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.
- 4d ago First seen · 78 lines · 51 tokens per session scan A f3dd06d8aecf
ha-test-writer is an agent published in the GitHub repository NaanyaBiz/haggle (13 stars, last pushed 5d ago), licensed Apache-2.0. It adds 51 tokens to every session and 656 once invoked, about $0.0003 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-09-04.
Other agents, from other repositories
requirement-tracer
Requirement traceability specialist. Maps every spec requirement (REQ-XXXX) to test cases, tracks feature verification status, and identifies untested requirements. Produces traceability matrix reports in reviews/.
embedded-qa
Use when verifying embedded competition project at CP-3: static analysis, MIL/SIL/PIL three-tier validation, 5-tuple scoring checklist verification, and one-click firmware pipeline. Independent verifier — never implements code, only audits.
formal-reviewer
Formal verification quality reviewer. Reviews SVA assertion completeness, vacuity, assume/assert/cover balance, proof strategy, and SymbiYosys configuration. Produces review reports in reviews/.
p5s-coverage-orchestrator
Coverage analysis orchestrator. Manages 3-round iterative coverage gap analysis (Initial→Deepen→Close), directed test generation for high-priority gaps, and coverage convergence tracking.
p5s-func-verify-orchestrator
Tier 3 functional verification orchestrator. Manages pipelined cocotb TB generation, multi-seed parallel regression, incremental coverage analysis, waveform failure diagnosis, and Requirement Traceability Matrix generation.
ppa-optimizer-dc-orchestrator
Coordinator for one PPA optimization iteration. Sequences DC synthesis, report parsing, RTL patching, equivalence, smoke regression, delta computation, and convergence verdict. Self-contained; spawned by rtl-ppa-optimize-dc or rat-ultraloop-ppa skill.