← 返回 Skills 市场
🔌

🏡 Home Assistant Builder (hab)

作者 HA · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
26
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hass-builder
功能描述
A skill to build and manage Home Assistant configurations. Use when using the Home Assistant Builder (`hab`) CLI to inspect, create, update, delete, operate,...
使用说明 (SKILL.md)

Home Assistant Builder (hab)

A CLI utility designed for LLMs to build and manage Home Assistant configurations.

Start Every Workflow

The script scripts/hab.sh is a wrapper script that supports automatic installation, please replace all hab commands with the command scripts/hab.sh.

alias hab='scripts/hab.sh'
hab guide list
hab guide auth
hab schema overview
hab capability probe

Then read the topic and command schema for the specific workflow:

Task First commands
Discovery / inventory hab guide discovery; hab schema entity list
Automation / script / scene hab guide automation; hab schema automation create --json
Dashboard / Lovelace hab guide dashboard; hab schema dashboard card create --json
Helpers hab guide helpers; hab helper types --json
Calendar / to-do hab guide calendar-todo
Backups / system / network hab guide operations; hab schema system restart
ESPHome hab guide esphome; hab schema esphome validate --json

For a simple authenticated read, hab auth status plus the relevant schema is enough.

Output and Parsing

Use --json whenever Claude or another program will parse output. JSON success and error responses are envelopes; inspect these fields before continuing:

  • success
  • data
  • error.code, error.details.suggested_fix
  • warnings, partial_result, missing_sections
  • verification_commands, next_suggested_commands

ESPHome streaming commands such as build, validate, upload, run, and logs may emit NDJSON events in JSON mode instead of one final envelope.

Mutations and Risk Gates

Inspect before changing state:

  1. Read the guide/schema for the command.
  2. Gather current state with read-only list/get commands.
  3. Preview the mutation with --plan or --dry-run when supported.
  4. Show the preview and ask the user before executing risky operations.
  5. Run verification commands from the plan or a follow-up get/list command.

Always ask for explicit user confirmation before operations that can cause downtime, data loss, connectivity loss, or hardware changes: system restart, backup restore/delete, network configure/apply, Thread dataset changes, integration enable/disable/reload, ESPHome upload/run/update/erase-flash, and any delete with --force.

Do not add --force just to make a command non-interactive. Use it only after the user has approved the exact operation.

Input Payloads

Commands that accept data usually support:

Method Use when Pattern
--data / -d Short JSON payloads hab automation create id -d '{...}' --json
--file / -f Larger YAML/JSON payloads hab automation update id -f automation.yaml
stdin heredoc Multi-line payload without temp file hab automation create id \x3C\x3C'EOF'

Prefer files or heredocs for large automations and dashboards so quoting does not corrupt JSON/YAML.

Common Command Patterns

# Authentication and instance checks
hab auth status
hab overview
hab capability probe

# Entity inventory
hab entity list --domain light
hab entity get light.kitchen --device --related
hab search related entity light.kitchen

# Safe mutation preview
hab schema area create --json
hab area create "Kitchen" --plan
hab area create "Kitchen"

# Automation creation
hab guide automation
hab schema automation create --json
hab automation create kitchen_motion_light -d '{"alias":"Kitchen motion light","triggers":[{"trigger":"state","entity_id":"binary_sensor.kitchen_motion","to":"on"}],"conditions":[],"actions":[{"action":"light.turn_on","target":{"entity_id":"light.kitchen"}}]}' --dry-run

# Operations
hab guide operations
hab system health --json
hab system restart --plan
hab backup list
hab backup delete \x3Cbackup_id> --plan

Response Pattern

When answering a user asking for hab commands:

  1. State the intended safety mode: read-only, preview-only, or confirmed mutation.
  2. Provide commands in execution order.
  3. Mark any command that requires user confirmation.
  4. Say what JSON fields to inspect before the next step.
  5. Include verification commands.

Common Mistakes

Mistake Better approach
Guessing command flags from memory Run hab schema \x3Ccommand> --json first
Parsing text output Use --json and inspect envelope fields
Creating resources without inventory list/get/search related first
Skipping mutation preview Use --plan or --dry-run when supported
Using --force for convenience Confirm the exact risky operation first
Treating ESPHome JSON as one object Handle NDJSON stream events for streaming commands
Ignoring verification_commands Run them or explain why not
安全使用建议
Install only if you trust the upstream Home Assistant Builder CLI releases. Consider manually installing or pinning the CLI, verify any downloaded binary where possible, use a limited Home Assistant token, and require explicit approval before restarts, deletes, network changes, backup changes, or ESPHome flashing.
能力评估
Purpose & Capability
The purpose is coherent: it manages Home Assistant resources, including creating, updating, deleting, restarting systems, backups, network changes, and ESPHome operations. Those are powerful but clearly related to the stated purpose.
Instruction Scope
The instructions include sensible safety gates: inspect schemas, gather current state, use --plan/--dry-run where supported, ask before risky operations, and verify afterward.
Install Mechanism
The wrapper downloads the latest platform binary from GitHub at runtime, marks it executable, caches it, and runs it without a pinned version, checksum, or signature verification.
Credentials
HAB_URL and HAB_TOKEN are expected for a Home Assistant CLI, and the artifacts do not show token logging or unrelated transmission, but the token can authorize high-impact home automation changes.
Persistence & Privilege
The downloaded CLI persists under ~/.cache/hab-cli. There is no evidence of background agents, autorun persistence, or self-propagation.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install hass-builder
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /hass-builder 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of hass-builder skill for Home Assistant CLI workflows. - Enables management of Home Assistant configurations using the `hab` CLI via `scripts/hab.sh` - Provides structured guides for discovery, automation, dashboards, helpers, backups, and ESPHome operations - Emphasizes safety with read, preview, and confirmation steps before mutations - Recommends JSON output for parsing, and explains how to interpret responses and handle ESPHome NDJSON events - Documents secure handling of risky operations, enforcing explicit user confirmation for destructive actions
元数据
Slug hass-builder
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

🏡 Home Assistant Builder (hab) 是什么?

A skill to build and manage Home Assistant configurations. Use when using the Home Assistant Builder (`hab`) CLI to inspect, create, update, delete, operate,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 26 次。

如何安装 🏡 Home Assistant Builder (hab)?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install hass-builder」即可一键安装,无需额外配置。

🏡 Home Assistant Builder (hab) 是免费的吗?

是的,🏡 Home Assistant Builder (hab) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

🏡 Home Assistant Builder (hab) 支持哪些平台?

🏡 Home Assistant Builder (hab) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 🏡 Home Assistant Builder (hab)?

由 HA(@ha)开发并维护,当前版本 v1.0.0。

💬 留言讨论