← ClaudeAtlas

ha-lovelace-card-scaffoldlisted

Scaffolds a vanilla-JS Lovelace card under custom_components/<domain>/www/<card-name>.js with every mandatory lifecycle method, shadow DOM, entity-change detection, HA CSS custom properties, and auto-registration in __init__.py. Activate on phrasings like "scaffold a Lovelace card for the integration", "add a custom Lovelace card called `<name>`", "erstelle eine Custom-Card für `<Resource>`". Do not activate for greenfield setup (use ha-integration-scaffold), TypeScript / Lit cards, or card removal.
nolte/claude-home-assistant · ★ 1 · AI & Automation · score 68
Install: claude install-skill nolte/claude-home-assistant
# HA Lovelace Card Scaffold Spec: `spec/claude/ha-lovelace-card-scaffold/en.md` (EN canonical) / `spec/claude/ha-lovelace-card-scaffold/de.md` (DE translation). ## Why this is a skill, not an agent - **Mid-flow interactivity (decisive):** card name, target entities, and registration path are confirmed with the operator before scaffolding; corrections iterate in the same thread. - **Quick, targeted change:** one new file under `www/` plus registration — main-conversation territory per the change-scope dimension. - **Counter-dimension considered:** the lifecycle boilerplate is template-like and self-contained (agent bias), but the scaffold is the first step of card development the conversation continues, so a report boundary would only add friction. ## When this skill activates Use this skill when the user wants to add a custom Lovelace card to an existing HA Custom Integration — a vanilla-JS card living under `custom_components/<domain>/www/`, auto-registered through `__init__.py`. ## When NOT to activate - greenfield integration setup → `ha-integration-scaffold` - TypeScript or Lit cards → separate spec planned - card removal → manual code edit - multi-card scaffold in one call → call once per card ## Hard rules 1. **Never set hard-coded hex colours.** Use HA CSS custom properties (`var(--primary-text-color)` etc.) so the card respects the active theme. 2. **Always set `cache_headers=False` in the StaticPathConfig.** Otherwise updated cards stay stale for cached brow