ha-automation-explorer
Browse and explain the hermit's Home Assistant automations — list by topic, filter by keyword with plain-language YAML explanations, or sort by last-fired. Read-only. Use when the operator asks "what automations do I have / what does this one do / which haven't fired."
- License 许可
- MIT
- 所属仓库
- gtapps/hermitd
- 最近更新
- 2026-11-15
- Stars
- ★ 85
- Forks
- 16
01 前言 Front Matter
- name
- ha-automation-explorer
- description
- Browse and explain the hermit's Home Assistant automations — list by topic, filter by keyword with plain-language YAML explanations, or sort by last-fired. Read-only. Use when the operator asks "what automations do I have / what does this one do / which haven't fired."
- allowed-tools
- [ "Bash", "Read", "mcp__homeassistant__GetDateTime", "mcp__homeassistant__llm__GetDateTime" ]
03 SKILL.md 正文
HA Automation Explorer
Read-only. No writes, no proposals, no actuation.
Shared preamble (all modes)
- Use the session language for all output.
- Read
.hermit/raw/snapshot-ha-normalized-latest.json. Check the file'smtimewithstat. If missing or older than 24 hours, append this warning to all output:"Context snapshot is stale — run
/hermitd-homeassistant:ha-refresh-contextfor accurate entity data." - Extract
entity_indexandsilence_summaryfrom the snapshot. Build the automation list: all entries inentity_indexwhose key starts withautomation..
Mode 1 — List all automations
Invoked as /hermitd-homeassistant:ha-automation-explorer (no args).
- If the automation list is empty, output: "No automations found in the context snapshot." Stop.
- Group automations by topic, inferring from
friendly_name(fromattributes.friendly_name) andentity_id. Buckets (best-effort — no area registry exists):- Security: alarm, lock, door, gate, camera, motion, presence
- Comfort: climate, temperature, heating, cooling, fan, blind, curtain, cover
- Presence: arrive, leave, away, home, person
- Energy: power, energy, solar, charge, saving
- Other: anything that doesn't fit the above
- Derive a one-line description from
friendly_namefor each automation. Do not fetch configs here. - Mark automations that appear in
silence_summary.dead_automationswith⚠ dead (N days). Fornever_fired: trueentries, use⚠ never fired. - Output the catalog grouped by topic:
**Security** - automation.alarm_away — "Arm alarm when everyone leaves" ⚠ dead (12 days) **Comfort** - automation.morning_blinds — "Open blinds at sunrise"
Mode 2 — Explain automations matching a keyword
Invoked as /hermitd-homeassistant:ha-automation-explorer <keyword>.
- Filter the automation list: keep entries where
keywordappears (case-insensitive) infriendly_nameorentity_id. - If no matches: output "No automations matching '<keyword>'." Stop.
- If more than 8 matches, the keyword is too broad to explain at once. List the matching
entity_id+friendly_namepairs and ask the operator to narrow the keyword. Do not fetch any configs. Stop. - For each match, check
attributes.id. If null (YAML-packaged automation, not retrievable via REST), note: "Config not retrievable — automation is YAML-packaged." Skip the config fetch for that entry. - For each match with a numeric
id, fetch its config:${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha get-automation-config <id> - Explain the fetched YAML in plain language in the session language:
- Triggers: what starts this automation (time, state change, event, etc.)
- Conditions: any guards that must be true for it to run
- Actions: what it does, step by step
- State: enabled / disabled;
⚠ deadif insilence_summary.dead_automations
Mode 3 — Sort by last fired
Invoked as /hermitd-homeassistant:ha-automation-explorer --last-fired.
- Call
GetDateTimefor the current UTC timestamp. - Sort all automations by
entity_index[entity_id].attributes.last_triggereddescending (most recently fired first). Automations with nulllast_triggeredgo at the bottom. - Compute human-readable "N days ago" using the timestamp from Step 1. For null
last_triggered: show "never fired." - Enrich with
silence_summary.dead_automationsto mark stale entries — do NOT callfetch-history. An automation is dead if it appears insilence_summary.dead_automations(30+ days silent while enabled, or never fired). - Output the sorted roster, one automation per line:
1. automation.morning_blinds — "Open blinds at sunrise" — fired 2 days ago 2. automation.alarm_away — "Arm alarm when everyone leaves" — fired 14 days ago ⚠ dead ... N. automation.old_routine — "Old routine" — never fired ⚠ dead - End with: "X automations total. Y dead or never fired."
Notes
- This skill is the on-demand browsing view.
ha-analyze-patternsis the scheduled, proposal-generating silence audit — it remains authoritative for surfacing dead automations via the proposal pipeline. - Mode 1 and Mode 3 flag never-fired automations differently, by design. Mode 1 reads
silence_summary.dead_automations, which only lists a never-fired automation once it is 30+ days old — so a recently-created automation that has never fired is not flagged in Mode 1. Mode 3 readsattributes.last_triggereddirectly, so it shows "never fired" immediately regardless of age. - For deep pattern analysis, use
/hermitd-homeassistant:ha-analyze-patterns. - For building new automations, use
/hermitd-homeassistant:ha-build-automation.
04 同仓库更多 Skills
task-decide
Record the operator's typed task decision.
dream
Nightly memory maintenance from transcript ground truth. Verifies, enriches and tidies auto-memory and topic pages with snapshot validation and undo. Also handles 'undo the dream'.
when-done-switch-to
Arm a deferred model or effort switch. Use for "when done switch to", "after this drop to sonnet", or "switch model when idle".
weekly-review
Generate the weekly review report for the current ISO week. Writes to .hermit/compiled/review-weekly-YYYY-Www.md (dev-facing detail) and sends a plain-language channel summary (Delivered / Decisions / Waiting on you / Spend). Runs every Sunday at 23:00 via routine.
watch
Background events via the config watch monitor or ad-hoc Monitor tool. Quiet watches cost zero tokens.
watch-activate
Activate the config watch monitor.