generate-integration

A command that scaffolds a complete Home Assistant integration from a set of requirements. Home Assistant is software for controlling and automating smart-home devices and services.

In plain words
What is it for?
Use it to start an integration for a hub, device, or cloud or network service. It helps set up the project based on whether communication uses scheduled polling or device-pushed updates.
Why use it?
Starting an integration from an empty folder means creating many files and making early architectural choices manually. This command collects the integration details and selected quality tier before generating the files.

Command

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/l3digitalnet/claude-code-plugins/generate-integration
Clone the repo
git clone --depth 1 https://github.com/L3DigitalNet/Claude-Code-Plugins
Per session 30 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,322 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.00030 $0.01322
Opus 5 $0.00015 $0.00661
Sonnet 5 $0.00006 $0.00264
Haiku 4.5 $0.00003 $0.00132

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

Security

Grade A, and why

generate-integration 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 2d 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.

plugins/home-assistant-dev/commands/generate-integration.md · 176 lines

How it starts

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

Generate Home Assistant Integration

Generate a complete Home Assistant custom integration. Collects requirements, then produces all files for the selected quality tier.

Step 1: Collect Core Details

Ask as a single open-ended question:

"What is the integration name (e.g. "Smart Thermostat") and the domain (lowercase underscores, e.g. smart_thermostat)?"

Then collect bounded choices:

AskUserQuestion:
  "What type of integration is this?"
  header: "Integration type"
  options:
    - label: "Hub"
      description: "A gateway connecting multiple devices (e.g. Hue bridge, Z-Wave stick)"
    - label: "Device"
      description: "A single standalone device (e.g. one smart plug, one sensor)"
    - label: "Service"
      description: "A cloud or network service (e.g. weather API, notification service)"
AskUserQuestion:
  "How does this integration communicate with the device/service?"
  header: "IoT class"
  options:
    - label: "local_polling — query device on a schedule (Recommended)"
      description: "Your code calls the device/API periodically to fetch state"
    - label: "local_push — device sends updates to HA"
      description: "Device pushes state changes via webhook, socket, or event"
    - label: "cloud_polling — query cloud API on a schedule"
      description: "Your code calls a remote API periodically"
    - label: "cloud_push — cloud sends updates to HA"
      description: "Remote service pushes state changes via webhook or SSE"
AskUserQuestion:
  "Which entity platforms does this integration expose? (select all that apply)"
  header: "Platforms"
  multiSelect: true
  options:
    - label: "sensor"
      description: "Read-only state values (temperature, power usage, status)"
    - label: "switch / binary_sensor"
      description: "On/off controls or binary state readings"
    - label: "light"
      description: "Dimmable or colour-controllable lights"
    - label: "climate / other"
      description: "Thermostats, covers, fans, media players, or other platforms"

Read the full file on GitHub · 176 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. 2d ago First seen · 176 lines · 30 tokens per session scan A 4226e1b51569

Subscribe to this mod's changes

generate-integration is a command published in the GitHub repository L3DigitalNet/Claude-Code-Plugins (6 stars, last pushed 2d ago), licensed MIT. It adds 30 tokens to every session and 1,322 once invoked, about $0.0002 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-31.