ha-frontend-events
Skill by home-assistant
HA Frontend Events is an agent skill with event handling patterns for the Home Assistant frontend. It is for developers who type event handlers, dispatch events with fireEvent, or declare HASSDomEvents and event maps.
Install ha-frontend-events
Built from the published package, never by AI.
git clone --depth 1 https://github.com/home-assistant/frontend /tmp/frontend && mkdir -p ~/.claude/skills && cp -r /tmp/frontend/.agents/skills/ha-frontend-events ~/.claude/skills/ha-frontend-eventsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/home-assistant/frontend /tmp/frontend && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/frontend/.agents/skills/ha-frontend-events ~/.gemini/antigravity-cli/skills/ha-frontend-eventsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
HA Frontend Events is an agent skill that gives an AI assistant the event patterns used in the Home Assistant frontend. It explains which event types to use when typing listeners, including HASSDomCurrentTargetEvent, HASSDomTargetEvent, HASSDomEvent, ValueChangedEvent and ActionHandlerEvent. It also covers dispatching events with fireEvent() and registering event names and detail types by augmenting HASSDomEvents.
The skill includes TypeScript examples for handlers, intersections for native events such as keyboard events, and global declarations for HTMLElementEventMap and GlobalEventHandlersEventMap. It tells the assistant to cross-load ha-frontend-components when the work involves dialogs, forms, alerts, panels or Lovelace cards. It is aimed at developers and reviewers working on Home Assistant frontend code.
Written from the project's SKILL.md and checked against it.
What it can do
- Typed event handlersChooses the right event type for a handler, such as HASSDomCurrentTargetEvent or HASSDomTargetEvent.
- Custom event payloadsReads custom event data through ev.detail using HASSDomEvent types.
- Value changed eventsTypes the standard value-changed event with ValueChangedEvent from src/types.ts.
- Lovelace action eventsUses ActionHandlerEvent for Lovelace tap, hold and double-tap handlers.
- Dispatching with fireEventFires Home Assistant component events instead of constructing Event or CustomEvent directly.
- Event map declarationsRegisters event names and detail types by augmenting HASSDomEvents and HTMLElementEventMap.
- Intersection typesCombines event facets, such as a value-changed event with a current target element type.
Try asking
- Write a handler for a radio group change using HASSDomCurrentTargetEvent.
- Add a fireEvent call for an item-selected event with an id detail.
- Declare HASSDomEvents and HTMLElementEventMap entries for a new custom event.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/ha-frontend-events/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md4 KB
Alternatives to ha-frontend-events
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
ha-frontend-events: common questions
What is the HASSDomCurrentTargetEvent type used for?
The source says to use HASSDomCurrentTargetEvent<T> to read the element on which the listener was registered through ev.currentTarget. HASSDomTargetEvent<T> is for the element that originated the event.
How does fireEvent() work with event names?
The source says fireEvent() constrains event names and supplied detail, based on registrations made by augmenting HASSDomEvents. Events bubble and cross shadow boundaries by default.
When should a handler keep the native event type?
The source says to keep the native event type when the handler reads native fields such as key, modifier keys, dataTransfer, or focus relationships.
How do I install ha-frontend-events?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is ha-frontend-events free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is ha-frontend-events safe to use?
It scores 85 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to ha-frontend-events?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
