Augment an existing Home Assistant Custom Integration config flow with an additional pattern — multi-step tenant / account selection, zeroconf discovery, reauth flow, reconfigure flow, or OAuth as alternative to API key — non-destructively. Activate on phrasings like "add a multi-step tenant selection to the config flow", "add zeroconf discovery to the existing config flow", "add a reauth flow", "add reconfigure flow", "add OAuth login as alternative to API key", "erweitere den Config-Flow um Tenant-Auswahl". Do not activate for greenfield scaffolding (use ha-integration-scaffold), pure schema edits, or destructive refactors.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-home-assistant:ha-config-flow-augmentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Spec: <https://github.com/nolte/claude-home-assistant/blob/develop/spec/claude/ha-config-flow-augment/de.md> (DE canonical) / [`en.md`](https://github.com/nolte/claude-home-assistant/blob/develop/spec/claude/ha-config-flow-augment/en.md).
Spec: https://github.com/nolte/claude-home-assistant/blob/develop/spec/claude/ha-config-flow-augment/de.md (DE canonical) / en.md.
Use this skill when the user wants to:
ha-integration-scaffoldentry.data across versions → ha-schema-migration (planned)config_flow.py, abort with "pattern already present".config_flow.py, strings.json, translations/<lang>.json, tests/test_config_flow.py, and (for zeroconf) manifest.json. The only exception is oauth, which also writes a registration block in __init__.py.oauth, the skill scaffolds the flow skeleton — token endpoint, authorize endpoint, scopes, client ID/secret stay user-fed. Surface them in the output as an explicit checklist.| Field | Required | Default | Notes |
|---|---|---|---|
target_dir | yes | — | repo root of the existing integration |
pattern | yes | — | one of tenant-step, zeroconf, reauth, reconfigure, oauth |
service_type | only for zeroconf | _<domain>._tcp.local. | mDNS service-type string |
tenant_list_method | only for tenant-step | — | API method on api.py that returns the tenant list (e.g. async_get_tenants) |
oauth_token_endpoint | only for oauth | — | OAuth provider token endpoint URL |
oauth_authorize_endpoint | only for oauth | — | OAuth provider authorize endpoint URL |
oauth_scopes | only for oauth | [] | space-separated scope list |
git -C <target_dir> rev-parse --is-inside-work-tree returns true.git -C <target_dir> status --porcelain is empty.<target_dir>/custom_components/<domain>/config_flow.py exists. Read domain from manifest.json; do not ask the user.tenant-step: async_step_tenant does not exist in the filezeroconf: async_step_zeroconf does not exist in the file and manifest.json:zeroconf is not setreauth: async_step_reauth does not existreconfigure: async_step_reconfigure does not existoauth: AbstractOAuth2FlowHandler is not in the imports / base classesRead domain from manifest.json. Resolve the pattern, and pattern-specific inputs. Print a one-paragraph summary of what will change. Wait for user confirmation.
Append the relevant code, strings, manifest changes, and tests for the chosen pattern. Each pattern is documented in the spec — keep operations idempotent and additive.
| Pattern | Files touched |
|---|---|
tenant-step | config_flow.py, const.py (new CONF_TENANT_SLUG), strings.json, translations/*.json, tests/test_config_flow.py |
zeroconf | config_flow.py, manifest.json, tests/test_config_flow.py, tests/conftest.py (or tests/helpers.py) for _make_zeroconf_info helper |
reauth | config_flow.py, strings.json, translations/*.json, tests/test_config_flow.py |
reconfigure | config_flow.py, strings.json, translations/*.json, tests/test_config_flow.py |
oauth | config_flow.py, __init__.py (provider registration), strings.json, translations/*.json, tests/test_config_flow.py |
ruff check custom_components/<domain>/
pytest tests/test_config_flow.py -v
Both must run cleanly. If they fail, surface the failing tool output and abort. Do not commit on the user's behalf — they own the commit.
Output to the user:
oauth)reauth → Bronze → Silverreconfigure → Silver → Goldzeroconf (for iot_class: local_*) → Bronze → Silvertenant-step and oauth → no tier transition (refinements within the same tier)ha-integration-scaffoldha-coordinator-add (planned)ha-test-harness-augment (planned)entry.data across versions → ha-schema-migration (planned)npx claudepluginhub nolte/claude-home-assistant --plugin claude-home-assistantGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.