一键导入
document-integration-docs
Document Home Assistant integrations in the current split-page format.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Document Home Assistant integrations in the current split-page format.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use this when writing or editing Home Assistant documentation, website pages, integration pages, blog prose, UI instructions, or other user-facing prose.
Use this when editing Home Assistant Markdown, Liquid, internal links, images, videos, glossary terms, My links, text boxes, or other website syntax.
Use this when editing Home Assistant YAML examples, automation examples, script examples, service action calls, templates, or configuration snippets.
Use this if the user wants to convert a blog post from Google Docs markdown to the format used in the Home Assistant website.
Use this if the user wants to update the agent instructions for the Home Assistant website.
| name | document-integration-docs |
| description | Document Home Assistant integrations in the current split-page format. |
Usage: /document-integration-docs <domain> [epic-or-issue]
Document the <domain> integration in the current Home Assistant split-page documentation format. Use an existing ./source/_integrations/<domain>.markdown page when present. If it does not exist, create it from the current integration documentation template.
Keep the main context small.
Use sub-agents for discovery and review.
Do not trust the epic, issue text, or existing docs unless Core confirms them.
Treat https://raw.githubusercontent.com/home-assistant/developers.home-assistant/master/docs/documenting/integration-docs-examples.md as the canonical template for split pages.
Treat https://raw.githubusercontent.com/home-assistant/developers.home-assistant/master/docs/documenting/yaml-style-guide.md as the YAML style source for all YAML examples.
Do not loosely imitate it.
Follow its structure closely unless Core implementation makes a specific section inapplicable.
Launch a sub-agent to inspect what exists:
./source/_integrations/<domain>.markdown, if present../core/homeassistant/components/<domain>/conditions.yaml../core/homeassistant/components/<domain>/services.yaml../core/homeassistant/components/<domain>/triggers.yaml../core/homeassistant/components/<domain>/strings.json../frontend/src/translations/en.json<domain> in:
./source/_triggers./source/_conditions./source/_actionsThe sub-agent must return only this compact inventory:
Domain: <domain>
Triggers to document:
- key: <domain>.<trigger_key>
title: <title>
description: <description>
target domains: [...]
options: [...]
Conditions to document:
- key: <domain>.<condition_key>
title: <title>
description: <description>
target domains: [...]
options: [...]
Actions to document:
- key: <domain>.<action_key>
title: <title>
description: <description>
target domains: [...]
fields: [...]
Categories not implemented:
- ...
Existing split pages:
- ...
Existing integration page:
- present: <yes/no>
- useful existing content: <short summary or none>
UI wording:
- trigger behavior labels: ...
- condition behavior labels: ...
- action-specific labels: ...
- automation example action labels to mirror: ...
Important implementation notes:
- ...
Mismatches between epic/issue text and Core:
- ...
Rules for Stage 1:
Launch a sub-agent to inspect:
./source/_integrations/_integration_docs_template.markdownhttps://raw.githubusercontent.com/home-assistant/developers.home-assistant/master/docs/documenting/integration-docs-examples.mdhttps://raw.githubusercontent.com/home-assistant/developers.home-assistant/master/docs/documenting/general-style-guide.mdhttps://raw.githubusercontent.com/home-assistant/developers.home-assistant/master/docs/documenting/yaml-style-guide.md./source/_includesThe sub-agent must return only this:
Integration page requirements:
- ...
- automation examples section requirement: ...
Trigger page requirements:
- required includes in order: ...
- required heading flow: ...
- required UI wording: ...
- Good to know guidance: ...
Condition page requirements:
- required includes in order: ...
- required heading flow: ...
- required UI wording: ...
- Good to know guidance: ...
Action page requirements:
- required includes in order: ...
- required heading flow: ...
- required UI wording: ...
- Good to know guidance: ...
Common pitfalls to avoid:
- ...
Focus on include order, heading expectations, UI wording, Good to know placement, and the integration-level automation examples section. Keep it compact.
The sub-agent must explicitly call out mandatory split-page sections and include order from the developer examples template, including sections that are often missing in older docs.
Using only the distilled outputs from Stage 1 and Stage 2:
./source/_integrations/<domain>.markdown.Hard requirements:
{% include integrations/triggers_conditions_actions.md %}.triggers_conditions_actions.md.{% include integrations/triggers.md %}{% include integrations/conditions.md %}{% include integrations/actions.md %}## <Integration name> automation examples section that follows the current integration template.Automation:.for attribute in options or fields, document its type as string, not time.{% term helper %} where appropriate.UI wording requirements:
Select what you want to monitor. Under **By target** ...Select what you want to check. Under **By target** ...Select what you want to control. Under **By target** ...Domain: prefix.Light: Turn on light, write Turn on light.Lock: Lock lock, write only the non-prefixed label.Split-page naming rules:
source/_triggers/<domain>.<trigger_key>.markdownsource/_conditions/<domain>.<condition_key>.markdownsource/_actions/<domain>.<action_key>.markdownUse exact Core keys.
Each trigger, condition, and action page must have:
Example rules:
Examples must match what the page claims.
Prefer standard Home Assistant concepts like time, sun, person/zone, notifications, locks, lights, alarm control panels, scripts, and automations.
Do not invent unsupported modes, flows, or features.
Do not imply a helper exists unless you explicitly say it is user-created.
In automation examples, do not list default values such as default for or behavior values.
In automation examples, use the correct full action labels, such as Lock lock or Turn on switch, not shortened labels like Lock or Turn on.
For examples that use the mobile notification action, use this pattern to refer to the mobile device:
In UI:
- **Action**: Send a notification message
- **Target**: My Device (`notify.my_device`)
In YAML:
actions:
- action: notify.send_message
target:
entity_id: notify.my_device
data:
message: >
...
If there are other **Target** items in UI lists, they should be nested with two spaces under the trigger/action/condition above them.
Launch a sub-agent to review the updated files against Core, templates, includes, and developer examples.
It must return only:
Problems found:
- [severity] <file>: <issue>
Passed checks:
- <check>
Required review checks:
{% include integrations/triggers_conditions_actions.md %} only when triggers, conditions, and actions all exist## <Integration name> automation examples section when required by the current templateAutomation:Domain: LabelSelect what you want to monitor. Under **By target** ...Select what you want to check. Under **By target** ...Select what you want to control. Under **By target** ...Domain: Label for action namesunavailable / unknown notes are in Good to knowfor is documented as type: string and the format is explained in the descriptionfor or behaviorLock lock or Turn on switchIf the review sub-agent reports problems:
Return:
Summary:
- ...
Files updated:
- ...
Files created:
- ...
Categories intentionally not documented:
- <category>: <reason>
Mismatches found between epic/issue text and Core:
- ...
Assumptions:
- ...