AGENT SKILL

ha-marketplace

Publish this Home Assistant custom integration through the Marketplace and HACS, and keep it listed — repository preconditions, hacs.json, brand images, the CI gates the catalog requires, the hacs/default pull request, the My links in the README, how a release reaches users, and renaming, archiving or removing a listed repository. Use when asked to "publish the integration", "get it into HACS", "submit to the Marketplace", "add it to the default repositories", "why doesn't the update show up", "keep files across updates", "rename or archive the repository", or when editing hacs.json or the brand/ folder. SYMPTOMS — load this if you are about to: open the hacs/default pull request yourself; add an `ignore` to the HACS action to make it pass; delete a repository that is in the catalog; delete an old release; write user data into the integration folder; set `zip_release`; ship Home Assistant's own logo as the brand icon; or raise `homeassistant` in hacs.json without treating it as a breaking change.

License 许可
MIT
所属仓库
amg0/ha_ksenia
最近更新
2026-11-15
Stars
★ 0
Forks
0

01 前言 Front Matter

name
ha-marketplace
description
Publish this Home Assistant custom integration through the Marketplace and HACS, and keep it listed — repository preconditions, hacs.json, brand images, the CI gates the catalog requires, the hacs/default pull request, the My links in the README, how a release reaches users, and renaming, archiving or removing a listed repository. Use when asked to "publish the integration", "get it into HACS", "submit to the Marketplace", "add it to the default repositories", "why doesn't the update show up", "keep files across updates", "rename or archive the repository", or when editing hacs.json or the brand/ folder. SYMPTOMS — load this if you are about to: open the hacs/default pull request yourself; add an `ignore` to the HACS action to make it pass; delete a repository that is in the catalog; delete an old release; write user data into the integration folder; set `zip_release`; ship Home Assistant's own logo as the brand icon; or raise `homeassistant` in hacs.json without treating it as a breaking change.

02 资源文件 3

03 SKILL.md 正文

Publish through the Marketplace

The Marketplace is the marketplace integration in Home Assistant Core from 2026.11 (Settings → Marketplace). It is HACS brought into Core: same catalog (hacs/default), same hacs.json, same HACS action. On first start it takes over a HACS installation and Home Assistant 2026.11 blocks the HACS custom integration. Users below 2026.11 still install through HACS, so everything here must satisfy both: anything this repository supports down to the minimum in hacs.json reaches some users through HACS.

Sources, checked against these pages — re-read them before relying on a detail that matters: how it works, custom integrations, releases, catalog, hacs.json, validation, brands.

Reference files

File When to read
references/checks.md Every hacs.json key, the catalog review checks, and what the Marketplace refuses
references/catalog-pr.md Drafting the hacs/default pull request, or the removal request
references/lifecycle.md README My links, how a release reaches users, renaming, archiving or removing

1. Repository preconditions

All of these are GitHub settings, not files — check them with gh repo view <owner>/<repo> --json visibility,description,repositoryTopics,hasIssuesEnabled:

  • Public. The Marketplace and HACS only read public repositories. validate.yml skips HACS validation on a private repository with a notice, so a green CI on a private repository proves nothing about the catalog.
  • A description, topics, and issues turned on — each is a catalog review check.
  • README.md — the Marketplace shows it on the repository page. initialize.sh produced it from README.template.md; it must describe the real integration, not the blueprint's demo (ha-quality-review §8).
  • At least one published GitHub release — a bare tag is not enough. ha-release owns how releases are made.

The manifest side is in blueprint.manifest: the catalog requires domain, documentation, issue_tracker, codeowners, name and version, and the HACS action fails an unknown categories value.

Pick a domain that is free. A domain equal to a Core integration replaces it — the catalog rejects that, and the Marketplace makes the user confirm. A domain another installed repository already uses is refused outright. Check both before the domain is public, because changing it later is a breaking change:

ls .venv/lib/python*/site-packages/homeassistant/components/<domain>   # must not exist
curl -s https://data-v2.hacs.xyz/integration/data.json | jq -r '.[] | select(.domain == "<domain>") | .full_name'

2. hacs.json — when to touch it

The Marketplace reads hacs.json from the root for every version it installs, so a key applies per release. initialize.sh writes name, homeassistant and hacs; most integrations never need more. Full key table: references/checks.md.

  • homeassistant — the minimum version for this release. The Marketplace does not offer the release to an older Home Assistant and shows those users earlier versions instead. Raise it in the release whose code first needs the newer version, never ahead of it. Raising it drops users, so it goes through ha-breaking-changes; script/ha-version-sync then makes the pytest plugin pin follow (ha-modern-apis). A b0 suffix ("2026.11.0b0") also admits that release's betas. Only checked for repositories with releases.
  • persistent_directory — an update replaces the whole integration folder; this names one subfolder the Marketplace moves aside and restores. ❌ Do not design for it: user data and runtime state belong in homeassistant.helpers.storage.Store (under config/.storage/), which survives updates and is covered by backups. Reach for it only for files a library insists on finding inside the integration folder.
  • zip_release / filename — ❌ not with this repository's release flow. Release-please publishes the source tree and attaches no ZIP asset, so installs would look for an asset that does not exist.
  • hacs — the minimum HACS version. The Marketplace reads it but never compares it; HACS still does, so keep it.
  • content_in_root, hide_default_branch — not for this layout; leave them out.
  • country — only when the integration works in some countries only; the catalog asks for it then.

A key with a value of the wrong type is dropped with a logged warning, not an error — validate against schemas/json/hacs_schema.json (blueprint.json).

3. Brand images

custom_components/<domain>/brand/ holds icon.png (256 × 256), icon@2x.png (512 × 512) and optionally logo.png / logo@2x.png (shortest side 128–256 / 256–512 px) and dark_ variants. PNG, trimmed, transparent background preferred. File names and rules: brand images for custom integrations.

  • The catalog requires at least icon.png. Replacing the blueprint's placeholder is a blueprint-scaffold §7 step; ask the developer for the artwork, never invent it.
  • ❌ No Home Assistant branded images — users would take the integration for an official one.
  • The brands site picks images up from the latest release, so a new icon on main is invisible in the Marketplace until the next release.
  • ❌ No pull request to home-assistant/brands — that is for Core integrations, and a local brand/ folder takes precedence anyway.

4. CI gates

.github/workflows/validate.yml runs both gates the catalog requires: hassfest and the HACS action with category: integration. The catalog review rejects a run that used ignore, and the pull request template asks for a link to a passing run without it.

  • validate.yml sets ignore: brands automatically while brand/icon.png is missing. Before submitting, the icon must exist so that the step's warning is gone and the run is clean.
  • ❌ Never add an ignore to get the action green. Fix the repository setting or file it names.
  • The workflow runs on pull requests, weekly and on demand — not on every push to main. For the link, start it on main with gh workflow run validate.yml --ref main and take the URL of the finished run.

5. Get into the catalog

Users can add the repository from a link at any time (a "custom repository"). The catalog makes it searchable for everyone. The submission is a pull request to hacs/default, and the developer submits it, not the agent: it must come from the owner or a major contributor, from a personal account, and every statement in it must be true.

What the agent does: confirm §1–§4 with evidence, then draft the pull request text into .agents/scratch/ with references/catalog-pr.md, and hand the steps over. Order matters: the validation runs pass first, then a release is published, then the pull request is opened.

Set expectations plainly: reviews take months; the backlog is public. Not accepted at all: integrations that replace a Core integration, and builds for testing an alpha or beta of a Core integration. Never request reviews on the pull request — it gets closed.

Do not

  • ❌ Never delete a repository that is in the catalog without the removal request first. Deleting a listed repository bars the owner from adding any repository to the catalog in the future. Archive it, or file the request and wait for it to be handled.
  • ❌ Do not open the hacs/default pull request or the removal issue yourself; draft them for the developer.
  • ❌ Do not add ignore to the HACS action, delete old releases, or set zip_release.
  • ❌ Do not store user data inside custom_components/<domain>/.
  • ❌ Do not claim the integration is "in HACS" or "in the Marketplace" before the catalog pull request is merged — until then it installs only as a custom repository.

04 同仓库更多 Skills

amg0
amg0/ha_ksenia

issues

Triage/fix the GitHub issue backlog via branch + PR, with auto-merge on green CI for this session.

★ 0
amg0
amg0/ha_ksenia

ha-translations

Add or fix user-facing strings for this Home Assistant custom integration — translations/en.json and other languages, icons.json, entity names and states, config flow labels and errors, service action descriptions, exception messages, and repair issue text. Use when asked to "update translations", "add a translation key", "translate", "fix the entity name", "add strings for the new sensor/action/option", "add icons", or when hassfest reports a missing or unused translation key. Covers the key structure, which keys each feature needs, placeholders, the icons.json contract, and the project's strict rule about only touching en.json. SYMPTOMS — load this if you are about to: write user-facing English into Python; edit a language file other than `en.json`; add an entity without its `entity.<platform>.<key>.name` key; skip `data_description` on a config flow field; or set `icon=` instead of using `icons.json`.

★ 0
amg0
amg0/ha_ksenia

ha-testing

Write, fix, or extend automated tests for this Home Assistant custom integration using pytest and pytest-homeassistant-custom-component. Use when asked to "add tests", "write a test", "the tests fail", "improve coverage", "add a regression test", "test the config flow", "update snapshots", or when a behavioural change needs verification before it can be called done. Covers the tests/ layout, the conftest.py fixtures this project needs, mocking the API client, config flow and entity test patterns, registry assertions, syrupy snapshots, freezing time, and the script/test commands. SYMPTOMS — load this if you are about to: instantiate an entity class directly instead of asserting on `hass.states`; write a test without `enable_custom_integrations`; use `time.sleep` instead of `async_fire_time_changed`; silence a DeprecationWarning to make the suite pass; or commit a snapshot you have not read.

★ 0
amg0
amg0/ha_ksenia

ha-service-action

Add, change, or remove a Home Assistant service action (also called a "service" or "action") in this custom integration. Use when asked to "add a service", "add an action", "expose X as a service call", "add a service that returns data", "make this callable from an automation", or when editing services.yaml, the service_actions/ package, service schemas, service response data, or the async_setup() registration. Covers the services.yaml contract, probatio schemas, selectors, entity/device targeting, response data, translated error messages, and the Bronze quality-scale rule that actions must be registered in async_setup(). SYMPTOMS — load this if you are about to: register an action in `async_setup_entry()`; add a `services.yaml` field without a selector; add an `entity_id` field where `target:` belongs; raise a plain English `HomeAssistantError`; or swallow an action failure into a log line.

★ 0
amg0
amg0/ha_ksenia

ha-release

Cut a release of this Home Assistant custom integration, or prepare the commits that feed it. Use when asked to "release", "cut a version", "bump the version", "prepare release notes", "what will the next version be", "write a commit message", "why didn't release-please pick this up", or when reviewing whether a change is user-facing. Covers the Conventional Commits rules commitlint enforces here, how release-please derives the version and changelog, the pre-1.0 bump rules, script/version and script/release-notes, skipping a commit from the notes, and the commit rules this project enforces for agents. SYMPTOMS — load this if you are about to: commit without an explicit request; offer to `git push`; label a user-facing fix as `chore` (chore, like every hidden type, never reaches the changelog and never triggers a release); write a commit subject over 100 characters or in sentence case; or edit the version in `manifest.json` by hand.

★ 0
amg0
amg0/ha_ksenia

ha-quality-review

Perform a structured quality review of this Home Assistant custom integration, either as a full audit or scoped to a diff. Use when asked to "review the integration", "audit the code", "check quality scale", "are we bronze/silver/gold", "is this ready to release", "review my changes", "what's missing before publishing", or before opening a pull request that touches integration code. Covers running the automated gates first, then auditing architecture, the Integration Quality Scale rules, error handling, security, performance, user experience, and documentation — and reporting findings ranked by severity with concrete fixes. SYMPTOMS — load this if you are about to: report a review that only restates linter output; claim real-device testing that did not happen; give a finding without a file path and a fix; or judge quality without running `script/hassfest` and the test suite first.

★ 0