ha-mcp-dev 6.7.2.dev240__tar.gz → 6.7.2.dev241__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. {ha_mcp_dev-6.7.2.dev240/src/ha_mcp_dev.egg-info → ha_mcp_dev-6.7.2.dev241}/PKG-INFO +12 -1
  2. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/README.md +11 -0
  3. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/pyproject.toml +2 -2
  4. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/config.py +9 -0
  5. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/.claude/settings.json +11 -0
  6. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/.claude-plugin/marketplace.json +18 -0
  7. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/.claude-plugin/plugin.json +7 -0
  8. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/.github/ISSUE_TEMPLATE/skill-rca.md +89 -0
  9. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/AGENTS.md +47 -0
  10. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/CLAUDE.md +47 -0
  11. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/CONTRIBUTING.md +49 -0
  12. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/LICENSE +21 -0
  13. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/README.md +65 -0
  14. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/SKILL.md +103 -0
  15. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/automation-patterns.md +601 -0
  16. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/device-control.md +417 -0
  17. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/examples.yaml +221 -0
  18. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/helper-selection.md +696 -0
  19. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/safe-refactoring.md +97 -0
  20. ha_mcp_dev-6.7.2.dev241/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/template-guidelines.md +572 -0
  21. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/server.py +186 -1
  22. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241/src/ha_mcp_dev.egg-info}/PKG-INFO +12 -1
  23. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp_dev.egg-info/SOURCES.txt +16 -0
  24. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/LICENSE +0 -0
  25. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/MANIFEST.in +0 -0
  26. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/setup.cfg +0 -0
  27. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/__init__.py +0 -0
  28. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/__main__.py +0 -0
  29. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/_pypi_marker +0 -0
  30. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/auth/__init__.py +0 -0
  31. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/auth/consent_form.py +0 -0
  32. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/auth/provider.py +0 -0
  33. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/client/__init__.py +0 -0
  34. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/client/rest_client.py +0 -0
  35. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/client/websocket_client.py +0 -0
  36. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/client/websocket_listener.py +0 -0
  37. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/errors.py +0 -0
  38. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/py.typed +0 -0
  39. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/resources/card_types.json +0 -0
  40. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/resources/dashboard_guide.md +0 -0
  41. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/smoke_test.py +0 -0
  42. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/__init__.py +0 -0
  43. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/backup.py +0 -0
  44. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/device_control.py +0 -0
  45. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/enhanced.py +0 -0
  46. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/helpers.py +0 -0
  47. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/registry.py +0 -0
  48. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/smart_search.py +0 -0
  49. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_addons.py +0 -0
  50. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_areas.py +0 -0
  51. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_blueprints.py +0 -0
  52. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_bug_report.py +0 -0
  53. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_calendar.py +0 -0
  54. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_camera.py +0 -0
  55. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_config_automations.py +0 -0
  56. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_config_dashboards.py +0 -0
  57. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_config_entry_flow.py +0 -0
  58. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_config_helpers.py +0 -0
  59. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_config_info.py +0 -0
  60. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_config_scripts.py +0 -0
  61. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_entities.py +0 -0
  62. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_filesystem.py +0 -0
  63. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_groups.py +0 -0
  64. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_hacs.py +0 -0
  65. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_history.py +0 -0
  66. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_integrations.py +0 -0
  67. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_labels.py +0 -0
  68. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_mcp_component.py +0 -0
  69. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_registry.py +0 -0
  70. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_resources.py +0 -0
  71. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_search.py +0 -0
  72. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_service.py +0 -0
  73. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_services.py +0 -0
  74. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_system.py +0 -0
  75. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_todo.py +0 -0
  76. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_traces.py +0 -0
  77. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_updates.py +0 -0
  78. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_utility.py +0 -0
  79. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_voice_assistant.py +0 -0
  80. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/tools_zones.py +0 -0
  81. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/tools/util_helpers.py +0 -0
  82. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/utils/__init__.py +0 -0
  83. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/utils/domain_handlers.py +0 -0
  84. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/utils/fuzzy_search.py +0 -0
  85. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/utils/operation_manager.py +0 -0
  86. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/utils/python_sandbox.py +0 -0
  87. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp/utils/usage_logger.py +0 -0
  88. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp_dev.egg-info/dependency_links.txt +0 -0
  89. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp_dev.egg-info/entry_points.txt +0 -0
  90. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp_dev.egg-info/requires.txt +0 -0
  91. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/src/ha_mcp_dev.egg-info/top_level.txt +0 -0
  92. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/tests/__init__.py +0 -0
  93. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/tests/test_constants.py +0 -0
  94. {ha_mcp_dev-6.7.2.dev240 → ha_mcp_dev-6.7.2.dev241}/tests/test_env_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ha-mcp-dev
3
- Version: 6.7.2.dev240
3
+ Version: 6.7.2.dev241
4
4
  Summary: Home Assistant MCP Server - Complete control of Home Assistant through MCP
5
5
  Author-email: Julien <github@qc-h.net>
6
6
  License: MIT
@@ -194,6 +194,17 @@ This server gives your AI agent tools to control Home Assistant. For better conf
194
194
 
195
195
  An MCP server can create automations, helpers, and dashboards, but it has no opinion on *how* to structure them. Without domain knowledge, agents tend to over-rely on templates, pick the wrong helper type, or produce automations that are hard to maintain. The skills fill that gap: native constructs over Jinja2 workarounds, correct helper selection, safe refactoring workflows, and proper use of automation modes.
196
196
 
197
+ ### Bundled Skills (built-in)
198
+
199
+ Skills from `homeassistant-ai/skills` are bundled and served as [MCP resources](https://modelcontextprotocol.io/docs/concepts/resources) via `skill://` URIs. Any MCP client that supports resources can discover them automatically — no manual installation needed.
200
+
201
+ | Setting | Default | Description |
202
+ |---------|---------|-------------|
203
+ | `ENABLE_SKILLS` | `true` | Serve skills as MCP resources. Resources are not auto-injected into context — clients must explicitly request them. |
204
+ | `ENABLE_SKILLS_AS_TOOLS` | `false` | Also expose skills via `list_resources`/`read_resource` tools for clients that don't support MCP resources natively. |
205
+
206
+ Skills can still be installed manually for clients that prefer local skill files — see the [skills repo](https://github.com/homeassistant-ai/skills) for instructions.
207
+
197
208
  ---
198
209
 
199
210
  ## 🧪 Dev Channel
@@ -164,6 +164,17 @@ This server gives your AI agent tools to control Home Assistant. For better conf
164
164
 
165
165
  An MCP server can create automations, helpers, and dashboards, but it has no opinion on *how* to structure them. Without domain knowledge, agents tend to over-rely on templates, pick the wrong helper type, or produce automations that are hard to maintain. The skills fill that gap: native constructs over Jinja2 workarounds, correct helper selection, safe refactoring workflows, and proper use of automation modes.
166
166
 
167
+ ### Bundled Skills (built-in)
168
+
169
+ Skills from `homeassistant-ai/skills` are bundled and served as [MCP resources](https://modelcontextprotocol.io/docs/concepts/resources) via `skill://` URIs. Any MCP client that supports resources can discover them automatically — no manual installation needed.
170
+
171
+ | Setting | Default | Description |
172
+ |---------|---------|-------------|
173
+ | `ENABLE_SKILLS` | `true` | Serve skills as MCP resources. Resources are not auto-injected into context — clients must explicitly request them. |
174
+ | `ENABLE_SKILLS_AS_TOOLS` | `false` | Also expose skills via `list_resources`/`read_resource` tools for clients that don't support MCP resources natively. |
175
+
176
+ Skills can still be installed manually for clients that prefer local skill files — see the [skills repo](https://github.com/homeassistant-ai/skills) for instructions.
177
+
167
178
  ---
168
179
 
169
180
  ## 🧪 Dev Channel
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ha-mcp-dev"
7
- version = "6.7.2.dev240"
7
+ version = "6.7.2.dev241"
8
8
  description = "Home Assistant MCP Server - Complete control of Home Assistant through MCP"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.13,<3.14"
@@ -53,7 +53,7 @@ package-dir = {"" = "src", "tests" = "tests"}
53
53
  packages = { find = { where = ["src", "."], include = ["ha_mcp*", "tests"] } }
54
54
 
55
55
  [tool.setuptools.package-data]
56
- ha_mcp = ["py.typed", "_pypi_marker", "resources/*.md", "resources/*.json"]
56
+ ha_mcp = ["py.typed", "_pypi_marker", "resources/*.md", "resources/*.json", "resources/skills-vendor/**/*"]
57
57
 
58
58
  [tool.mypy]
59
59
  python_version = "3.11"
@@ -79,6 +79,15 @@ class Settings(BaseSettings):
79
79
  # Disable when using clients with programmatic tool use (future).
80
80
  enable_dashboard_partial_tools: bool = Field(True, alias="ENABLE_DASHBOARD_PARTIAL_TOOLS")
81
81
 
82
+ # Skills configuration
83
+ # Serve bundled HA best-practice skills as MCP resources (skill:// URIs).
84
+ # Resources are not auto-injected — clients must explicitly request them.
85
+ enable_skills: bool = Field(True, alias="ENABLE_SKILLS")
86
+
87
+ # Expose skills as tools (list_resources/read_resource) for clients
88
+ # that don't support MCP resources natively.
89
+ enable_skills_as_tools: bool = Field(False, alias="ENABLE_SKILLS_AS_TOOLS")
90
+
82
91
  @property
83
92
  def env_file_name(self) -> str:
84
93
  """Get the current environment file name."""
@@ -0,0 +1,11 @@
1
+ {
2
+ "enabledPlugins": {},
3
+ "extraKnownMarketplaces": {
4
+ "anthropic-agent-skills": {
5
+ "source": {
6
+ "source": "github",
7
+ "repo": "anthropics/anthropic-agent-skills"
8
+ }
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "home-assistant-skills",
3
+ "owner": {
4
+ "name": "homeassistant-ai",
5
+ "email": ""
6
+ },
7
+ "metadata": {
8
+ "description": "Agent skills for Home Assistant: best practices for automations, helpers, templates, and device control",
9
+ "version": "0.1.0"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "home-assistant-skills",
14
+ "description": "Best practices for Home Assistant automations, helpers, scripts, and device controls",
15
+ "source": "./"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "home-assistant-skills",
3
+ "description": "Agent skills for Home Assistant: best practices for automations, helpers, templates, and device control.",
4
+ "version": "0.1.0",
5
+ "repository": "https://github.com/homeassistant-ai/skills",
6
+ "license": "MIT"
7
+ }
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: Report Bad Skill Advice
3
+ about: A skill misled your agent. Have your agent fill out this report so we can fix the skill.
4
+ title: "[RCA] "
5
+ labels: rca
6
+ ---
7
+
8
+ <!--
9
+ INSTRUCTIONS FOR THE AGENT
10
+
11
+ A skill in this repository misled you, and your user saw the result.
12
+
13
+ BEFORE FILING: Search existing issues for the same skill and failure.
14
+ If a matching issue exists, react with thumbs-up or comment with
15
+ additional context. Open a new issue only when the failure is unreported.
16
+
17
+ Fill out each section below. Quote the skill content that misled you,
18
+ list affected entities and configs, and mark the first failure point.
19
+
20
+ Write "N/A" for any section that is irrelevant.
21
+ -->
22
+
23
+ ## 1. Context
24
+
25
+ - **Skill name:** <!-- e.g. home-assistant-best-practices -->
26
+ - **Skill version:** <!-- from the metadata.version field in SKILL.md frontmatter -->
27
+ - **What the user originally asked you to do:**
28
+
29
+ ## 2. Timeline
30
+
31
+ List each action you took. For each, record what you did, what resulted, and its status (e.g., Success, Failure).
32
+
33
+ Mark the first failing step with **[GAP]** in the `Status` column.
34
+
35
+ | Step | Action | Result | Status |
36
+ |------|--------|--------|-----|
37
+ | 1 | | | |
38
+ | 2 | | | |
39
+ | 3 | | | |
40
+
41
+ <!-- Add or remove rows as needed. -->
42
+
43
+ ## 3. Root Cause
44
+
45
+ ### 3a. What skill instruction did you follow?
46
+
47
+ <!--
48
+ Quote the SKILL.md passage or reference file section that guided
49
+ your actions. Include the file name and section heading.
50
+ If the skill offered no guidance for this scenario, write:
51
+ "No guidance found in the skill for this scenario."
52
+ -->
53
+
54
+ ### 3b. What did that instruction cause you to do (or not do)?
55
+
56
+ <!--
57
+ Describe the action or omission that caused the failure,
58
+ and tie it to the skill content you quoted in 3a.
59
+ -->
60
+
61
+ ### 3c. What should the skill have told you instead?
62
+
63
+ <!--
64
+ Describe the guidance the skill should have included
65
+ to prevent this failure.
66
+ -->
67
+
68
+ ## 4. Impact
69
+
70
+ ### 4a. Observable failure
71
+
72
+ <!--
73
+ What failure did the user observe?
74
+ Error messages, broken UI, unexpected behavior, etc.
75
+ -->
76
+
77
+ ### 4b. Blast radius
78
+
79
+ <!--
80
+ List every affected component: dashboards, automations,
81
+ configurations, entities, integrations, etc.
82
+ If the failure affected only the immediate task, say so.
83
+ -->
84
+
85
+ ## 5. Environment
86
+
87
+ - **Home Assistant version:** <!-- e.g. 2025.1.3 -->
88
+ - **Agent platform and model:** <!-- e.g. Claude Code with Opus 4.5, ChatGPT with GPT-4o -->
89
+ - **Integration / device type involved:** <!-- e.g. ZHA, Z2M, IKEA FYRTUR, or N/A -->
@@ -0,0 +1,47 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ This is a community-contributed collection of **Agent Skills** for Home Assistant, following the open [Agent Skills standard](https://agentskills.io/specification). Skills teach AI agents domain expertise for configuring and controlling Home Assistant. The repository doubles as a Claude Code plugin (see `.claude-plugin/plugin.json`).
8
+
9
+ ## Repository Structure
10
+
11
+ - `skills/<skill-name>/SKILL.md` — each skill lives in its own folder with a `SKILL.md` file
12
+ - `CONTRIBUTING.md` — skill authoring guidelines and submission workflow
13
+ - `.claude-plugin/plugin.json` — Claude Code plugin metadata
14
+
15
+ ## Skill Format
16
+
17
+ Every skill is a `SKILL.md` file with YAML frontmatter:
18
+
19
+ ```yaml
20
+ ---
21
+ name: skill-name-here
22
+ description: >
23
+ When to activate this skill and what symptoms it addresses.
24
+ ---
25
+ ```
26
+
27
+ Constraints from CONTRIBUTING.md:
28
+ - Max **500 lines** per SKILL.md
29
+ - Reference files must be **one level deep** only (e.g. `references/example.yaml`)
30
+ - Use **forward slashes** in all file paths
31
+ - Optional subdirectories: `references/` (additional docs), `scripts/` (utility scripts), `assets/` (static resources)
32
+
33
+ ## Skill Authoring Principles
34
+
35
+ - **Context window conservation** — only include domain-specific knowledge that agents lack; omit general programming advice
36
+ - **Conciseness** — provide patterns and quick-reference tables, not tutorials
37
+ - **Consistent terminology** — one term per concept throughout a skill
38
+ - **Symptom-based triggering** — the `description` frontmatter should describe observable agent behaviors that signal the skill is needed
39
+
40
+ ## Validation
41
+
42
+ CI runs `skills-ref validate` on every PR and push to `main` that touches `skills/**`. To validate locally:
43
+
44
+ ```bash
45
+ pip install skills-ref
46
+ python -m skills_ref.cli validate skills/<skill-name>
47
+ ```
@@ -0,0 +1,47 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ This is a community-contributed collection of **Agent Skills** for Home Assistant, following the open [Agent Skills standard](https://agentskills.io/specification). Skills teach AI agents domain expertise for configuring and controlling Home Assistant. The repository doubles as a Claude Code plugin (see `.claude-plugin/plugin.json`).
8
+
9
+ ## Repository Structure
10
+
11
+ - `skills/<skill-name>/SKILL.md` — each skill lives in its own folder with a `SKILL.md` file
12
+ - `CONTRIBUTING.md` — skill authoring guidelines and submission workflow
13
+ - `.claude-plugin/plugin.json` — Claude Code plugin metadata
14
+
15
+ ## Skill Format
16
+
17
+ Every skill is a `SKILL.md` file with YAML frontmatter:
18
+
19
+ ```yaml
20
+ ---
21
+ name: skill-name-here
22
+ description: >
23
+ When to activate this skill and what symptoms it addresses.
24
+ ---
25
+ ```
26
+
27
+ Constraints from CONTRIBUTING.md:
28
+ - Max **500 lines** per SKILL.md
29
+ - Reference files must be **one level deep** only (e.g. `references/example.yaml`)
30
+ - Use **forward slashes** in all file paths
31
+ - Optional subdirectories: `references/` (additional docs), `scripts/` (utility scripts), `assets/` (static resources)
32
+
33
+ ## Skill Authoring Principles
34
+
35
+ - **Context window conservation** — only include domain-specific knowledge that agents lack; omit general programming advice
36
+ - **Conciseness** — provide patterns and quick-reference tables, not tutorials
37
+ - **Consistent terminology** — one term per concept throughout a skill
38
+ - **Symptom-based triggering** — the `description` frontmatter should describe observable agent behaviors that signal the skill is needed
39
+
40
+ ## Validation
41
+
42
+ CI runs `skills-ref validate` on every PR and push to `main` that touches `skills/**`. To validate locally:
43
+
44
+ ```bash
45
+ pip install skills-ref
46
+ python -m skills_ref.cli validate skills/<skill-name>
47
+ ```
@@ -0,0 +1,49 @@
1
+ # Contributing
2
+
3
+ Skills for this repository follow the [Agent Skills open standard](https://agentskills.io). See the [specification](https://agentskills.io/specification) for the full format reference.
4
+
5
+ ## Skill Format
6
+
7
+ Structure each skill as a folder under `skills/` with a `SKILL.md` file:
8
+
9
+ ```
10
+ skills/
11
+ your-skill-name/
12
+ SKILL.md # Required
13
+ references/ # Optional: additional docs loaded on demand
14
+ scripts/ # Optional: utility scripts
15
+ assets/ # Optional: static resources (templates, data files)
16
+ ```
17
+
18
+ ### SKILL.md requirements
19
+
20
+ - **YAML frontmatter** with `name` (letters, numbers, hyphens only; 64 chars max) and `description` (1024 chars max).
21
+ - **`metadata.version`** using [semver](https://semver.org/) (e.g. `"1.0.0"`). Bump the version in every PR that changes skill content. CI enforces this.
22
+ - **`description`** in third person. Describe what the skill does and when to use it. Include keywords that help agents match tasks. Don't summarize the skill's workflow.
23
+ - **Body** under 500 lines. Split into reference files if approaching this limit.
24
+ - **Reference files** one level deep from SKILL.md—no nested references.
25
+ - **Forward slashes** in all file paths.
26
+
27
+ See Anthropic's [skill authoring best practices](https://docs.anthropic.com/en/docs/agents-and-tools/agent-skills/best-practices) for additional guidance.
28
+
29
+ ## Guiding Principles
30
+
31
+ **The context window is a public good.** Only add what the agent doesn't already know. Challenge every paragraph: does its token cost justify its value?
32
+
33
+ **Concise over verbose.** Claude is smart. Provide domain-specific knowledge and patterns, not general explanations.
34
+
35
+ **Consistent terminology.** Choose one term for each concept and stick to it throughout the skill.
36
+
37
+ ## Reporting Skill Problems
38
+
39
+ When a skill misleads your agent — broken dashboards, failed automations, wrong configurations — first search existing issues for the same skill and failure. If a matching issue exists, react with thumbs-up or comment with additional context. Otherwise, open a new issue with the **Report Bad Skill Advice** template. Let the agent fill it out — it holds the full context and can trace the failure to its source in the skill.
40
+
41
+ The template covers five sections: context, timeline, root cause, impact, and environment. A thorough report gives maintainers everything they need to fix the skill in one pass.
42
+
43
+ ## Submitting a Skill
44
+
45
+ 1. Fork this repository.
46
+ 2. Create a folder under `skills/` with your skill name.
47
+ 3. Write a `SKILL.md` following the format above.
48
+ 4. Test your skill with real scenarios.
49
+ 5. Submit a pull request describing what your skill teaches and what problems it solves.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The Unofficial and Awesome Home Assistant MCP Server
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,65 @@
1
+ # Home Assistant Agent Skills
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4
+ [![Agent Skills](https://img.shields.io/badge/Agent_Skills-agentskills.io-blue)](https://agentskills.io)
5
+
6
+ An **Agent Skill** is a plugin that teaches AI coding agents best practices for a specific technology, delivered as a portable Markdown knowledge pack.
7
+
8
+ This repository provides an Agent Skill for Home Assistant, following the open [Agent Skills standard](https://agentskills.io/specification). Install a skill and your agent gains Home Assistant best practices that persist across sessions.
9
+
10
+ ## Included Skill
11
+
12
+ **[home-assistant-best-practices](skills/home-assistant-best-practices/):** Native HA constructs over templates, helper selection, automation modes, Zigbee button patterns, device control best practices, and safe refactoring.
13
+
14
+ ## Installation
15
+
16
+ ### Agent Skills installer
17
+
18
+ Requires [Node.js 18+](https://nodejs.org/).
19
+
20
+ ```bash
21
+ npx skills add homeassistant-ai/skills
22
+ ```
23
+
24
+ Works with AI coding agents that support the [Agent Skills standard](https://agentskills.io): Claude Code, Cursor, Copilot, VS Code, Gemini CLI, and others. To update: `npx skills update`
25
+
26
+ ### Claude Code plugin
27
+
28
+ Run each command separately inside Claude Code:
29
+
30
+ ```
31
+ /plugin marketplace add homeassistant-ai/skills
32
+ ```
33
+ ```
34
+ /plugin install home-assistant-skills@homeassistant-ai-skills
35
+ ```
36
+
37
+ Restart Claude Code after installation for the skill to take effect.
38
+
39
+ ### Claude Desktop / claude.ai
40
+
41
+ 1. Download or clone this repository
42
+ 2. Zip the skill folder: `cd skills && zip -r home-assistant-best-practices.zip home-assistant-best-practices/`
43
+ 3. **Settings → Capabilities → Skills → Upload skill** → select the `.zip` file
44
+
45
+ ## Skill Contents
46
+
47
+ The `home-assistant-best-practices` skill includes:
48
+
49
+ | File | Purpose |
50
+ |------|---------|
51
+ | `SKILL.md` | Decision workflow and quick-reference routing |
52
+ | `references/safe-refactoring.md` | Safe workflow for renaming entities, replacing helpers, restructuring automations |
53
+ | `references/automation-patterns.md` | Native conditions, triggers, waits, automation modes |
54
+ | `references/helper-selection.md` | Built-in helpers vs template sensors (with decision matrix) |
55
+ | `references/template-guidelines.md` | When templates are the right choice |
56
+ | `references/device-control.md` | Service calls, entity_id vs device_id, Zigbee buttons |
57
+ | `references/examples.yaml` | Compound examples combining multiple best practices |
58
+
59
+ ## Contributing
60
+
61
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on writing and submitting skills.
62
+
63
+ ## License
64
+
65
+ MIT
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: home-assistant-best-practices
3
+ description: >
4
+ Best practices for Home Assistant automations, helpers, scripts, and device controls.
5
+
6
+ TRIGGER THIS SKILL WHEN:
7
+ - Creating or editing HA automations, scripts, or scenes
8
+ - Choosing between template sensors and built-in helpers
9
+ - Writing or restructuring triggers, conditions, or automation modes
10
+ - Setting up Zigbee button/remote automations (ZHA or Zigbee2MQTT)
11
+ - Renaming entities or migrating device_id references to entity_id
12
+
13
+ SYMPTOMS THAT TRIGGER THIS SKILL:
14
+ - Agent uses Jinja2 templates where native conditions, triggers, or helpers exist
15
+ - Agent uses device_id instead of entity_id in triggers/actions
16
+ - Agent modifies entity IDs or config objects without checking all consumers
17
+ - Agent chooses wrong automation mode (e.g., single for motion lights)
18
+ metadata:
19
+ version: "1.0.0"
20
+ ---
21
+
22
+ # Home Assistant Best Practices
23
+
24
+ **Core principle:** Use native Home Assistant constructs wherever possible. Templates bypass validation, fail silently at runtime, and make debugging opaque.
25
+
26
+ ## Decision Workflow
27
+
28
+ Follow this sequence when creating any automation:
29
+
30
+ ### 0. Gate: modifying existing config?
31
+
32
+ If your change affects entity IDs or cross-component references — renaming entities, replacing template sensors with helpers, converting device triggers, or restructuring automations — read `references/safe-refactoring.md` first. That reference covers impact analysis, device-sibling discovery, and post-change verification. Complete its workflow before proceeding.
33
+
34
+ Steps 1-5 below apply to new config or pattern evaluation.
35
+
36
+ ### 1. Check for native condition/trigger
37
+ Before writing any template, check `references/automation-patterns.md` for native alternatives.
38
+
39
+ **Common substitutions:**
40
+ - `{{ states('x') | float > 25 }}` → `numeric_state` condition with `above: 25`
41
+ - `{{ is_state('x', 'on') and is_state('y', 'on') }}` → `condition: and` with state conditions
42
+ - `{{ now().hour >= 9 }}` → `condition: time` with `after: "09:00:00"`
43
+ - `wait_template: "{{ is_state(...) }}"` → `wait_for_trigger` with state trigger (caveat: different behavior when state is already true — see `references/safe-refactoring.md#trigger-restructuring`)
44
+
45
+ ### 2. Check for built-in helper
46
+ Before creating a template sensor, check `references/helper-selection.md`.
47
+
48
+ **Common substitutions:**
49
+ - Sum/average multiple sensors → `min_max` integration
50
+ - Binary any-on/all-on logic → `group` helper
51
+ - Rate of change → `derivative` integration
52
+ - Cross threshold detection → `threshold` integration
53
+ - Consumption tracking → `utility_meter` helper
54
+
55
+ ### 3. Select correct automation mode
56
+ Default `single` mode is often wrong. See `references/automation-patterns.md#automation-modes`.
57
+
58
+ | Scenario | Mode |
59
+ |----------|------|
60
+ | Motion light with timeout | `restart` |
61
+ | Sequential processing (door locks) | `queued` |
62
+ | Independent per-entity actions | `parallel` |
63
+ | One-shot notifications | `single` |
64
+
65
+ ### 4. Use entity_id over device_id
66
+ `device_id` breaks when devices are re-added. See `references/device-control.md`.
67
+
68
+ **Exception:** Zigbee2MQTT autodiscovered device triggers are acceptable.
69
+
70
+ ### 5. For Zigbee buttons/remotes
71
+ - **ZHA:** Use `event` trigger with `device_ieee` (persistent)
72
+ - **Z2M:** Use `device` trigger (autodiscovered) or `mqtt` trigger
73
+
74
+ See `references/device-control.md#zigbee-buttonremote-patterns`.
75
+
76
+ ---
77
+
78
+ ## Critical Anti-Patterns
79
+
80
+ | Anti-pattern | Use instead | Why | Reference |
81
+ |---|---|---|---|
82
+ | `condition: template` with `float > 25` | `condition: numeric_state` | Validated at load, not runtime | `references/automation-patterns.md#native-conditions` |
83
+ | `wait_template: "{{ is_state(...) }}"` | `wait_for_trigger` with state trigger | Event-driven, not polling; waits for *change* (see `references/safe-refactoring.md#trigger-restructuring` for semantic differences) | `references/automation-patterns.md#wait-actions` |
84
+ | `device_id` in triggers | `entity_id` (or `device_ieee` for ZHA) | device_id breaks on re-add | `references/device-control.md#entity-id-vs-device-id` |
85
+ | `mode: single` for motion lights | `mode: restart` | Re-triggers must reset the timer | `references/automation-patterns.md#automation-modes` |
86
+ | Template sensor for sum/mean | `min_max` helper | Declarative, handles unavailable states | `references/helper-selection.md#numeric-aggregation` |
87
+ | Template binary sensor with threshold | `threshold` helper | Built-in hysteresis support | `references/helper-selection.md#threshold` |
88
+ | Renaming entity IDs without impact analysis | Follow `references/safe-refactoring.md` workflow | Renames break dashboards, scripts, and scenes silently | `references/safe-refactoring.md#entity-renames` |
89
+
90
+ ---
91
+
92
+ ## Reference Files
93
+
94
+ Read these when you need detailed information:
95
+
96
+ | File | When to read | Key sections |
97
+ |------|--------------|--------------|
98
+ | `references/safe-refactoring.md` | Renaming entities, replacing helpers, restructuring automations, or any modification to existing config | `#universal-workflow`, `#entity-renames`, `#helper-replacements`, `#trigger-restructuring` |
99
+ | `references/automation-patterns.md` | Writing triggers, conditions, waits, or choosing automation modes | `#native-conditions`, `#trigger-types`, `#wait-actions`, `#automation-modes`, `#ifthen-vs-choose`, `#trigger-ids` |
100
+ | `references/helper-selection.md` | Deciding whether to use a built-in helper vs template sensor | `#numeric-aggregation`, `#rate-and-change`, `#time-based-tracking`, `#counting-and-timing`, `#scheduling`, `#entity-grouping`, `#decision-matrix` |
101
+ | `references/template-guidelines.md` | Confirming templates ARE appropriate for a use case | `#when-templates-are-appropriate`, `#when-to-avoid-templates`, `#template-sensor-best-practices`, `#common-patterns`, `#error-handling` |
102
+ | `references/device-control.md` | Writing service calls, Zigbee button automations, or using target: | `#entity-id-vs-device-id`, `#service-calls-best-practices`, `#zigbee-buttonremote-patterns`, `#domain-specific-patterns` |
103
+ | `references/examples.yaml` | Need compound examples combining multiple best practices | — |