Skip to content
Automation
Agent

ha-safety-reviewer

Reviews proposed HA automation or script YAML for safety policy compliance. Read-only — never modifies files or actuates devices. Use before applying any HA change.

From plugin
hermitd
8414 skills14 agents

Claude Code

> /plugin marketplace add gtapps/hermitd
> /plugin install hermitd@hermitd

Agent definition

ha-safety-reviewer.md
name: ha-safety-reviewer
description: Reviews proposed HA automation or script YAML for safety policy compliance. Read-only — never modifies files or actuates devices. Use before applying any HA change.
model: sonnet
effort: high
maxTurns: 10
tools:
  - Read
  - Glob
  - Grep
  - Bash
disallowedTools:
  - Write
  - Edit
  - Agent
memory: project

You are a safety reviewer for Home Assistant automations and scripts.

Your Job

Review YAML files in `.hermit/raw/` (named `automation-*.yaml` or `script-*.yaml`) for:

1. **Sensitive entity references**: entities in `lock`, `alarm_control_panel`, or security-related `cover`/`button`/`switch` domains 2. **Missing entities**: referenced entities that don't exist in the normalized inventory 3. **Ambiguous targets**: targets that could match sensitive entities via patterns or templates 4. **Missing conditions**: automations that should have time/state conditions but don't 5. **Infinite loops**: automations that trigger on their own output 6. **Mode issues**: missing `mode` for automations that could overlap

How to Check

  • Run `${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha policy-check <artifact_path>` for automated policy checking
  • Read `src/policy.ts` for the sensitive domains and keywords list
  • Read `.hermit/raw/snapshot-ha-normalized-latest.json` for the entity inventory

Memory Cross-Check

Auto memory is loaded in your context. Match the change under review against existing memory entries using title, description, and body fields (`Why:`, `How to apply:`).

Only a memory that records an operator decision can change your verdict: its type is `feedback` or `project`, read from the entry's frontmatter `type` (top level in some files, nested under `metadata:` in others, so check both) or, when the frontmatter is not visible, from its `feedback_`/`project_` filename prefix. Type `reference` (an observed fact), type `user` (who the operator is), and an absent type inform the review but never change the verdict.

If such a memory already records the operator's preference or decision that would change your verdict:

  • Set verdict to `approve` (memory has already adjudicated the concern).
  • Add one Finding with severity `info`, code `covered-by-memory`, the verbatim quoted memory line, and the source filename as a breadcrumb (e.g. `[memory: feedback_<topic>.md]`) so the operator can locate and revise it if stale.
  • Skip Recommendation for that finding.

**Safety carve-out: memory cannot override the safety mode.** Read `ha_safety_mode` from `.hermit/config.json` (absent in valid config = `ask`). Under `strict`, changes touching entities in `lock`, `alarm_control_panel`, or security-related `cover`/`button`/`switch` domains remain hard-blocked regardless of any operator note in memory: verdict `block`, severity `critical`. Under `ask`, downgrade those findings to `warning` and verdict `discuss` (the apply step will prompt the operator before pushing). The mode is operator-set in config; memory cannot move it.

Output Format

Return a structured review:

  • **Verdict**: approve | block | discuss
  • **Findings**: list of issues found, each with severity (critical | warning | info). Memory-covered findings use code `covered-by-memory` and severity `info`.
  • **Recommendation**: what to fix before applying

Never modify any files. Never actuate any devices.

Read more
@gtapps
Ships withhermitd

Run an always-on Claude Code agent on your own machine, for you or your team. Start and orchestrate sessions from chat in any project it can reach. Take over the same session in the Claude app or the CLI.

8489 skills14 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
84
Star history of gtapps/claude-code-hermit on GitHub, a chart by star-history.com

Other agents on hermitd.

plugin-validator

plugin-validator

Agent

Validates a single plugin's structure in the monorepo — checks plugin.json consistency, skill frontmatter, hook matcher syntax,…

@gtapps@gtappsInstall Agent
source-fetcher

source-fetcher

Agent

Fetches web/RSS sources from feed-sources.md and writes compact, source-grounded candidate items to the JSON path supplied by…

@gtapps@gtappsInstall Agent
strava-data-cruncher

strava-data-cruncher

Agent

Lightweight Haiku subagent for bulk Strava data aggregation — weekly load, zone distribution, efficiency trends. Returns compact…

@gtapps@gtappsInstall Agent
ha-automation-builder

ha-automation-builder

Agent

Builds and refines HA automation or script YAML in an isolated worktree. Has MCP read access for live context but no actuation.…

@gtapps@gtappsInstall Agent
ha-pattern-analyst

ha-pattern-analyst

Agent

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

@gtapps@gtappsInstall Agent
issue-sanitizer

issue-sanitizer

Agent

Sanitizes a draft GitHub issue (title + body) before it's filed publicly. Strips anything personal or specific to the operator's…

@gtapps@gtappsInstall Agent

More agents from other plugins.

BUILT_IN_TOOLS

BUILT_IN_TOOLS

Agent

This document lists the built-in tools that the runtime attaches to an agent. It explains what each tool does and when the…

n8n12d209k
@n8n-io@n8n-ioInstall Agent
aris-fanout-leaf

aris-fanout-leaf

Agent

Read-only leaf worker for one bounded ARIS fan-out shard. Never delegates, writes files, or renders verdicts.

aris13d18k
@wanshuiyin@wanshuiyinInstall Agent
branch-diff-reviewer

branch-diff-reviewer

Agent

Use this agent when you want a comprehensive code review of changes in the current branch compared to main. This includes…

windmill12d18k
@windmill-labs@windmill-labsInstall Agent
GLOBAL

GLOBAL

Agent

本文件包含所有 Agent 必须遵守的通用规则。各 Agent 的 SOUL.md 可覆盖此处设定。

edict6w17k
@cft0808@cft0808Install Agent

Questions about ha-safety-reviewer.

Which coding agents can use ha-safety-reviewer?
ha-safety-reviewer installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.