| name | ha-create-skill |
| description | ๐งฐ Create or update a Home Assistant skill under .claude/skills/. |
ha-create-skill
Overview
Create or update a Claude Code skill under .claude/skills/<name>/SKILL.md. Once committed, the skill is invokable as /ha-<name>. This skill enforces the repo's house conventions for every other /ha-... skill.
House Conventions (hard rules)
- Location:
.claude/skills/<kebab-case-name>/SKILL.md โ one folder per skill.
- Name prefix: every skill name starts with
ha-. Kebab-case, lowercase, letters/digits/hyphens only.
- Frontmatter: only
name and description. Total โค1024 chars.
- Description format:
<emoji> <imperative verb phrase>. โ describe what the skill does, not when to use it. One sentence, โค~100 chars. No Use when ... prefix. Never include a slash-command name (e.g. /ha-foo, /init, /...) inside the description โ the harness loader silently drops the description and falls back to the skill name. Describe the concept instead (e.g. "a Home Assistant skill", not "a /ha-... skill").
- Body sections (in this order, skip what doesn't apply):
# <h1 matching the folder name>
## Overview โ 1โ2 sentences on the core purpose
## Hard Rules / ## House Conventions โ bullets of non-negotiables
## Procedure โ numbered steps
## Style Reference โ code blocks for concrete examples (when useful)
## Common Mistakes โ | Mistake | Fix | markdown table
- Tone: simple, efficient, scannable. Bullets and tables over paragraphs.
- No Co-Authored-By trailer anywhere โ neither in this skill's commit nor in any commit instructions inside the skills you author.
- No
pnpm references โ this repo is Home Assistant YAML, not a JS project.
Procedure
1. Detect mode โ new vs update
Check the user's request:
- Mentions an existing skill by name / file / path / phrases like "modifie" / "update" / "fix" โ Update mode (
Read the file first).
- Otherwise โ New mode.
When in doubt, ask: Tu veux un nouveau skill ou modifier <closest match>?
2. Clarify (only what's missing)
Settle these before writing:
- Name โ must be
ha-<something>, kebab-case.
- Purpose in one verb phrase โ what does the skill do?
- Emoji โ one that semantically matches the purpose (๐ ship, ๐ blueprint, ๐ build, ๐งน cleanup, ๐ notify, โฆ).
- Hard rules โ anything the agent MUST or MUST NOT do?
- Procedure โ the exact step-by-step flow.
- Side effects โ does it touch git, push, edit files outside the skill folder?
- Confirmation gates โ irreversible steps that need explicit user
oui / yes?
- Inputs the user must provide each invocation โ args, file paths, etc.
Ask only what can't be reasonably defaulted. Prefer AskUserQuestion with concrete options.
3. Written summary (bullets)
- New or Update + file path
- Proposed
name and description (with emoji)
- Section outline of the body
- Any hard rules or confirmation gates being added
4. Write the file
- New mode:
Write .claude/skills/<name>/SKILL.md.
- Update mode:
Edit targeted sections (don't rewrite the whole file unless the change is sweeping).
- Re-scan the result against every house rule above before saving.
5. Make ONE commit
- Stage only the affected skill folder:
git add .claude/skills/<name>/
- Commit message (HEREDOC, no
Co-Authored-By):
- New skill โ
feat(skill): <concise description>
- Bugfix โ
fix(skill): <concise description>
- Refactor / cleanup โ
refactor(skill): <concise description>
- Title โค72 chars. Body optional, only if non-obvious.
- Do not push. Squashing the branch is a separate step (see
/ha-squash-and-commit).
Style Reference
Frontmatter template:
---
name: ha-<kebab-name>
description: <emoji> <Imperative verb phrase describing what the skill does>.
---
Examples of correct descriptions (from skills already in this repo):
๐ Ship the current worktree as one clean commit on origin/main.
๐ Create or update a Home Assistant automation blueprint.
๐งฐ Create or update a Home Assistant skill under .claude/skills/.
Body skeleton:
# ha-<name>
## Overview
<1โ2 sentences on what this skill does and why.>
## Hard Rules
- **NEVER** <forbidden action>.
- **<Other non-negotiable>**.
## Procedure
1. **<Step title>**
- <action>
- <action>
2. **<Next step>**
- โฆ
## Common Mistakes
| Mistake | Fix |
|---|---|
| <Typical failure mode> | <How to recover> |
Common Mistakes
| Mistake | Fix |
|---|
Description starts with Use when ... | Strip the prefix. Format: <emoji> <verb phrase>. โ what the skill DOES. |
| Description is multiple sentences or > ~100 chars | Cut to one tight sentence. |
| Missing emoji in description | Add one that matches the purpose semantically. |
Skill name without ha- prefix | Rename. Every skill in this repo is ha-*. |
| Skill name has uppercase or underscores | Kebab-case, lowercase only. |
Frontmatter has fields other than name / description | Remove them. Only these two are supported. |
Co-Authored-By trailer in any commit (or in commit examples in the skill body) | Strip it. Hard repo rule โ no AI watermark. |
| Created a new file when the user meant to update an existing skill | Always run the Detect-mode step. Ask when ambiguous. |
| Update-mode: rewrote the whole file instead of editing | Use Edit for targeted changes; only rewrite if the change is sweeping. |
| Multiple commits for one skill change | One commit per skill change. |
| Pushed after committing | Don't push โ pushing is a separate manual step. |
| Wrote a long workflow summary in the description | The description is what, the body is how. |
Description references a slash-command name (/ha-foo, /..., /init) | Rephrase to the concept ("a Home Assistant skill"). The harness silently drops the description otherwise and the menu shows only the skill name. |