Create Skill
Create one new Muse skill. Use this skill only for explicit Muse skill creation
requests, not for ordinary skill usage, code changes, benchmark tasks, or
third-party skill/plugin systems.
Two scopes exist (ADR 8975):
- Project scope (the default): the skill lives in the current workspace at
.agents/skills/<skill-id>/.
- Personal scope (the user asked for a "personal", "user", or
"cross-project" skill): the skill belongs in the managed personal root
$CONFIG_DIR/skills/<skill-id> ($XDG_CONFIG_HOME/muse, else
$HOME/.config/muse). You stage and validate the draft in the workspace,
then hand the user one muse skills install command — the store performs the
managed install (files + provenance), so skills update and
skills uninstall keep working on it.
Never write to a foreign harness root (~/.codex/skills, ~/.claude/skills)
or to $HOME/.agents/skills — those are import-only sources, never write
targets. Never write directly into $CONFIG_DIR/skills either: the store owns
that write, through the install command below.
Scope
- Create exactly one directory:
.agents/skills/<skill-id>/ (project scope) or
the staging directory .agents/skill-drafts/<skill-id>/ (personal scope —
deliberately OUTSIDE .agents/skills/, so the draft is not loaded as a
project skill).
- Create exactly one required file:
<that directory>/SKILL.md.
- Do not create a plugin, install a plugin, enable a skill, trust a plugin, execute
the generated skill, fetch remote content, or write outside the current workspace.
- Do not add scripts, assets, references, or extra files unless the user explicitly
asks for them and the target remains inside the new skill directory.
Inputs
Before writing files, identify:
scope: project (default) or personal — personal only when the user asked for
a personal/user/cross-project skill.
skill-id: a portable lowercase identifier for the directory and frontmatter
name.
description: one clear sentence for the frontmatter.
body: concise instructions that make the generated skill useful on its own.
Ask a short clarification question if the user did not provide enough information
to choose a safe skill-id and useful behavior.
Safety Checks
Reject the request before writing when:
- the destination is not under
.agents/skills/ (project scope) or
.agents/skill-drafts/ (personal staging) in the current workspace;
- the requested final destination is a foreign harness root (
~/.codex/skills,
~/.claude/skills), $HOME/.agents/skills, or any absolute path outside the
two sanctioned roots and the personal staging destination (the workspace
.agents/skills/ tree, $CONFIG_DIR/skills/<skill-id>, and
.agents/skill-drafts/<skill-id>) — explain the sanctioned path instead;
- the ID is empty,
., .., contains / or \, starts with -, or contains
anything except ASCII lowercase letters, digits, hyphen, or underscore;
- the ID is a Windows reserved stem such as
con, prn, aux, nul, com1,
com2, com3, com4, com5, com6, com7, com8, com9, lpt1,
lpt2, lpt3, lpt4, lpt5, lpt6, lpt7, lpt8, or lpt9;
- the destination already exists, is a symlink, or any parent resolves outside the
current workspace.
Creation Steps
Use normal file and shell tools with the current workspace as the base. <dir>
below is .agents/skills/<skill-id> (project scope) or
.agents/skill-drafts/<skill-id> (personal scope).
Check that <dir> does not exist.
Create its parent (.agents/skills or .agents/skill-drafts) if needed.
Reserve the leaf directory with a no-replace operation. If another process wins
the race, stop and report incomplete.
Recheck that the reserved directory resolves inside the current workspace and is
not a symlink.
Write <dir>/SKILL.md.
Run:
muse skills validate <dir> --json
Treat the draft as complete only when the validator succeeds, returns
valid: true, and reports zero diagnostics or warnings.
If validation fails, correct the same draft and revalidate. Stop after three
correction rounds and report the remaining validator output as incomplete.
Generated SKILL.md
Use this shape:
---
name: <skill-id>
description: <one sentence>
---
# <Readable Skill Name>
<Instructions for when and how to use the skill.>
Keep the generated instructions direct and self-contained. Include only behavior the
user asked for or that is necessary for the skill to work.
Completion Report
On success, report:
the canonical path to the created directory;
the validator command and clean result;
that no install, enable, trust, or execution step was run;
personal scope only: the one command that finishes the managed install
into the personal root — run by the user, so the skills store records the
install provenance itself:
muse skills install .agents/skill-drafts/<skill-id>
and that the staging directory can be deleted after the install succeeds.
On failure, report:
- what operation failed;
- the destination if it was reserved;
- the remaining diagnostics or tool error;
- which checks were not completed.
1---2name: create-skill3description: Create and validate a new Muse skill — project-local in the current workspace by default, or a personal skill staged for `muse skills install` into the managed personal root. Use ONLY when the user explicitly asks to create a Muse skill or invokes the create-skill skill. Do NOT use for ordinary skill usage, code changes, benchmark tasks, or third-party skill/plugin systems.4---56# Create Skill78Create one new Muse skill. Use this skill only for explicit Muse skill creation9requests, not for ordinary skill usage, code changes, benchmark tasks, or10third-party skill/plugin systems.1112Two scopes exist (ADR 8975):1314- **Project scope (the default)**: the skill lives in the current workspace at15 `.agents/skills/<skill-id>/`.16- **Personal scope** (the user asked for a "personal", "user", or17 "cross-project" skill): the skill belongs in the managed personal root18 `$CONFIG_DIR/skills/<skill-id>` (`$XDG_CONFIG_HOME/muse`, else19 `$HOME/.config/muse`). You stage and validate the draft in the workspace,20 then hand the user one `muse skills install` command — the store performs the21 managed install (files + provenance), so `skills update` and22 `skills uninstall` keep working on it.2324Never write to a foreign harness root (`~/.codex/skills`, `~/.claude/skills`)25or to `$HOME/.agents/skills` — those are import-only sources, never write26targets. Never write directly into `$CONFIG_DIR/skills` either: the store owns27that write, through the install command below.2829## Scope3031- Create exactly one directory: `.agents/skills/<skill-id>/` (project scope) or32 the staging directory `.agents/skill-drafts/<skill-id>/` (personal scope —33 deliberately OUTSIDE `.agents/skills/`, so the draft is not loaded as a34 project skill).35- Create exactly one required file: `<that directory>/SKILL.md`.36- Do not create a plugin, install a plugin, enable a skill, trust a plugin, execute37 the generated skill, fetch remote content, or write outside the current workspace.38- Do not add scripts, assets, references, or extra files unless the user explicitly39 asks for them and the target remains inside the new skill directory.4041## Inputs4243Before writing files, identify:4445- `scope`: project (default) or personal — personal only when the user asked for46 a personal/user/cross-project skill.47- `skill-id`: a portable lowercase identifier for the directory and frontmatter48 `name`.49- `description`: one clear sentence for the frontmatter.50- `body`: concise instructions that make the generated skill useful on its own.5152Ask a short clarification question if the user did not provide enough information53to choose a safe `skill-id` and useful behavior.5455## Safety Checks5657Reject the request before writing when:5859- the destination is not under `.agents/skills/` (project scope) or60 `.agents/skill-drafts/` (personal staging) in the current workspace;61- the requested final destination is a foreign harness root (`~/.codex/skills`,62 `~/.claude/skills`), `$HOME/.agents/skills`, or any absolute path outside the63 two sanctioned roots and the personal staging destination (the workspace64 `.agents/skills/` tree, `$CONFIG_DIR/skills/<skill-id>`, and65 `.agents/skill-drafts/<skill-id>`) — explain the sanctioned path instead;66- the ID is empty, `.`, `..`, contains `/` or `\`, starts with `-`, or contains67 anything except ASCII lowercase letters, digits, hyphen, or underscore;68- the ID is a Windows reserved stem such as `con`, `prn`, `aux`, `nul`, `com1`,69 `com2`, `com3`, `com4`, `com5`, `com6`, `com7`, `com8`, `com9`, `lpt1`,70 `lpt2`, `lpt3`, `lpt4`, `lpt5`, `lpt6`, `lpt7`, `lpt8`, or `lpt9`;71- the destination already exists, is a symlink, or any parent resolves outside the72 current workspace.7374## Creation Steps7576Use normal file and shell tools with the current workspace as the base. `<dir>`77below is `.agents/skills/<skill-id>` (project scope) or78`.agents/skill-drafts/<skill-id>` (personal scope).79801. Check that `<dir>` does not exist.812. Create its parent (`.agents/skills` or `.agents/skill-drafts`) if needed.823. Reserve the leaf directory with a no-replace operation. If another process wins83 the race, stop and report incomplete.844. Recheck that the reserved directory resolves inside the current workspace and is85 not a symlink.865. Write `<dir>/SKILL.md`.876. Run:8889 ```sh90 muse skills validate <dir> --json91 ```92937. Treat the draft as complete only when the validator succeeds, returns94 `valid: true`, and reports zero diagnostics or warnings.958. If validation fails, correct the same draft and revalidate. Stop after three96 correction rounds and report the remaining validator output as incomplete.9798## Generated `SKILL.md`99100Use this shape:101102```markdown103---104name: <skill-id>105description: <one sentence>106---107108# <Readable Skill Name>109110<Instructions for when and how to use the skill.>111```112113Keep the generated instructions direct and self-contained. Include only behavior the114user asked for or that is necessary for the skill to work.115116## Completion Report117118On success, report:119120- the canonical path to the created directory;121- the validator command and clean result;122- that no install, enable, trust, or execution step was run;123- **personal scope only**: the one command that finishes the managed install124 into the personal root — run by the user, so the skills store records the125 install provenance itself:126127 ```sh128 muse skills install .agents/skill-drafts/<skill-id>129 ```130131 and that the staging directory can be deleted after the install succeeds.132133On failure, report:134135- what operation failed;136- the destination if it was reserved;137- the remaining diagnostics or tool error;138- which checks were not completed.