一键导入
write
Use when creating, updating, or deleting Home Assistant automations or scripts through HA NOVA Relay. Resolves entities and reviews internally.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating, updating, or deleting Home Assistant automations or scripts through HA NOVA Relay. Resolves entities and reviews internally.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user wants Home Assistant operations through HA NOVA (App + Relay) with local OS-backed auth.
Use when checking Home Assistant home status, repairs, system health, unavailable/unknown entities, low batteries, or component/config summaries through HA NOVA Relay.
Use when HA NOVA Relay requests fail due to onboarding, connectivity, or auth issues.
Use when checking pending Home Assistant updates (core, OS, Apps, integrations, device firmware), reading release notes, installing updates with safety gates, or skipping/unskipping update versions through HA NOVA Relay.
Use when managing Home Assistant people, zones, tags, and user accounts — creating a person, drawing a zone, adding a tag, or reviewing who has access — through HA NOVA Relay.
Use when working with Home Assistant's voice assistant — testing what Assist understands, inspecting or editing Assist pipelines, managing which entities are exposed to voice, and listing TTS/STT/wake-word engines — through HA NOVA Relay.
| name | write |
| description | Use when creating, updating, or deleting Home Assistant automations or scripts through HA NOVA Relay. Resolves entities and reviews internally. |
| license | MIT |
| compatibility | Requires the ha-nova CLI (run 'ha-nova setup' first) and the HA NOVA Relay in Home Assistant (App, or standalone container on Container/Core). |
Mutations only:
automation, scriptcreate, update, deleteRead and follow ../ha-nova/session-bootstrap.md.
Verify Relay:
ha-nova relay health
If this fails, run onboarding: ha-nova setup.
File-based relay requests only: ha-nova relay core --method <METHOD> --path <PATH> --body-file <payload-file> for config writes, ha-nova relay ws --data-file <payload-file> for reads/reloads, --jq-file / --out for filters and large reads.
Multi-target logical changes: present the plan first per skills/ha-nova/write-safety.md → Multi-Target Changes. Non-destructive worksets (max 10 operations) may confirm as one grouped change set per skills/ha-nova/grouped-change-set.md — Phase 2 previews stay, their per-preview options and confirmation collapse into the group's single final action block.
Input-device remaps (buttons, remotes, switches): run the capability preflight per skills/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 skills/ha-nova/consumer-discovery-preflight.md; incomplete coverage is disclosed, never claimed as "unused".
skills/ha-nova/agents/resolve-agent.md.target_id, current_config, bp_status, suggested_enhancements.
entity_id -> unique_id with config/entity_registry/get; use config/entity_registry/list_for_display only for search/disambiguationcreate IDs: automations=Unix timestamp, scripts=slug.skills/ha-nova/write-safety.md): fresh/stale+simple->continue, stale+complex->block.delete):
suggested_enhancements as the Suggestion Block (output-rules.md; max 4, numbered/menu). User accepts numbers or "skip" → merge accepted into config BEFORE preview. Skip when SUGGESTED_ENHANCEMENTS: none.skills/review/checks.md → Application (family matrix + evidence boundaries). Run S/R/P/M checks analytically on the draft YAML — no relay calls (scripts: F-01..F-08; helper refs: H-01..H-08. Defer H-09/H-10 to Phase 4).
One pre-write verdict line before apply:
trigger.id into elif or refactor to choose + condition: trigger."True"/"False"; use the boolean directly or direct negation.available_energy may be current charge, not capacity; ask user to verify maximum/nominal source. Never auto-rewrite integration-specific entity IDs.
Track findings by check type for dedup in Phase 4, except R-18.search/related on the top target entities (max 3 related configs); show affected automations/scripts as advisory. Skip create/delete.skills/ha-nova/write-safety.md for the fixed shape):
ha-nova diff (prefer --out <diff-file>), print the diff output verbatim in the Changes slot — never write it yourself; state the behavioral effect in the summary sentence (write-safety → Behavior narrative). create: summary. Create/update previews show apply, show yaml, and cancel options.apply, show yaml, cancel, or any menu; ask only for the exact confirm:<token> or cancellation.skills/ha-nova/batch-safety.md; per-item consumer checks and absence verification stay.confirm:<token>. Active Preview Confirmation is required; delete is the typed confirmation code, never a menu. Pre-preview consent is draft-only; payload/diff changes need preview.write-safety.md → Drift check before apply).skills/ha-nova/config-snapshots.md (on capture failure follow its capture-failure stop; mention restore in the result).skills/ha-nova/agents/apply-agent.md.Fallback: If agent dispatch unavailable, execute inline.
Do NOT invoke ha-nova:review separately.
target_id (do NOT re-resolve by slug):
ha-nova relay core --method GET --path /api/config/automation/config/<target_id> --jq-file <filter-file> --out <result-file>/api/config/script/config/<target_id><filter-file>: copy skills/ha-nova/config-body-filter.jq; if unavailable (flat-copy installs), recreate exactly:
if .ok then .data.body else error("relay error: \(.error.message // "unknown")") end
reloaded: false or ran inline without reload; resolve actual entity_id by matching unique_id == <target_id>, then read /api/states/{entity_id} to confirm runtime presenceentity_id differs, report it and point to skills/ha-nova/safe-refactoring.md; do not silently assume the requested slug wonid,unique_id,created_at,modified_at,editor,enabled).trigger→triggers, action→actions, condition→conditions). Account for plural aliasing when comparing — these are not real diffs.skills/review/checks.md → Application. If they match, skip covered checks but re-run storage-sensitive R-18 subset.R-19 follows normal dedup; R-23/R-24 do too. If already shown pre-write, do not repeat unless it becomes a new category.{"type":"search/related","item_type":"entity","item_id":"<entity_id>"} via ha-nova relay ws --data-file <payload-file>; read max 3 related configs.skills/ha-nova/output-rules.md) — report only what has substance; scans still run, only empty output is suppressed:
Questions to consider, Suggestions, or Instant help post-write; never repeat an item across Findings and Advisory.ha-nova snapshot save and offer revert (see skills/ha-nova/write-safety.md). Creates → cleanup via normal HA NOVA delete flow with preview, confirm:<token>, and absence verification. Deletes → name the captured config snapshot as the restore path (skills/ha-nova/config-snapshots.md); when no snapshot was captured (store missing/full), Home Assistant Backups.After the Post-Write Review output, build a Test Plan Card per skills/ha-nova/test-run.md: classify trigger type and action risk, pick ONE recommended option (real run included where acceptable — with the devices it will switch named), show at most 3 options plus skip. Never execute anything unconsented; the user's option choice is the confirmation bound to that exact card (single confirmation — no second prompt). Runs follow the service-call runtime rules (mqtt triggers via ha-nova:mqtt; logic check via POST /api/template), then the automatic post-run follow-up in test-run.md (trace, state verify, restore). After one skip, de-escalate to a single line for later writes. Skip this phase for deletes.
Apply skills/ha-nova/output-rules.md.
Previews, delete prompts, post-write results, and the Phase 5 test offer render as the Cards defined there (Test Plan Card mechanics: skills/ha-nova/test-run.md); the diff mechanics stay in skills/ha-nova/write-safety.md.
See skills/ha-nova/SKILL.md → Response Format.
Preview before write: nothing is saved until the user confirms the shown preview.
Confirmation binds to the displayed preview and expires on any change to target, payload, endpoint, or scope (context skill → Active Preview Confirmation).
Pre-preview phrases ("do it", "go ahead", "implement the plan") authorize drafting and preview only — never the write itself.
Delete and destructive operations require the typed confirmation code confirm:<token> verbatim; "yes" or any natural-language reply is invalid.
Never guess entity, service, or config IDs — resolve them or ask.
Home Assistant is reached exclusively through ha-nova relay.
For any HA write this skill does not cover, STOP and invoke ha-nova:fallback first — never probe unfamiliar write endpoints.
Destructive cleanup still requires confirm:<token>, even for items created earlier in the same session.
Agents must use Relay only; no MCP, no direct HA API
Every write MUST end with the Post-Write Review slot; use terminal-friendly labels where Markdown headings add noise.
get_states — use targeted registry/config readsAlways load:
skills/ha-nova/relay-api.md, skills/ha-nova/payload-schemas.md, skills/ha-nova/best-practices.md, skills/ha-nova/write-safety.mdskills/ha-nova/agents/resolve-agent.md, skills/ha-nova/agents/apply-agent.mdskills/review/checks.md (self-contained catalog + Application)On demand — read only when the trigger applies:
skills/ha-nova/automation-patterns.md — drafting new branching, timing, or flow-control logicskills/ha-nova/template-guidelines.md — the draft contains Jinja templatesskills/ha-nova/safe-refactoring.md — rename, migrate, or orphan-cleanup tasksskills/ha-nova/update-revert.md — the user asks to revert, undo, or restore a verified update (create cleanup stays out — see write-safety)skills/ha-nova/config-snapshots.md — capturing the pre-delete snapshot, or the user asks to restore from a config snapshotskills/ha-nova/test-run.md — Phase 5 test offer: feasibility, options, post-run follow-upskills/ha-nova/input-capability-preflight.md — remapping an input device (button, remote, switch)skills/ha-nova/consumer-discovery-preflight.md — repurposing or cleaning up an input's existing consumers