From claude-code-homeassistant-hermit
On-demand brainstorm for Home Assistant automation gaps. Reads entity inventory, existing automations, and operator intent to suggest capability improvements.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-homeassistant-hermit:domain-brainstormThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
After ≥8 invocations, read `state/proposal-metrics.jsonl` and filter events where `type:"brainstorm-emit"` and `skill:"ha-domain-brainstorm"`. Count CREATE vs total emits with ideas (triage-survival) and read `status:` of the resulting PROP files (PROP-acceptance). If triage-survival < 25% or PROP-acceptance < 30%, cut this skill rather than tune it — signal-to-noise isn't there.
After ≥8 invocations, read state/proposal-metrics.jsonl and filter events where type:"brainstorm-emit" and skill:"ha-domain-brainstorm". Count CREATE vs total emits with ideas (triage-survival) and read status: of the resulting PROP files (PROP-acceptance). If triage-survival < 25% or PROP-acceptance < 30%, cut this skill rather than tune it — signal-to-noise isn't there.
Read these in parallel — all are cheap cached reads plus one lightweight listing. Do not run ha refresh-context, fetch individual automation configs in a loop, or actuate any device.
Entity inventory
Read .claude-code-hermit/raw/snapshot-ha-normalized-latest.json → entity_index (the universe of areas, devices, and domains).
Automation/script inventory Run:
${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha list-automations
${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha list-scripts
These are live REST calls. On error or timeout: do not retry — note "automation inventory unavailable" and continue with cached artifacts only. With no inventory, [coverage-asymmetry] and [unbuilt-intent] are unsupportable; a degraded run will usually emit-zero.
Operator intent
Read .claude-code-hermit/OPERATOR.md (## HA hermit section) and the auto-memory MEMORY.md index. Note any stated wants or preferences ("close garage at night", "welcome light when arriving") that no automation name clearly implements.
Suppression filters (read to exclude ideas — never to source them)
.claude-code-hermit/state/integration-health-degraded-domains.json — skip any idea whose target entity sits in a degraded domain..claude-code-hermit/raw/snapshot-ha-pattern-analysis-latest.json / patterns-latest.md — already-flagged silent/dead items are ha-analyze-patterns' territory; do not surface them as capability gaps.Think across all four inputs. For each candidate, both constraints must pass before including it:
entity:binary_sensor.bedroom_motion, area:garage, script:bom_dia, operator:OPERATOR.md "close garage at night", health:no degraded domains). These support the friction; friction is the bar.Map each passing idea to the closest HA capability-gap prefix:
[automation-gap] — a device, sensor, or area present in the entity inventory but wired into zero automations.[coverage-asymmetry] — a paired-pattern gap (e.g. a bom_dia script exists but no boa_noite; a motion sensor turns lights on but nothing turns them off).[unbuilt-intent] — an operator-stated want (OPERATOR.md / auto-memory) that no automation or script name clearly implements.Important precision note for [automation-gap]: a precise "wired into zero automations" coverage graph is not cheaply cached (ha-safety-audit persists entity references only for violating automations, not all). [automation-gap] therefore produces a candidate grounded in the alias inventory and entity_index — triage and the operator decision are the backstop. State this candidacy in the Evidence.
Drop any idea whose target entity/domain sits in a degraded integration (suppression filter). Cap at 2 ideas total. Emit-zero if none pass. Record discarded candidates (one line each) for Gate 4.
For each idea, invoke /claude-code-hermit:proposal-create once:
Title: [<prefix>] <short idea title>
Evidence Source: capability-brainstorm
Evidence: <one paragraph: friction sentence + named grounding items>
Set frontmatter: source: auto-detected, category: improvement, tags: [domain-brainstorm, ideation].
Parse the verdict:
CREATE — note PROP-NNN.SUPPRESS — <code> — record suppression code; don't retry.DUPLICATE:<PROP-ID> — record existing ID; don't create.After each verdict, append a metrics event (Node stdlib, no deps). Tag skill:'ha-domain-brainstorm' to keep rows attributable to this plugin if other brainstorm skills ever share proposal-metrics.jsonl. Inlined here because append-metrics.js lives in the core plugin and is unreachable via ${CLAUDE_PLUGIN_ROOT}; JSON.stringify guarantees a valid line:
node -e "const fs=require('fs'); fs.appendFileSync('.claude-code-hermit/state/proposal-metrics.jsonl', JSON.stringify({ts:new Date().toISOString(),type:'brainstorm-emit',skill:'ha-domain-brainstorm',verdict:'<CREATE|SUPPRESS|DUPLICATE>',proposal_id:'<PROP-NNN or null>'})+'\n','utf-8');"
This event is what the kill-criteria audit reads — proposal-create's own created event does not carry per-skill provenance.
Do NOT invoke proposal-triage directly — /proposal-create handles it.
Send one message per the Operator Notification protocol in CLAUDE.md. Use the stored locale from OPERATOR.md (## HA hermit) for all user-facing text.
Zero-emit:
🏠 Domain brainstorm — 0 ideas emitted (<reason: thin context | automation inventory unavailable | all suppressed | all duplicates | stale snapshot>)
Non-zero:
🏠 Domain brainstorm (<N> idea(s))
1. **[prefix] <title>** — <one-line description>
_Grounding: <item 1>, <item 2>_
_Friction: <one-sentence pain>_
PROP-NNN created · (or: suppressed — <code> · or: duplicate of PROP-NNN)
If ≥1 PROP was created (not suppressed or duplicate), write:
.claude-code-hermit/compiled/domain-brainstorm-YYYY-MM-DD-HHMM.md
---
title: Domain brainstorm — <ISO timestamp>
type: domain-brainstorm
created: <ISO timestamp with timezone>
tags: [domain-brainstorm, ideation]
source: interactive
proposals_created: [PROP-NNN, ...]
---
Body (150-line cap): ideas that passed (one paragraph each), discarded candidates (one line each), triage verdicts, inputs scanned (paths only, no content), note if inventory was degraded.
Do not tag foundational — this is a time-bounded ideation snapshot.
Zero-emit runs: skip the artifact entirely. Log one line to SHELL.md Findings:
domain-brainstorm: 0 ideas emitted (<reason>)
npx claudepluginhub p/gtapps-claude-code-homeassistant-hermit-plugins-claude-code-homeassistant-hermitReviews Home Assistant automations, scripts, and helpers for errors, best-practice violations, and conflicts. Handles discovery and reading internally.
Teaches Home Assistant automation patterns using native triggers, helpers, and conditions instead of Jinja2 templates. Covers safe refactoring, Blueprints, Zigbee automations, and dashboard cards.
Browse and explain 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 exist, what a specific one does, or which haven't fired.