ha-card-sizing-determine
Determines the optimal size declaration for an existing custom Lovelace card or panel — getGridOptions() (sections) and getCardSize() (masonry/panel/stacks) —…
Skill by nolte
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/nolte-ha-card-sizing-determine
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, frontend, devops, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/ha-card-sizing-determine
What's inside
- Skill name
ha-card-sizing-determine- Description
- Determines the optimal size declaration for an existing custom Lovelace card or panel — getGridOptions() (sections) and getCardSize() (masonry/panel/stacks) — so it renders correctly across devices in view and edit mode, then hands the result to an implementation step patching both callbacks. Classifies as content-dependent (rows:"auto" + min_columns) or deterministic (numeric rows + min_rows:rows), verifies the rows:"auto" CSS preconditions, and treats edit-mode overlay overlap as a sizing defect, per spec/ha/card-panel-sizing. Activate on "size this card correctly", "fix the edit-mode overlay overlap", "determine getGridOptions/getCardSize", or equivalent German requests. Do not activate for scaffolding a new card (ha-lovelace-card-scaffold), a full frontend solution (ha-lovelace-solution), panels/UX (ha-panel-add/-author/-ux-audit), feature rows (ha-card-features-add), or live-instance deploy/verify (ha-integration-deployer/-verify).
- License
- MIT
- Instructions
- 92 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# HA Card Sizing Determine
Spec: `spec/ha/card-panel-sizing/en.md` (EN canonical) / `spec/ha/card-panel-sizing/de.md` (DE translation). This skill operationalises that decision procedure; it does not restate it — read the spec for the field reference, the `.fit-rows` mechanics, the source citations, and the canonical card examples.
## Why this is a skill, not an agent
- **Mid-flow interactivity** — the content-shape classification (content-dependent vs. deterministic) and the determined declaration are approved by the user *before* the card is patched; that approval gate is the load-bearing dimension and belongs on the visible command surface.
- **Output flows back to the main conversation** — the determined `getGridOptions`/`getCardSize` values and the patch are read back inline, without a structured report boundary; the caller keeps working in the same context.
- **Bounded inline generation with a hand-off** — determination plus patching two small callbacks fits inline; where a specialist edit is warranted the skill orchestrates it (skill-orchestrates, agent-executes) rather than doing isolated heavy work itself.
- Counter-dimension considered: the source-grounded analysis could suggest an isolated agent (context-window protection), but the analysis reads one card file against a spec that is already loaded, so isolation buys nothing and the approval gate wins — skill.
## When this skill activates
Use this skill when an **existing** custom Lovelace card or panel needs its size declaration determined or corrected: it renders wrong in one view type or mode, its edit-mode overlays sit inside the content, it clips or leaves dead space, it reflows badly on tablet/mobile, or it simply lacks a considered `getGridOptions()` / `getCardSize()`. The skill determines the correct declaration and hands it to an implementation step that patches both callbacks in the target card file.
## When NOT to activate
- greenfield card scaffolding (new card file, full lifecycle) → `ha-lovelace-card-scaffold`
- orchestrating a whole frontend solution across the card family → `ha-lovelace-solution`
- panels, panel-mode views, custom views, or panel UX → `ha-panel-add` / `ha-panel-author` / `ha-panel-ux-audit`
- adding a feature control row to a card → `ha-card-features-add`
- the card lifecycle / rendering framework or the full layout-antipattern catalogue → `ha/lovelace-card-patterns` / `ha/lovelace-layout-antipatterns`
- deploying or runtime-verifying on a live HA instance → `ha-integration-deployer` / `ha-integration-verifier`
## Hard rules
1. **`spec/ha/card-panel-sizing` is normative.** Derive every sizing decision from it; never assert an HA sizing fact (field names, the `rows:"auto"` semantics, the `.fit-rows` height, edit-mode overlay heights) from memory. When the spec's cited source does not cover a case, verify against the official docs and the frontend source per `ha/upstream-docs-verification` — do not guess.
2. **Classify before declaring.** Decide content-dependent vs. deterministic first; when genuinely unsure, default to `rows:"auto"` (the frontend's own `DEFAULT_GRID_SIZE`), never a guessed numeric `rows`.
3. **Both callbacks, one model.** Determine `getGridOptions()` and `getCardSize()` together and keep them consistent with each other and with the chosen model — `getGridOptions()` governs sections; `getCardSize()` governs masonry, panel, and stacks. Never determine one and leave the other at its default.
4. **Verify the `rows:"auto"` preconditions before recommending it.** Confirm the card root has no fixed/`100%` height, no clipping `overflow:hidden`, and no `position:absolute` root; a fixed inner-content height is fine. If a precondition fails, either fix the CSS as part of the hand-off or fall back to the deterministic branch — do not ship `rows:"auto"` over a root that defeats measurement.
5. **Never resolve edit-mode overlap by tuning a guessed fixed `rows`.** Overlap is a sizing defect: fix it with `rows:"auto"` (content-dependent) or a correctly computed numeric `rows` + `min_rows:rows` (deterministic).
6. **Responsive columns.** Declare a `columns` default (multiple of 3) and a `min_columns` floor; set `max_columns` when the card has an upper useful width; use `columns:"full"` only when the card genuinely spans the section.
7. **No live deploy or verify.** This skill determines and patches source only; deploying or verifying on a running HA instance is out of scope (`ha-integration-deployer` / `ha-integration-verifier`).
## Inputs
| Field | Required | Default | Notes |
|---|---|---|---|
| `card_file` | yes | — | path to the existing card/panel module whose sizing is determined |
| `content_shape` | no | inferred + confirmed | content-dependent vs. deterministic; inferred from the card, confirmed with the user |
| `view_targets` | no | all | which view types matter (sections / masonry / panel / stacks); default: all |
| `column_intent` | no | derived | intended `columns` default, `min_columns`/`max_columns`, or `"full"` span |
| `handoff` | no | inline patch | `inline` (patch the two callbacks here) or dispatch an implementation specialist |
If the user is silent on an optional field, use the default but state it explicitly.
## Pre-flight (in order — abort on first failure)
1. `card_file` exists and contains an existing custom card/panel (a `getGridOptions`/`getCardSize` host, not a feature or badge).
2. Read `spec/ha/card-panel-sizing`. Do not proceed from memory.
3. Read the card: its render output, the CSS on the card root, and any current `getGridOptions()` / `getCardSize()`.
4. The reported symptom (overlap / clipping / dead space / bad reflow / missing declaration) is reproducible from the card, or the user has stated the sizing goal explicitly.
## Workflow
### 1) Classify and determine
Walk the spec's decision tree. Classify the card as **content-dependent** or **deterministic**. Determine the full declaration:
- content-dependent → `getGridOptions: { columns: <mult-of-3>, rows: "auto", min_columns: <floor> }`, and `getCardSize()` derived from content (sum of rows/children); confirm the R5 CSS preconditions hold.
- deterministic → compute `rows` from config, `getGridOptions: { columns, rows, min_columns, min_rows: rows[, max_*] }`, and `getCardSize()` as a fixed number consistent with `rows`.
State the classification, the determined `getGridOptions()` and `getCardSize()` values, any CSS-precondition fix required, and the responsive-column choice in one short block.
### 2) Confirm (approval gate)
Present the determined declaration and the intended hand-off (inline patch vs. dispatched specialist). Wait for user confirmation before editing the card. This is the mid-flow gate that makes this a skill.
### 3) Hand off to implementation
The determination is not the end — hand the declaration to an implementation step:
- **(a) inline patch** — generate or patch `getGridOptions()` and `getCardSize()` in `card_file` (and apply any required CSS-precondition fix on the card root), matching how the sibling scaffold/augment skills generate/patch callbacks.
- **(b) dispatch** — when the edit is larger than a two-callback patch, hand the determined declaration to the appropriate implementation specialist rather than doing heavy work here — resolve the specialist from the live skill inventory (typically `ha-lovelace-card-scaffold` for cards, `ha-panel-add` / `ha-panel-author` for panels).
Keep the analyse→hand-off boundary explicit: determination produces the declaration; the hand-off applies it.
### 4) Validate and report
Validate offline against the spec's Acceptance Criteria: matching branch used; both callbacks present and consistent; `rows:"auto"` preconditions hold where used; edit-mode overlays would sit at the cell boundary; no clipping/dead space in view mode; reflow within `min_columns`/`max_columns`; sensible masonry/panel distribution. Emit a CONFORMANT / NEEDS-WORK report keyed to those criteria, plus the changed file paths and the quality-scale marker (dashboard layout and custom cards are **not part of the HA quality scale** — a portfolio guardrail). Do not deploy or verify on a live instance.
## Boundaries
- greenfield card scaffold → `ha-lovelace-card-scaffold`
- full frontend orchestration → `ha-lovelace-solution`
- panels / panel UX → `ha-panel-add` / `ha-panel-author` / `ha-panel-ux-audit`
- feature control rows → `ha-card-features-add`
- card lifecycle / rendering framework → `ha/lovelace-card-patterns`
- the full layout-antipattern catalogue → `ha/lovelace-layout-antipatterns`
- deploy / runtime verify on live HA → `ha-integration-deployer` / `ha-integration-verifier`From nolte/claude-home-assistant, MIT.
More from nolte/claude-home-assistant
- 0.497score
ha-conversation-agent-augment
nolte
Augments an existing Home Assistant Custom Integration with one or more Voice & AI surfaces — intent handlers, a conversation agent, and/or LLM API tools —…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-automation-solution
nolte
Plans and orchestrates a complete Home Assistant YAML solution from a result-oriented requirement, so the user never has to pick which authoring skill to use.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-badge-add
nolte
Adds a custom Lovelace badge to an existing Home Assistant frontend module, conforming to spec/ha/lovelace-badges.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-blueprint-scaffold
nolte
Scaffolds a single Home Assistant blueprint (automation, script, or template domain) as a self-contained, spec-conformant YAML file — by gathering the intent…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-bluetooth-augment
nolte
Augments an existing Home Assistant Custom Integration with Bluetooth support, conforming to spec/ha/bluetooth.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-card-editor-add
nolte
Adds an ha-form-based visual configuration editor to an existing custom Home Assistant Lovelace card, conforming to spec/ha/lovelace-card-editor.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-card-features-add
nolte
Augments an existing Home Assistant frontend module with one custom tile/card feature — the interactive control row rendered inside the tile card and other…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-automation-author
nolte
Authors one Home Assistant automation-logic or command artifact as spec-conformant YAML (or a sandboxed .py) from a described intent — an automation, script…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-config-entry-migrate
nolte
Adds or extend async_migrate_entry in an existing Home Assistant Custom Integration to migrate stored config entries across a schema change — bump…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-config-flow-augment
nolte
Augments an existing Home Assistant Custom Integration config flow with an additional pattern — multi-step tenant / account selection, zeroconf discovery…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-coordinator-add
nolte
Appends a new DataUpdateCoordinator to an existing Home Assistant Custom Integration — separate role, separate update interval, full integration with…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-derived-sensor-author
nolte
Authors one Home Assistant derived or statistical helper sensor as a spec-conformant YAML block from a described intent — bayesian, derivative, filter…
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Jul 23, 2026 (3 months ago)
- Last release
- Jul 23, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/nolte/claude-home-assistant
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from nolte
- 0.497score
ha-automation-solution
nolte
Plans and orchestrates a complete Home Assistant YAML solution from a result-oriented requirement, so the user never has to pick which authoring skill to use.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-badge-add
nolte
Adds a custom Lovelace badge to an existing Home Assistant frontend module, conforming to spec/ha/lovelace-badges.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-blueprint-scaffold
nolte
Scaffolds a single Home Assistant blueprint (automation, script, or template domain) as a self-contained, spec-conformant YAML file — by gathering the intent…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-bluetooth-augment
nolte
Augments an existing Home Assistant Custom Integration with Bluetooth support, conforming to spec/ha/bluetooth.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-card-editor-add
nolte
Adds an ha-form-based visual configuration editor to an existing custom Home Assistant Lovelace card, conforming to spec/ha/lovelace-card-editor.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ha-automation-author
nolte
Authors one Home Assistant automation-logic or command artifact as spec-conformant YAML (or a sandboxed .py) from a described intent — an automation, script…
SkillCFreshness: C★ 1Claude Code +9
Cite this page
ha-card-sizing-determine skill. Agent Mart. https://agentmart.dev/skills/nolte-ha-card-sizing-determine (last updated 2026-10-24)