t3chnaztea/home-assistant-skills/ha-connect
Claude Code and agent skill by t3chnaztea/home-assistant-skills
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Use when connecting a coding agent to a Home Assistant instance for the first time or in a fresh session: "connect to Home Assistant", "SSH into HA", set up the Terminal & SSH add-on, generate a long-lived access token, call the REST API, check an entity's state, call a service from the command line, edit configuration or automations YAML over SSH, figure out which of the two access lanes (SSH vs REST) a task needs, or decide whether an MCP integration already covers the task instead. Foundation skill: the other ha-* skills assume its connection pattern and doctrine. Not for writing automations (ha-automations) or building the entity inventory (ha-context-map).
Install
npx vskill@latest install t3chnaztea/home-assistant-skills/ha-connectSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
HA Connect
Two ways into a Home Assistant box, and when to use each. Every other ha-* skill assumes this connection pattern, so get this working first.
Lane zero: check whether MCP already covers the task
Before setting up SSH and a token, ask what the task actually needs. If it is purely state reads and service calls (control a device, answer "is the garage open", toggle things on a schedule the UI could build), and the user has Home Assistant's MCP Server integration (or a community MCP server from HACS) connected to this agent, use that instead: it is scoped to exposed entities and needs no root access. Recommend it to users who only want control and Q&A; don't push them into the SSH lane they don't need.
The lanes below earn their setup cost when the task is admin-shaped: editing YAML, validating config before a reload, reading logs to find out why an automation never fires, auditing automations.yaml for conflicts, taking backups. The MCP surface cannot do any of that; it is state and services only, not files.
The two lanes
| Lane | Transport | Use for | |
|---|---|---|---|
| SSH | Terminal & SSH add-on, port 22 | Editing YAML in /config, the ha CLI (ha core check, ha core info, ha backups new), reading logs, anything file-shaped | |
| REST API | HTTP :8123 + long-lived token | Live entity state, calling services, rendering templates, verification reads: anything state-shaped |
Rule of thumb: files over SSH, state over REST. Editing automations.yaml via the API is miserable; reading a sensor over SSH by grepping a database is worse.
One-time setup
SSH lane: the Terminal & SSH add-on
Settings → Add-ons → Add-on Store → Terminal & SSH (official). In its configuration, add your public key under authorized_keys (preferred over a password), enable the add-on, and confirm port 22 is exposed on the host.
Two things to know about where you land:
- You are in the add-on container, not the host OS.
/configis mounted
there and is the same /config Core sees; that's where configuration.yaml, automations.yaml, and scripts.yaml live.
- The
haCLI is available and is the supported way to talk to the
supervisor: ha core check, ha core restart, ha addons, ha backups new.
If homeassistant.local doesn't resolve (some networks break mDNS), use the instance's IP or hostname; the recipes below write it as <HA_HOST>.
REST lane: a long-lived access token
In the HA web UI: click your user (bottom of sidebar) → Security tab → Long-lived access tokens → Create Token. It is shown once.
Store it in an env var or an untracked env file, never in a skill, a script, a committed file, or a chat transcript:
That health check is the first command of every session. If it fails, nothing else in these skills will work; fix the token/host before debugging anything downstream.
REST recipes
All assume source ~/.config/ha/env has run.
Gotchas worth knowing before they bite:
- A service call returning `[]` or `200` is not proof anything happened.
It means HA accepted the call. Read the entity state back afterwards (see ha-automations for the full verify doctrine).
- A call naming a nonexistent service or entity can fail quietly from the
caller's perspective (or 400 with a terse message). When a call "did nothing", first confirm the service exists via /api/services and the entity id via /api/states/<id>; typos are the #1 cause.
POST /api/services/...responds with a list of states that changed as a
direct result. An empty list on a turn_on for an already-on light is normal, not an error.
SSH recipes
Editing files remotely: prefer pulling the file down, editing locally, and pushing back, or a quoted heredoc, over inline sed/awk with nested escaping (which corrupts YAML edits with depressing regularity):
Always keep the previous version (cp automations.yaml automations.yaml.bak on the host, or rely on the backup you just took).
Session doctrine
sourcethe env file, run the API health check.- Read before you write: pull current state / current YAML first.
- Validate (
ha core check) before reloading; reload the specific domain
(see ha-automations) instead of restarting Core.
- After every write, read the thing back and show before/after.
- Token hygiene: the token grants full admin. Treat it like a root password.
Never echo it, never commit it, and revoke tokens you stop using (same Security tab).
What next
- Build the instance map so you stop guessing entity ids:
ha-context-map. - Write and verify automations:
ha-automations. - Drive automations from prices and LLM judgment:
ha-external-triggers.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ha-connect/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/t3chnaztea/home-assistant-skills/ha-connect)