ha-automation

ha-automation is a skill for Claude Code, Codex 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 CodeCodex

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.

agentmods
npx agentmods add skills/nodnarbnitram/claude-code-extensions/ha-automation
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00068 $0.03044
Opus 5 $0.00034 $0.01522
Sonnet 5 $0.00014 $0.00609
Haiku 4.5 $0.00007 $0.00304

Measured 3d ago against content hash a67c7c7aac6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

.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. 3d 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 (16 stars, last pushed 4mo ago), licensed MIT. It adds 68 tokens to every session and 3,044 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

cli-anything-3mf

3MF mesh geometry editor — detect and resize cylindrical holes, repair meshes, compare 3D printing files. Works with BambuStudio and PrusaSlicer 3MF files.

HKUDS/CLI-Anything · 44 tokens

doca-compress

Use this skill for hands-on DOCA Compress programming on a BlueField DPU, ConnectX NIC, or host with DOCA — enabling compress-deflate, decompress-deflate, decompress-lz4-stream, or decompress-lz4-block tasks on a docacompress context (the hardware supports DEFLATE both directions plus LZ4 decompress; LZ4 encode is NOT…

NVIDIA/skills · 242 tokens

pcbway

PCBWay PCB fabrication and assembly — turnkey/consigned assembly, design rules, ordering workflow. Alternative to JLCPCB for manufacturing. Use with KiCad. Use this skill when the user mentions PCBWay, needs turnkey assembly (PCBWay sources parts by MPN), has parts not available on LCSC, needs assembled boards with…

aklofas/kicad-happy · 119 tokens

robotics-design-patterns

Architecture patterns, design principles, and proven recipes for building robust robotics software. Use this skill when designing robot software architectures, choosing between behavioral frameworks, structuring perception-planning-control pipelines, implementing state machines, designing safety systems, or…

arpitg1304/robotics-agent-skills · 120 tokens

unifly

This skill should be used when the user asks to "manage UniFi devices", "configure UniFi networks", "create a VLAN", "provision an SSID", "create firewall rules", "reorder firewall policies", "create a NAT rule", "set up port forwarding", "configure masquerade NAT", "add DNS records", "manage traffic matching lists"…

hyperb1iss/unifly · 265 tokens

autofish-control

Control Android devices with Autofish via the af CLI. Use this skill when you need reliable observe-act-verify loops, ref-based tapping, overlay management, screenshots, and recovery steps.

felinics/Autofish · 42 tokens