Skip to content

Commit a455a8e

Browse files
committed
🤖 docs: document agent skills
Change-Id: I94e8cfc58b4220045018e6f2d751560ffc4b39b9 Signed-off-by: Thomas Kosiewski <[email protected]>
1 parent e581b0b commit a455a8e

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed

docs/agent-skills.mdx

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: Agent Skills
3+
description: Share reusable workflows and references with skills
4+
---
5+
6+
## Overview
7+
8+
Agent Skills are reusable, file-based “playbooks” that you can share across projects or keep project-local.
9+
10+
Mux follows the Agent Skills specification and exposes skills to models in two steps:
11+
12+
1. **Index in the system prompt**: mux lists available skills (name + description).
13+
2. **Tool-based loading**: the agent calls tools to load a full skill when needed.
14+
15+
This keeps the system prompt small while still making skills discoverable.
16+
17+
## Where skills live
18+
19+
Mux discovers skills from two roots:
20+
21+
- **Project-local**: `<projectRoot>/.mux/skills/<skill-name>/SKILL.md`
22+
- **Global**: `~/.mux/skills/<skill-name>/SKILL.md`
23+
24+
If a skill exists in both locations, **project-local overrides global**.
25+
26+
<Info>Mux reads skills from the machine running mux (even if the workspace runtime is SSH).</Info>
27+
28+
## Skill layout
29+
30+
A skill is a directory named after the skill:
31+
32+
```text
33+
.mux/skills/
34+
my-skill/
35+
SKILL.md
36+
references/
37+
...
38+
```
39+
40+
Skill directory names must match `^[a-z0-9]+(?:-[a-z0-9]+)*$` (1–64 chars).
41+
42+
## `SKILL.md` format
43+
44+
`SKILL.md` must start with YAML frontmatter delimited by `---` on its own line.
45+
Mux enforces a 1MB maximum file size for `SKILL.md`.
46+
47+
Required fields:
48+
49+
- `name`: must match the directory name
50+
- `description`: short summary shown in mux’s skills index
51+
52+
Optional fields:
53+
54+
- `license`
55+
- `compatibility`
56+
- `metadata` (string key/value map)
57+
58+
Mux ignores unknown frontmatter keys (for example `allowed-tools`).
59+
60+
Example:
61+
62+
```md
63+
---
64+
name: my-skill
65+
description: Build and validate a release branch.
66+
license: MIT
67+
metadata:
68+
owner: platform
69+
---
70+
71+
# My Skill
72+
73+
1. Do the thing...
74+
```
75+
76+
## Using skills in mux
77+
78+
Mux injects an `<agent-skills>` block into the system prompt listing the available skills.
79+
80+
To load a skill, the agent calls:
81+
82+
```ts
83+
agent_skill_read({ name: "my-skill" });
84+
```
85+
86+
If your skill references additional files (cheatsheets, templates, etc.), the agent can read them with:
87+
88+
```ts
89+
agent_skill_read_file({ name: "my-skill", filePath: "references/template.md" });
90+
```
91+
92+
`agent_skill_read_file` supports `offset` / `limit` (like `file_read`) and rejects absolute paths and `..` traversal.
93+
94+
<Info>
95+
`agent_skill_read_file` uses the same output limits as `file_read` (roughly 16KB per call,
96+
numbered lines). Files are limited to 1MB. Read large files in chunks with `offset`/`limit`.
97+
</Info>
98+
99+
## Current limitations
100+
101+
- There is no `/skill` command or UI activation flow yet; skills are loaded on-demand via tools.
102+
- `allowed-tools` is not enforced by mux (it is tolerated in frontmatter, but ignored).

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
},
5656
"context-management",
5757
"instruction-files",
58+
"agent-skills",
5859
"mcp-servers",
5960
{
6061
"group": "Project Secrets",

0 commit comments

Comments
 (0)