/ha-nova:writefrom ha-nova
Creates, updates, deletes, and reverts Home Assistant automations and scripts via HA NOVA Relay. Handles blueprints, batch changes, and one-shot automations.
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.
Mutations of automation and script configs: create, update, delete,
and revert of a verified update — plus one runtime exception: the paired
immediate service call of a DURATION request and automation.turn_off on an
expiry automation this flow just created (../ha-nova/one-shot-automations.md). Blueprints: read ../write/blueprints.md first.
Read and follow ../ha-nova/session-bootstrap.md. An unreachable Relay answers exit 1 RELAY_ERROR
(then ha-nova setup). Multi-server: --server <name>
on every command but apply; name a non-default server once per response.
For automations/scripts, this skill sends no raw ha-nova relay config write; blueprints use raw plans:
ha-nova find "<phrase>" --domain automation|script; ha-nova get <entity_id> --config (current config + config_id from the registry unique_id, never the slug); ha-nova get <entity_id> --related.ha-nova plan write --domain automation|script [--id <config_id> | --create] --file <draft.json>, ha-nova plan delete <entity_id>, ha-nova plan revert [--target <config_id>] [--domain <d>].ha-nova apply [--confirm <code>] --plan <id> [--no-snapshot].Draft: full config as one JSON object in a client-private scratch
file, posted byte-exactly.
variables, trigger_variables, script fields evaluate top-down: preserve
key order. Updates pass --id <config_id> from get --config; creates
--create (refuses existing ids and automation draft id). Script keys derive from alias or --id
(script.<key>). Update diff without a before side: item gone, STOP and ask.
Multi-target logical changes: present the plan first (../ha-nova/write-safety.md → Multi-Target Changes). 2 to 20 automation/script writes or deletes (mixed): plan each, show each Phase 2 preview without its ask, then ha-nova plan batch --plan <id> --plan <id> … in run order and its say; one confirmation, one apply (../ha-nova/batch-safety.md → CLI Batch). With other families in the task: ../ha-nova/grouped-change-set.md.
Input-device remaps: run the capability preflight per ../ha-nova/input-capability-preflight.md before drafting; the write stays blocked while the chosen gesture is only assumed or its evidence conflicts. Repurposing or cleaning up an input additionally runs ../ha-nova/consumer-discovery-preflight.md; incomplete coverage is disclosed, never claimed as "unused".
A one-shot intent ("just today", "tell me when the laundry finishes") takes the self-disabling pattern in ../ha-nova/one-shot-automations.md and skips unsolicited improvement offers — the Suggestion Block and Phase 5. A recovery, watchdog, self-healing, or retry intent reads ../ha-nova/recovery-workflows.md before drafting; the preview names the attempt bound — and the persistent-fault path only where the intent promises watchdog/self-healing continuity: an explicitly one-shot recovery keeps an attempt bound of one.
Every draft follows ../ha-nova/smallest-solution.md.
plan revert; undo-delete: result's restore verbatim. Update/delete/named revert: ha-nova find (exact entity_id wins; disabled: --include-disabled), then ha-nova get <entity_id> --config. managed: yaml/CONFIG_NOT_FOUND: YAML/package item, ha-nova:yaml-config, never plan write/plan delete. Ambiguity, no match, or an open choice (which garage door): ask one blocking question before any draft, not inside a preview. No second ambiguity question. Correct invalid premises.ha-nova find/get. A trigger or condition on a room, floor, or group ("in the living room", HA 2026.7+) takes a purpose-specific one (temperature.crossed_threshold, motion.detected) that get_triggers_for_target/get_conditions_for_target lists for its area, floor, or label, not one sensor's state/numeric_state: ../ha-nova/best-practices.md → Triggers, Conditions, and Targets.../ha-nova/smallest-solution.md → Write Suggestion Candidates.description. New or explicitly edited notification actions follow the canonical contract ../ha-nova/mobile-notification-composition.md. Its recurring-workflow INTENT classification is not so limited: it runs before the write preview on EVERY recurring-workflow write — existing notification actions and trigger-only edits included, their payloads staying byte-for-byte untouched — and may add an exception-only Suggestion Block item.../ha-nova/smallest-solution.md rule 7).../review/checks.md → Application, analytically on the draft — no relay calls (scripts: F-01..F-08; helper refs: H-01..H-08. Defer H-09/H-10 to Phase 4). A draft with a finding gets one verdict line ("Pre-write check: this draft may not behave as intended."), a clean one none; 🔴 inline with a fix, 🟠🟡 as advisory below the preview, code-free. Advisories do not block the write and do not require extra confirmation:
trigger.id into elif or use choose + condition: trigger."True"/"False" — use the boolean.available_energy may be current charge, not capacity — ask the user; never rewrite integration entity ids.
Track findings by check type for dedup in Phase 4, except R-18.ha-nova get <entity_id> --related on the top entities the item acts on or reads — NEVER on the item's own entity_id (that is the delete direction). Show other affected automations/scripts/scenes as advisory (read max 3 configs). An empty result names the scanned entities; a failed read is "couldn't check what uses it" — never a no-consumer claim.numeric_state above/below, its for:, a wait timeout, or a numeric template predicate on a physical-process sensor — or swaps the compared entity_id/attribute/value_template, or adds/changes an action setting a threshold-backing input_number — runs ../ha-nova/threshold-calibration.md and carries its findings (observed ranges, longest ambiguous phase, data gaps, both failure directions) into the preview; bounded reads of existing traces are its explicit exception to the no-auto-trace rule. A create runs it only for a stored setter on a helper existing items use as a physical-process boundary (one ha-nova get <helper> --related); otherwise create keeps its 3c skip. Unrelated numeric edits skip it.ha-nova plan write (delete/revert: plan delete|revert). Exit 3: stored plan, plan.confirm natural|code. Exit 0 (none): no preview or ask; apply per next_step. A draft notice: add the in-between state it names to from: (../review/checks.md R-31) and plan again. Exit 4: CONFIG_NOT_UI_MANAGED → ha-nova:yaml-config; CONFIG_ID_IN_USE → check earlier apply first, never duplicate; otherwise automation: omit --id, script: ask another name, --id <new> --create; NO_UNDO_SNAPSHOT → nothing revertible; REVERT_UNSUPPORTED → helper checkpoint, specify --target <config_id> or ha-nova:helper. Delete exit 5: absent. Revert exit 2 REVERT_DRIFT: changed since verified update, nothing planned; show live config, ask desired change.../ha-nova/write-safety.md):
diff rows verbatim in the Changes slot — never write it yourself; state the behavioral effect in the summary sentence (write-safety → Behavior narrative). create: summary. Close the card with the plan's say (it names the members[] that set the tier — never repeat them, except those it says the preview lists; it ends with the save or confirmation ask); several plans in one preview keep each reason and ask once: each plan's ask, the note once.consumers (who references the item's OWN entity_id): the consumers; [] is an explicit none among automations, scripts, and scenes; absent (coverage.complete false) is "couldn't check what uses it", never a no-consumer result. No menu — only say.plan.confirm none → apply; natural → show the preview and wait for the user's reply; code → follow say/next_step (window, phone, form, or chat code), never a menu. A duration pair takes its stricter plan's confirmation for both halves. Relay say and add no other reason; never cite, link, or name this skill or any HA NOVA rule file. A code counts only as a reply that is only the code, after the preview. After a "yes" to a code plan, repeat say's note and code block. Never pass a code they did not type. Pre-preview consent is draft-only; a changed draft needs a new plan and preview. An answer to a clarifying question is never a confirmation: end the turn with each new or changed plan's preview (except Phase 3 step 4's natural-confirmation duration call re-plan with action and tier unchanged).ha-nova apply --plan <id> (a plan.code: --confirm <the user's exact text> before --plan; else per next_step). Exit 2: the live config changed since the preview, nothing written; show the new diff and ask again. Never retry after exit 6 or 7.verified = the read-back equals the planned body (content and variables/fields order), Home Assistant loaded it, the registry entity is live; unverified says why in verification[].note or .observed (not loaded in time: saved, but whether it runs is unknown; say so); exit 7: relay say, then read ha-nova get <entity_id> --config and name it; before_config in the result is the way back. An undo notice: the update is not revertible; say so. Do not report destructive success until verification proves the target is gone.snapshot in the result). SNAPSHOT_FAILED deleted nothing: offer pruning the snapshot store, a full safety backup (ha-nova:backup), or proceeding without one; only after the user picks the last, apply [--confirm <code>] --plan <id> --no-snapshot.../ha-nova/automation-patterns.md): plan both first (plan write, plan call) for the one preview. Apply and verify the automation, re-check deadline margin and restore value — if stale, disable the armed expiry immediately and remove it through the delete flow before re-previewing. The new automation watches the actuator, so the call plan drifts: re-plan it (plan call) and apply the new plan under the same confirmation only if action and tier are unchanged (a new plan.code: the user types it); otherwise it fails below. VERIFY the immediate action by reading the target back; on any failure — every non-zero exit but CONFIRM_WAITING (rerun per next_step) — disable the automation at once (ha-nova call automation.turn_off <entity_id>) and clean it up through the delete flow before anything is re-previewed. Never hand the immediate half back to the user as a separate step.Not via ha-nova:review.
verified, else ha-nova get <entity_id> --config. If verification[].entity_id differs from the requested slug, report it — do not silently assume the requested slug won.../review/checks.md → Application. Dedup: findings the user saw in 3b MUST NOT repeat (by check type) — except R-18 still matching the persisted config: report it again as a persisted runtime risk with the reorder fix. Do not auto-trigger or auto-read traces outside an accepted Phase 5 test plan. R-19 follows normal dedup. Actions referencing helpers: always H-01..H-11.ha-nova get <entity_id> --related on the entities it triggers on and acts on, minus the item itself (3c fail-closed rule); read max 3 related configs.../ha-nova/output-cards.md → Findings, Empty States): Findings real issues; Collision check related items or failed scan ("couldn't check what uses it"); Advisory non-empty only — never print an empty "none" bucket; nothing at all → no review line beyond say. Never emit Questions to consider, Suggestions, or Instant help post-write; never repeat an item across Findings and Advisory. Sole exception: the one-line Replication Line after a verified create; Phase 5's line closes.undo receipt (replaced: only this newest update stays revertible; evicted targets are no longer revertible) and offer revert unless its say already names the way back (write-safety → Update-Revert). Creates → cleanup via normal HA NOVA delete flow (preview, its confirmation, absence verification); never promise a code. Deletes → offer restore (one plan + apply), else Home Assistant Backups.Every saved create/update ends, in the same response as the result's say, with one closing line offering a test preview ("Want a test preview? I'll show which devices would change before anything runs.", localized). Only exceptions: a one-shot or duration intent; a batch or grouped change set (on request); the user stopped these offers this session. An earlier test is no exception. A "yes" asks for the card, never a run (Test Plan Card mechanics: ../ha-nova/test-run.md). Never execute anything unconsented; the choice confirms only that card, and the card confirmation never replaces the typed confirmation. Skip this phase for deletes.
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.
Render Cards per ../ha-nova/output-cards.md. A create summary (or a deleted item's restore) names the item and devices, triggers, conditions, actions (scripts: inputs/steps); mode only if not single, in plain words; ids and the full config only when asked.
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.
Destructive cleanup keeps the delete's full confirmation, even for items created earlier in the same session.
No third-party MCP server, no direct HA API, no raw ha-nova relay config write.
get_states.Always load:
../ha-nova/best-practices.md, ../ha-nova/write-safety.md, ../ha-nova/smallest-solution.md../review/checks.md (catalog + Application; evidence boundaries on demand as it says)../ha-nova/write-safety.md of these.On demand — read only when the trigger applies:
../ha-nova/payload-schemas.md — a script, choose, or wait shape../ha-nova/automation-patterns.md — new branching, timing, or flow-control logic; restart-surviving save/restore (Persistence Model)../ha-nova/one-shot-automations.md — one-shot or duration-bound requests../ha-nova/recovery-workflows.md — recovery, watchdog, or retry intent../ha-nova/template-guidelines.md — the draft contains Jinja templates../ha-nova/safe-refactoring.md — rename, migrate, or orphan cleanup../ha-nova/update-revert.md — revert, undo, or restore a verified update../ha-nova/config-snapshots.md — restore from a config snapshot../ha-nova/test-run.md — only after the user accepts the Phase 5 test offer../ha-nova/input-capability-preflight.md — remapping an input device../ha-nova/consumer-discovery-preflight.md — repurposing an input's consumers../ha-nova/threshold-calibration.md — threshold, for:, wait-timeout, or compared-signal changesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub markusleben/ha-nova --plugin ha-nova35 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`./backupUse when checking Home Assistant backup status, creating a backup (including a safety backup before risky changes), inspecting or deleting backups, or changing the automatic-backup schedule, retention, or locations through HA NOVA Relay./calendarUse when listing, reading, creating, updating, or deleting Home Assistant calendar events through HA NOVA Relay./cameraUse when working with Home Assistant cameras — taking a snapshot for the agent to look at, getting a stream URL, recording, casting a camera stream to a TV or speaker display, or turning a camera or its motion detection on and off — through HA NOVA Relay./dashboardUse when listing, reading, building, redesigning, updating, or deleting Home Assistant dashboards, views, and cards (installed custom cards included), checking dashboards for broken cards, or managing Lovelace resources through HA NOVA Relay.Other plugins' skills for the same job