> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent skills

> Commit project-specific guidance for Momentic's runtime agents to your repository with .momentic/skills.

Agent skills let you commit project-specific guidance for Momentic's runtime
agents to your repository. Use them to describe how to start and reach the app
under test, authentication and environment details, and any conventions the
agents should follow.

<Warning>Agent skills are in beta and may change.</Warning>

## Layout

Each skill is a directory under `.momentic/skills` containing a `SKILL.md` file.
You can use intermediate directories to group related skills:

```text theme={null}
.momentic/
  skills/
    frontend/
      app-startup/
        SKILL.md
    triage/
      SKILL.md
```

The directory containing `SKILL.md` defines the skill name, while the path from
`.momentic/skills` identifies the skill.

### Where skills are discovered

Skills conventionally live at the **repository root**. Momentic looks for a
`.momentic/skills` folder starting at the project root (the directory containing
`momentic.config.yaml`) and walking up through its ancestors, and uses the
**first** one it finds. When your project root is a subdirectory of the
repository, as in a monorepo, keep a single `.momentic/skills` at the repository
root so every project in the repository shares it; a `.momentic/skills` folder
nearer to a project root takes over entirely for that project.

`SKILL.md` is Markdown with a YAML frontmatter block:

```markdown theme={null}
---
name: app-startup
description: How to build and serve the app under test.
agents: [explore, triage]
---

Build the app with `pnpm build` and serve it on http://localhost:8888. The
explore agent should target that URL; triage can assume it when reasoning about
environment mismatches.
```

### Frontmatter

| Field         | Required | Description                                                                 |
| ------------- | -------- | --------------------------------------------------------------------------- |
| `name`        | yes      | Skill name. Must match the directory containing `SKILL.md`.                 |
| `description` | yes      | One-line summary of what the skill covers.                                  |
| `agents`      | no       | Which runtime agents the skill applies to. Omit to apply it to every agent. |

The supported agent targets are `explore`, `result-classification`, and
`triage`.

## How skills are applied

* A skill applies to an agent when its `agents` list includes that agent, or
  when `agents` is omitted. Every applicable skill is always used.
* Matching skills are combined in skill-name order, then path order when names
  match. Each skill's name, path, and description are added to the agent's
  instructions.
* Target a single agent (e.g. `agents: [triage]`) to prompt that agent
  specifically. Target several agents to reuse the same guidance across them.
* A skill with missing frontmatter, invalid YAML, an unknown agent target, an
  empty body, or a name that doesn't match its directory is skipped. Momentic
  prints a warning naming the file so you can fix it.

## Skills and prompt flags

Some agents also accept prompt flags for one-off or path-specific guidance. The
[explore agent](/docs/coding-agents/explore), for example, takes `--prompt` and
`--prompt-file`. Skills apply automatically and stack with any prompt flags, so
you can commit shared guidance as skills and still pass one-off instructions per
run.
