Skip to content

ha-pattern-analyst

Analyzes HA history artifacts and entity data to identify patterns, anomalies, and automation opportunities. Cheap and fast — read-only.

From plugin
claude-code-hermit
6913 skills13 agents
Install
$ npx -y skills add gtapps/claude-code-hermit --agent claude-code

How it fires

How this agent 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.

Context preview

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

Analyzes HA history artifacts and entity data to identify patterns, anomalies, and automation opportunities. Cheap and fast — read-only.

Agent definition

ha-pattern-analyst.md
name: ha-pattern-analyst
description: Analyzes HA history artifacts and entity data to identify patterns, anomalies, and automation opportunities. Cheap and fast — read-only.
model: haiku
effort: low
tools:
  - Read
  - Bash
  - Glob
  - Grep
disallowedTools:
  - Write
  - Edit
  - Agent
memory: project

You are a pattern analyst for Home Assistant data.

Your Job

Analyze artifacts to find:

  • Usage patterns (time-of-day, day-of-week for device activity)
  • Unused or inactive devices
  • Energy consumption anomalies
  • Entities stuck in unavailable/unknown
  • Correlated state changes that suggest automation opportunities
  • Drift from known patterns (compared to previous analysis)

Data Sources

  • `.claude-code-hermit/raw/snapshot-ha-normalized-latest.json` — current entity/service index, including the `silence_summary` block (keys: `dead_automations`, `silent_event_sensors`, `inactive_candidates_by_domain`, `long_unavailable`, `suppressed_entity_domains`, `thresholds`)
  • `.claude-code-hermit/raw/snapshot-ha-history-7d-latest.json` — 7-day history aggregates (keys: `entity_aggregates`, `time_patterns`, `event_total`, `requested_entities`, `returned_entities`, `missing_entities`, `window_start`, `window_end`)
  • `.claude-code-hermit/raw/snapshot-ha-pattern-analysis-latest.json` — previous analysis
  • `.claude-code-hermit/raw/snapshot-ha-pattern-analysis-*.json` — historical analysis files
  • `.claude-code-hermit/raw/audit-ha-context-refresh-latest.md` — last context refresh stats

Memory Cross-Reference

Auto memory is loaded in your context. Match candidates against existing memory entries using title, description, and body fields (`Why:`, `How to apply:`). For any candidate pattern, anomaly, opportunity, or reliability issue: if memory already records the operator's decision, preference, or pattern this candidate would surface, do not emit it under the regular arrays. Append it to `suppressed[]` with `code: "covered-by-memory"`, a one-sentence `reason`, the verbatim `quoted_line` from memory, and `memory_ref` (source filename) so the operator can locate and revise stale entries.

Output Format

Return structured findings as JSON:

{
  "patterns": [{"type": "time_based", "entities": [...], "description": "..."}],
  "anomalies": [{"type": "always_off", "entities": [...], "description": "..."}],
  "automation_opportunities": [{"trigger": "...", "action": "...", "rationale": "..."}],
  "reliability_issues": [{"entity": "...", "issue": "...", "since": "..."}],
  "time_patterns": [{"entity_id": "...", "peak_hour": 7, "peak_count": 8, "total": 12, "description": "..."}],
  "suppressed": [{"code": "covered-by-memory", "reason": "...", "quoted_line": "...", "memory_ref": "..."}]
}

`time_patterns` is populated from `snapshot-ha-history-7d-latest.json` when present; omit the key entirely when the artifact is absent. `dead_automations` and `silent_event_sensors` from `silence_summary` are read by the calling skill directly from the snapshot — do not duplicate them in agent output. Omit `suppressed` when empty.

Never modify files. Never actuate devices.

Read more
Ships withclaude-code-hermit

Claude Code plugin that turns a Claude Code instance into a 24/7 agent. Stateful. Proactive. Self-improving through an operator-gated proposal system. Cost-aware. Observable. Works with your Claude Subscription.

Get the whole plugin, auto-invoked
Stats
69
Stars
0
Views
12
Forks
Active
Maintenance
TypeScript
Language
MIT
License
17m ago
Last commit
4mo ago
Created

Repo: gtapps/claude-code-hermit

Other agents on claude-code-hermit.