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/commands/new-entity.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/commands/naanyabiz/haggle/new-entity)<a href="https://agentmods.dev/commands/naanyabiz/haggle/new-entity"><img src="https://agentmods.dev/badge/commands/naanyabiz/haggle/new-entity/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/commands/naanyabiz/haggle/new-entity"><img src="https://agentmods.dev/badge/commands/naanyabiz/haggle/new-entity.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.00000 | $0.00281 |
| Opus 5.5 | $0.00000 | $0.00112 |
| Sonnet 5.5 | $0.00000 | $0.00056 |
| Haiku 4.5 | $0.00000 | $0.00028 |
Grade A, and why
new-entity 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 1mo 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
/new-entity
Scaffold a new sensor entity with tests.
Usage
/new-entity <key> <translation_key> <device_class> <state_class> <unit>
Example:
/new-entity consumption_cost consumption_cost MONETARY TOTAL_INCREASING AUD
Steps
- Add a new
SensorEntityDescriptionentry toSENSOR_DESCRIPTIONSincustom_components/haggle/sensor.pywith the provided params. - Add the key constant to
custom_components/haggle/const.py(follow theDATA_*naming pattern). - Add the translation key to
custom_components/haggle/strings.jsonandcustom_components/haggle/translations/en.json. - Add the key to the coordinator's mock return value in
tests/test_init.py(_COORDINATOR_DATA). - Invoke the
ha-test-writersubagent to write a dedicated test for the new sensor. - Invoke the
energy-domain-expertsubagent if the entity touches the Energy dashboard (device_class=ENERGY or MONETARY). - Run
uv run ruff check --fix custom_components/ tests/ && uv run mypy custom_components/haggle && uv run pytestand fix any issues before reporting done.
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.
- 1mo ago First seen · 25 lines · 0 tokens per session scan A 89e68230ba90
new-entity is a command published in the GitHub repository NaanyaBiz/haggle (14 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 281 tokens. 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 commands, from other repositories
embedded-test
Generate Unity tests, CMock mocks, a hardware-in-the-loop scaffold, or a coverage report.
test
A command for generating and running tests for embedded C code, either on a computer or on a physical development board. It creates both runnable test code and a written list of test cases.
gf-cocotb
Generate Python testbench using Cocotb.
session
Complete guide to managing pair programming sessions.
test-tdd
Run when user calls /test-tdd. Scans modified files, locates their corresponding unit/integration test suites, and runs them.
kill-mutants
Analyze surviving mutants from a mutation testing run and write targeted unit tests to kill them. Re-runs mutations to confirm kills.