ha-integration-scaffold

A command that creates starter files for a custom Home Assistant integration. Home Assistant is software for controlling smart-home devices, and an integration connects it to a device or service.

In plain words
What is it for?
Use it to start integrations such as a weather service, smart lights, or an IoT hub. Pass a kebab-case identifier and optionally request a UI configuration flow or platforms such as sensors, switches, or lights.
Why use it?
It avoids manually creating the repeated folder and code structure needed to begin an integration. Optional settings let you include a configuration screen and selected device platforms.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/nodnarbnitram/claude-code-extensions/ha-integration-scaffold
Clone the repo
git clone --depth 1 https://github.com/nodnarbnitram/claude-code-extensions

Made for: Claude Code.

Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,904 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.01904
Opus 5 $0.00005 $0.00952
Sonnet 5 $0.00002 $0.00381
Haiku 4.5 $0.00001 $0.00190

Measured 3d ago against content hash f0d811ee7d45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ha-integration-scaffold scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/ha-integration-scaffold.md · 262 lines

How it starts

The opening of the file, as written. The whole thing — 262 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Home Assistant Integration Scaffold

Generate boilerplate files for a new Home Assistant custom integration.

Arguments: $ARGUMENTS

Important:

  • First argument: domain (kebab-case identifier, e.g., my-integration)
  • Optional flags:
    • --with-config-flow: Include config_flow.py for UI-based configuration
    • --platforms: Comma-separated list of platforms (e.g., sensor,switch,light)

Your Task

Follow these steps to scaffold the Home Assistant integration:

Step 1: Parse Arguments

Extract from $ARGUMENTS:

  • Domain: The first argument (kebab-case identifier, e.g., my-integration)
  • Config Flow Flag: Check for --with-config-flow (optional)
  • Platforms: Extract from --platforms sensor,switch,... (optional)

Examples:

  • /ha-integration-scaffold my-device
  • /ha-integration-scaffold weather-api --with-config-flow
  • /ha-integration-scaffold smart-lights --platforms sensor,switch,light
  • /ha-integration-scaffold iot-hub --with-config-flow --platforms sensor,binary_sensor

Step 2: Validate Domain

  • Must be kebab-case (lowercase letters and hyphens only)
  • Convert underscores to hyphens if needed
  • Store as both kebab-case (domain) and snake_case (for Python module name)
    • Domain: my-integration
    • Python module: my_integration

Step 3: Generate manifest.json

Create custom_components/<domain>/manifest.json with:

{
  "domain": "domain-name",
  "name": "Domain Name",
  "codeowners": ["@username"],
  "config_entries_only": true,
  "documentation": "https://github.com/username/ha-domain-name",
  "homeassistant": "2024.1.0",
  "iot_class": "cloud_polling",
  "issue_tracker": "https://github.com/username/ha-domain-name/issues",
  "requirements": [],
  "version": "1.0.0"
}

Key points:

  • domain: Use the kebab-case version (e.g., my-integration)
  • name: Title-case version (e.g., My Integration)
  • homeassistant: Set to a recent stable version (e.g., 2024.1.0)
  • iot_class: Choose appropriate class:
    • local_polling: Local network, polling
    • cloud_polling: Cloud API, polling
    • local_push: Local network, push updates
    • cloud_push: Cloud API, push updates
  • config_entries_only: Set to true (required for modern integrations)
  • requirements: Empty array initially (add dependencies as needed)

Read the full file on GitHub · 262 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 262 lines · 10 tokens per session scan A f0d811ee7d45

Subscribe to this mod's changes

ha-integration-scaffold is a command published in the GitHub repository nodnarbnitram/claude-code-extensions (16 stars, last pushed 4mo ago), licensed MIT. It adds 10 tokens to every session and 1,904 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.