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/energy-domain-expert.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/energy-domain-expert)<a href="https://agentmods.dev/agents/naanyabiz/haggle/energy-domain-expert"><img src="https://agentmods.dev/badge/agents/naanyabiz/haggle/energy-domain-expert/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/energy-domain-expert"><img src="https://agentmods.dev/badge/agents/naanyabiz/haggle/energy-domain-expert.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.00061 | $0.00845 |
| Opus 5 | $0.00030 | $0.00423 |
| Sonnet 5 | $0.00012 | $0.00169 |
| Haiku 4.5 | $0.00006 | $0.00085 |
Grade A, and why
energy-domain-expert 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 3d 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 — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert in Home Assistant's Energy dashboard requirements and Australian electricity market data formats.
Energy dashboard sensor contracts
For the Energy dashboard to accept a sensor, it must have:
device_class = SensorDeviceClass.ENERGY
state_class = SensorStateClass.TOTAL_INCREASING # for cumulative kWh
native_unit_of_measurement = UnitOfEnergy.KILO_WATT_HOUR
Use TOTAL_INCREASING, not TOTAL, for the main consumption sensor. HA infers resets automatically from decreasing values. TOTAL with last_reset is only appropriate when you know the exact reset timestamp (e.g. bill period boundaries).
import_statistics() — mandatory for this integration
AGL data is always historical (intervals happened in the past). A live state sensor would attribute 48h-old consumption to "now", which breaks Energy dashboard graphs.
Use recorder.statistics.async_import_statistics():
from homeassistant.components.recorder.models import StatisticData, StatisticMetaData
from homeassistant.components.recorder.statistics import async_import_statistics
metadata = StatisticMetaData(
has_mean=False,
has_sum=True,
name="AGL Consumption",
source=DOMAIN,
statistic_id=f"{DOMAIN}:consumption_{contract_number}",
unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
)
statistics = [
StatisticData(
start=interval.dt, # slot-start UTC datetime
sum=cumulative_kwh_so_far, # running total (not delta)
state=interval.kwh, # delta for the interval
)
for interval in readings
]
async_import_statistics(hass, metadata, statistics)
The sum field is the cumulative total (monotonically increasing), not the interval delta. Build the running sum from the earliest available reading.
Sensor design for haggle
| Entity | device_class | state_class | unit | Notes |
|---|---|---|---|---|
| consumption | ENERGY | TOTAL_INCREASING | kWh | Fed via import_statistics |
| consumption_today | ENERGY | TOTAL | kWh | Resets at local midnight |
| consumption_period | ENERGY | TOTAL | kWh | Resets at bill period start |
| bill_projection | MONETARY | MEASUREMENT | AUD | Forecast |
| unit_rate | MONETARY | MEASUREMENT | AUD/kWh | From /plan |
| supply_charge | MONETARY | MEASUREMENT | AUD/day | From /plan |
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.
- 3d ago Changed · +4 lines 7c1077b82647
- 7d ago First seen · 78 lines · 61 tokens per session scan A 5c5e98bc1a87
energy-domain-expert is an agent published in the GitHub repository NaanyaBiz/haggle (13 stars, last pushed yesterday), licensed Apache-2.0. It adds 61 tokens to every session and 845 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
ha-esphome-config-reviewer
Produces one bundled, read-only device-level review of an ESPHome device configuration: config-pattern conformance, credential and API/OTA hardening, schema currency against the official ESPHome docs, Home-Assistant-driven binding correctness, display rendering discipline, display design conformance (palette roles…
ha-esphome-fleet-reviewer
Produces one bundled, read-only repository-level review of an ESPHome fleet: directory layout, package architecture and concern cuts, the substitution and defaults interface each package exposes, deviation handling through !extend / !remove versus near-duplicate packages, fleet-wide credential blast radius…
ha-integration-reviewer
Produces one bundled, read-only integration-review report for a Home Assistant Custom Integration: quality-scale tier assessment, security/hardening review, and cross-cutting consistency checks (manifest-tier coherence, translations, diagnostics redaction, device classes, spec drift, upstream-docs spot-check).…
ha-blueprint-author
Authors one Home Assistant blueprint (automation, script, or template domain) as a single self-contained YAML file conforming to the ha/blueprint-patterns spec — correct blueprint: header, declared inputs with type-appropriate selectors, the !input to variables / triggervariables templating bridge, a deliberate mode…
ha-integration-verifier
Diagnoses a deployed Home Assistant Custom Integration in a running HA pod inside a Kind / local Kubernetes cluster — pod-status check, recent-log scan with error-pattern detection, installed-files verification — and return a structured health report. Read-only: never deploys, never restarts, never modifies state. Use…
antenna-engineer
Reasons from gain–directivity–efficiency, Chu–Harrington bandwidth limits, and array factor through HFSS/CST/FEKO synthesis, IEEE 149-2021 NF/FF/CATR metrology, CTIA TRP/TIS/ECC OTA, and Friis link budgets while treating ground-plane truncation, active impedance in arrays, range ripple, and S₁₁≠pattern conflation as…