---
title: Skill packages
lastModified: '2026-12-05T07:02:46.000Z'
description: 'A skill is a folder: a SKILL.md whose YAML frontmatter names and describes it, and text files beside it.'
---

A skill is a folder: a `SKILL.md` whose YAML frontmatter names and describes it, and text files beside it. This page describes the package rules Loom holds such a folder to, the content hash that names a package, and the report of the operations a package names. After it you can read every refusal `skill.check` answers and say why the rule has its number.

`skill.check` is the one place the rules run. It stores nothing: no table, no setting, no migration. The [operations reference](/docs/reference/operations/skill) lists its fields and the [status page](/docs/reference/status) its maturity.

## What a check answers

The caller sends the folder as `files: [{path, text}]`. The answer is always a report with HTTP 200: a package that breaks a rule answers `ok=false` with its `refusals`, never an error, so a client reads one shape. An empty `files` answers `ok=false` with `no_skill_md`.

- **A package is refused whole and never repaired.** Loom does not drop the file that broke a rule, strip a character or rewrite a key: the text a person approved is the text that is checked.
- **Every refusal of the folder is answered in one call.** A rule that one file breaks on several lines is answered once, at the first line. Text past a size limit is the exception: no content rule reads it (below).
- **A refusal is `{code, path, line, message}`.** The message names the file, the line and the rule. It quotes no value of the package, so a secret in a file does not travel into a log through its own refusal. The one exception is a frontmatter key, which the message names when the key is printable. A file whose path is `path_invalid` is named in every message by its place in the request ("file 2 of the request"), and its path is answered only in `path`.
- **`ok` means the package rules pass.** It does not mean the text is safe to follow. The rules remove forms that hide text from a reviewer or run on load; whether the instructions are ones to trust is a person's decision.
- **`findings` have the same shape and refuse nothing.** They point a reviewer at places worth reading.

The request's own bounds (`files` at most 256 entries, `path` at most 512 characters, `text` at most 400,000) only keep it parseable. A package past a package limit is answered with a code, not rejected.

**No content rule reads text past a size limit.** A request can hold many times a package, and the content rules cost time in proportion to the text, so a check reads at most one package:

- The content rules do not run on a file over the file limit. The other files are checked.
- For a package over its byte limit or its file limit, the content rules run on no file, `operations` is empty and `content_sha256` is empty.

The path and size rules read no text and the frontmatter has its own limit, so those rules answer either way. A package answered `file_too_large`, `skill_too_large` or `too_many_files` can therefore break content rules the report does not name: check it again once it is within the limits.

## The rules

Each rule is one of two kinds. A rule of the open skill format is one any reader of the format applies. A rule of Loom's own is stricter than the format: it refuses what a skills library must not carry.

### Files and paths

| Code              | Refused                                                                                             | Whose rule | Why                                                                                                |
| ----------------- | --------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------- |
| `no_skill_md`     | No `SKILL.md` at the root                                                                           | Format     | The file is the package.                                                                           |
| `nested_skill`    | A `SKILL.md` below the root                                                                         | Loom       | One package is one skill; a nested one would be loaded by a host as a second skill nobody checked. |
| `path_invalid`    | An empty path, an absolute path, a `..` segment, a backslash, an empty segment, a control character | Loom       | A path names a file inside the folder on every platform, or it is not a path of the package.       |
| `path_duplicate`  | Two paths equal after NFC normalization and case folding                                            | Loom       | A file system that folds case, or that normalizes names, would keep one of the two.                |
| `path_hidden`     | A segment that starts with `.`                                                                      | Loom       | Dot files are a tool's state or a host's configuration, not skill text.                            |
| `path_host_dir`   | A file under a top-level `agents/` or `hooks/`                                                      | Loom       | Hosts read those folders as their own configuration.                                               |
| `file_type`       | An extension outside `.md .txt .json .yaml .yml .toml .csv .tsv`, except a file named `LICENSE`     | Loom       | A package is text a reviewer reads. It carries no script and no binary.                            |
| `file_too_large`  | A file over 100,000 bytes                                                                           | Loom       | A larger file does not load in a client that reads skills served over MCP.                         |
| `skill_too_large` | A package over 400,000 bytes                                                                        | Loom       | The same client's bound for one skill.                                                             |
| `too_many_files`  | Over 64 files                                                                                       | Loom       | A package stays small enough for one person to review whole.                                       |

The two byte limits are the ones the skills Loom serves over MCP are built under; `scripts/codegen/served_skills.py` imports them from the rules module, so the numbers have one source.

### Content

The text of every file within the size limits is checked.

| Code              | Refused                                                                                                                                                                            | Whose rule | Why                                                                                             |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------- |
| `content_control` | Half of a surrogate pair, or a character of category Cc other than tab, line feed and a carriage return directly before a line feed                                                | Loom       | A terminal acts on control characters, and a renderer drops them.                               |
| `hidden_text`     | U+E0000 to U+E007F (tag characters); U+202A to U+202E and U+2066 to U+2069 (explicit bidirectional controls); U+E0100 to U+E01EF where it does not directly follow a CJK ideograph | Loom       | These carry or reorder text that a reviewer does not see and a model reads.                     |
| `shell_form`      | `!` before a backtick at a line start or after whitespace; a fence opened with three backticks and `!`                                                                             | Loom       | Some hosts run these as shell commands while they load the text, before the agent reads a word. |
| `secret`          | A file that reads as a credential or another secret                                                                                                                                | Loom       | A library entry is copied to every reader.                                                      |

`content_control` and `hidden_text` are also applied to every string the frontmatter yields, because a quoted YAML value can spell a character with an escape that the file's own text does not hold. For a `description` written `"\e[2J"`, the file holds five printable characters and the value a host loads holds a terminal's escape character.

The three implicit directional marks (U+200E, U+200F, U+061C) are not refused: right-to-left prose needs them, and they reorder nothing on their own. A variation selector directly after a CJK ideograph selects a glyph and is not refused either. Both are reported as findings.

`secret` is the detector the memory write path uses (`server.memory.domain.sensitivity.detect_sensitivity`). `line` is the first line that reads as a secret alone, and 0 when only several lines together do. The detector judges the shape of the text, not what it means. After one of its key words (`password`, `secret`, `api_key`, `access_token` and the like) and a `:` or `=`, the detector reads a value up to the first whitespace, quote, comma or semicolon, past one opening quote, and a value of eight or more characters is refused, whatever it spells: `api_key=YOUR_API_KEY` and the placeholder `api_key=<your-api-key>` both are, and so is `api_key=<your-api-key here>`, where thirteen characters precede the space. A key word joined to a prefix by `_` is not read as one (`LOOM_API_KEY=<your-token>`), five characters precede the space in `api_key=<your token>`, and a variable is no assignment (`$LOOM_API_KEY`): none of the three is refused.

### Frontmatter

`SKILL.md` opens with a `---` line, YAML, and a closing `---` line. The frontmatter is the one part of a package a parser reads, so the rules are ordered to bound what the parser is given.

| Code                     | Refused                                                                                                                                                                                             | Whose rule                                       |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| `frontmatter_missing`    | `SKILL.md` does not open with `---`, or nothing closes it                                                                                                                                           | Format                                           |
| `frontmatter_too_large`  | A frontmatter over 8,192 bytes, checked before any parse                                                                                                                                            | Loom                                             |
| `frontmatter_shape`      | An anchor, an alias, a merge key, an explicit tag, a second document, or nesting deeper than 8 levels; a root that is not a mapping; a key that is not a string; a key written twice in one mapping | Loom                                             |
| `frontmatter_unloadable` | Anything the load raises                                                                                                                                                                            | Format                                           |
| `frontmatter_key`        | `allowed-tools`, `hooks`, `shell`, `model`, `effort`, `context`, `agent`, or any key outside the allowed list                                                                                       | Loom                                             |
| `frontmatter_value`      | A value of the wrong kind or size (below)                                                                                                                                                           | Format, and Loom for the keys outside the format |
| `name_invalid`           | A `name` that is not 1 to 64 of `a-z`, `0-9` and `-`, or that starts or ends with a hyphen, or holds `--`                                                                                           | Format                                           |

Why the parse rules are what they are:

- **8,192 bytes** is twice what a description of the largest allowed size can take in UTF-8, and bounds the time a load can cost. It is checked on the raw text, so a document the parser would choke on is never parsed.
- **Anchors, aliases and merge keys** are refused on the parser's events, before a node or a value is built. A few hundred bytes of aliases that each repeat the level before expand to millions of values; refusing them removes the expansion instead of bounding it. **Explicit tags** ask the loader to build something other than text.
- **Nesting deeper than 8 levels** is refused on the events too. No allowed key nests deeper than two, so such a frontmatter is refused whatever its content, and the parser's cost grows with the square of the depth.
- **Keys are checked on the composed nodes, never on the built mapping.** `1:` beside `true:` builds one key that is neither a string nor what the author wrote, and a key written twice builds a mapping with the last value and no error.
- **Every exception from the load is a refusal.** A date that names no day and an integer of thousands of digits each raise a plain `ValueError`. A colon inside a value that is not quoted is the usual cause: its refusal carries the file line and says to quote the value.

Allowed keys and their values:

| Key                                          | Value                                                   | Part of the open format |
| -------------------------------------------- | ------------------------------------------------------- | ----------------------- |
| `name`                                       | Required. A string that passes `name_invalid`           | Yes                     |
| `description`                                | Required. A string, not empty, at most 1,024 characters | Yes                     |
| `license`                                    | A string                                                | Yes                     |
| `compatibility`                              | A string of at most 500 characters                      | Yes                     |
| `metadata`                                   | A map of string to string                               | Yes                     |
| `when_to_use`, `argument-hint`               | A string                                                | No                      |
| `arguments`, `paths`                         | A string or a list of strings                           | No                      |
| `disable-model-invocation`, `user-invocable` | Written `true` or `false`                               | No                      |

A value is judged as YAML types it. `metadata: {internal: true}` holds a boolean and `version: 1.10` a number, and two YAML versions type such values differently, so the refusal says to quote them. The two flag keys are judged as written, because YAML also reads `yes`, `on` and `True` as a boolean and another reader of the same file does not.

The keys refused by name configure the host that runs the skill: its tools, hooks, shell and model. A package in a shared library carries none of a host's permissions. `allowed-tools` is a key of the open format; refusing it is Loom's rule.

### Findings

| Code                     | Reported                                                                                                                                 |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `html_comment`           | An HTML comment, which a rendered page does not show                                                                                     |
| `encoded_run`            | 200 or more base64 characters in a row                                                                                                   |
| `external_link`          | A link to an `http` or `https` address                                                                                                   |
| `path_reference`         | `@` before a path, which some hosts read as a file to attach                                                                             |
| `format_character`       | Any other character of category Cf, the implicit directional marks among them, and the variation selectors `hidden_text` does not refuse |
| `bom_before_frontmatter` | A byte-order mark before the first `---`: a host that reads `---` only as the file's first bytes loads no name and no description        |
| `key_not_in_format`      | An allowed key outside the open format's own: accepted here, refused by a strict reader of the format                                    |

## The content hash

`content_sha256` names a package by its files:

1. For each file, the SHA-256 of its text as UTF-8 bytes, in hex.
2. One manifest line per file: the digest, two spaces, the path, a line feed.
3. The lines sorted by the path's UTF-8 bytes.
4. The SHA-256 of the manifest, in hex.

The sort is by bytes, not by UTF-16 code units or a locale's collation, so a client in another language computes the same hash: the two orders differ for a path with a character above U+FFFF. The hash does not depend on the order the files were sent in. It is empty when a path rule refused (`path_invalid`, `path_duplicate`, `path_hidden`, `path_host_dir`), because the paths are then not one set of files, and when the package is over its byte or file limit, because its text is not read. `tests/fixtures/skill_manifest.json` holds a package, its manifest and its hash, and the server's rule and the Python SDK's folder reader are both tested against it.

## The operations report

A skill's text tells an agent which operations to call. `operations` lists the names the package's Markdown files give in code spans (each line of a fenced block, and each inline span), each at its first mention:

- a dotted name whose first segment is an op group of the serving build (`kind: "op"`);
- a name of the form `loom_` followed by lowercase letters and underscores (`kind: "tool"`).

| Field           | Meaning                                                                                                                                                                                                                                                          |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `known`         | The serving build holds the op. For a tool: it is `loom_op`, `loom_activate`, or the tool name of an op whose `mcp` is not `none`                                                                                                                                |
| `required_role` | The op's minimum role                                                                                                                                                                                                                                            |
| `mcp`           | `tool` when a toolset in `toolsets` lists it, `loom_op` when no toolset does and it is called by name through the `loom_op` tool, `none` when MCP does not serve it. The tools `loom_op` and `loom_activate`, which no op owns, are `tool` with `toolsets` empty |
| `toolsets`      | The toolsets whose listing carries it, as [`ops.capabilities`](/docs/reference/operations/ops#opscapabilities) answers them                                                                                                                                      |
| `path`, `line`  | The first mention: `SKILL.md` first, then the other files by path                                                                                                                                                                                                |

An unknown name has `known=false` and the other fields empty. `mcp` is a fact of the build, not of a session: which tools a connection lists also depends on its toolset. `memory.search` and `knowledge.search` are `tool` with `toolsets: ["assistant"]`: only that toolset lists them, and the other listings carry `loom_search` in their place.

`operations` is empty for a package over its byte or file limit.

The report never refuses and never changes `ok`. It is a match on names, not a reading of the text, and it has known false matches:

- **An example value.** A code span that shows a made-up key or setting shaped like a tool name is reported as an unknown tool.
- **A name written with a wildcard.** `tracker.source.*` is taken as `tracker.source`, which no build holds.
- **A section that names removed things on purpose.** A migration note that lists retired ops reports each as unknown.
- **A file name.** A code span such as `memory.md` is a dotted name whose first segment is an op group.

A tool name qualified by a host (a server prefix before `loom_`) is not matched, and argument names are not checked.

## The command

`loom skill check <dir>` is a command of the Python SDK. `loom.skills.read_folder` reads the folder: regular files only, each opened without following a link. A path with a segment that starts with `.`, and a `__MACOSX` folder, is left out and listed. A link, a file that is not a regular file, a path that resolves outside the folder and a file that is not UTF-8 stop the command and name the path; nothing is sent in the file's place. The reader parses no YAML: the server holds the rules.

The command prints what was left out, every refusal, the findings, the operations report and the hash. After a message that names a file by its place in the request, it prints the file's path. It adds one finding of its own, `folder_name_differs`, when the folder's name is not the frontmatter `name`: the open format requires them equal, and the server never sees the folder's name. An unknown operation is worded "not held by build" with the serving build's commit. `--json` prints the op's answer with the local findings added. A character that is not printable, in a file's name or in a message, is printed as its escape (`\x1b`), so a name cannot send a control sequence to the terminal.

| Exit | Meaning                                                                                 |
| ---- | --------------------------------------------------------------------------------------- |
| 0    | The package rules pass                                                                  |
| 1    | A refusal, or the request failed                                                        |
| 2    | The folder cannot be read (nothing is sent), or the server does not serve `skill.check` |

A job that runs the command needs a token scoped to a namespace at `viewer` or above.

## Invariants

- **Tenant isolation.** The op is addressed by namespace and the transport admits it at `viewer`. The handler reads no stored row, so nothing of another tenant can be answered. A token bounded below its namespace (to one user or session) is refused at admission.
- **No row is written.** The request ledger keeps the argument digest, the answered `name` and `content_sha256`; it keeps no file. A `name` the name rule refuses is answered empty, so the ledger keeps a name and never a line of text.
- **Belief revision.** None: the op is a read.
- **Rolling upgrade.** A build without the op answers an unknown operation. The command asks `ops.capabilities` first and says the server does not serve the check.
- **Import contract.** The rules are a `domain` module with no I/O. It takes the set of op groups as an argument; the handler reads the registry.

## Source entry points

- `server/identity/domain/skill_format.py`: `check_package`, `content_sha256`, `operation_mentions`, `package_mentions`, and every limit as a constant.
- `server/identity/app/skills.py`: `handle_skill_check`, `operations_report`.
- `server/identity/api/models_skills.py`, `server/identity/api/ops_skills.py`: the wire models and the declaration.
- `sdk/python/loom/skills.py`: `read_folder`. `sdk/python/loom/cli_skill.py`: the command.
- Tests: `tests/unit/test_skill_format_rules.py`, `tests/unit/test_skill_format_frontmatter.py`, `tests/unit/test_skill_format_hash.py`, `tests/unit/test_skill_format_repository_folders.py` (the rules over every skill folder in this repository), `tests/unit/test_skill_check_operations.py`, `tests/unit/test_sdk_skill_folder.py`, `tests/integration/test_skill_check.py`.

## Related

- [Operations reference: `skill`](/docs/reference/operations/skill)
- [CLI reference](/docs/reference/cli)
- [Security](/docs/architecture/security)
