benny-lewis/home-assistant-assistant/ha-deploy
Claude Code and agent skill by benny-lewis/home-assistant-assistant
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Use when the user says "deploy", "push changes", "send to HA", "sync to Home Assistant", "rollback", "revert", or otherwise asks to apply or undo local YAML edits on the live HA instance. Commits to git, pushes, and reloads HA; requires explicit confirmation at each side-effectful step.
Install
npx vskill@latest install benny-lewis/home-assistant-assistant/ha-deploySemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Deploy & Rollback Home Assistant Configuration
CRITICAL: This skill has side effects (git commit, git push, HA service calls).- NEVER invoke this skill unless the user explicitly asks to deploy, push, or rollback- ALWAYS show a summary of changes and get explicit user confirmation before each destructive step- Use AskUserQuestion to get confirmation at commit, push, and reload steps
Safety Invariant #5: Never deploy unless explicitly requested.
Push local configuration changes to the git repository, triggering Home Assistant to pull and reload. Also handles rollback to previous states.
Prerequisites
- Git repository configured (via
/ha-onboard) - Changes to commit (for deploy)
- Git Pull add-on running on Home Assistant
Deploy Workflow
Step 1: Check for Changes
If no changes:
- Inform user there's nothing to deploy
- Ask if they want to pull latest from remote instead
Step 2: Pre-Deploy Validation
Always validate before deploying. Delegate to ha-validate skill or ha-config-validator agent.
If validation fails, show errors and offer: a) Fix issues (describe what to change) b) Go back to editing c) Abort deploy
Validation failures are blocking. Do NOT offer a skip/bypass path.
Step 2.5: Verify HA Can Pull
Check if deploy.pull_method is cached in .claude/settings.local.json. If cached, use that method and skip this step.
If not cached, check if Git Pull add-on is available:
- If found → proceed with auto-pull workflow, cache
"deploy": { "pull_method": "git_pull_addon" }in settings. - If not found or API unavailable → ask user:
"How does your HA instance get config updates?"
- Git Pull add-on — offer to help set it up
- SSH access — use
ssh <host> 'cd /config && git pull' - Manual — provide instructions to pull on HA side
Cache the answer in .claude/settings.local.json under deploy.pull_method so we don't ask every time.
Step 3: Review Changes — MANDATORY CONFIRMATION
Show the user what will be deployed:
For each changed file, show a brief summary of what changed.
Then use AskUserQuestion with options:
- "Deploy" — proceed with commit + push + reload
- "Edit commit message" — let user customize the message
- "Abort" — cancel deployment
Do NOT proceed without explicit user selection.
Step 4: Commit Changes
Ask user for commit message or generate one based on changes:
- "Update automation: motion lights"
- "Add new scene: movie night"
- "Fix template sensor: average temperature"
Step 5: Push to Remote
Resolve push target from .claude/settings.local.json:
deploy.git_remote(preferred) ->ha.git_remote(legacy fallback) ->origindeploy.git_branch(preferred) ->ha.git_branch(legacy fallback) ->main
Show the chosen push target before pushing: Using push target: <remote> <branch>
Handle push failures:
- Fetch and merge if behind remote
- "Push failed. Options:
a) Continue anyway (reload HA with local changes only) b) Retry push c) Abort deployment"
Git Pull Timing
Important:automation.reloadonly applies config that HA already has on disk.Ifdeploy.pull_methodisgit_pull_addon, HA's config won't update until the add-onpolls (default: every 5 minutes). Do NOT loop/retry reload — it will not help.Instead: tell the user the push succeeded, mention they can restart the Git Pull add-onfrom the HA UI (Settings → Add-ons → Git Pull → Restart) for immediate effect,and proceed to reload once. Mark verification as "Pending — awaiting HA pull"if entity state still shows old values.
Step 6: Reload Home Assistant
If hass-cli is configured, offer to trigger a reload:
Or for full config reload:
Step 7: Verify Deployment (Resolver-Driven)
Do NOT assume entity ID format. Verify entity actually exists:
If found:
Report verification result with evidence:
If the Git Pull add-on hasn't synced yet, verification will show stale data.This is expected. Mark as "Pending — awaiting HA pull" rather than retrying.
Step 8: Confirm Success
"Deployed successfully.
Created: automation.kitchen_motion_light Status: Enabled Commit: abc123
Test it by triggering the automation, or run /ha-validate to verify."
Deploy Output Format
Flags
--dry-run- Show what would be deployed without committing--rollback- Enter rollback mode (see below)
Validation bypass is intentionally disabled. Deploy cannot proceed if validation fails.
Auto-Deploy Mode (Deprecated)
Per Safety Invariant #5, all deployments require explicit confirmation. The auto_deploy setting is ignored.
If user has auto_deploy: true in settings, warn: "Note: auto_deploy is deprecated for safety reasons. All deployments now require explicit confirmation. Would you like me to remove this setting?"
Configuration
Read settings from .claude/settings.local.json:
- commit_prefix: string (optional, e.g., "ha: ")
- deploy.pull_method: string (e.g., "git_pull_addon" | "ssh" | "manual")
- deploy.git_remote: string (optional, preferred push remote)
- deploy.git_branch: string (optional, preferred push branch)
- ha.git_remote: string (optional, legacy fallback push remote)
- ha.git_branch: string (optional, legacy fallback push branch)
Push target resolution order:
deploy.git_remote/deploy.git_branchha.git_remote/ha.git_branchorigin/main
Rollback Workflow
Default mode is dry-run (preview only).User must explicitly confirm to execute the actual rollback.
Revert to a previous configuration state.
Step 1: Check for Uncommitted Changes
If changes exist, ask: "You have uncommitted changes:
- modified: automations.yaml
- modified: scripts.yaml
Options: a) Stash changes and continue (can restore later) b) Commit current changes first c) Cancel rollback"
Step 2: Show Recent Commits
Display formatted list:
Step 3: Preview (Dry-Run)
ALWAYS preview before executing.
Display preview:
Step 4: Confirm Execution
"Ready to execute rollback.
What will happen:
- Revert changes from commits abc123, def456
- Create new commit documenting the rollback
- Push to remote (if configured)
- Reload automations/scripts/scenes in HA
This action modifies git history and HA configuration.
Execute rollback? [Yes / Show full diff / Cancel]"
Step 5: Execute Rollback (Only After Explicit Confirmation)
Step 6: Reload Home Assistant
Step 7: Confirm with Evidence
Rollback Recovery
If user changes their mind:
Rollback Error Handling
| Error | Response | |
|---|---|---|
| Merge conflict during revert | Show conflict, offer manual resolution or abort | |
| Push rejected | Offer: retry, force push (with warning), or local-only | |
| HA reload failed | Check error logs, offer to retry or investigate |
Deploy Error Recovery
If deployment fails:
- Check HA logs:
``bash MSYS_NO_PATHCONV=1 hass-cli raw get /api/error_log | tail -20 ``
- Offer rollback option:
"Deployment failed. Would you like to: a) View error details b) Rollback to previous commit c) Try to fix and redeploy"
Security
- Security scanPassed, 100 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-deploy/SKILL.md
Popularity
- Repository stars
- 46
- Repository forks
- 2
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 22 Mar 2026, 8 months ago.
Extension points
hookPre/post lifecycle hookspluginCustom 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/benny-lewis/home-assistant-assistant/ha-deploy)