Home Assistant best practices skill

Home Assistant Agent Skills

A skill of Home Assistant rules: native triggers instead of templates, safe renaming, dashboards and backups

  • 973 ★ on the repository
  • Last commit
  • MIT
Skill

Minimal access

Why this level

  • The skill consists of instructions and references and runs nothing itself
  • The advice concerns the live home configuration, so agent edits are best reviewed before saving
All reasons and checks

homeassistant-ai/skills

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/home-assistant-agent-skills

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • The skill consists of instructions and references and runs nothing itself
  • The advice concerns the live home configuration, so agent edits are best reviewed before saving

This is third-party code. Review the repository files before installing.

What it does

The repository holds the home-assistant-best-practices skill. It loads on its own when an agent writes automations, scripts, scenes, helpers, dashboards, blueprints or touches Home Assistant backups. The main `SKILL.md` sets a decision order and a table of typical agent mistakes with a ready fix. Among the mistakes: Jinja templates where a native trigger or condition exists, `device_id` instead of `entity_id`, `mode: single` on a motion light, renames that silently break dashboards and scripts. Details live in reference files and the agent opens only the ones it needs: triggers and conditions, actions, helper choice, scenes, dashboards, blueprints, AppDaemon, safe refactoring and backups.

Who it is for. Home Assistant smart home owners who let an agent write automations and dashboards and want it to leave the working configuration intact.

Good fit when

  • The agent writes a motion light automation that needs the right mode and a native trigger
  • An entity is being renamed while dashboards, scenes and scripts refer to it
  • A Jinja template sensor should be replaced with a built-in helper
  • A blueprint is coming that selects entities through selectors instead of hard-coded IDs
  • Before a core upgrade or a backup deletion you need a recovery plan

Not a fit when

  • You need real-time device control commands: the skill gives rules and does not open access to your Home Assistant instance
  • The home runs on another platform such as openHAB or Domoticz
  • You are writing a Python core integration: the skill topics stop at configuration, dashboards and AppDaemon

Example request

Create an automation: the hallway light turns on when motion is detected and turns off five minutes after the motion stops

Limitations

Installing through `npx skills` needs Node.js 22.20 or newer. The skill gives instructions and does not open Home Assistant access to the agent: the instance is controlled through other tools such as an MCP server or a browser. Some advice depends on core versions, for example the triggers and conditions introduced in 2026.7, so the agent checks your installation version. If the version cannot be read, the skill advises assuming a current release and naming a fallback. Claude Desktop and claude.ai need code execution enabled in settings.

How to disable. Delete the `home-assistant-best-practices` folder from the agent skills directory. The Claude Code plugin is disabled through `/plugin`.

FAQ

How do I install the Home Assistant skill in Claude Code?

Two paths work. With `npx skills add homeassistant-ai/skills` the files land in `.claude/skills/`. Or inside Claude Code run `/plugin marketplace add homeassistant-ai/skills`, then `/plugin install home-assistant-skills@home-assistant-skills` and reload plugins with `/reload-plugins`.

Do I need to call the skill by hand?

No, it attaches itself when the task touches automations, scripts, scenes, helpers, dashboards, blueprints or backups. Describe the task in plain words.

How do I install it in Claude Desktop or on claude.ai?

Enable code execution in settings, open Customize, then Plugins, and add a marketplace from the `homeassistant-ai/skills` repository. As a fallback zip the `home-assistant-best-practices` folder and upload it as a skill.

Does the skill replace a Home Assistant MCP server?

No, it only advises. If the agent has no API access, the skill tells it to stop asking about access and hand over the change right away: through the web UI, showing it before saving, or as ready YAML for the automation editor mode.

What if the skill gave bad advice?

Open an issue with the "Report Bad Skill Advice" template and ask the agent to fill it in: the agent holds the context to trace the mistake to its source in the skill text.

Discussion

No questions or reviews yet.

Skills

A Claude Code skill that edits and deploys Home Assistant configuration: YAML automations, validation, deploy and Lovelace dashboards

SkillExtended access983Repository stars

A skill collection by aahl: Home Assistant, Edge TTS and GLM-TTS speech, Qwen ASR, DuckDuckGo search, DeepWiki and Lark.

SkillExtended access166Repository stars

A Claude Code template: Home Assistant YAML automations, a custom React dashboard and checks before config is pushed.

WorkflowExtended access127Repository stars

Official UiPath skills: an agent builds, runs, tests and deploys RPA workflows, Maestro flows, agents and apps on UiPath.

PluginBroad access180Repository stars

A language and runtime for skills an agent writes and a human approves: execution through allowlisted connectors and signatures

CLIBroad access76Repository stars

A Node.js MCP server through which an agent controls Home Assistant devices and edits its automations

MCP serverBroad access574Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Home Assistant best practices (this card)no973
Home Assistant Managerno983another Home Assistant skill with its own set of techniques and coverage
homeassistant-mcpnoAPI key574an MCP server for controlling devices, with no rules for writing configuration

README in short

The README explains what an agent skill is, lists the topic coverage and shows an example of replacing a template condition with a native one. Then come three installation routes, a sample prompt and a table of the skill files.

README badge

Original SKILL.md

---
name: home-assistant-best-practices
description: >
  Home Assistant (HA) best practices. Load first, before answering or exploring, on any HA request.

  TRIGGER THIS SKILL WHEN:
  - Creating or editing automations, scripts, scenes, dashboards, blueprints
  - Choosing template sensors, helpers, or Jinja macros
  - Restructuring triggers, conditions, or modes; button, remote, or event-entity automations
  - Renaming entities or migrating device_id to entity_id
  - Looking up card types or domain docs; writing AppDaemon apps
  - Deleting or restoring a backup, or upgrading Core or the OS

  SYMPTOMS:
  - Jinja2 templates where native options exist
  - device_id used instead of entity_id
  - Entity IDs changed without checking consumers
  - Wrong automation mode chosen
  - Raw sensor or hard-coded value used where a helper belongs
  - Direct .storage edits or automation lookups there; generated YAML
  - User told to edit configuration.yaml for UI integrations
  - Hardcoded Blueprint entities or skipped selectors
  - Existing state changed with no recovery path
  - Jinja copy-pasted between templates
metadata:
  version: "56"
---

# Home Assistant Best Practices

**Core principle:** Use native Home Assistant constructs wherever possible. Templates bypass validation, fail silently at runtime, and make debugging opaque.

**No tool reaches the HA API?** Do not stop to ask for access. If you can drive a browser on the HA web UI, make the change there, but first show the user the exact change and wait for their OK before you save: approving a click does not show them what it writes. Otherwise give the user the complete config to create in the UI (for an automation, the YAML for the editor's **Edit in YAML** mode; for a helper, its form fields), and name the entity IDs you assumed. Config that can only be written in YAML is edited with the File editor app (or in the config folder on a Container install): keep a copy of the file first, then check the configuration and run the matching reload in the **YAML** tab of **Tools** (named **Developer Tools** before 2026.8; restart if it isn't listed).

**A feature marked with a release (2026.5+) depends on the instance's version.** Read it before choosing: `version` in `GET /api/config`, or **Settings → About** in the UI. On that release or later, use the feature and do not offer the older way as an equal choice. If you cannot read the version, assume a current release and name the older fallback with the version it needs.

**Read the matching reference before you answer.** This page only summarizes the files in [Reference Files](#reference-files); the exact keys, fields and working examples are in them. Read every file whose row matches the task, and only those: do not load all reference files upfront.

## Decision Workflow

Follow this sequence when creating any automation:

### 0. Gate: modifying existing config?

If your change affects entity IDs, display names, or cross-component references — renaming entities or devices, replacing template sensors with helpers, converting device triggers, or restructuring automations — read [safe-refactoring](references/safe-refactoring.md) first. That reference covers impact analysis, device-sibling discovery, display-name overrides, and post-change verification. Complete its workflow before proceeding.

Report a problem