plugins/claude-code-homeassistant-hermit/skills/ha-presence-report/SKILL.md
Presence history & tracker-health report — current home/away state, reliability, recent arrival/departure transitions, and activity patterns for person/device_tracker entities. Use when the operator asks about presence history or when a presence-dependent automation (locks, alarm, vacuum, climate) misbehaves.
npx skillsauth add gtapps/claude-code-hermit ha-presence-reportInstall 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.
Call GetDateTime for the current time reference. Read the stored locale from .claude-code-hermit/OPERATOR.md under ## HA hermit (fall back to English if absent).
Read .claude-code-hermit/raw/snapshot-ha-normalized-latest.json.
"Context snapshot is stale — run
/claude-code-homeassistant-hermit:ha-refresh-contextfor accurate data."
entity_index to keys starting with person. or device_tracker.. If no matching keys exist, emit "no presence entities found — presence tracking isn't configured in this HA instance" and stop. Do not proceed to the history fetch.state field (home / away / unknown / unavailable) and last_changed → "since HH:MM" relative to now.state == "unavailable" OR last_changed is more than 48 hours ago (stale tracker).Run:
${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha fetch-history \
--window-days 7 \
--entities "device_tracker.*" "person.*" \
--include-transitions
This writes .claude-code-hermit/raw/snapshot-ha-history-7d-latest.json.
Read snapshot-ha-history-7d-latest.json. For each presence entity:
transitions (ordered chronologically), formatted as HH:MM DD-Mon — <state>.state_durations — what percentage of the window was "home" vs "away".transitions list by UTC hour, keyed on direction: transitions to home are arrivals, transitions to away are departures. Report the top 1–2 arrival hours and departure hours separately (e.g. "typically arrives around 18:00 UTC, leaves around 08:00 UTC"). With ≥7d of data and ≥5 total transitions, state the windows; below that threshold, say "insufficient data for pattern detection." (hour_histogram counts all events regardless of direction, so use it only as a fallback for entities whose states aren't home/away.)Compose and print the inline report in the operator's locale:
## Presence Report — <date>
### Current State
<per-entity: who is home/away/unknown, since when>
### Tracker Health
<list unreliable entities with reason; "All trackers healthy." if none>
### Recent Transitions (last 7 days)
<per-entity: last 5 home/away events with timestamp>
### Activity Patterns
<per-person: typical arrival/departure windows, or "insufficient data">
Write compiled/presence-report-<YYYY-MM-DD>.md with frontmatter:
title: "Presence Report — <YYYY-MM-DD>"
type: presence-report
created: <ISO 8601 with UTC offset>
session: <S-NNN from .claude-code-hermit/state/runtime.json .session_id, or null if absent>
tags: [presence, ha]
Body: the inline report from step 5.
Append a citation to .claude-code-hermit/sessions/SHELL.md under ### Artifacts produced this session:
- [[compiled/presence-report-<date>.md]]
Create the section if it doesn't exist; skip the SHELL.md step if the file is absent (no active session).
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.