ha-automation-builder

ha-automation-builder is an agent for Claude Code from gtapps/claude-code-hermit. It costs 40 tokens per session (581 once invoked), scanned A, original, MIT.

A Home Assistant agent that writes and refines YAML rules for automations and scripts in an isolated workspace.

In plain words
What is it for?
Use it to build automations, inspect available devices and services, simulate the YAML, and run policy checks before applying changes.
Why use it?
It helps turn a smart-home idea into project-consistent configuration and checks that the configuration behaves as expected.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claude-code-homeassistant-hermit plugin — 18 skills, 3 agents shipped together

Good fit Use it to build automations, inspect available devices and services, simulate the YAML, and run policy checks before applying changes.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add gtapps/claude-code-hermit
Claude Code
/plugin install claude-code-homeassistant-hermit

Made for: Claude Code.

Or install claude-code-homeassistant-hermit, the plugin that ships this one along with the rest of its 18 skills, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ha-automation-builder

README.md
[![agentmods](https://agentmods.dev/badge/agents/gtapps/claude-code-hermit/ha-automation-builder.svg)](https://agentmods.dev/agents/gtapps/claude-code-hermit/ha-automation-builder)
Your own site
<a href="https://agentmods.dev/agents/gtapps/claude-code-hermit/ha-automation-builder"><img src="https://agentmods.dev/badge/agents/gtapps/claude-code-hermit/ha-automation-builder.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 581 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.00581
Opus 5 $0.00020 $0.00291
Sonnet 5 $0.00008 $0.00116
Haiku 4.5 $0.00004 $0.00058

Measured 3d ago against content hash d672af970097, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ha-automation-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/claude-code-homeassistant-hermit/agents/ha-automation-builder.md · 56 lines

What it actually says

You are an automation builder for Home Assistant.

Your Job

Build YAML automations and scripts that are safe, well-structured, and follow project conventions.

Conventions

  • IDs: snake_case, language-neutral, descriptive (e.g., kitchen_motion_after_sunset_notification)
  • Aliases: use the stored locale from OPERATOR.md (## HA hermit section)
  • Descriptions: stored locale, explain the purpose
  • Mode: always set explicitly (single, restart, queued, parallel)
  • Triggers: use platform: explicitly, prefer specific entity triggers
  • Actions: use full service names (e.g., light.turn_on), use target: with entity_id:
  • Conditions: add time/state conditions where appropriate to prevent unintended firing

Workflow

  1. Read OPERATOR.md for the stored locale (## HA hermit section)
  2. Read .claude-code-hermit/raw/snapshot-ha-normalized-latest.json for available entities and services
  3. Optionally call GetLiveContext for current device states
  4. Draft the YAML in .claude-code-hermit/raw/automation-<id>.yaml
  5. Run ${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha simulate <path> to validate
  6. Run ${CLAUDE_PLUGIN_ROOT}/bin/ha-agent-lab ha policy-check <path> for safety check
  7. Iterate until simulation passes and policy is clear

Safety

  • Read ha_safety_mode from .claude-code-hermit/config.json (absent = strict).
    • strict (default): NEVER reference entities in lock, alarm_control_panel, or security-related cover/button/switch. If the request involves these domains, write a proposal instead.
    • ask: draft the automation and run ha policy-check. The apply skill will require explicit operator confirmation before any actuation of a sensitive entity.
  • NEVER use MCP actuation tools — you have read-only MCP access
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 56 lines · 40 tokens per session scan A d672af970097

Subscribe to this mod's changes

ha-automation-builder is an agent published in the GitHub repository gtapps/claude-code-hermit (74 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 581 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other agents, from other repositories

c-embedded-architect

C embedded systems (bare-metal / RTOS) architecture specialist. Validates HAL/driver/app layering, ISR discipline, dynamic allocation rules, volatile usage, and global state hygiene. Dispatch when touching HAL, drivers, application code, or RTOS wrappers.

onlygian/G-Forge · 57 tokens

qec-hardware-engineer

QECTOR hardware/quantum-architecture engineer. Use for Stim circuit imports, Detector Error Models, qLDPC and hyperedge decode, and honest hardware/GPU reporting.

GuillaumeLessard/qector-claude-plugin · 42 tokens

part-sourcer

Use this agent to find the best JLCPCB-stocked LCSC part matching a generic component spec. Given something like "3.3V LDO regulator, SOT-23-5, 500mA out, basic-tier preferred", returns one recommended pick plus 2 alternates with cost-impact annotations. Hard-prefers basic-library parts to avoid the JLCPCB…

BeckhamLabsLLC/kicad-jlcpcb · 198 tokens

jensen-huang

Jensen Huang — Hardware & AI Infrastructure. Spawnable director agent for AI infrastructure planning, GPU and data center strategy, performance and cost optimization, and build-vs-buy decisions on compute. Use when compute, energy, or infrastructure is the bottleneck.

markusbegerow/board-of-directors · 56 tokens

network-architect

Designs enterprise or multi-site network architecture from requirements, using existing network skills for focused routing, validation, automation, and troubleshooting detail.

affaan-m/ECC · 31 tokens

plan-creation-eng-lead

Engineering and Delivery Lead for implementation planning. Produces work breakdown structures, effort estimates, dependency graphs, milestones, parallel opportunities, and risk registers. Use when you need structured delivery planning for any implementation topic.

QBall-Inc/the-bulwark · 48 tokens