Skip to content

A skill is a directory containing a SKILL.md file. M31A shows the skill's name and description to the model, then loads the full Markdown body only when the model calls activate_skill. This keeps routine tasks out of the system prompt until they are needed.

Prerequisites ​

  • M31A installed and authenticated.
  • Familiarity with the Skills guide.

1. Choose a scope ​

ScopeLocationUse case
User~/.m31a/skills/<name>/SKILL.mdPersonal workflows across projects.
Workspace<project>/.m31a/skills/<name>/SKILL.mdProject-specific conventions.
Extension<extension>/skills/<name>/SKILL.mdDistributed with other assets.

Discovery precedence is built-in, extensions, user, workspace; later scopes can override earlier ones by name. Workspace skills are skipped when the folder is not trusted. This tutorial uses a workspace skill.

2. Write the skill ​

bash
mkdir -p .m31a/skills/commit-style

Create .m31a/skills/commit-style/SKILL.md:

markdown
---
name: commit-style
description: Write conventional commit messages for this repository, including scope and a short imperative summary.
---

# Commit style

Use this skill when asked to write or review a commit message.

1. Read the staged diff with read-only tools.
2. Produce a header of the form `type(scope): summary`.
3. Use one of: feat, fix, docs, refactor, test, chore, build, ci.
4. Keep the summary under 72 characters and in the imperative mood.
5. Add a body only when the *why* is not obvious from the header.
6. Never include secrets or generated lockfile noise.

The description is the activation signal: it should say both what the skill does and when to use it. The body should contain the procedure, not restate the description.

Front matter rules ​

The bundled validator in packages/core/src/skills/builtin/skill-creator/scripts/validate_skill.cjs enforces:

  • the file must start with --- and contain a closing ---;
  • name must be hyphen-case (^[a-z0-9-]+$);
  • description must be a single-line string, at most 1024 characters;
  • unresolved TODO: markers produce a warning.

skillLoader.ts reads only name and description. Extra front matter fields are not used for activation.

3. Install and inspect ​

If you created the skill directly in .m31a/skills/, no install step is needed. For a skill stored elsewhere, link it:

bash
m31a skills list --all
m31a skills link /path/to/commit-style
m31a skills enable commit-style

Inside the TUI, use /skills list, /skills reload, and /skills enable|disable <name>.

skills.enabled defaults to true; skills.disabled is a list of names to skip, and admin.skills can restrict skills further. Check that your skill is not disabled:

json
{
  "skills": {"enabled": true, "disabled": []}
}

4. Verify activation ​

Start a session and ask a question that matches the description:

bash
m31a -p "Stage nothing. Just propose a conventional commit message for the staged diff using your commit-style skill."

To confirm the skill body was actually loaded, ask the agent to follow a detail that exists only in the body, for example:

text
Which commit types does the commit-style skill allow, and what is the summary length limit?

The correct answer must mention the type list and 72 characters. If the agent guesses instead, refine the description so the activation signal is clearer.

Use /tools desc to confirm activate_skill is present in the session. If it is missing, check tools.exclude and tools.core.

5. Add bundled resources (optional) ​

A skill directory may include:

text
commit-style/
  SKILL.md
  scripts/        deterministic helpers
  references/     docs loaded on demand
  assets/         templates used in output

The body can instruct the agent to run node scripts/check_message.cjs for deterministic validation. Scripts should print concise, LLM-friendly stdout and avoid stack traces. Treat every bundled script as executable code and review it before enabling the skill.

6. Validate before sharing ​

The built-in skill-creator skill ships the validator script:

bash
node packages/core/src/skills/builtin/skill-creator/scripts/validate_skill.cjs \
  .m31a/skills/commit-style

A valid skill exits successfully with a confirmation message. To distribute it, move the directory under an extension's skills/ folder; see Custom extension.

7. Troubleshooting ​

SymptomCause and fix
Skill not listedCheck the directory path and m31a skills list --all.
Activation never happensMake the description more specific about when to use it.
Body seems ignoredThe model may not have called activate_skill; ask it explicitly.
Overridden by another skillLater scopes win; check extension and workspace copies.
Disabled by policyCheck skills.disabled and admin.skills.

Next steps ​

Built with VitePress. Powered by NVIDIA NIM.