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.
npx skills add nolte/claude-home-assistant --skill ha-websocket-command-addgit clone --depth 1 https://github.com/nolte/claude-home-assistantWrote 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/skills/nolte/claude-home-assistant/ha-websocket-command-add)<a href="https://agentmods.dev/skills/nolte/claude-home-assistant/ha-websocket-command-add"><img src="https://agentmods.dev/badge/skills/nolte/claude-home-assistant/ha-websocket-command-add/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/skills/nolte/claude-home-assistant/ha-websocket-command-add"><img src="https://agentmods.dev/badge/skills/nolte/claude-home-assistant/ha-websocket-command-add.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.00195 | $0.02021 |
| Opus 5.5 | $0.00078 | $0.00808 |
| Sonnet 5.5 | $0.00039 | $0.00404 |
| Haiku 4.5 | $0.00019 | $0.00202 |
Grade A, and why
ha-websocket-command-add 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.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
HA WebSocket Command Add
Spec: spec/claude/ha-websocket-command-add/en.md (EN canonical) / spec/claude/ha-websocket-command-add/de.md (DE translation).
Why this is a skill, not an agent
- Human-visible augmentation surface — the user describes the data a card needs and reads back the handler, the schema, and the conformance report; a skill keeps this on the visible command surface, like the sibling augment skills (
ha-config-flow-augment,ha-coordinator-add,ha-repairs-add). - Mid-flow interactivity — the command-vs-service decision and the sync-vs-async choice are per-run dialogues the user approves before generation.
- Bounded, inline generation — one decorated handler plus its schema and the
async_register_commandcall fit inline; no isolated agent context is needed. - Counter-dimension considered: the draft→validate loop could be an agent, but the command-vs-service and admin-exposure decisions belong in the user's working context; skill wins.
When this skill activates
Use this skill to add one custom WebSocket API command to an existing integration — the backend endpoint a card or panel calls via hass.callWS(...) to load integration-specific data that is not a state attribute.
When NOT to activate
- a user-driven action / backend mutation with its own schema →
ha-service-definition-add/ha/services - the frontend consumer side (TypeScript typing,
callWSerror handling in the card) →ha/frontend-data-api - a custom panel that consumes the command →
ha-panel-add - deploying/importing into a running HA instance → out of scope
Hard rules
- One command, one run. No multi-command batches.
- Read
spec/ha/frontend-websocket-commands/en.mdfirst. Do not generate from memory. - Command vs. service. Run the choice first: a data fetch into the frontend is a command; a user-driven action/mutation is a service. On action/mutation, point at
ha-service-definition-addand abort. - Three-part contract. Declare type and schema via
@websocket_api.websocket_command({...})on a handler with signature(hass, connection, msg); namespace the type asvol.Required("type"): "<domain>/<name>"(docs example:"camera/get_thumbnail"); declare input fields viavol.Required/vol.Optionalwith a type annotation, kept minimal. - Sync vs. async. A pure in-memory handler is a synchronous function with
@callback; a handler doing network/device/computation work isasync defdecorated with@websocket_api.async_response. Never run blocking I/O in a@callbackhandler. - Results and errors. Deliver success via
connection.send_result(msg["id"], result)using the incomingmsg["id"]; report errors viaconnection.send_error(msg["id"], "<code>", "<message>")instead of letting an exception propagate, and return after everysend_error. Never substitute themsg["id"]. - Admin restriction. Decorate admin-only commands with
@websocket_api.require_admin; consider it for sensitive or integration-internal data. Never hand-roll admin checks in the handler body. - Register in setup. Register via
websocket_api.async_register_command(hass, ws_handler)inside the integration's setup method (e.g.async_setup), not scattered across platform modules; do not requirewebsocket_apias a manifest dependency. - Name per
spec/ha/naming-conventions/en.mdand verify HA internals against the official docs (seespec/ha/upstream-docs-verification/en.md).
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 · 107 lines · 195 tokens per session scan A 8ff7823073c2
ha-websocket-command-add is a skill published in the GitHub repository nolte/claude-home-assistant (1 stars, last pushed 1mo ago), licensed MIT. It adds 195 tokens to every session and 2,021 once invoked, about $0.0008 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-15.
Other skills, from other repositories
inference-serving-sglang
Fast structured generation and serving for LLMs with RadixAttention prefix caching. Use for JSON/regex outputs, constrained decoding, agentic workflows with tool calls, or when you need 5× faster inference than vLLM with prefix sharing. Powers 300,000+ GPUs at xAI, AMD, NVIDIA, and LinkedIn.
agent-django-fastapi-expert
Specialist subagent: Django ORM, Django REST Framework, FastAPI async patterns, and Pydantic v2 specialist. Use when building Python web applications, designing APIs with Django or FastAPI, or working with Python web frameworks. Trigger phrases: Django, FastAPI, DRF, Django REST Framework, Pydantic, ORM, queryset…
microservices-architecture
Microservices architecture patterns and best practices. Use when designing distributed systems, breaking down monoliths, or implementing service communication.
authentication-patterns
OAuth 2.0, JWT, SSO, MFA, NextAuth/Clerk/Supabase Auth implementation patterns.
email-systems
Transactional email (Resend, SendGrid, SES), templates (React Email, MJML), deliverability (SPF/DKIM/DMARC), and inboxing best practices. Use when building email infrastructure, designing templates, or troubleshooting deliverability.
event-driven-architecture
Kafka, RabbitMQ, SQS/SNS, event sourcing, CQRS, saga patterns, dead letter queues, and idempotency. Use when designing asynchronous systems, implementing message-driven workflows, or building event streaming pipelines.