Token导航 LogoToken导航

Agent Skill · 运维和基础设施

ha-addon(哈插件)

ha-addon 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

ha-addon 是运维和基础设施类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在运维和基础设施类的 2,449 个 Skill 里排第 933。

总安装 1,141周安装 49GitHub Stars 8下载 785核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ha-addon(哈插件)
来源仓库:https://github.com/nodnarbnitram/claude-code-extensions
仓库路径:skills/ha-addon
安装命令:
npx skills add https://github.com/nodnarbnitram/claude-code-extensions --skill ha-addon
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/nodnarbnitram/claude-code-extensions --skill ha-addon

这个 Skill 是做什么的

运维和基础设施类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

ha-addon 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中进行协作事项整理。适用于围绕仓库状态、代码变更或协作事项进行信息组织与梳理的场景。

通过 npx skills add 命令从 GitHub 仓库安装,需结合原始 README 核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。ha-addon 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/ha-addon

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/nodnarbnitram/claude-code-extensions --skill h…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

ha-addon 怎么安装?

在终端执行 npx skills add https://github.com/nodnarbnitram/claude-code-extensions --skill ha-addon。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ha-addon 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

ha-addon 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

ha-addon 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

ha-addon 用的人多吗?

公开数据是累计安装 1,141 次,近一周安装 49 次,下载 785 次,GitHub 8 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

ha-addon 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理运维和基础设施类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

运维和基础设施类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
brainstorming

头脑风暴 · Codex、Claude

3,148,776173,131操作浏览器MIT通过
copywriting

文案写作 · Codex、Claude

1,996,72425,583需要联网MIT通过
openclaw-secure-linux-cloud

OpenClaw secure linux cloud 命令行 · Codex、Claude

1,853,08840接触敏感数据未明确未通过
xget

xget 命令行 · Codex、Claude

1,799,28040执行命令未明确未通过
requesting-code-review

代码审查请求 · Codex、Claude

1,590,144173,103权限未标注MIT通过
ha-addon

哈插件 · 本页

1,1418需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Home Assistant Add-On Development

Expert guidance for building, configuring, and publishing Home Assistant add-ons with Docker, Supervisor integration, and multi-architecture support.

Before You Start

This skill prevents common Home Assistant add-on development errors:

IssueSymptomSolution
Permission errorsPermission denied on supervisor API callsUse correct SUPERVISOR_TOKEN and API endpoints
Configuration validationAdd-on won't loadValidate config.yaml schema before publishing
Docker base image errorsMissing dependencies in runtimeUse official Home Assistant base images (ghcr.io/home-assistant)
Ingress misconfigurationWeb UI not accessible through HAConfigure nginx reverse proxy correctly
Multi-arch build failuresAdd-on only works on one architectureSet up build.yaml with architecture matrix

Quick Start: Create an Add-On from Scratch

Step 1: Create the Add-On Directory Structure

mkdir -p my-addon/{rootfs,rootfs/etc/s6-overlay/s6-rc.d/service-name}
cd my-addon

Why this matters: Home Assistant expects specific directory layouts. The rootfs/ contains your actual application files that get packaged into the Docker image.

Step 2: Create config.yaml

---
name: My Custom Add-On
description: My awesome Home Assistant add-on
version: 1.0.0
slug: my-addon
image: ghcr.io/home-assistant/{arch}-addon-my-addon
arch:
  - amd64
  - armv7
  - aarch64
ports:
  8080/tcp: null
options:
  debug: false
schema:
  debug: bool
permissions:
  - homeassistant  # Read/write Home Assistant core data

Why this matters: This is your add-on's manifest. The slug becomes the internal identifier and determines where configuration is stored.

Step 3: Create the Dockerfile

FROM ghcr.io/home-assistant/amd64-base:latest

# Install dependencies
RUN apk add --no-cache python3 py3-pip

# Copy application
COPY rootfs /

# Set working directory
WORKDIR /app

# Install Python packages if needed
RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

# Run using S6 overlay
CMD ["/init"]

Why this matters: Using Home Assistant base images includes critical runtime components (S6 overlay, bashio helpers, supervisor integration).

Step 4: Create S6 Service Script

Create rootfs/etc/s6-overlay/s6-rc.d/service-name/run:

#!/command/execlineb -P
foreground { echo "Starting my add-on..." }
/app/my-service

Make it executable:

chmod +x rootfs/etc/s6-overlay/s6-rc.d/service-name/run

Why this matters: S6 overlay is Home Assistant's init system. It manages service startup, logging, and graceful shutdown.

Critical Rules

✅ Always Do

  • ✅ Use official Home Assistant base images (ghcr.io/home-assistant/{arch}-base)
  • ✅ Include all supported architectures in config.yaml (amd64, armv7, aarch64)
  • ✅ Use bashio helper functions for common operations (bashio::log::info, bashio::addon::option)
  • ✅ Validate config.yaml schema before releasing
  • ✅ Document configuration options in the schema section
  • ✅ Include addon_uuid in logs for debugging

❌ Never Do

  • ❌ Don't hardcode paths - use bashio to get configuration directory (/data/)
  • ❌ Don't run services as root unless absolutely necessary (set USER in Dockerfile)
  • ❌ Don't call supervisor API without SUPERVISOR_TOKEN
  • ❌ Don't ignore SIGTERM signals - implement graceful shutdown
  • ❌ Don't assume one architecture - use {arch} placeholder in image names
  • ❌ Don't store data outside /data/ - Home Assistant won't persist it

Common Mistakes

❌ Wrong: Hardcoded paths

#!/bin/bash
CONFIG_PATH="/config/my-addon"

✅ Correct: Using bashio for configuration

#!/command/execlineb -P
CONFIG_PATH=${"$(bashio::addon::config_path)"}

Why: bashio handles path resolution and ensures your add-on works in any Home Assistant installation.

Configuration Reference

config.yaml Structure

---
name: String                          # Display name
description: String                   # Short description
version: String                       # Semantic version (1.0.0)
slug: String                          # URL-safe identifier
image: String                         # Docker image URL with {arch} placeholder
arch:
  - amd64|armv7|aarch64|armhf|i386    # Supported architectures
ports:
  8080/tcp: null                      # TCP port (null=internal only, number=external)
  53/udp: 53                          # UDP with external port mapping
devices:
  - /dev/ttyACM0                      # Device access
services:
  - mysql                             # Depends on other service
options:
  debug: false                        # User configuration options
  log_level: info
schema:
  debug: bool                         # Configuration validation schema
  log_level:
    - debug
    - info
    - warning
    - error
permissions:
  - homeassistant                     # Read/write HA config
  - hassio                            # Full supervisor API access
  - admin                             # Broad system access
  - backup                            # Backup/restore operations
environment:
  NODE_ENV: production
webui: http://[HOST]:[PORT:8080]     # Web UI URL pattern
ingress: true                         # Enable ingress proxy
ingress_port: 8080                    # Internal port for ingress
ingress_entry: /                      # URL path for ingress entry

Key settings:

  • slug: Used internally and in supervisor API calls
  • arch: List all supported architectures or builds fail
  • image: Must use {arch} placeholder for dynamic builds
  • options: User-configurable settings
  • permissions: Controls supervisor API access level
  • ingress: Enables reverse proxy for web UIs

Common Patterns

Using bashio for Logging

#!/command/execlineb -P
foreground { bashio::log::info "Add-on started" }
foreground { bashio::log::warning "Low disk space" }
foreground { bashio::log::error "Failed to connect" }

Accessing Configuration Options

#!/command/execlineb -P
define DEBUG "$(bashio::addon::option 'debug')"
define LOG_LEVEL "$(bashio::addon::option 'log_level')"
if { test "${DEBUG}" = "true" }
  bashio::log::debug "Debug mode enabled"

Supervisor API Communication

#!/bin/bash
# Get addon info
curl -X GET \
  -H "Authorization: Bearer $SUPERVISOR_TOKEN" \
  http://supervisor/addons/self/info | jq .

# Send notification
curl -X POST \
  -H "Authorization: Bearer $SUPERVISOR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message":"Warning message"}' \
  http://supervisor/notifications/create

Multi-Arch Docker Build

Create build.yaml:

build_from:
  amd64: ghcr.io/home-assistant/amd64-base:latest
  armv7: ghcr.io/home-assistant/armv7-base:latest
  aarch64: ghcr.io/home-assistant/aarch64-base:latest
  armhf: ghcr.io/home-assistant/armhf-base:latest
codenotary: your-notary-id  # Optional code signing

Ingress Configuration for Web UIs

ingress: true
ingress_port: 8080
ingress_entry: /
# Optional ingress_stream for streaming endpoints

Inside your app, use correct reverse proxy headers:

# nginx configuration in your app
location / {
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header Host $host;
  proxy_pass http://localhost:8080;
}

Known Issues Prevention

IssueRoot CauseSolution
Add-on fails to startMissing S6 service filesCreate /etc/s6-overlay/s6-rc.d/service-name/ with run executable
Supervisor API returns 401Invalid SUPERVISOR_TOKENVerify token is set by Home Assistant (check logs with addon_uuid)
Configuration not persistingSaving outside /data/Always use bashio::addon::config_path or /data/ for persistence
Port already in useMultiple services on same portCheck configuration - each service needs unique port
Architecture mismatch{arch} placeholder not usedUse exact placeholder in image field: ghcr.io/home-assistant/{arch}-base
Build fails with "Unknown architecture"config.yaml lists unsupported archUse only: amd64, armv7, aarch64, armhf, i386

Supervisor API Endpoints

# Authentication: Pass SUPERVISOR_TOKEN header
# Base URL: http://supervisor

GET /addons/self/info            # Get current add-on details
POST /addons/self/restart        # Restart this add-on
GET /addons/installed            # List installed add-ons
GET /info                        # System information
POST /notifications/create       # Send notification to user
GET /config/homeassistant        # Read Home Assistant config

# Example with bashio
bashio::addon::self_info         # Helper function for self info

Dependencies

Required

PackageVersionPurpose
Home Assistant2024.1+Add-on platform and supervisor
DockerLatestContainer runtime
S6 Overlay3.xInit system (included in base images)

Optional

PackageVersionPurpose
bashioLatestHelper functions (included in base images)
python33.9+Python-based add-ons
nodejs18+Node.js-based add-ons

Official Documentation

Troubleshooting

Add-on Won't Start

Symptoms: Add-on shows as "Not running" or "Unknown"

Solution:

# Check logs
docker logs addon_name_latest  # Or use HA UI: Settings > System > Logs

# Common causes:
# 1. Invalid config.yaml syntax
# 2. Missing S6 service files
# 3. Dockerfile can't find base image
# 4. Permission denied on rootfs files

Supervisor API Returns 401

Symptoms: API calls fail with "Unauthorized"

Solution:

# Verify SUPERVISOR_TOKEN is set
echo $SUPERVISOR_TOKEN

# Check add-on logs for token errors
# Token is automatically injected by Home Assistant

# Verify permissions in config.yaml
# If calling hassio endpoints, add: permissions: [hassio]

Configuration Not Saving

Symptoms: Options are lost after restart

Solution:

# Always save to /data/ or use bashio
CONFIG_PATH="$(bashio::addon::config_path)"  # Returns /data/
echo "my_value=123" > "${CONFIG_PATH}/settings.json"

# Verify /data/ exists and is writable
ls -la /data/

Ingress Web UI Not Accessible

Symptoms: Ingress URL returns 502 or blank page

Solution:

# 1. Verify service is listening on correct port
netstat -tlnp | grep 8080

# 2. Check reverse proxy headers in app config
# X-Forwarded-For, X-Forwarded-Proto must be set

# 3. Verify ingress settings in config.yaml
ingress: true
ingress_port: 8080
ingress_entry: /

Build Fails with Architecture Error

Symptoms: "Unknown architecture" or "Image not found"

Solution:

# Check config.yaml has valid arch values
arch:
  - amd64      # x86 64-bit
  - armv7      # 32-bit ARM (Pi 2/3)
  - aarch64    # 64-bit ARM (Pi 4+)
  - armhf      # 32-bit ARM (older devices)
  - i386       # 32-bit x86 (rare)

# Dockerfile must use {arch} placeholder
FROM ghcr.io/home-assistant/{arch}-base:latest

Setup Checklist

Before publishing your add-on, verify:

  • config.yaml has valid YAML syntax (use online YAML validator)
  • All listed architectures are supported (amd64, armv7, aarch64, armhf, i386)
  • Dockerfile uses official Home Assistant base image
  • S6 service files exist and are executable (chmod +x)
  • All configuration options are documented in schema
  • No hardcoded paths (use bashio helpers)
  • Permissions field lists required supervisor API access
  • Tested on at least amd64 and ARM architecture
  • Logs use bashio::log functions
  • Graceful shutdown on SIGTERM implemented
  • /data/ used for all persistent data
  • Ingress working if web UI is provided
  • README includes installation and usage instructions

Creating a Repository

To publish multiple add-ons:

1. Create Repository Structure

mkdir my-addon-repo
cd my-addon-repo

2. Create repository.yaml

---
name: My Add-On Repository
url: https://github.com/username/my-addon-repo
maintainer: Your Name <email@example.com>

3. Add Add-Ons

my-addon-repo/
├── repository.yaml
├── my-addon-1/
│   ├── config.yaml
│   ├── Dockerfile
│   └── rootfs/
└── my-addon-2/
    ├── config.yaml
    ├── Dockerfile
    └── rootfs/

4. Push to GitHub

Add the repository URL to Home Assistant to make add-ons discoverable.

Advanced: Publishing to GitHub Container Registry

For private repositories or multi-architecture builds:

# Build and push for all architectures
docker buildx build \
  --platform linux/amd64,linux/arm/v7,linux/arm64/v8 \
  -t ghcr.io/username/my-addon:1.0.0 \
  --push .

Related Skills

  • docker-configs - Docker fundamentals and best practices
  • esphome-config-helper - Related IoT device integration patterns
  • home-assistant-automation - Home Assistant automation and scripting

平台分布

windsurf

30.28%
按下载量换算238

Antigravity

24.39%
按下载量换算191

OpenCode

18.31%
按下载量换算144

Gemini CLI

13.27%
按下载量换算104

Claude Code

7.33%
按下载量换算58

trae

3.2%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills