From claude-code-homeassistant-hermit
Drafts Home Assistant automation or script YAML from a description. Validates against entity inventory and safety policy. Includes helper provisioning.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-homeassistant-hermit:ha-build-automationThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. **Gather context**:
Gather context:
.claude-code-hermit/raw/snapshot-ha-normalized-latest.json for available entities and services.## HA hermit section) for alias and description fields.GetLiveContext via MCP for current state.Draft the YAML:
id: as the first field, using a stable, language-neutral snake_case value (e.g., kitchen_motion_after_sunset_notification). The validate-apply command uses this as the REST config ID — omitting it causes a derived, fragile ID that breaks on alias rename.alias and description.mode explicitly where concurrency matters..claude-code-hermit/raw/automation-<automation_id>.yaml.Provision missing helpers:
input_boolean.*, input_number.*, input_text.*, input_select.*, input_datetime.*, timer.*, counter.*, schedule.*) that are absent from the entity inventory snapshot. If none are absent, skip to step 4.${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha list-helpers --type <type> once to check whether any absent helper of that type already exists under a different entity_id. If found, reference that entity instead.input_boolean / input_text: {"name": "Friendly Name"}input_number: {"name": "...", "min": <N>, "max": <N>} (optional: step, initial, mode)input_select: {"name": "...", "options": ["opt_a", "opt_b"]}input_datetime: {"name": "...", "has_date": true, "has_time": true}timer: {"name": "...", "duration": "HH:MM:SS"}counter: {"name": "...", "initial": 0, "step": 1}schedule: {"name": "..."} with weekday blocks — run ha list-helpers --type schedule to inspect the schema of any existing helper; if none exists, check the HA schedule integration docs for the required block format.${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha create-helper <type> '<json>' and handle the result:
"requires_confirm": true — ha_safety_mode is ask; describe the helper to the operator and ask for confirmation. On confirm, re-run with --confirm."blocked": true, "requires_confirm": false — ha_safety_mode is strict; explain the boundary and create a proposal via /claude-code-hermit:proposal-create. Do not retry with --confirm. Continue to validation so the operator sees which entities are still missing."ok": true — helper created; continue.${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha refresh-context --incremental to update the snapshot before validation.Validate:
${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha simulate <path> to check entity references and policy.${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha policy-check <path> for a safety assessment.Handle results:
severity: "allow" — valid and safe: offer to apply via /claude-code-homeassistant-hermit:ha-apply-change.severity: "ask" (ask mode) — explain which sensitive entities are involved, then offer to apply. The apply step will require explicit operator confirmation.severity: "block" (strict mode) — explain why and create a proposal using /claude-code-hermit:proposal-create.snake_case, language-neutral, descriptiveplatform: explicitlyservice: with full domain (e.g., light.turn_on)entity_id over area/device when specificUnder ha_safety_mode: strict (the default): never draft automations that actuate lock, alarm_control_panel, or security-related cover/button/switch. If the user requests this, explain the safety boundary and create a proposal for manual review. Under ask: draft and run ha policy-check — the severity field in the result drives step 5.
npx claudepluginhub p/gtapps-claude-code-homeassistant-hermit-plugins-claude-code-homeassistant-hermitCreates, updates, and deletes Home Assistant automations and scripts via HA NOVA Relay. Includes entity resolution, safety checks, and preview before applying changes.
Validates and applies Home Assistant automation/script YAML with safety policy checks and optional domain reload. Use after building or modifying an automation.
Provides YAML patterns, triggers (state, time, sun, numeric, template, event, device, webhook, MQTT), conditions, actions, and best practices for Home Assistant automations. Useful for creating or editing YAML configs.