SKM-N04 · Error
`name` has a leading, trailing, or consecutive hyphen
The specification forbids leading, trailing, and consecutive hyphens in `name`.
What the rule is
The specification forbids a `name` that starts with a hyphen, ends with a hyphen, or contains two hyphens in a row. This is a narrower rule than the character-set check in SKM-N03 — a name can use only allowed characters and still violate this one.
It most often shows up after an automated slugification step that doesn't trim or collapse hyphens, or after manually editing a name and leaving a stray hyphen behind.
Where it comes from
- Agent Skills — SpecificationSpecification
Which runtimes enforce it
| Runtime | Effect | Note |
|---|---|---|
| Claude Code | Not documented | The spec states the rule; no runtime documents behaviour on a name that violates it. |
| Codex | Not documented | The spec states the rule; no runtime documents behaviour on a name that violates it. |
| Cursor | Not documented | The spec states the rule; no runtime documents behaviour on a name that violates it. |
| OpenClaw | Not documented | The spec states the rule; no runtime documents behaviour on a name that violates it. |
| Hermes Agent | Not documented | The spec states the rule; no runtime documents behaviour on a name that violates it. |
How to fix it
- Remove any hyphen at the start or end of `name`, and collapse any run of two or more consecutive hyphens into one.
Elsewhere
- SKILL.md, the formatThe full frontmatter field table this rule is drawn from.
- Agent Skills Not WorkingThe diagnostic reference this rule’s portability and failure evidence comes from.
- All rulesEvery check the validator runs, grouped by class.