ha-automation

ha-automation is a skill for Claude Code from nodnarbnitram/claude-code-extensions. It costs 68 tokens per session (3,044 once invoked), scanned A, original, MIT.

A guide for creating and debugging Home Assistant automations, scripts, reusable blueprints, and Jinja2 templates. Home Assistant automations run actions when triggers and conditions are met.

In plain words
What is it for?
Use it to define triggers, conditions, and actions; write scripts or blueprints; and create or troubleshoot Jinja2 expressions in Home Assistant.
Why use it?
It helps prevent invalid YAML, outdated trigger forms, missing condition logic, template errors, and incorrect blueprint parameters.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to define triggers, conditions, and actions; write scripts or blueprints; and create or troubleshoot Jinja2 expressions in Home Assistant.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nodnarbnitram/claude-code-extensions/ha-automation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nodnarbnitram/claude-code-extensions --skill ha-automation
Clone the repo
git clone --depth 1 https://github.com/nodnarbnitram/claude-code-extensions

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/nodnarbnitram/claude-code-extensions/ha-automation/github.svg)](https://agentmods.dev/skills/nodnarbnitram/claude-code-extensions/ha-automation)
Your own site
<a href="https://agentmods.dev/skills/nodnarbnitram/claude-code-extensions/ha-automation"><img src="https://agentmods.dev/badge/skills/nodnarbnitram/claude-code-extensions/ha-automation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ha-automation

Your own site · 80×15
<a href="https://agentmods.dev/skills/nodnarbnitram/claude-code-extensions/ha-automation"><img src="https://agentmods.dev/badge/skills/nodnarbnitram/claude-code-extensions/ha-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,044 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.00068 $0.03044
Opus 5.5 $0.00027 $0.01218
Sonnet 5.5 $0.00014 $0.00609
Haiku 4.5 $0.00007 $0.00304

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

Security

Grade A, and why

ha-automation 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 3mo 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.

.claude/skills/ha-automation/SKILL.md · 564 lines

How it starts

The opening of the file, as written. The whole thing — 564 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Home Assistant Automation Expert

Master Home Assistant automations, scripts, blueprints, and Jinja2 templating with confidence.

Before You Start

This skill prevents common automation mistakes including:

  1. Incorrect trigger syntax - Using deprecated formats or invalid entity IDs
  2. Missing condition operators - Forgetting and/or/not conjunctions
  3. Jinja2 template errors - Undefined variables or incorrect filter usage
  4. Blueprint parameterization issues - Missing !input substitutions or misaligned selectors

Quick Reference: Automation Structure

Basic Automation Format

automation: !include automations.yaml

Single Automation File

- alias: "My Automation"
  description: "What this automation does"
  trigger: ...
  condition: ...
  action: ...
  mode: single

Triggers Quick Reference

State Trigger

trigger:
  platform: state
  entity_id: light.bedroom
  from: "off"
  to: "on"
  for:
    minutes: 5

Numeric State Trigger

trigger:
  platform: numeric_state
  entity_id: sensor.temperature
  above: 25
  below: 30

Time Trigger

trigger:
  platform: time
  at: "10:30:00"

Time Pattern Trigger

trigger:
  platform: time_pattern
  hours: "*/2"  # Every 2 hours
  minutes: 0

Device Trigger

trigger:
  platform: device
  device_id: abc123...
  domain: light
  type: turned_on

Event Trigger

trigger:
  platform: event
  event_type: call_service
  event_data:
    domain: light

MQTT Trigger

trigger:
  platform: mqtt
  topic: home/front_door/status
  payload: "opened"

Webhook Trigger

trigger:
  platform: webhook
  webhook_id: my_webhook_id

Sun Trigger

trigger:
  platform: sun
  event: sunrise
  offset: "-00:30:00"  # 30 min before sunrise

Zone Trigger

trigger:
  platform: zone
  entity_id: device_tracker.john
  zone: zone.home
  event: enter

Template Trigger

trigger:
  platform: template
  value_template: "{{ state_attr('light.bedroom', 'brightness') > 200 }}"

Read the full file on GitHub · 564 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3mo ago First seen · 564 lines · 68 tokens per session scan A a67c7c7aac6e

Subscribe to this mod's changes

ha-automation is a skill published in the GitHub repository nodnarbnitram/claude-code-extensions (19 stars, last pushed 7mo ago), licensed MIT. It adds 68 tokens to every session and 3,044 once invoked, about $0.0003 per session on Opus 5.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-08-30.

Related

ha-automation compared with skills from other repositories

ha-automation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ha-automationnodnarbnitram/claude-code-extensionsSkill197mo agoMITA68Claude Code
gke-compute-classesgoogle/skillsSkill25kyesterdayApache-2.0A83Claude Code, Codex
jetson-diagnosticNVIDIA/skillsSkill4.3ktodayApache-2.0A30Claude Code, Codex
holoscan-install-wheelNVIDIA/skillsSkill4.3ktodayApache-2.0A34Claude Code, Codex
offensive-z-waveSnailSploit/Claude-RedSkill12k15d agoMITA113Claude Code, Codex
hsb-flashNVIDIA/skillsSkill4.3ktodayApache-2.0B94Claude Code
jetson-validate-imageNVIDIA/skillsSkill4.3ktodayApache-2.0B50Claude Code, Codex