/ha-nova:reviewfrom ha-nova
Reviews Home Assistant automations, scripts, helpers, scenes, and dashboards for errors, best-practice violations, and conflicts. Handles discovery and reading internally.
Ships in ha-nova. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read-only quality review for automations, scripts, helpers, storage scenes, and storage dashboards:
../ha-nova/mobile-notification-composition.md: objective schema, capability, safety, or privacy violations are findings; optional style differences are suggestions; recurring-workflow intent advice is low-severity usability advice, never a correctness findingRead-only analysis. Exception: after explicit user confirmation, one Quick-Fix service call may be executed to correct an acute state problem detected during review.
POST, PUT, PATCH, or DELETE config writes through the relay.ha-nova:write.ha-nova:helper.Read and follow ../ha-nova/session-bootstrap.md.
Relay CLI: ha-nova relay
ha-nova relay ws --data-file <payload-file> — canonical WebSocket pathha-nova relay core --method <METHOD> --path <PATH> --body-file <payload-file> — canonical REST pathha-nova relay ... --jq-file <filter-file> — canonical complex filter pathha-nova relay ... --out <result-file> — canonical large-output pathIf user provides an exact automation/script entity_id (e.g., automation.main_lights), skip search and go directly to config read.
Storage scenes resolve like automations (registry unique_id → GET /api/config/scene/config/<id>; name-based requests search the scene. domain in the compact registry exactly like the automation keyword search). The Editability Guard from ha-nova:scene applies. A scene without registry unique_id is YAML-backed: run SC checks only when that scene's exact YAML is already in context; otherwise STOP and ask for the pasted scene YAML — never emit an empty or inferred review. Storage dashboards resolve by url_path (lovelace/dashboards/list → lovelace/config), and D-02/D-05 additionally read lovelace/resources. Apply the SC/D families from ../review/checks-extended.md; cross-item HX rules run in aggregate/bulk mode OR whenever their required registry/state context is already loaded. A dashboard D-01/D-06 pass normally loads that context, so apply HX-05 to visible card actions without expanding the workset. Flow adaptation for these targets: a SCENE replaces the Step-2 collision scan with a consumer scan (search/related on the scene entity — who activates it) and skips conflict analysis; a DASHBOARD skips Steps 2–4 entirely (no collision surface, no Quick-Fix) — its review is the D config-quality pass plus suggestion synthesis. Output for both: keep the Report shape but include ONLY the sections that ran (findings, consumers for scenes, suggestions, next step) — never render empty collision/conflict/Quick-Fix sections for checks that were intentionally skipped.
For helpers, resolve the family first:
input_boolean, input_number, input_text, input_select, input_datetime, input_button, counter, timer, scheduleutility_meter, derivative, integration, min_max, threshold, tod, statistics, group, history_stats, templateentry_idAsked only about broken or missing references: ../ha-nova/bulk-patterns.md → Dead-Reference Sweep before any shortlist or Static Pass; its report is the answer.
If the target config is not already in the thread context, resolve it yourself:
prefix, domain, area, or label, build a shortlist first using ../ha-nova/bulk-patterns.md.
config/entity_registry/list_for_display for direct prefix / domain resolution, except a whole automation/script domain (below)config/entity_registry/list and config/area_registry/list only when richer area/label evidence is requiredsearch/related with item_type:"area" before any registry-first fallbackautomation, script, entity, device, ...), not as a flat array.data.automation.data.script.data.entity is only a fallback seed for automation/script derivation when the target-family arrays are absentarea_id only as supplemental evidence when it is actually populatedentity_id, then sort deterministically and persist the matched shortlistha-nova find --domain automation --limit 200 --include-disabled (scripts: ha-nova find --domain script --limit 200 --include-disabled) is the shortlist — it also lists YAML items without a registry row; its total is the matched count../ha-nova/bulk-patterns.md → Static Pass and runs it over EVERY matched targetei=entity_id, en=name/alias):
Skip this step when step 1 already produced a resolved current review set.
Create <payload-file> with {"type":"config/entity_registry/list_for_display"}.
Then run:
ha-nova relay ws --data-file <payload-file> --jq-file <filter-file>
Write <filter-file> with:
.data.entities[] | select(.ei | startswith("automation.")) | "\(.ei) | \(.en // "unnamed")"
Filter the resulting text with the client's native search/filter tool, not shell-specific pipelines.
For scripts: select(.ei | startswith("script.")).
For helpers: (.ei | split(".")[0]) as $domain | select(["input_boolean","input_number","input_text","input_select","input_datetime","input_button","counter","timer","schedule"] | index($domain)).ha-nova relay ws --data-file <payload-file> --out <entries-file>
ha-nova relay ws --data-file <payload-file> --out <registry-file>
with:
{"type":"config_entries/get"}{"type":"config/entity_registry/list"}
Resolve the target by one of:entry_idtitle within the supported helper domainsentity_id by matching entity-registry config_entry_id
Build the canonical metadata item:entry_iddomaintitlestatelinked_entities[]unique_id (config key) — the entity_id slug and config key differ for UI-created items (see relay-api.md → ID Types):
Create <payload-file> with the final config/entity_registry/get request in one write step, then run:
ha-nova relay ws --data-file <payload-file> --out <registry-file>
ha-nova relay jq -r --file <registry-file> '.data.unique_id'
The jq filter quoting above is a POSIX example. On Windows/PowerShell pass the same filter with native argument quoting.
Use that saved-result + -r form for the scalar. Do not create a separate jq file for .data.unique_id, do not strip quotes with shell substitutions afterward, and do not write placeholder payload templates that are rewritten later with perl -0pi, sed -i, or similar commands.
For scripts: use "entity_id":"script.<slug>".
Skip this step for config-entry helpers — entry_id is already the canonical identity.# Automation:
ha-nova relay core --method GET --path /api/config/automation/config/<unique_id> --jq-file <config-filter-file> --out <target-file>
# Script:
ha-nova relay core --method GET --path /api/config/script/config/<unique_id> --jq-file <config-filter-file> --out <target-file>
# Helper (storage-based family, WS list + filter):
ha-nova relay ws --data-file <payload-file> --jq-file <helper-filter-file> --out <target-file>
Preferred: copy ../ha-nova/config-body-filter.jq to <config-filter-file> and use that copied file directly.
If the canonical file is unavailable (flat-copy installs), recreate it with exactly:
if .ok then .data.body else error("relay error: \(.error.message // "unknown")") end
When writing this jq file, paste that jq program body exactly as shown. Do not add extra shell-escape backslashes around the jq interpolation or run a probe variant first.
POSIX shell example only:
cat <<'EOF' > "$config_filter_file"
if .ok then .data.body else error("relay error: \(.error.message // "unknown")") end
EOF
On Windows/PowerShell, use the native file-writing equivalent or copy the canonical file while preserving the exact jq file body. The jq file body must contain exactly that one jq expression and nothing else. Do not add extra single quotes inside the error string. If you print the file for confirmation, do not compare it against a shell-escaped string, do not store the jq program in a shell variable, and do not wrap it in an if [ "$line" != ... ] guard. If the printed contents differ, overwrite the same config_filter_file with the exact canonical line before the first config read; do not create probe variants or alternate filenames, and do not patch the file afterward with in-place rewrite commands.
Write <helper-filter-file> with:
if .ok then [.data[] | select(.name | test("<search_term>";"i"))] else error("relay error: \(.error.message // "unknown")") end
For config-entry helpers, persist the canonical metadata item from step 3 to <target-file> instead of attempting {type}/list.
Then read the file with the native file-reading tool for complete, untruncated access.light.main_light, climate.main_zone — NOT the automation/script entity itself). Read its current state (for Quick-Fix detection at end of review):
ha-nova relay core --method GET --path /api/states/<controlled_entity_id> --jq-file <state-filter-file> --out <state-file>
Write <state-filter-file> with:
if .ok then .data.body else empty end
Skip this step when the current review set contains more than one target.
If no controlled entity found in actions, or state read fails: continue review — Quick-Fix will be skipped.
For standalone config-entry helper review, skip this step entirely. There is no config body with actions to analyze for a primary controlled entity.If config is already in the thread context (e.g., user pasted YAML):
Do NOT invoke ha-nova:entity-discovery or ha-nova:read — handle everything within this review flow.
After target resolution:
== 1: stay in normal single-target review mode> 1: enter aggregate multi-target review mode automaticallyMulti-target rules:
Bulk mode rules:
../ha-nova/bulk-patterns.md for selector semantics, stable ordering, and workset limitsmatched N / statically checked S / deep-audited M / remaining R and wait for an explicit follow-up request before continuingBefore analyzing, consult these sources:
Official HA docs (fetch selectively based on config content — do NOT fetch all for every review):
{{ / {%) → https://www.home-assistant.io/docs/configuration/templating/ (functions, filters, constants, and documented semantic hazards; fetch once per review — the checks in ../review/checks.md stay local and offline). No web access or a failed fetch: continue with the local checks and say in the output that template function validity was not verified against the official reference.Only fetch pages relevant to the triggers, actions, and templates found in the config. Cross-check against documented gotchas and constraints — this catches issues beyond the hardcoded checks below.
Verify-before-flag rule: the canonical sequence lives in
../review/checks.md → Verify Before Flagging, because the post-write
phases load that file without this one. Resolve every finding against a source
before reporting it, and flag it when the source confirms the CLAIM you are
making — semantics or risk for behavioral checks, schema invalidity only for
schema-shaped ones.
Do NOT flag valid HA builtins or documented behavior as errors — but "valid" alone never clears a behavioral finding: much of the catalog describes config Home Assistant accepts and that still misbehaves.
Analyze config against the review catalog plus any additional issues found in the official docs. Report only violations found.
Traverse all variables: mappings in the config, not just the top-level block. Include root variables: on the automation/script plus local variables: actions inside choose, if / then / else, default, repeat, and nested sequence blocks.
Rule Catalog
../review/checks.md before evaluating findings. Read ../review/checks-extended.md as checks.md says: a check's evidence boundary before flagging or escalating that check, and the family section before reviewing a scene, dashboard, YAML sensor, or bulk/cross-item set.../review/SKILL.md is the stable review entrypoint; ../review/checks.md plus ../review/checks-extended.md are the full rule catalog.Apply the catalog:
../review/checks.md and follow its ## Application section — the family-by-domain matrix, the per-check evidence boundaries (R-17..R-25, M-05), and the live-helper evidence rules live there.Find other automations/scripts that control the same entities.
For updates, this same scan is also run pre-write as an advisory impact preview (see ha-nova:write Phase 2 Step 3c, Pre-Write Impact, and the ha-nova:helper update flows). The post-write run here stays mandatory and authoritative against the persisted config.
Branch by target family:
linked_entities[] from the canonical metadata item; do not attempt action extractionsearch/related (item_type: area|floor|label); exclude narrows only at run timelinked_entities[] from the canonical metadata itemsearch/related:
ha-nova relay ws --data-file <payload-file> --jq-file <filter-file>
<filter-file> is the canonical ../ha-nova/search-related-consumers.jq (recreate per ../ha-nova/relay-api.md → Parsing rule on flat-copy installs).write/helper deliberately use a tighter budget of max 3 related configs). Resolve unique_id first for automation/script targets (see Target Resolution step 5), then:
# Automation:
ha-nova relay core --method GET --path /api/config/automation/config/<unique_id> --jq-file <config-filter-file> --out <related-file>
# Script:
ha-nova relay core --method GET --path /api/config/script/config/<unique_id> --jq-file <config-filter-file> --out <related-file>
Trace ANALYSIS belongs to ha-nova:diagnose: a runtime complaint ("didn't
fire", "wrong behavior last night") is a concrete incident and routes there,
not here. Stay in this skill only when the user asked for an automation or
script review and traces are supporting evidence for a config finding — never
as the answer to a failure question.
In that case:
ha-nova trace latest <automation_or_script_entity_id> --json, ha-nova trace list <automation_or_script_entity_id> --json, and ha-nova trace get <automation_or_script_entity_id> <run_id> --json; they are enough for run selection, result status, timestamp, item binding, and most review findings.path, result, changed_variables, or error, and avoid large jq projections as the standard path.item_id in every trace matches the target's unique_id before attributing results (Evidence below).🔴 Condition blocked — condition was never met in last 3 runs). Localize at runtime per ../ha-nova/output-rules.md.For each related automation/script, apply the 3-step conflict test:
Step 3a — Action Polarity:
Step 3b — Trigger Temporal Relationship:
Step 3c — Guard Conditions:
sleep_mode: on vs off) → no conflict, skipUse the known safe/problem patterns from ../review/checks.md when deciding whether a related automation pair is truly benign or a real conflict.
Skip this step entirely in bulk mode.
After completing Steps 1-3, check if the current entity state (from the earlier <state-file> read) shows an acute, fixable problem.
Qualifies as Quick-Fix:
on when automation should have turned it off, climate mode wrong)unavailable cover that needs cover.stop_cover)input_select stuck on wrong option)Does NOT qualify:
device_class, or running a scene, script, or automation that reaches one. Every corrective call — ordinary device control or a trigger-source write such as resetting a desynchronized input_select — must RUN the indirect-actuation gate first: ha-nova plan call <domain.service> <entity_id> [--set k=v]… (read-only; the CLI runs the gate per ../ha-nova/indirect-actuation.md — ordinary device control still carries its CONSUMER scan). What disqualifies it is the gate's VERDICT, not having consulted the gate: an ordinary or preview plan stays Quick-Fixable, while a typed plan — or a scan that could not enumerate the consumers — sends it out of Quick-Fix. Never Quick-Fix those: name the fix and offer to run it as a separate service call, which carries the typed high-consequence gate this step does not.If qualified:
ha-nova:service-call; relay the plan's say; Safety below).On confirmation: Execute the planned call once, verified by the CLI:
ha-nova apply --plan <id>
Relay the result's say (../ha-nova/output-rules.md → Verb Results); exit 2 means the state changed since the plan — show the new plan and ask again; never retry after exit 6 or 7.
Skip this step in bulk mode and for helper reviews.
Run this step only when at least one complexity gate matches:
repeat: present, or choose: with 3+ branchestime_pattern) combined with actuator control such as switch, light, cover, climate, or valveAsk only non-binding "what happens if...?" questions that go beyond the fixed checklist:
queued / parallel behavior under rapid repeat triggersRules:
Skip this step in bulk mode.
Derive candidate suggestions only from verified evidence already present in the current review context:
Do not invent intent or removal justification from appearance alone.
Design-intent gate for remove/simplify ideas:
After the gate, rank confident suggestions by intervention depth:
Rules:
Apply ../ha-nova/output-rules.md: plain words, HA names verbatim; unless asked or names clash, no ids, "entity", modes, Relay/HA URLs, snapshots, raw JSON.
Review output is sectioned, not card-framed; only a Section 8 quick-fix proposal renders as the service-call Preview Card (output-cards.md → Cards) when it proposes a call.
Exception: if a maintainer-provided release-validation or machine-check prompt explicitly pins exact section titles or machine markers, follow that override exactly so automated validation can compare the fixed headings. This exception does not allow internal check codes in normal user-facing prose.
For resolved automation/script/helper targets == 1, keep this 8-section output in the same order every time (scene/dashboard targets omit skipped sections per Target Resolution):
Section 1 — Review target:
Section 2 — Findings:
🔴|🟠|🟡 Short descriptive titleWhy: ...Fix: ...Section 3 — Collision check:
Section 4 — Conflicts:
Section 5 — Questions to consider:
Section 6 — Suggestions:
Section 7 — Summary:
Section 8 — Instant help:
For resolved targets > 1, return exactly these 6 sections:
Section 1 — Scope:
Section 2 — Summary:
Section 3 — High-Risk Findings:
Section 4 — Repeated Patterns:
Section 5 — Items Checked:
Section 6 — Collisions by Cluster:
Each finding's data belongs to the reviewed item (matching entity_id, unique_id, or item_id, never a name alone), is complete (say when a read was truncated or failed), and is current. Unverified findings say so ("this likely means …", "could not verify …"), never in a verified tone.
Safety Core: before any write, apply ../ha-nova/safety-core.md; not yet in this conversation → read it first; unreadable or incomplete → stop and write nothing.
Drafts follow ../ha-nova/smallest-solution.md: the complete requested outcome in the simplest safe design, nothing speculative.
The Quick-Fix service call requires confirmation bound to its exact preview; bulk mode disables it entirely.
What SKILL.md sets; muted values are Claude Code's defaults
35 skills in this plugin
/adminUse when managing Home Assistant people, zones, tags, user accounts, general settings (name, location, units, time zone), Labs features, and analytics sharing — creating a person, drawing a zone, adding a tag, or reviewing who has access — through HA NOVA Relay./assistUse when working with Home Assistant's own built-in voice assistant (Assist) — testing what it understands, inspecting, editing, or creating Assist pipelines, managing which entities are exposed to voice, listing TTS/STT/wake-word engines, and teaching Assist custom sentences — through HA NOVA Relay. Not for Alexa or Google Assistant — setting those up is `ha-nova:integration-setup` (or `ha-nova:yaml-config` for a manual cloud config), and one that STOPPED working is a concrete failure for `ha-nova:diagnose`./backupnpx claudepluginhub markusleben/ha-nova --plugin ha-novaOther plugins' skills for the same job