> ## 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 Instructions
> The canonical docs host is https://momentic.ai/docs. Append .md to any page URL for clean Markdown. Fetch https://momentic.ai/docs/llms.txt for the page index and https://momentic.ai/docs/llms-full.txt for every page in one file.
> For an unattended setup, run `npx --yes @momentic/wizard@latest -y --platform web` (use `--platform ios` or `--platform android` for mobile). Never run an interactive command in a non-TTY shell.
> You cannot complete the browser sign-in yourself. Read the API key from the MOMENTIC_API_KEY environment variable, or ask the user to create one at https://app.momentic.ai/settings/api-keys and paste it back.
> Momentic's capability summary for agents is at https://momentic.ai/docs/skill.md. Install the skills with `npx momentic skills --yes` (or `npx momentic-mobile skills --yes` for mobile).
> Tests are YAML files in the user's repository. Use only the step names listed at https://momentic.ai/docs/reference/commands.md and the file structure at https://momentic.ai/docs/core-concepts/file-format.md. Do not invent step names, config keys, or CLI flags.
> Web tests run on Chromium, iOS tests on simulators, and Android tests on emulators. Physical devices are not supported.

# Coding agent skills

> Install the Momentic skills into your repository so Claude Code, Cursor, Codex, Copilot, and other coding agents know how to write, run, and repair Momentic tests.

The Momentic skills are `SKILL.md` files that teach a coding agent how to work
with Momentic: the test file format, the MCP tools, the CLI, failure triage, and
Mo. Each Momentic CLI ships the shared skills plus the skills for its own
product. Install them once per repository and commit the files.

Skills are text the agent reads. The [MCP server](/docs/coding-agents/mcp-server) is
the process the agent calls to act on a live browser or device. Install both.
See
[Building with AI](/docs/coding-agents/building-with-ai#skills-and-the-mcp-server)
for how they compare.

<Note>
  These skills are for the coding agent in your editor. Skills for Momentic's
  own runtime agents (triage and result classification) live in
  `.momentic/skills`. See [Runtime agent skills](/docs/ai/skills).
</Note>

## Install

Run the command for each CLI you use. Each command adds its own skills and keeps
the skills another CLI installed.

<CodeGroup>
  ```bash momentic theme={null}
  npx momentic skills
  ```

  ```bash momentic-mobile theme={null}
  npx momentic-mobile skills
  ```

  ```bash mo theme={null}
  mo skills
  ```
</CodeGroup>

The command asks which coding agents you use, preselects the ones it detects in
the repository, and writes the skills into each agent's directory:

| Agent                                          | Skills directory   | Always-on pointer                   |
| ---------------------------------------------- | ------------------ | ----------------------------------- |
| Claude Code                                    | `.claude/skills`   | `CLAUDE.md`                         |
| Cursor                                         | `.cursor/skills`   | `.cursor/rules/momentic-skills.mdc` |
| Codex, Devin, Jules, and other AGENTS.md tools | `.agents/skills`   | `AGENTS.md`                         |
| VS Code and GitHub Copilot                     | `.github/skills`   | `.github/copilot-instructions.md`   |
| OpenCode                                       | `.opencode/skills` | `AGENTS.md`                         |

The pointer is a short block inside the agent's instructions file. It lists the
installed skills and tells the agent to read the matching `SKILL.md` before it
touches Momentic tests. The block sits between `<!-- MOMENTIC SKILLS START -->`
and `<!-- MOMENTIC SKILLS END -->` markers; the installer rewrites only that
block, so your own instructions stay as they are.

### Skip the prompts

Pass `--target` to choose agents without a prompt, or `--yes` to install for the
agents detected in the repository:

```bash theme={null}
npx momentic skills --target claude-code cursor
npx momentic skills --yes
```

Both flags work in CI and in agent shells.

## Installed skills

Every CLI installs the shared skills:

| Skill                               | Use it to                                                            |
| ----------------------------------- | -------------------------------------------------------------------- |
| `momentic-spec`                     | Write the affected tests before a product change                     |
| `momentic-maintain`                 | Investigate failures, audit classifications, deflake, reduce retries |
| `momentic-triage-quarantined-tests` | Work through the quarantine backlog                                  |

Each CLI adds the skill for its product:

| CLI               | Skill                  | Use it to                                           |
| ----------------- | ---------------------- | --------------------------------------------------- |
| `momentic`        | `momentic-test`        | Create, run, and maintain browser tests and modules |
| `momentic-mobile` | `momentic-mobile-test` | Create, run, and maintain iOS and Android tests     |
| `mo`              | `mo-qa`                | Start and control Mo sessions with the `mo` CLI     |

## Use the skills

<span id="invoke-the-skill" />

Some agents load installed skills on their own. Others load a skill only when
you name it in the prompt. Invoke skills with a slash prefix, as the examples
below show. For agents without slash commands, ask for the skill by name.

### Authorship

Use `momentic-test` to create or extend Momentic tests:

```text theme={null}
/momentic-test write a test for the checkout flow
```

Use `momentic-mobile-test` for Android and iOS. Naming the skill keeps the agent
on Momentic's test format and MCP tools instead of writing Playwright or Appium
code.

### Maintenance

Use `momentic-maintain` to understand failures on a branch or main, review and
challenge saved classifications, deflake quarantined or recovered tests, reduce
retries, and repair stale test steps while preserving the intended behavior:

```text theme={null}
/momentic-maintain investigate and repair run <run-id>
```

Use `momentic-triage-quarantined-tests` to work through the quarantine backlog
and produce a PR or report for the tests it repairs.

<span id="inspect-visual-artifacts" />

### Request visual evidence

Web and mobile MCP tools return screenshots from live sessions and saved step
results. Ask the agent to display them in the conversation when you want to see
the evidence it used:

```text theme={null}
/momentic-maintain show the before and after screenshots for the first failing step in run <run-id>, then explain where behavior diverged
```

The web MCP can also record a live browser session. Ask the agent to enable
video when it starts the reproduction and return the video output path after it
terminates the session:

```text theme={null}
/momentic-maintain reproduce run <run-id> in a web session with video enabled, then return the screenshots and video output path
```

Mobile MCP sessions return screenshots and have no live session video option.
The agent can still inspect the video attached to a completed mobile run when
that artifact exists.

### Spec-driven development

In the simplified format, Momentic tests read as product specs. Invoke
`momentic-spec` when implementing a feature so the agent creates or updates the
smallest set of affected Momentic tests before changing product code:

```text theme={null}
/momentic-spec add a confirmation message after a file is attached
```

To make this the default behavior for your repository, also add a spec-driven
section to your `AGENTS.md` (or `.cursor/rules`, etc.):

```md theme={null}
## Momentic spec-driven development

Use the `momentic-spec` skill before implementing user-visible product changes.
It captures the intended behavior in the smallest affected set of Momentic
tests, then validates the implementation at durable UI checkpoints. Follow the
skill's steps for test data, disabled specifications, and verification.
```

See [Agentic testing](/docs/core-concepts/agentic-testing) for more on `act` and AI
action V3.

### Mo

<span id="mo" />

Use `mo-qa` to start and control [Mo](/docs/mo/why-mo) sessions from a coding agent.
If the `mo` CLI is installed, `mo skills` writes `mo-qa` and the shared skills
into the directory of each agent you pick. Without the CLI, install the skill on
its own:

```bash theme={null}
npx skills add https://github.com/momentic-ai/skills --skill mo-qa
```

Claude Code and Cursor can also install the `momentic` plugin from the
[Momentic skills repository](https://github.com/momentic-ai/skills); it contains
the same skills.

```text theme={null}
/mo-qa bug bash my new feature on <branch>
```

The skill installs and authenticates the CLI, asks you for the parts of the
brief you left out, starts the session, and follows it. It invents no scope,
credentials, or acceptance criteria. See [write a good brief](/docs/mo/brief) and
[use the CLI](/docs/mo/cli).

## Keep skills current

The skills ship inside the CLI package, so a CLI upgrade can carry new skill
content. The first time you run `momentic run`, `momentic app`,
`momentic-mobile run`, or `mo start` in a terminal after an upgrade with newer
skills, the CLI asks once whether to update the installed files. Answer `y` to
rewrite them for the agents you chose before. Answer `n` and it does not ask
again for that skill version. Each CLI tracks its own skills, so an update from
`momentic` leaves the files `mo` installed as they are.

The prompt appears only in an interactive terminal. It does not run in CI, in
non-TTY shells, or when `MOMENTIC_SKIP_SKILLS_PROMPT` is set. To update without
the prompt, run the install command again:

```bash theme={null}
npx momentic skills --yes
```

Install state lives in `~/.momentic/skills.json`. Delete the file to see the
first-run prompt again.

Each installed `SKILL.md` ends with a footer such as
`Generated for momentic 3.53.0 (skills 1788291203)`. Read it to see which CLI
version wrote the file, and compare it with `npx momentic --version` in a code
review to spot a stale skill.

## Related

* [Building with AI](/docs/coding-agents/building-with-ai)
* [MCP server](/docs/coding-agents/mcp-server)
* [Runtime agent skills](/docs/ai/skills)
