plugins/claude-code-homeassistant-hermit/skills/ha-build-automation/SKILL.md
Draft a Home Assistant automation or script YAML from a description. Validates against the entity inventory and safety policy. Use when the user wants to create or modify HA automations.
npx skillsauth add gtapps/claude-code-hermit ha-build-automationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
tools
Composes and delivers the daily fitness brief — a forward-looking morning read (readiness + today's plan) or a backward-looking evening read (today's training, or an earned-rest note, + tomorrow's setup) — in the operator's configured voice. Invoke with /claude-code-fitness-hermit:fitness-brief --morning|--evening|--slot <name>. Becomes the plugin's two daily beats — the morning Strava connectivity check and the evening activity sync, RPE binding, and Run deep-dive.
development
Renew the hermit's long-lived Claude login token over the channel, before it expires. Relays a one-time sign-in link to the operator, takes the code back, installs the new token, and restarts. Activates on messages like 'relogin', 'renew my login', 'reauth', 'the login is expiring', or when doctor's credential-expiry check flags setup-token.
development
Synthesizes the past 7 days of archived briefs into a weekly digest — top stories, emerging vs faded themes, category activity, and per-source performance built from archive frontmatter. Delivers to the operator's configured channel and archives a weekly note. Designed as a weekly routine. Invoke with /feed-hermit:weekly-digest.
development
Manage developing story arcs tracked across briefs — add, resolve, and list active arcs in compiled/story-arcs-*.md. Arc Watch keywords drive the feed-brief arc-tagging enrichment. Invoke with /feed-hermit:story-arcs add|resolve|list.