#Writing a skill.md by hand
1 messages · Page 1 of 1 (latest)
Yep â write skills like direct operating instructions, not documentation/narrative.
Iâd use this pattern:
## Roles
- âYouâ means the agent/assistant reading this skill.
- âThe requesterâ means the human who asked for help.
- âThe recipient/contact/third partyâ means any other person being discussed.
- Avoid âwe/usâ unless it literally means both you and the requester.
## Instructions
When the requester asks for X:
1. Check Y.
2. Do Z.
3. Reply with the result.
Best tips:
- Prefer imperative voice: âCheck the fileâ, âAsk one clarifying questionâ, âSummarize the resultâ.
- Avoid future-tense prose like âwe willâŠâ â it makes the model role-play the skill author.
- Use âyouâ for the agent, not âthe agentâ.
- Use ârequesterâ instead of âuserâ if there may be multiple humans involved.
- Add tiny examples when pronouns matter:
Bad: âTell the user their account is ready.â
Good: âTell the requester: âYour account is ready.ââ
Also keep the skill short and procedural. OpenClawâs docs say skills should teach the agent how and when to use tools, so concise trigger/action/checklist style tends to work best: https://docs.openclaw.ai/tools/creating-skills
Would it be a good idea to have the agent read through the skill and outline the process? I noticed across new sessions the outline changes, so I assume it's my fault for writing an ambiguous skill?
Yes â thatâs a good debugging technique, but I wouldnât make it part of the normal workflow.
Ask the agent something like:
âRead this SKILL.md and produce the exact checklist you would follow. Do not perform the task.â
Then compare a few fresh sessions. If the outlines differ only in wording, thatâs normal model variance. If they differ in order, required checks, definitions, or when to ask the requester questions, the skill is probably ambiguous.
My preferred fix: put the outline inside the skill as the canonical procedure.
## Procedure
Follow these steps in order:
1. Identify the requesterâs goal.
2. Check whether required input A and B are present.
3. If either is missing, ask one concise clarifying question.
4. Otherwise, run the workflow.
5. Return the result plus any caveats.
Then add a small âDo / Donâtâ section:
## Language rules
- âYouâ means the assistant using this skill.
- âRequesterâ means the human asking for help.
- Do not say âwe willâ unless you mean both you and the requester.
- Do not refer to the requester as âthe userâ in outward-facing replies.
And if the workflow is delicate, add 1â2 examples:
Requester asks: âCan you clean this up?â
You should: ask what âclean upâ means unless the target format is already specified.
So yeah: outline-generation is a great skill lint test. If you want stable behavior, donât rely on the agent deriving the process each time â write the process explicitly. Docs reference: https://docs.openclaw.ai/tools/creating-skills
I wrote in TOOLS.md the following, but my agent still cannot find the skill reliably: [ The "chef" or "chef-advisor" skill can be found at /home/juani/.openclaw/workspace/skills/chef-advisor/SKILL.md, read it carefully to understand how to invoke the skill. ]
TOOLS.md is the wrong lever for this. It can remind the agent about a path, but it doesnât make the skill reliably load into the skill snapshot.
First thing Iâd check: what OpenClaw version are you on?
openclaw --version
Then debug it as a skill-loading issue:
openclaw skills list --eligible
openclaw skills info chef-advisor
openclaw skills check
A few common gotchas:
- The path must be under the agentâs actual
<workspace>/skills/, not just the path you expect. If that agentâs workspace is different,/home/juani/.openclaw/workspace/skills/...may be invisible. - Start a new session after adding/editing it:
/newis usually enough. - Make sure
SKILL.mdhas valid frontmatter, e.g.
---
name: chef-advisor
description: Helps with cooking/recipe/meal-planning advice.
---
- Check
agents.defaults.skills/agents.list[].skills. If you have an allowlist, the skill must be included there. - If the skill has
metadata.openclaw.requires..., it may be gated out because a required bin/env/config/OS check fails.
Better than saying âread this pathâ in TOOLS.md: put the skill in the right skills/ directory, verify it appears in openclaw skills list --eligible, then reference it by its actual skill name.
Docs: https://docs.openclaw.ai/tools/skills and https://docs.openclaw.ai/cli/skills
I see, the skill generatede by the agend did not include the frontmatter, I will add it. Once added, how do I register the skill for use? I understand install is only for downlaoding from clawhub?
Yep â openclaw skills install is for downloading from ClawHub. For a hand-written local skill, there usually isnât a separate âregisterâ step.
Do this:
# Folder shape
~/.openclaw/workspace/skills/chef-advisor/SKILL.md
SKILL.md needs frontmatter like:
---
name: chef-advisor
description: Helps with cooking, recipes, substitutions, and meal planning.
---
# Chef Advisor
When the requester asks for cooking help, follow this procedure...
Then reload/verify:
/new
openclaw skills list --eligible
openclaw skills info chef-advisor
openclaw skills check
If you want the skill shared across all agents on the machine, put it here instead:
~/.openclaw/skills/chef-advisor/SKILL.md
If you have an agent skill allowlist configured, also make sure chef-advisor is included in agents.defaults.skills or that agentâs agents.list[].skills; otherwise it can exist on disk but not be exposed.
If it still doesnât appear, check:
openclaw --version
and paste the output of:
openclaw skills info chef-advisor
openclaw skills check
Docs: https://docs.openclaw.ai/tools/creating-skills and https://docs.openclaw.ai/tools/skills
thank you, consider this solved đ
Glad that helped! đ
If this fixed it, please right-click the solution message â Apps â â Mark Solution. That helps Answer Overflow index it for future folks. đŠ