Skip to content

mleibetseder/home-assistant

v1.1.0MIT

A Home Assistant Engineer agent and seven skills for automations, scripts, blueprints, templates, configuration, dashboards, devices (Zigbee, Matter, ESPHome) and custom integrations; reads a live instance first, changes it only after approval.

Home Assistant agent plugin

An AI coding agent and seven skills for building and maintaining a Home Assistant setup: automations, scripts, blueprints, templates, configuration, dashboards, devices (Zigbee, Matter, ESPHome) and custom integrations. Works with Claude Code, opencode, Codex and other tools that read Agent Skills.

It is built to be safe in a real home: it reads your instance first, uses your real entity IDs and the syntax of your Home Assistant version, and changes nothing without your approval.

Not affiliated with or endorsed by Home Assistant or the Open Home Foundation.

Safety model

RuleWhy
Read first, act after approvalEvery change (action call, configuration write, reload, restart, update, restore, deletion) is shown as an exact preview and needs your OK.
Security devices one at a timeLocks, alarm panels, covers (garage doors, gates), valves and sirens: every single action needs its own approval; never batched, scheduled or "tested". Home Assistant itself does not ask for confirmation here.
Facts from your instanceVersion from /api/config, entity IDs and actions from /api/states and /api/services; an unknown ID is a question, not a guess.
Safe changesBackup → edit → configuration check → smallest reload; never .storage/ edits; never POST /api/states to "switch" a device.
SecretsToken only from HASS_SERVER / HASS_TOKEN; never printed, never committed; secrets.yaml stays private.

What is inside

NameUse it for
Agenthome-assistant-engineerAnything Home Assistant; loads the skills below as needed
Skillha-live-instanceTalking to a live instance (REST, WebSocket, MCP, ha CLI)
Skillha-automationsAutomations, scripts, blueprints, syntax by version, traces
Skillha-templatesJinja templates, modern template: entities
Skillha-configurationPackages, secrets, checks, backups, recorder, updates
Skillha-dashboardsSections-view dashboards for phones and wall tablets
Skillha-devicesLocal-first devices, Zigbee, Matter and Thread, ESPHome
Skillha-integration-devCustom integrations in Python, quality scale, HACS

Facts were checked against the Home Assistant, contributors and ESPHome documentation for Home Assistant 2026.10. The skills name the version a feature arrived in, so older installs get matching syntax.

Install

Claude Code (plugin marketplace):

claude plugin marketplace add mleibetseder/home-assistant-agent-plugin
claude plugin install home-assistant@home-assistant-agent-plugin

Claude Code agents cannot carry their own shell permissions, so add ask rules to your ~/.claude/settings.json (or the project's .claude/settings.json):

{
  "permissions": {
    "ask": [
      "Bash(ha core restart:*)", "Bash(ha core update:*)", "Bash(ha os update:*)",
      "Bash(ha host reboot:*)", "Bash(ha backups restore:*)", "Bash(ha backups remove:*)",
      "Bash(curl -X POST:*)", "Bash(git push:*)"
    ]
  }
}

opencode: copy (or symlink) agents/home-assistant-engineer.md to ~/.config/opencode/agents/ and each folder of skills/ to ~/.config/opencode/skills/. The agent file is in opencode format and carries the ask rules in its permission block; Claude Code reads the same file and ignores those keys.

Codex and other Agent Skills tools: the repository has a Codex plugin manifest (.codex-plugin/plugin.json, .agents/plugins/marketplace.json); or copy the folders of skills/ into ~/.agents/skills/ (Codex) or your tool's skills folder.

Connect to your Home Assistant

  1. In Home Assistant create a dedicated user for the agent (admin only if it should change configuration; local access only), then a long-lived access token under Profile → Security.

  2. Export it where the agent runs, never in a file in a repository:

    export HASS_SERVER=http://homeassistant.local:8123
    export HASS_TOKEN=<token>
    
  3. Optional: Home Assistant's built-in MCP Server integration (Settings → System → AI on 2026.10+) gives MCP clients the Assist API. It only sees entities exposed to voice; keep locks, alarm panels and garage doors unexposed unless you want them voice-controlled.

Then ask, for example: "Write an automation that turns the hallway light on with motion after sunset", "Why does my heating automation not fire?", "Build a dashboard for the kitchen tablet".

Quality checks

bash scripts/check.sh            # lint, offline trigger eval, self-tests, shellcheck, manifests (CI runs this)
bash scripts/eval-guardrails.sh  # behaviour eval under pressure, calls the model; add --baseline to compare
  • Lint (scripts/lint.sh): frontmatter, sizes, skill references, Codex metadata, and that the agent is one opencode-format file that Claude Code can read too.
  • Trigger eval (evals/triggers.tsv): three prompts and one near miss per skill, ranked offline against every skill and the agent.
  • Guardrail eval (evals/guardrails.tsv): pressure cases run headless with no tools, compared with a generic assistant prompt; results in evals/RESULTS.md.

Fork and adapt

See AGENTS.md for the layout and the rules to keep when you change or add skills. Pull requests welcome; security issues: SECURITY.md.

Related work

  • homeassistant-ai/skills and ha-mcp: community best-practice skill and MCP server with configuration tools (MIT).
  • Home Assistant core ships contributor skills for core development in its own repository.

Licence

MIT