plugins/home-assistant-dev/skills/ha-integration-scaffold/SKILL.md
Scaffold a new Home Assistant integration with correct file structure, manifest, and boilerplate. Use when creating a new custom component, custom integration, or when asked to scaffold, create, or start a Home Assistant integration.
npx skillsauth add l3digitalnet/claude-code-plugins ha-integration-scaffoldInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
custom_components/{domain}/
├── __init__.py # Entry point: async_setup_entry, async_unload_entry
├── manifest.json # Integration metadata (REQUIRED)
├── config_flow.py # UI-based configuration (REQUIRED)
├── const.py # Domain constant, platform list
├── coordinator.py # DataUpdateCoordinator subclass
├── entity.py # Base entity class (recommended)
├── strings.json # Config flow strings
├── services.yaml # Service action definitions (if registering services)
├── icons.json # Entity and service icons (optional)
├── translations/
│ └── en.json # English translations
└── [platform].py # One per entity platform (sensor.py, switch.py, etc.)
For HACS distribution, also include at repository root:
/
├── custom_components/{domain}/ # Integration files
├── hacs.json # HACS metadata (REQUIRED for HACS)
├── README.md # Documentation
└── LICENSE # License file
{
"domain": "{domain_name}",
"name": "{Human Readable Name}",
"version": "1.0.0",
"codeowners": ["@{github_username}"],
"config_flow": true,
"dependencies": [],
"documentation": "https://github.com/{user}/{repo}",
"integration_type": "hub",
"iot_class": "local_polling",
"issue_tracker": "https://github.com/{user}/{repo}/issues",
"requirements": []
}
Required fields (Core + HACS):
domain: lowercase, underscores only, matches folder namename: human-readable (omit for core integrations)version: SemVer (required for custom integrations)codeowners: GitHub usernames with @ prefixconfig_flow: always true for new integrationsdocumentation: URL to integration docsintegration_type: hub (gateway), device (single device), service (cloud)iot_class: local_polling, local_push, cloud_polling, cloud_push, calculatedissue_tracker: URL for bug reports (required for HACS)"""The {Name} integration."""
from __future__ import annotations
import logging
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from .const import DOMAIN
from .coordinator import {Name}Coordinator
_LOGGER = logging.getLogger(__name__)
PLATFORMS: list[Platform] = [Platform.SENSOR]
# Type alias for config entry with typed runtime_data
type {Name}ConfigEntry = ConfigEntry[{Name}Coordinator]
async def async_setup_entry(hass: HomeAssistant, entry: {Name}ConfigEntry) -> bool:
"""Set up {Name} from a config entry."""
coordinator = {Name}Coordinator(hass, entry)
await coordinator.async_config_entry_first_refresh()
# Store coordinator in runtime_data (modern pattern, not hass.data)
entry.runtime_data = coordinator
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True
async def async_unload_entry(hass: HomeAssistant, entry: {Name}ConfigEntry) -> bool:
"""Unload a config entry."""
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
"""Constants for the {Name} integration."""
from typing import Final
DOMAIN: Final = "{domain}"
DEFAULT_SCAN_INTERVAL: Final = 30
list[str] not List[str]from __future__ import annotations in every fileunique_idDeviceInfoentry.runtime_data, not hass.dataha-config-flow skillha-coordinator skillha-entity-platforms skillha-testing skilldevelopment
Use when you're stuck or missing current information mid-task - the same command/API/approach failed twice, an error looks like a changed or deprecated API, or you need the current version of something, a fact from after your training cutoff, or to verify something you cannot confirm from the code in context. Starts with a cheap inline lookup and only escalates to a full research sweep if that fails. Do not use for routine pre-emptive checks before ordinary library work - for deliberate research, use /qdev:research.
documentation
Update Outline wiki documentation with implementation-level details from the current session by dispatching the up-docs-propagate-wiki sub-agent. This skill should be used when the user runs /up-docs:wiki.
documentation
Update repository documentation (README.md, docs/, CLAUDE.md) based on session changes by dispatching the up-docs-propagate-repo sub-agent. This skill should be used when the user runs /up-docs:repo.
documentation
Update Notion pages with strategic and organizational context from the current session by dispatching the up-docs-propagate-notion sub-agent. This skill should be used when the user runs /up-docs:notion.