Skip to content
Automation
Skill

/ha-refresh-context

Fetch and normalize the full Home Assistant state into durable artifacts. Use before drafting automations or when context is stale.

From plugin
claude-code-hermit
7488 skills11 agents
Install
$ npx -y skills add gtapps/claude-code-hermit --skill ha-refresh-context --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/ha-refresh-context

Context preview

The summary Claude sees to decide when to auto-load this skill.

Fetch and normalize the full Home Assistant state into durable artifacts. Use before drafting automations or when context is stale.

SKILL.md

ha-refresh-context.SKILL.md
name: ha-refresh-context
description: Fetch and normalize the full Home Assistant state into durable artifacts. Use before drafting automations or when context is stale.
allowed-tools:
  - Bash
  - Read
  - Write
  - mcp__homeassistant__GetLiveContext

HA Refresh Context

Steps

1. Run `${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha refresh-context`. 2. Read the output JSON — note entity count and base_url_source. 3. Read `.claude-code-hermit/raw/snapshot-ha-normalized-latest.json` to understand what's in the house. 4. Compare with the previous entity count (check your auto memory for a stored house profile). 5. If new entities, areas, or domains appeared, update your auto memory with the house profile changes. 6. If entities disappeared or became unavailable, note it in your auto memory.

Output

  • `.claude-code-hermit/raw/snapshot-ha-context-<date>.json` + `snapshot-ha-context-latest.json` — raw HA API snapshot
  • `.claude-code-hermit/raw/snapshot-ha-normalized-latest.json` — processed entity/service index (fixed name)
  • `.claude-code-hermit/raw/audit-ha-context-refresh-<date>.md` + `audit-ha-context-refresh-latest.md` — audit entry

**House profile (first run or when profile changes):** if new areas, domains, or significant entity changes are observed in step 5, write a durable house profile summary to `.claude-code-hermit/compiled/context-house-profile-<YYYY-MM-DD>.md` with frontmatter `type: context`, `title: "House Profile: <date>"`, `created: <ISO8601>`, `task: <T-... for the open record in this turn; omit this field otherwise>`, `tags: [ha-context, house-profile, foundational]`, `injection_stub: "House profile: <N> areas, <M> entities, <K> automations. Read compiled/context-house-profile-<date>.md for detail."` (fill in the real counts). Inside an open record's turn, pipe `[[compiled/context-house-profile-<date>]]` into `.claude-code-hermit/bin/hermit-run task note .claude-code-hermit <id>`. Otherwise skip the note.

When to Use

  • Session start (via ha-boot) when context is stale
  • Before building any automation
  • After the operator reports changes to their HA setup
  • Periodically to detect drift
Read more
Ships withclaude-code-hermit

If you know Claude Tag, the idea will feel familiar: hand Claude work through a channel, such as Discord, Telegram, or your custom integration, and get results back there.

Get the whole plugin

Other skills on claude-code-hermit.