# momentic-spec

A skill that makes the agent write Momentic tests before implementing anything, so the tests define the contract instead of matching finished code.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 28300 installs · ★ 16
- Author: momentic-ai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/momentic-ai/skills/tree/HEAD/skills/momentic-spec/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/momentic-spec

## What it does

The skill enforces a fixed order. The agent reads `momentic.config.yaml`, nearby tests and modules, names the exact Momentic tests the change will touch, and only then creates or edits them. Product code comes after the specs are on disk. If the requirement shifts, the spec is updated first.

Picking the affected set has its own rules. New user-visible behavior gets the smallest new test that describes the journey; changed behavior means updating the existing test rather than adding duplicate coverage. Shared modules are touched only when the requested contract requires it, and every test consuming them is accounted for. A weak assertion does not survive just because it matches what the code does today.

Momentic is end-to-end validation here, not the agent's inner loop. It does not run after every edit or commit. Unit tests, typechecking and linting carry the build; before a long run the agent states which tests it proposes and the expected duration, then waits for confirmation. A test gets `disabled: true` when the implementation or a dependency is not ready, with a note on what must change before enabling it. Missing local credentials are not a reason to disable it.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add momentic-ai/skills --skill momentic-spec -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/momentic-spec/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/momentic-spec/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add momentic-ai/skills --skill momentic-spec -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/momentic-spec/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add momentic-ai/skills --skill momentic-spec -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/momentic-spec/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install momentic-ai/skills momentic-spec
```

2. **Manually: put the files in place**
- File: `.github/skills/momentic-spec/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add momentic-ai/skills --skill momentic-spec -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/momentic-ai/skills --path skills/momentic-spec
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/momentic-spec/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add momentic-ai/skills --skill momentic-spec -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/momentic-ai/skills/tree/HEAD/skills/momentic-spec/SKILL.md

## When to use it
- write the expected behavior as a test before coding it
- find every Momentic test a change will affect
- update an existing test instead of duplicating coverage
- check a shared module and all tests that consume it
- hold end-to-end runs until a durable checkpoint

## Example prompts
- add the password reset flow: spec it in Momentic first, then implement
- which Momentic tests does the auth module change affect?
- update the old checkout test instead of adding a new one

## Similar
- [spec-driven-workflow](https://affpapa.org/en/nevibecode/skills/spec-driven-workflow.md) — skill · 600 installs
- [test-driven-development](https://affpapa.org/en/nevibecode/skills/addyosmani-test-driven-development.md) — skill · 62000 installs
- [spec-to-repo](https://affpapa.org/en/nevibecode/skills/spec-to-repo.md) — skill · 573 installs
- [clerk-testing](https://affpapa.org/en/nevibecode/skills/clerk-testing.md) — skill · 46300 installs
- [cypress-author](https://affpapa.org/en/nevibecode/skills/cypress-author.md) — skill · 9000 installs
- [cypress-tap](https://affpapa.org/en/nevibecode/skills/cypress-tap.md) — skill · 2700 installs

From the same set: [momentic-ai/skills](https://affpapa.org/en/nevibecode/by/momentic-ai/skills.md) — 5 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
