ha-badge-add

ha-badge-add is a skill for Claude Code from nolte/claude-home-assistant. It costs 217 tokens per session (2,189 once invoked), scanned A, original, MIT.

A guide for adding one custom status badge to an existing Home Assistant Lovelace frontend module. Lovelace is Home Assistant’s web dashboard, and a badge is a small status display shown at the top of a dashboard view.

In plain words
What is it for?
Use it to add a custom Lovelace badge that displays a status in an integration’s frontend module or standalone dashboard module.
Why use it?
It provides the required custom element, registration, and configuration structure instead of leaving those integration details to be worked out manually. It also checks the result against the stated specification.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-home-assistant plugin — 45 skills, 11 agents shipped together

Good fit Use it to add a custom Lovelace badge that displays a status in an integration’s frontend module or standalone dashboard module.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nolte/claude-home-assistant/ha-badge-add
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.

Any agent
npx skills add nolte/claude-home-assistant --skill ha-badge-add
Clone the repo
git clone --depth 1 https://github.com/nolte/claude-home-assistant

Made for: Claude Code.

Or install claude-home-assistant, the plugin that ships this one along with the rest of its 45 skills, 11 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ha-badge-add

README.md
[![agentmods](https://agentmods.dev/badge/skills/nolte/claude-home-assistant/ha-badge-add/github.svg)](https://agentmods.dev/skills/nolte/claude-home-assistant/ha-badge-add)
Your own site
<a href="https://agentmods.dev/skills/nolte/claude-home-assistant/ha-badge-add"><img src="https://agentmods.dev/badge/skills/nolte/claude-home-assistant/ha-badge-add/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ha-badge-add

Your own site · 80×15
<a href="https://agentmods.dev/skills/nolte/claude-home-assistant/ha-badge-add"><img src="https://agentmods.dev/badge/skills/nolte/claude-home-assistant/ha-badge-add.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 217 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,189 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00217 $0.02189
Opus 5 $0.00109 $0.01094
Sonnet 5 $0.00043 $0.00438
Haiku 4.5 $0.00022 $0.00219

Measured 11d ago against content hash 03d4c3d6afc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ha-badge-add 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 11d 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.

skills/ha-badge-add/SKILL.md · 112 lines

How it starts

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

HA Badge Add

Spec: spec/claude/ha-badge-add/en.md (EN canonical) / spec/claude/ha-badge-add/de.md (DE translation).

Why this is a skill, not an agent

  • Human-visible augmentation surface — the user describes a status display and reads back the badge element, the registration entry, and the conformance report; a skill keeps this on the visible command surface, like the sibling frontend skill ha-lovelace-card-scaffold.
  • Mid-flow interactivity — the badge_type tag-name decision and the "graphical editor yes/no" choice are per-run dialogues the user approves before generation.
  • Bounded, inline generation — one custom-element module plus its window.customBadges push and optional editor fit inline; no isolated agent context is needed.
  • Counter-dimension considered: the draft→validate loop could be an agent, but the tag-name and editor-depth decisions belong in the user's working context; skill wins.

When this skill activates

Use this skill to add one custom badge — the small status widget at the head of a Lovelace view — to an existing frontend module (an integration's www/ folder or a standalone Lovelace module).

When NOT to activate

  • a custom card (the larger content building block) → ha-lovelace-card-scaffold / ha/lovelace-card-patterns
  • a tile card feature → ha/lovelace-card-features
  • a dashboard strategy → ha/lovelace-strategies
  • the config-changed graphical-editor detail pattern → ha/lovelace-card-editor
  • deploying/importing into a running HA instance → out of scope

Hard rules

  1. One badge, one run. No multi-badge batches.
  2. Read spec/ha/lovelace-badges/en.md first. Do not generate from memory.
  3. Custom element, no React. Define the badge as a subclass of HTMLElement (or LitElement) and register it via customElements.define("<badge-type>", <BadgeClass>); the tag name becomes the badge type custom:<badge-type>. Never use React as the rendering framework — custom elements and React are not compatible in HA badges.
  4. setConfig contract. Implement setConfig(config); reject an invalid configuration with throw new Error("...") — HA catches it and renders an error badge.
  5. hass setter. Implement the hass property as a setter; the badge updates itself to the latest state on every set. Read the consumed entity from hass.states[entityId] and render a sensible fallback (e.g. unavailable) when it is missing (see spec/ha/frontend-data-api/en.md).
  6. Picker registration. Push an entry into window.customBadges (window.customBadges = window.customBadges || []; window.customBadges.push({...})) with at least the required type and name; description / documentationURL / preview are optional (preview defaults to false).
  7. Graphical editor is optional. Add the static getConfigElement() / getStubConfig() only when an editor is wanted; do not spell out the config-changed event pattern here — that is governed by spec/ha/lovelace-card-editor/en.md.
  8. Document the wiring. Reference the badge via type: "custom:<badge-type>" in a view's badges: list and add a module resource with the badge module URL (typically /local/<badge-name>.js); note the HA restart needed after first creating the www folder.
  9. Name per spec/ha/naming-conventions/en.md and verify HA internals against the official docs (see spec/ha/upstream-docs-verification/en.md).
  10. Honour the layout-antipattern catalogue (spec/ha/lovelace-layout-antipatterns/en.md). Badges do not render in panel or sidebar views (A2) — when documenting the wiring, note the target view must support badges (Sections, Masonry), not panel/sidebar.

Read the full file on GitHub · 112 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. 11d ago First seen · 112 lines · 217 tokens per session scan A 03d4c3d6afc9

Subscribe to this mod's changes

ha-badge-add is a skill published in the GitHub repository nolte/claude-home-assistant (1 stars, last pushed 1mo ago), licensed MIT. It adds 217 tokens to every session and 2,189 once invoked, about $0.0011 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.

Related

Other skills, from other repositories

cache-components

Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). PROACTIVE ACTIVATION: Use this skill automatically when working in Next.js projects that have cacheComponents: true in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best…

sangrokjung/claude-forge · 183 tokens

frontend-code-review

Trigger when the user requests a review of frontend files (e.g., .tsx, .ts, .js). Support both pending-change reviews and focused file reviews while applying the checklist rules.

sangrokjung/claude-forge · 42 tokens

accessibility-a11y

WCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen readers, automated testing.

travisjneuman/.claude · 26 tokens

flutter-development

Cross-platform development with Flutter and Dart for iOS, Android, Web, Desktop, and embedded. Use when building Flutter apps, implementing Material/Cupertino design, or optimizing Dart code.

travisjneuman/.claude · 41 tokens

electron-desktop

Desktop application development with Electron for Windows, macOS, and Linux. Use when building cross-platform desktop apps, implementing native OS features, or packaging web apps for desktop.

travisjneuman/.claude · 38 tokens

generic-react-feature-developer

Guide feature development for React applications with architecture focus. Covers Zustand/Redux patterns, IndexedDB usage, component systems, lazy loading strategies, and seamless integration. Use when adding new features, refactoring existing code, or planning major changes.

travisjneuman/.claude · 53 tokens