/install haos-ssh-maintenance
HAOS SSH Maintenance
Use SSH only when API-based inspection is not enough.
Default posture
Prefer the Home Assistant API first for:
- entity state inspection
- history and logbook
- automation listing, enable/disable, and trigger
- service-level testing
Switch to SSH when:
- files under
/configneed reading or editing - YAML definitions must be inspected directly
custom_componentsmust be inspected- shell-level troubleshooting is required
haCLI work is needed
Use the SSH target stored in TOOLS.md.
Common HAOS paths
/config/config/configuration.yaml/config/automations.yaml/config/scripts.yaml/config/scenes.yaml/config/custom_components//config/home-assistant_v2.db
Logs
Do not assume Home Assistant writes logs to a file by default.
Check logs in this order:
- Home Assistant UI logs when the issue is visible there
- interactive
haCLI log access such asha core logs - Supervisor or container-side logs when available
- file-based logs only if the environment explicitly enables them
Observed behavior for this environment:
ha core logsmay fail in one-shot SSH modeha core logsworks in an interactive PTY-backed SSH session
Workflow
- Decide whether the task is one-shot SSH or interactive SSH.
- Start read-only.
- Identify the smallest affected file or command path.
- Explain the intended change before risky edits.
- Edit minimally.
- Verify surrounding context after the change.
- Prefer reload over full restart when possible.
- Report exactly what changed.
Home Assistant YAML pitfalls
When editing Home Assistant automations or packages by hand:
- In automation YAML, use
service:to call a service such asshell_command.fooorlight.turn_on. - Do not write
action: shell_command.fooin YAML automations. That produces an unknown action error in this environment. actionis the UI/schema concept for a step in the actions list, but in hand-written YAML the concrete service call key should beservice:.- After editing automation/package YAML, reload both core config and automations when possible, then validate by triggering the automation once.
SSH modes
One-shot SSH
Use one-shot SSH commands for:
- reading files under
/config - grepping YAML or custom component code
- listing directories
- small targeted edits
- quick environment inspection
One-shot SSH is appropriate for commands like:
catgrepsedfindls
Do not assume ha CLI commands will work in one-shot mode.
Interactive SSH
Use an interactive PTY-backed SSH session for:
ha core logs- other
haCLI commands that fail in one-shot mode - shell flows that require a login session or interactive context
When running from OpenClaw, prefer a PTY-backed exec session and then send commands into the live SSH shell.
Investigation order
Automation problems
- API logbook and history
/config/automations.yaml/config/scripts.yaml- relevant Home Assistant or Supervisor logs
Naming or entity-origin confusion
- API-visible attributes and registry-derived metadata
- YAML definitions under
/config - template, MQTT, REST, command_line, utility_meter, and custom component definitions
Integration or startup failures
- relevant Home Assistant or Supervisor logs
- referenced YAML blocks
custom_componentsif relevant
Change boundaries
Use SSH for:
- YAML edits
- package edits
custom_componentsinspection- interactive
haCLI log inspection - Supervisor or container-side log inspection
- shell-level checks
- targeted
.storageinspection or edits when UI/registry-backed state must be changed directly
Do not use SSH first for:
- normal state checks
- routine entity discovery
- simple automation enable/disable/trigger actions
.storage direct-edit policy
Home Assistant internal storage under /config/.storage/ can be edited when necessary, including files such as:
/config/.storage/core.entity_registry/config/.storage/core.device_registry/config/.storage/core.config_entries
Rules:
- Treat
.storageedits as a last-resort or targeted-operation path, not the default first move. - Back up the exact file before every edit.
- Prefer the smallest possible change to a specific entity/device/config entry.
- Expect UI names to live in
core.entity_registry; YAMLfriendly_nameoverlays can override what the UI shows. - Be aware of writeback/refresh timing: changes may not appear immediately and may require reload or restart.
- Avoid broad rewrites of
.storageJSON unless explicitly necessary. - Report both the file path edited and the rollback path created.
Safety
- Read before editing.
- Change the smallest possible region.
- Avoid broad rewrites when a targeted edit is enough.
- Ask before changing behavior that affects locks, alarms, access control, or physical entry.
Reporting
When using this skill, report:
- what path was inspected
- what was found
- what changed, if anything
- whether reload or restart is needed
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install haos-ssh-maintenance - 安装完成后,直接呼叫该 Skill 的名称或使用
/haos-ssh-maintenance触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Haos Ssh Maintenance 是什么?
Perform Home Assistant OS maintenance via SSH for direct file access, YAML edits, custom component inspection, shell troubleshooting, and interactive ha CLI... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 87 次。
如何安装 Haos Ssh Maintenance?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install haos-ssh-maintenance」即可一键安装,无需额外配置。
Haos Ssh Maintenance 是免费的吗?
是的,Haos Ssh Maintenance 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Haos Ssh Maintenance 支持哪些平台?
Haos Ssh Maintenance 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Haos Ssh Maintenance?
由 Altair(@nextaltair)开发并维护,当前版本 v1.0.1。