Use when browsing, installing, version-pinning or downgrading, redownloading, or removing HACS packages (the Marketplace since Home Assistant 2026.11), adding custom HACS repositories, or migrating to a custom integration through HA NOVA Relay.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Hacs?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/markusleben-hacs)
---
name: hacs
description: Use when browsing, installing, version-pinning or downgrading, redownloading, or removing HACS packages (the Marketplace since Home Assistant 2026.11), adding custom HACS repositories, or migrating to a custom integration through HA NOVA Relay.
license: MIT
compatibility: Requires the ha-nova CLI (run 'ha-nova setup' first) and the HA NOVA Relay in Home Assistant (App, or standalone container on Container/Core). HACS 2.x must already be installed (Home Assistant 2026.10 or older); on 2026.11+ the Marketplace's own subset applies.
---
# HA NOVA HACS Lifecycle
## Scope
HACS package lifecycle:
- inventory: registered repositories, installed versions, pending states
- custom repository registration and removal
- download/install (exact version, stable, or explicit prerelease), update,
redownload, version pinning
- uninstall/removal with consumer discovery
- custom-integration migration coordination
Not in scope:
- `update.*` entity flows — the plain "update this integration" path stays in
`ha-nova:updates`; this skill owns what the entity flow cannot do
- integration config flows after install (`ha-nova:integration-setup`)
- installing HACS itself (HA documentation/UI)
- Lovelace dashboard editing (`ha-nova:dashboard`)
## Bootstrap (once per session)
Read and follow `../ha-nova/session-bootstrap.md`.
Then run the capability gate in `hacs-commands.md` once, before advertising
any coverage or naming a cause: `hacs/info`, and on `unknown_command` the
Marketplace probe. Home Assistant 2026.11+ ships HACS built in as the
Marketplace and removes the HACS integration: there, never say HACS is
missing or suggest installing it — only Marketplace mode
(`hacs-commands.md` → Marketplace mode) applies.
## Relay Contract
File-based relay requests only:
- `ha-nova relay ws --data-file <payload-file> --out <result-file>` — other
`hacs/*` commands and the two Marketplace reads, the WS-only frontend reads
`{"type":"lovelace/resources"}` and
`{"type":"lovelace/config","url_path":<dashboard>}`, and the preflight
reads the uninstall/migration flow depends on:
`{"type":"config_entries/get"}`, `{"type":"get_config"}`,
`{"type":"config/entity_registry/list"}`,
`{"type":"config/device_registry/list"}`, and
`{"type":"search/related","item_type":"entity","item_id":<entity_id>}`
- `ha-nova relay core --method GET --path <path> --out <result-file>` for HA
REST reads (config entries, states)
- `ha-nova plan raw --file <requests.json>`, then `ha-nova apply`: the writes
marked plan-only in `hacs-commands.md`, and ONLY inside this skill's
uninstall/migration flow the dependent config-entry DELETE
`/api/config/config_entries/entry/<entry_id>`
- `--jq-file <filter-file>` for non-trivial filters
Envelope parsing follows `../ha-nova/relay-api.md` → Standard Envelope;
WS results live under `.data`.
The pinned command map, repository-identity rules, error asymmetry, and
restart semantics live in `hacs-commands.md` — read it before the first
`hacs/*` call. Only commands from that map may be sent. Read `hacs/info`
first every session and apply its capability gate; on an unrecognized schema
or a set `disabled_reason`, fail closed with the HACS-UI pointer on an
unrecognized install. Never guess schemas, never edit `.storage`, never SSH.
## Flow
### Inventory
1. Capability gate, then `hacs/repositories/list` (Marketplace mode:
`marketplace/repositories/list`) — bounded:
filter by requested category/name, render as a List Frame with counts and
Progressive Detail; never dump the raw list.
2. Registration, downloaded files, and config entries are three distinct
lifecycle objects — name them as such in every result (a registered
repository is not installed; installed files are not a configured
integration).
3. HACS mode: surface `hacs/repositories/removed` matches and unacknowledged
`hacs/critical/list` entries for installed packages as warnings.
### Resolve
Resolve the target through `list`/`hacs/repository/info` in THIS session and
use only its `id` afterwards (identity rules in `hacs-commands.md`). On
ambiguity, ask one blocking question with the candidate `full_name`s. Never
act on a name match alone.
### Install / update / redownload / pin
Marketplace mode: its install and acceptance steps in `hacs-commands.md`
apply instead of 1–3.
1. Read `hacs/repository/releases` (and `release_notes` for updates) before
choosing. The list is DISCOVERY, not the complete chooser — it returns
only the newest page (~30): a user-named tag/ref outside it can still
be installed one-off; bind that exact ref in the preview and let the
download validate it (a rejected ref fails the mutation loudly). Durable-pin rules (2.0.5 `version_to_download`): on a repository WITH
releases, any non-null `selected_tag` is honored — older tags outside
the newest page pin durably (confirm with the post-pin read-back that
`selected_tag` is still set); pinning the CURRENT latest clears itself
(HACS resets it) and is not a pin. On a repository WITHOUT releases,
only the default branch pins durably — any other ref installs one-off
with the default-branch fallback named in the preview. A PRERELEASE tag on a repository that ALSO has a stable release pins
durably without any toggle (`last_version` is set). Only a
prerelease-ONLY repository needs beta visibility ON for a durable
prerelease pin (the confirmed `hacs/repository/beta` toggle): with it
off, such a repository has no `last_version` and its prereleases are
absent from `published_tags`, so later downloads fall back to the
default branch — without the toggle, that install is one-off, named
as such. A repository with NO releases installs its
default branch: name the branch and
resolved commit in the preview and verify the installed ref on
read-back. A user-pinned version (`selected_tag`) is never silently
replaced by a newer release — say the pin exists and ask; prerelease only
on explicit request — choose the tag from `releases` (its `prerelease`
flag marks them; no visibility toggle needed to install one). The
`hacs/repository/beta` toggle is itself a mutation: send it only after
the confirmed preview, when the user wants prereleases to STAY visible.
2. Preview per the Preview Card: repository `full_name`, category,
installed → target version, HA domain (from the list row —
`repository/info` is needed only for release/pin state and clears the
repository's `new` flag — name that side effect),
restart/reload impact, and — for updates — the release-notes summary
with breaking changes. Install/update/redownload takes the one-time code
(third-party code in Home Assistant, a card in every signed-in browser
with that user's rights): a `plan raw` item whose `say` closes this
preview.
3. Apply (`ha-nova apply`): `hacs/repository/download` with the chosen `version` — never
version-then-download (a version-less download resolves to LATEST, and
every download clears the selection; see `hacs-commands.md`). Branch-only
repositories (`releases` empty, `version_or_commit` = `commit`) are the
one case WITHOUT a `version`: preview the default-branch install, send
`download` without `version`, and verify against the commit-ish
`installed_version` — pinning and downgrades are unavailable there; say
so instead of blocking the install. A Relay
timeout is an UNKNOWN outcome — enter the reconcile loop below; never
fire a second download on a timeout. For a persistent pin, send
`hacs/repository/version` AFTER the verified download and disclose that
HACS keeps flagging the repository `pending_upgrade`.
4. Verify category-appropriately (Verification below) and report INSTALLED
vs ACTIVE honestly.
### Custom repositories
- Add: a custom repository is code nobody has vetted, so HA NOVA does not
add one (a raw `hacs/repositories/add` is refused). Validate the GitHub
reference and its category (manifest, topics, structure; ask when
ambiguous), then hand the user the steps: HACS > ⋮ > Custom repositories,
paste the URL, pick that category (Marketplace mode: its steps).
Afterwards re-list for the canonical `full_name` to confirm it appeared;
registration downloads nothing.
- Remove registration: plan-only, and only with exact identity
plus installation state known — and only when `installed == false`.
Unregistering an installed repository strands its files (the ID vanishes
from `list`, so a later uninstall would need re-registration): when it is
still installed, run the separately confirmed uninstall FIRST, then
unregister. Removing a registration never deletes files.
### Uninstall / removal
EVERY uninstall/removal — standalone or inside a migration — runs
HACS-specific consumer discovery FIRST and shows the result in the preview:
- the integration's OWN footprint through the HA registries: entities whose
registry `platform` equals the integration's domain (this also covers
YAML-configured setups that have NO config entry), config entries of that
domain (`config_entries/get`) with their devices, plus a bounded
`/api/states` scan for the domain's entities missing from the registry.
When none of these sources yields the footprint, the preview says the
footprint is incomplete — never that there is none
- REFERENCING automations/scripts/scenes through `search/related` on those
entities — read the response ONLY through the canonical filter
`../ha-nova/search-related-consumers.jq` (recreate it per
`../ha-nova/relay-api.md` → Parsing rule on flat-copy installs). Fail
closed: only a verified-shape empty result means "no linked consumers
found"; a failed, skipped, or wrong-path scan renders as "I couldn't check what
uses it", NEVER as a no-consumer claim. The canonical filter covers
exactly those three referencer arrays — helpers and other referencer
kinds are disclosed as unscanned
- for frontend packages additionally the Lovelace resource list and storage
dashboard configs for the package's custom element references; manual YAML
dashboards and template consumers are not enumerable — name them as an
unscanned surface, never claim "no consumers"
Then the Delete Card, closed by the plan's `say`. On confirmation
APPLY the uninstall — `hacs/repository/remove` (Marketplace mode:
`marketplace/repository/uninstall`; deletes the downloaded
files) — and read back until `installed == false` in the repository info
(reconcile loop on timeout); only that read-back is success. Dependent
config-entry deletion carries its own typed confirmation. For
non-config-flow integrations the running component stays loaded until the
HA restart — report removed-but-still-loaded and offer the restart as its
own confirmed step. Record pre-change state (versions, repository
identity) in the result so reinstalling the previous version stays
explainable.
### Migration (custom integration replaces another)
A CURRENT completed full Home
Assistant Backup is MANDATORY before the first destructive step — create
one via `ha-nova:backup`, or accept an existing backup only when it is
COMPLETED and CURRENT (a backup predating the present configuration does
not satisfy the gate; config entries sit outside config snapshots — the
Backup is the recovery net).
Check same-domain replacement risk before installing the replacement: a
fork that keeps the original integration domain collides with the
installed one — name which registration/entry survives and in what order.
Never delete a working config entry before the replacement is resolvable;
hand config flows to `ha-nova:integration-setup`; hard stop for UI-only
credentials/OAuth/pairing; entity-ID preservation is verified, never
promised; cleanup of the old package is delayed until verification passes.
### Reconcile loop (timeouts and unknown outcomes)
A Relay timeout or generic error is an UNKNOWN outcome, never a failure:
re-read HACS repository state, HA config entries, and pending flows over a
bounded settle window (up to three reads across ~30 seconds) until the
outcome is proven completed/failed/still-running. A single unchanged
read-back proves nothing — the upstream operation may still land later.
Non-idempotent mutations NEVER auto-retry; only an idempotent mutation
(repeating it is harmless even if the original lands later) may retry, and
only after re-reading identity before every retry. Everything else stops
with the observed state and asks the user.
### Verification
Command success alone is never a result. Verify by category:
- integration: repository `installed`/`installed_version`, manifest/domain
presence, config-entry state — distinguishing INSTALLED (files updated)
from ACTIVE (running component). Every integration upgrade requires a
Home Assistant restart before the new version is live: report "installed,
not yet active", surface the pending-restart status/repair, and offer the
restart as a separate confirmed step via `ha-nova:service-call` — never
restart silently, never claim the new version is live before it.
- frontend/plugin: repository state and installed version; in storage
resource mode also the Lovelace resource registration — in YAML mode the
resource is user-managed: say so instead of failing the check. A
frontend reload note replaces restart talk.
- theme: repository state and version (no integration manifest exists).
- python_script: repository state and version, PLUS the real activation
anchor — after the user-confirmed reload, the `python_script.<name>`
service exists in the service registry; before that reload, report
installed-but-not-active.
- template/appdaemon: repository state and version are the ONLY
Relay-verifiable evidence (no config entry, no Lovelace resource, no
readable files; appdaemon runs outside HA). Run the lifecycle, but NEVER
report these as activation-verified: name the limit and point to the
HACS UI / AppDaemon's own logs for activation proof.
Also verify survival of unrelated objects and absence of duplicates after
adds/migrations. Evidence comes from the HACS/HA APIs ONLY — never file
reads; the Relay file endpoint denies `custom_components` and `www/community` by
design.
## Error Handling
Apply the error asymmetry from `hacs-commands.md`: clean
`repository_not_found` only from `info`/`ignore`; `download` errors with
code `error`; most bad-ID paths return a generic error — treat any generic
error as an unknown outcome (reconcile loop), not as proof of failure, and
re-resolve the ID before anything else. Never surface raw envelopes; report
the operation, the observed state, and the next safe step.
## Output Format
Apply `../ha-nova/output-rules.md`: plain words, HA names verbatim; unless asked or names clash, no ids, "entity", modes, Relay/HA URLs, snapshots, raw JSON. List Frame
for inventories (counts first, Progressive Detail follow-ups), Preview/Delete
/Result Cards for mutations (both in `../ha-nova/output-cards.md`). Keep repository `full_name`,
versions, categories, and HA state values literal; localize everything else
at runtime.
## Safety
- Safety Core: before any write, apply `../ha-nova/safety-core.md`; not yet in this conversation → read it first; unreadable or incomplete → stop and write nothing.
- Drafts follow `../ha-nova/smallest-solution.md`: the complete requested outcome in the simplest safe design, nothing speculative.
- Confirmation tiers: the one-time code for install/update/redownload
(third-party code with user rights), uninstall, registration
removal, and dependent config-entry deletion.
- The migration backup gate is non-negotiable: no destructive migration
step before a COMPLETED and CURRENT full Home Assistant Backup exists.
- Never trigger restarts, reloads, or config flows silently — each is its
own confirmed step in its owning skill.
- No credentials or GitHub secrets in chat or output, ever.