Home Assistant Best Practices Skill (homeassistant-ai) for Claude Code: What It Does and How to Install It
Makes Claude write native Home Assistant automations, helpers, scenes and dashboards instead of Jinja templates and fragile device triggers.
- Installs
- 8.9K
- on skills.sh
- Stars
- 935
- on GitHub
- Files
- 15
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
This skill loads before any Home Assistant request. Its rule is to use native triggers, conditions and helpers instead of templates. It checks first for a purpose-specific trigger, then for a built-in helper, then picks the automation mode, uses entity_id instead of device_id and handles buttons and remotes. A table of 31 anti-patterns names the mistake and the fix for each.
It bundles 15 reference files that Claude reads only when the task matches: refactoring, triggers, actions, helpers, templates, YAML-only integrations, device control, scenes, dashboards, blueprints, AppDaemon and backups. It bundles no scripts. It assumes Claude can reach your Home Assistant through some tool you have set up. SKILL.md says that without one, Claude should give you the config to paste into the UI instead.
Good for
- Home Assistant users who write automations, scripts and scenes with Claude
- People building dashboards, blueprints or AppDaemon apps
- Anyone renaming entities, moving off device_id or working with backups and upgrades
Install home-assistant-best-practices
Claude Code
- 1
Copy this prompt.
Install the home-assistant-best-practices skill in Claude Code. Run this command: /plugin marketplace add homeassistant-ai/skills /plugin install home-assistant-skills@home-assistant-skills Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route. The plugin and the skills installer both install the same single skill. Run each plugin command separately, then /reload-plugins or restart Claude Code. The installer puts it in the current project; add -g for all projects.
From the project README. Source.
What's in the skill
When it loads
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
Sections in SKILL.md
- Decision Workflow
- 0. Gate: modifying existing config?
- 1. Check for a purpose-specific, then generic native, trigger/condition
- 2. Check for built-in helper or Template Helper
- 3. Select correct automation mode
- 4. Use entity_id over device_id
- 5. For buttons and remotes
- Critical Anti-Patterns
- Reference Files
Key facts
- License
- MIT
- Installs on skills.sh
- 8,871 (Nov 2, 2026)
- Last repo commit
- Oct 29, 2026
- Audits on skills.sh
- Gen Agent Trust Hub: pass, Socket: pass, Snyk: pass
What it includes
Read safe-refactoring before renames, helper swaps or restructures
Impact analysis, device-sibling discovery, display-name overrides and checks after the change.
Try: “Rename sensor.living_room_temp and fix everything that uses it”
Read ·
Safe-refactoring gatePurpose-specific trigger, then generic native, then template
For example numeric_state instead of a Jinja float comparison, and motion.detected instead of a state trigger on a motion sensor.
Try: “Turn on the hallway light when motion is detected and off five minutes after it stops”
Write ·
Native trigger or condition firstmin_max, group, derivative, threshold and utility_meter helpers
If no built-in helper fits, it prefers a Template Helper created through the config flow over YAML.
Write ·
Built-in helper before template sensorrestart, queued, parallel or single by scenario
A motion light with a timeout gets restart, not the default single.
Read ·
Automation mode choiceAvoids device_id triggers that break when a device is re-added
Zigbee2MQTT autodiscovered device triggers are the stated exception.
Write ·
entity_id over device_idevent.received on the event entity, or a ZHA or MQTT trigger
The choice depends on the integration and on whether an event entity exists.
Write ·
Buttons and remotesNames each mistake, the fix, why, and the reference file
Covers templates, helpers, .storage edits, YAML, AppDaemon, blueprints and backups.
Read ·
Anti-pattern tableAsk before restoring or deleting a backup or upgrading Core or the OS
The anti-pattern table says to ask, name the effect and wait for an answer every time.
Read ·
Backup and upgrade confirmationLoaded on demand when the task matches a row
SKILL.md says to read every file whose row matches and not to load them all up front.
Read ·
15 reference files
From the official docs
Permissions
Medium risk
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It guides edits to your live Home Assistant
With a tool that reaches the Home Assistant API, Claude can create and change automations, scenes, helpers and dashboards. Our advice: use a test instance or a limited account first, and review each change. github.com
Backups can be restored or deleted
backups.md says restoring discards every change since that archive and restarts Home Assistant, and a direct delete of one backup has no last-backup guard. SKILL.md says to ask for explicit confirmation every time. github.com
Browser changes need your OK
If no API tool is available and Claude can drive the web UI, SKILL.md says to show you the exact change and wait for your OK before saving. github.com
Plugin route adds a marketplace
The README plugin route adds the homeassistant-ai/skills marketplace. Its plugin.json carries a name, description, version, repository and license. The repo tree has one skill folder and no hooks or MCP config. github.com
Technical details
| Turning on read-only | No read-only mode. Claude's access to Home Assistant is whatever tool or browser session you give it. |
|---|---|
| Sign-in and keys | The skill holds no credentials. Access depends on the tool you give Claude; automation-actions.md notes that admin-only actions fail for a non-admin user's long-lived token. |
| Scopes |
|
Questions
What does the home-assistant-best-practices skill do?
It makes Claude follow Home Assistant best practices when it writes or edits automations, scripts, scenes, helpers, dashboards, blueprints and AppDaemon apps. The core rule is to use native Home Assistant constructs instead of Jinja templates where one exists.
How do I install it?
Use the install box at the top of this page. The README documents the skills installer, a Claude Code plugin and a Claude Desktop or claude.ai marketplace sync, with a zip upload as an alternative.
Does it work in the Claude app?
Yes, the README documents it. Turn on Cloud code execution and file creation in Settings, then add the repo as a marketplace under Customize, or upload the skill folder as a zip.
Does it connect Claude to my Home Assistant?
No. It bundles no tools or scripts. SKILL.md assumes Claude has some way to reach the Home Assistant API. If it has none, SKILL.md tells Claude to give you config to create in the UI, or to show you the exact change and wait for your OK before saving it in a browser.
Can it change or break my setup?
It can, through whatever tool you give Claude. It tells Claude to follow a safe-refactoring workflow before renames, to fetch an object's current definition before editing it, and to ask before restoring or deleting a backup or upgrading Core or the OS. See the permissions section on this page.
Is it made by the Home Assistant project?
Not as far as the repo says. It is published by homeassistant-ai, a separate GitHub organization, and nothing in the README or SKILL.md claims it comes from the Home Assistant project. The LICENSE names its copyright holder as The Unofficial and Awesome Home Assistant MCP Server.
Is it safe?
It bundles no scripts, but its job is to guide edits to your Home Assistant configuration, automations, dashboards and backups. What it can change depends on the access you give Claude. Our advice: start on a test instance or take a backup first. The permissions section lists what to watch for.
What Home Assistant version does it assume?
A recent one. SKILL.md marks some features as needing a release such as 2026.5+ or 2026.7, tells Claude to read your version first and to name the older fallback with the version it needs when it cannot.
Information
updated Nov 2, 2026
- Repository
- homeassistant-ai/skills
- Folder
skills/home-assistant-best-practices
Sources
Docs, issue trackers and discussions this page is built from.
Show all 7Hide
- home-assistant-best-practices SKILL.md · github.com
- homeassistant-ai/skills README · github.com
- marketplace.json · github.com
- backups.md · github.com
- LICENSE · github.com
- automation-actions.md · github.com
- plugin.json · github.com