Install
openclaw skills install document-skillsWrite or update a skill (SKILL.md and supporting files) to match host structure and best practices. Use when user says create skill, write skill, update SKILL.md, /document-skills.
openclaw skills install document-skillsWrite or update a skill to fit the host's expected structure. Use the structure and checklist below.
skills/example/) or the skill name.If you don't give either: Use the current or given context (e.g. the skill or path already under discussion).
SKILL.md updated (and supporting files if needed).
SKILL.md (exact name, case-sensitive).name must match the folder name.skills/<name>/). The host discovers skills from this location even when it's nested (e.g. inside a package).references/ and is linked from SKILL.md (progressive disclosure).references/, linked from SKILL.md.--- lines)Frontmatter configures when and how the skill runs. The table below follows the official skills reference.
name and description are required. name must match the folder name (kebab-case). description should follow: [What it does] + [When to use it] + [Key capabilities] — under 1024 characters; no XML angle brackets (< >). Avoid vague lines like "Helps with projects"; include specific trigger phrases and, if relevant, file types (e.g. ".fig files", "PDF contract review").
| Field | Required | Description |
|---|---|---|
name | Yes | kebab-case only; must match skill folder name. Lowercase letters, numbers, and hyphens (max 64 characters). |
description | Yes | [What it does] + [When to use it] + [Key capabilities]. Include trigger phrases (e.g. "Use when user says save, /save"). Mention file types if relevant. Under 1024 characters. No < or >. |
argument-hint | No | Hint shown during autocomplete to indicate expected arguments. Example: [issue-number] or [filename] [format]. |
disable-model-invocation | No | Set to true to disable automatic loading; use for workflows you want to trigger manually with /name. Default: false. |
user-invocable | No | Set to false to hide from the / menu. Use for background knowledge users shouldn't invoke directly. Default: true. |
allowed-tools | No | Tools the assistant can use without asking permission when this skill is active. |
model | No | Model to use when this skill is active. |
context | No | Set to fork to run in a forked subagent context. |
agent | No | Which subagent type to use when context: fork is set. |
hooks | No | Hooks scoped to this skill's lifecycle. See Hooks in skills and agents for configuration format. |
Optional: license (e.g. MIT for open source), compatibility (1–500 chars: product, system deps, network), metadata (e.g. author, version, mcp-server). See complete skills guide.
Security: No XML angle brackets in frontmatter. Avoid reserved names in the skill name (e.g. host or vendor names).
YAML gotcha: Avoid colons inside a value. They can be read as a new key. Use something like "Scope is" instead of "Scope:" in the text.
/skill-name. Use disable-model-invocation: true so the skill is not auto-loaded.Use the same section order so skills are easy to scan:
python scripts/validate.py --input {filename}" not "Validate the data"). Include error handling for common failures; reference bundled files (e.g. "Before queries, consult references/api-patterns.md") when relevant.Skip a section only if it really doesn't apply. When unsure, include Inputs, Output, Process, and Reference; add Examples and Troubleshooting where they help. Match the layout of other skills in the repo.
From the official docs:
$ARGUMENTS – All arguments passed when invoking the skill. If not present in the content, arguments are appended as ARGUMENTS: .$ARGUMENTS[N] or $N – The Nth argument (0-based index).${CLAUDE_SESSION_ID} – The current session ID (host-defined).${CLAUDE_SKILL_DIR} – The directory containing the skill's SKILL.md file (host-defined).For injecting shell output before the skill runs, see Inject dynamic context.
description follows [What it does] + [When to use it] + [Key capabilities] and is specific (include phrases users might say, e.g. "Use when user says save, /save"). name matches the skill. Task or side-effect skills: disable-model-invocation: true per official docs.references/ and link (progressive disclosure).$ARGUMENTS or $N and optionally argument-hint if the skill takes input.disable-model-invocation and/or user-invocable so the skill runs when intended (see Control who invokes a skill).User says: "Create a skill for validating CSV uploads."
Actions: Create folder skills/validate-csv/ (or the project's skill path; kebab-case). Add SKILL.md with required frontmatter (name: validate-csv, description using [What it does] + [When to use it] + [Key capabilities], e.g. "Validate CSV uploads. Use when user says validate CSV, check upload, /validate-csv. Key capabilities: schema check, encoding detection."). Add Inputs, Output, Process, optional Reference. If the skill runs a script, add scripts/validate.sh and reference it in Process.
Result: New skill that triggers on the stated phrases; coordinator and flows updated if it is part of a flow.
User says: "Update the save skill to mention update-gitignore."
Actions: Open the save skill's SKILL.md (e.g. skills/save/SKILL.md). Add the new step or reference in Process. Update description if trigger phrases change. Sync coordinator and references/coordinator-flows.md if the Save flow changes.
Invalid frontmatter / upload error.
Cause: YAML formatting (missing --- delimiters, unclosed quotes, or colons in a value read as a new key).
Solution: Ensure frontmatter is between two --- lines. Avoid colons in description text; use "Use when" not "When:". No < or > in frontmatter.
Skill doesn't trigger.
Cause: Description too vague or missing the full formula (what it does, when to use it, key capabilities) or trigger phrases.
Solution: Use [What it does] + [When to use it] + [Key capabilities] and add specific "Use when user says X, Y, /skill-name". Same phrases should appear in coordinator flow table if the skill is part of a flow. Debug: Ask the assistant "When would you use the [skill name] skill?" and adjust the description from what’s missing.
Skill triggers too often.
Cause: Description too broad or overlapping with other skills.
Solution: Add negative triggers (e.g. "Do NOT use for simple data exploration; use data-viz skill instead"). Narrow scope (e.g. "PDF legal documents for contract review" instead of "Processes documents"). Clarify when not to use (e.g. "Use specifically for online payment workflows, not general financial queries").
Wrong folder name.
Cause: Folder has spaces, underscores, or capitals.
Solution: Rename to kebab-case. Update name in SKILL.md to match. Update all references (coordinator, agents, README, package.json, checklist script, agents/references/).
Official skills reference – frontmatter, control who invokes a skill, run in subagent, substitutions. Coordinator – Flow table and agent descriptions should follow [What it does] + [When to use it] + [Key capabilities] and match the phrases users say.
Complete guide to building skills – progressive disclosure, description formula, good/bad examples, optional frontmatter, triggering and troubleshooting, instructions best practices.