# Skills

Source: https://crabtalk.ai/docs/development/skills

> A service carries Agent Skills in skills/ beside its crab.toml, and its MCP server lists them over MCP's skills extension, so clients such as Claude Code load them alongside its tools.

A skill teaches an agent how to use a service: when to call which tool, in what order, with what to check. A service carries its skills in its image, and its [MCP server](/docs/guides/service-mcp) serves them with its tools.

## Writing

```text
weather-desk/
├── Cargo.toml
├── crab.toml
└── skills/
    └── forecast/
        ├── SKILL.md
        └── references/
            └── regions.md
```

```md
---
name: forecast
description: Answer weather questions with the weather-desk tools, region first.
---

# Forecast

Call `regions` before `forecast`, and read [regions](references/regions.md) for the region codes.
```

- Each directory under `skills/` is one skill, in the [Agent Skills](https://agentskills.io/specification) format: a `SKILL.md` whose YAML frontmatter has `name` and `description`, plus any other files. Every frontmatter field is kept as written.
- `name` equals the directory's name: 1 to 64 lowercase letters, digits and single hyphens between them.
- A skill holds at most 512 files and 16 MiB. The build refuses one past either.
- Files and directories whose names start with `.` are left out.
- `[image] skills = "path"` in `crab.toml` names another directory, relative to the file. Without it and without `skills/`, the service carries none.
- Linked [service libraries](/docs/development/reuse) contribute no skills.

`crab build` embeds every file in the image, so a skill changes only with a deploy. `crab inspect` lists a service's skills.

## Serving

The service's MCP server declares the skills extension, `io.modelcontextprotocol/skills`, and answers:

| Method | Answers |
|---|---|
| `skills/list` | Every skill, at `skill://{name}/SKILL.md`, with its frontmatter and each file's SHA-256 digest and size. |
| `skills/get` | One skill by its `SKILL.md` URI; `-32602` for a URI that names none. |
| `resources/read` | A skill's file at `skill://{name}/{path}`. Markdown is `text/markdown`, other text `text/plain`, and anything else base64 bytes. |

- Skills follow the service's visibility. A caller who cannot see the service gets no skills and no files.
- In Claude Code, a skill appears as `<server>:<skill>`.
- Through [`https://mcp.crabtalk.ai`](/docs/guides/mcp), `inspect` names a service's skills and `resources/read` reads their files at `crab://owner/name/skills/{name}/{path}`; connect the service's own MCP server to use them as skills.
