# Test

> Test is an open-source agent skill for developer tools. Writes failing tests from approved acceptance criteria before any implementation exists. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/JasGujral/mokata-oss/tree/main/src/mokata/skills/test
- **Repository:** https://github.com/jasgujral/mokata-oss
- **GitHub stars:** 19
- **License:** Apache-2.0
- **Skill name:** test
- **Collection:** https://github.com/JasGujral/mokata-oss
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill guides the agent through a test-first step in the mokata workflow. It starts by retrieving a saved spec with its acceptance criteria, and it stops and asks for a spec if none is persisted. The agent then writes one test per criterion, checks that each test fails before any implementation is written, and keeps tests tied to real function names and signatures rather than invented interfaces.

The instructions also push for coverage at the point where a value is read by a caller, not just where it is produced, and for inputs at the edges of each criterion's domain such as empty, falsy, absent and hostile values. It asks the agent to record each test run with mokata progress commands and to flag any criterion that is wrong or untestable so the spec can be amended instead of silently changing coverage.

The skill is a single SKILL.md with no bundled scripts. It relies on mokata's spec and code-graph commands, and it is meant for Python projects in the mokata repository.

## When your agent uses it

> mokata · Write failing tests first (RED); no implementation.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/test)
- [License: Apache-2.0](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/test)

## Features

- **Spec-gated test writing:** Requires a persisted spec with acceptance criteria before any tests are written.
- **Red-first verification:** Expects each test to be seen failing before implementation code exists.
- **Consumer-level assertions:** Checks criteria where the value is read by callers, not only where it is produced.
- **Boundary input coverage:** Feeds empty, falsy, absent and hostile values for each acceptance criterion.
- **Run progress recording:** Logs each test run by full node id through mokata progress commands.

## Good for

- Write failing tests for the acceptance criteria of an approved spec
- Add tests for a feature before any implementation is started
- Check that a function's return value is covered at the point a caller reads it
- Identify edge-case inputs that a spec's acceptance criteria should be tested against

## Install

### Claude Code

This skill ships in the `mokata` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add JasGujral/mokata-oss
/plugin install mokata@mostack
```

Or copy only this skill to `~/.claude/skills/test`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/test &&
cp -R "$tmp/src/mokata/skills/test" ~/.claude/skills/test &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/test` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/test` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/test &&
cp -R "$tmp/src/mokata/skills/test" ~/.agents/skills/test &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/test` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/test` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/test &&
cp -R "$tmp/src/mokata/skills/test" ~/.cursor/skills/test &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/test` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/JasGujral/mokata-oss.git --path src/mokata/skills/test
```

Or copy the folder to `~/.gemini/skills/test` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/test`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/test &&
cp -R "$tmp/src/mokata/skills/test" ~/.copilot/skills/test &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/test` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git
```

Then copy `mokata-oss/src/mokata/skills/test` into your agent's skills folder as `test`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Test need before it runs?

It needs a saved spec with at least one acceptance criterion, retrieved with the spec_show tool or mokata spec show. If none exists, the skill tells the agent to produce the spec first.

### Does Test write implementation code?

No. The skill forbids writing implementation in this step and expects the tests to fail first. Implementation belongs to the separate develop step.

### When does Test trigger?

It is meant to engage when a spec's acceptance criteria need failing tests, when the user asks for tests on approved behaviour, or when starting test-driven development before implementation exists.

### Which AI clients does Test support?

The listing does not tie it to specific clients, so it follows the shared agent skills format and is listed for all supported clients.

### How do I install Test in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/test to use it in all your projects, or to .claude/skills/test in one project. Or install the mokata plugin, which includes it: /plugin marketplace add JasGujral/mokata-oss, then /plugin install mokata@mostack.

### Does Test run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Test?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Test?

The closest alternatives to Test are Develop, Spec, Mt spec, TDD and Testing.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Develop](https://ai-powered.com/skills/develop): Develop is an open-source agent skill for developer tools.
- [Spec](https://ai-powered.com/skills/spec-jasgujral): Spec is an open-source agent skill for developer tools.
- [Mt spec](https://ai-powered.com/skills/mt-spec): Mt spec is an open-source agent skill for developer tools.
- [TDD](https://ai-powered.com/skills/tdd): TDD is an open-source agent skill for developer tools.
- [Testing](https://ai-powered.com/skills/testing-xiaolai-2): Testing is an open-source agent skill for developer tools.
- [TDD loop](https://ai-powered.com/skills/tdd-loop): TDD loop is an open-source agent skill for developer tools.
- [TDD](https://ai-powered.com/skills/tdd-michael-denyer): TDD is an open-source agent skill for developer tools.
- [Testing strategy](https://ai-powered.com/skills/testing-strategy): Testing strategy is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/test
