Skip to content
Back to skills

Ha Safety Audit

ASecurity

Audit all live Home Assistant automations and scripts against the safety policy. Catches policy drift from entities added via the HA UI that bypassed this plugin's safety gate. Runs weekly as a routine via reflect --check-id ha-safety-audit --check hermitd-homeassistant:ha-safety-audit.

  • 88 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 27, 2026
data-aibash

Works with

  • cli

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add gtapps/claude-code-hermit --skill ha-safety-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ha Safety Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ha Safety Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gtapps-ha-safety-audit/badge)](https://www.skillsdirectory.com/skills/gtapps-ha-safety-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ha-safety-audit
description: Audit all live Home Assistant automations and scripts against the safety policy. Catches policy drift from entities added via the HA UI that bypassed this plugin's safety gate. Runs weekly as a routine via reflect --check-id ha-safety-audit --check hermitd-homeassistant:ha-safety-audit.
allowed-tools:
  - Bash
  - Read
---

# HA Safety Audit

## Purpose

The plugin's safety gate only runs when automations are built through `ha-build-automation`. Automations and scripts added directly via the HA UI bypass it. This skill re-audits every live automation and script against the current safety policy and surfaces violations so the operator can review them.

Violations listed in `.hermit/compiled/acknowledged-violations.md` (under `automation_ids` or `script_ids`) are suppressed from the actionable findings and reported separately as acknowledged.

## Steps

1. Run `${CLAUDE_PLUGIN_ROOT}/scripts/ha-agent-lab ha audit-automations`.
2. Run `${CLAUDE_PLUGIN_ROOT}/scripts/ha-agent-lab ha audit-scripts`.
3. Each command writes JSON + markdown artifacts under `.hermit/raw/audit-ha-safety-*` and `.hermit/raw/audit-ha-script-safety-*` and prints one JSON object: `date`, `domain`, `scanned`, `passed`, `violations` (each `alias`, `id`, `reasons`), and the counts `acknowledged`, `unmanaged` and `fetch_failures`.
4. Render one block per command as below and join the two with a blank separator line. reflect --check-id ha-safety-audit --check hermitd-homeassistant:ha-safety-audit consumes the result as the scheduled check output.

## Output contract

Render each command's block in this shape, one violation line per entry with its `reasons` joined by `; `:

```
ha-safety-audit findings — YYYY-MM-DD
Policy violations: N
- <alias> (`<id>`): <reasons>
No action needed: M automations passed
Acknowledged (suppressed): K
Skipped (no numeric id): U
Skipped (404 on config fetch): F
```

Scripts use `ha-script-safety-audit findings — YYYY-MM-DD` as the first line and `scripts` in place of `automations`. Leave out a count line whose count is 0.

If `violations` is empty, the `Policy violations`, violation and `No action needed` lines become one: `No actionable findings. (<scanned> automations scanned)` or `No actionable findings. (<scanned> scripts scanned)`.

## Failure modes

- HA unreachable or erroring: the CLI prints `{"error":"ha_unreachable:<detail>"}` or `{"error":"ha_http_<status>:<detail>"}` and exits 1. Treat either as "skipped, cannot audit" in reflect --check-id ha-safety-audit --check hermitd-homeassistant:ha-safety-audit context; do not retry automatically.
- No automations or scripts configured → `No actionable findings. (0 automations/scripts scanned)` — not an error.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data-ai →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.