docs: fix custom skill naming example

Fix the custom skill docs example so the folder and SKILL.md frontmatter use the same hyphen-case name.
This commit is contained in:
nighty
2026-04-29 11:15:36 +08:00
committed by GitHub
parent 64533ed7b1
commit 6e31de5847

View File

@@ -29,7 +29,7 @@ For how skills are loaded and prioritized, see [Skills](/tools/skills).
```markdown
---
name: hello_world
name: hello-world
description: A simple skill that says hello.
---
@@ -39,6 +39,9 @@ For how skills are loaded and prioritized, see [Skills](/tools/skills).
"Hello from your custom skill!".
```
Use hyphen-case with lowercase letters, digits, and hyphens for the skill
`name`. Keep the folder name and frontmatter `name` aligned.
</Step>
<Step title="Add tools (optional)">
@@ -83,13 +86,13 @@ For how skills are loaded and prioritized, see [Skills](/tools/skills).
The YAML frontmatter supports these fields:
| Field | Required | Description |
| ----------------------------------- | -------- | ------------------------------------------- |
| `name` | Yes | Unique identifier (snake_case) |
| `description` | Yes | One-line description shown to the agent |
| `metadata.openclaw.os` | No | OS filter (`["darwin"]`, `["linux"]`, etc.) |
| `metadata.openclaw.requires.bins` | No | Required binaries on PATH |
| `metadata.openclaw.requires.config` | No | Required config keys |
| Field | Required | Description |
| ----------------------------------- | -------- | -------------------------------------------------------------- |
| `name` | Yes | Unique identifier using lowercase letters, digits, and hyphens |
| `description` | Yes | One-line description shown to the agent |
| `metadata.openclaw.os` | No | OS filter (`["darwin"]`, `["linux"]`, etc.) |
| `metadata.openclaw.requires.bins` | No | Required binaries on PATH |
| `metadata.openclaw.requires.config` | No | Required config keys |
## Best practices