home-assistant

home-assistant is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 93 tokens per session (4,887 once invoked), scanned C, original, MIT.

A skill for controlling Home Assistant, a home-automation platform that connects devices and runs rules. It covers YAML configuration, device actions, HTTP and WebSocket APIs, tokens, and container installation.

In plain words
What is it for?
For creating triggers, conditions, and actions; reading or changing device states; subscribing to events; using the REST or WebSocket API; and running Home Assistant in Docker.
Why use it?
It helps an agent work with Home Assistant's configuration and interfaces without having to infer the platform's file formats and API details. It also covers common configuration and authentication problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit For creating triggers, conditions, and actions; reading or changing device states; subscribing to events; using the REST or WebSocket API; and running Home Assistant in Docker.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/home-assistant
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 znlgis/opengis-skills --skill home-assistant
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

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 home-assistant

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/home-assistant/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/home-assistant)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/home-assistant"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/home-assistant/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 home-assistant

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/home-assistant"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/home-assistant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,887 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00093 $0.04887
Opus 5.5 $0.00037 $0.01955
Sonnet 5.5 $0.00019 $0.00977
Haiku 4.5 $0.00009 $0.00489

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

Security

Grade C, and why

home-assistant scanned grade C with 2 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 today.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -s -H "Authorization: Bearer $TOKEN" "$HA_URL/api/states/sensor.balcony_illuminance" | python -m json.tool

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -H "Authorization: Bearer $TOKEN" http://localhost:8123/api/
iot/home-assistant/SKILL.md · 405 lines

How it starts

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

项目地址: https://github.com/home-assistant/core

官方文档: https://www.home-assistant.io/docs/

开发者文档: https://developers.home-assistant.io/

最新版本: 2026.10.4(GitHub Releases 与 Docker 镜像 tag 一致,截至 2026-10)

安装形态: Home Assistant OS / Supervised / Container / Core(pip)

许可证: Apache-2.0

概述

Home Assistant 是一个本地优先的开源家庭自动化平台。它把上千种设备与云服务统一成「实体(entity)」,再通过状态机、自动化规则、脚本与仪表盘把它们编排起来。数据与逻辑都跑在你自己的机器上,不依赖厂商云。

对脚本与自动化最关键的几层:

  • 实体与状态:每个设备暴露为 domain.name(如 light.study),状态 + 属性构成当前值
  • 服务(service/action):light.turn_on、climate.set_temperature 这类可调用动作,是自动化与 API 的执行单位
  • 自动化与脚本:YAML 或 UI 定义的 triggers/conditions/actions 三段式规则
  • REST API:/api/*,用长期访问令牌鉴权,适合外部程序读写状态、触发服务
  • WebSocket API:/api/websocket,支持实时订阅事件、订阅触发器、批量取状态
  • 模板(Jinja2):{{ states('sensor.x') }} 在自动化与 /api/template 中计算动态值

环境准备

方式一:Home Assistant OS(推荐给家庭用户)

在 Raspberry Pi / NUC / 虚拟机上刷写官方镜像,得到受管系统(含 Supervised、Add-ons、备份)。安装入口见 https://www.home-assistant.io/installation/。首次启动后浏览器访问 http://<ip>:8123 完成引导。

方式二:Docker Container

docker run -d \
  --name homeassistant \
  --restart=unless-stopped \
  --privileged \
  --network=host \
  -e TZ=Asia/Shanghai \
  -v /path/to/config:/config \
  -v /run/dbus:/run/dbus:ro \
  ghcr.io/home-assistant/home-assistant:stable

要点:

  • -v /path/to/config:/config 必须持久化,否则升级即丢配置;
  • --network=host 让设备发现(mDNS/SSDP)正常工作,端口直接是 8123;
  • 需要直通 USB 设备(Zigbee/Z-Wave 棒)时加 --device /dev/ttyUSB0:/dev/ttyUSB0;
  • 关机给足时间:docker run --stop-timeout 60,否则容易损坏数据库。
# compose.yaml
services:
  homeassistant:
    image: ghcr.io/home-assistant/home-assistant:stable
    container_name: homeassistant
    restart: unless-stopped
    network_mode: host
    privileged: true
    stop_grace_period: 60s
    environment:
      TZ: Asia/Shanghai
    volumes:
      - ./config:/config
      - /run/dbus:/run/dbus:ro

方式三:Core(pip,仅开发/调试)

python3 -m venv .venv
source .venv/bin/activate
pip install homeassistant==2026.10.4
hass --config ./config --debug

Read the full file on GitHub · 405 lines

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. today First seen · 405 lines · 93 tokens per session scan C aad8c590d011

Subscribe to this mod's changes

home-assistant is a skill published in the GitHub repository znlgis/opengis-skills (75 stars, last pushed yesterday), licensed MIT. It adds 93 tokens to every session and 4,887 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-28.

Related

Other skills, from other repositories

Home Assistant Automation

Automate smart home devices and create intelligent home automation workflows with Home Assistant.

claude-office-skills/skills · 18 tokens

amazon-alexa

Integracao completa com Amazon Alexa para criar skills de voz inteligentes, transformar Alexa em assistente com Claude como cerebro (projeto Auri) e integrar com AWS ecosystem (Lambda, DynamoDB, Polly, Transcribe, Lex, Smart Home).

sickn33/agentic-awesome-skills · 53 tokens

iot-expert

Expert-level IoT systems, embedded devices, edge computing, and IoT protocols. Use when the user mentions embedded, edge computing, MQTT, sensors, or firmware, or when the task involves IoT Architecture, IoT Protocols, Embedded Systems, or Device Design.

personamanagmentlayer/pcl · 59 tokens

amazon-alexa

Integracao completa com Amazon Alexa para criar skills de voz inteligentes, transformar Alexa em assistente com Claude como cerebro (projeto Auri) e integrar com AWS ecosystem (Lambda, DynamoDB, Polly, Transcribe, Lex, Smart Home).

lingxling/awesome-skills-cn · 53 tokens

unraid-management-agent

Monitor and control an Unraid server via the Unraid Management Agent's MCP server (125 tools, 5 resources, 6 diagnostic prompts) and REST API. Use when: connecting an AI client (Claude, ChatGPT, Cursor, Copilot, Gemini CLI) to Unraid; checking system, array, disk, Docker, VM, GPU, UPS, ZFS, or network status…

ruaan-deysel/unraid-management-agent · 198 tokens

aether-iot-query

Use this skill when the user asks about a live AetherEdge runtime: channels, points, real-time values, history, alarms, rules, models, instances, routing, SHM health, service health, or system status. Use aether CLI commands to answer — do NOT inspect source code, local database files, or config YAMLs to answer…

EvanL1/AetherEdge · 0 tokens