Getting Started

Mocking with coding agents

Mocko ships an agent skill that teaches coding agents the mock file format, the Bigodon templating language, and the SDK. With it installed, your agent can write mocks for your API, debug failing templates, and review mock changes in pull requests.

Install the skill

The skill is distributed with skills.sh, which works with Claude Code, Codex, Cursor, and other skills-compatible agents. Run this in your project:

$npx skills@latest add mocko-app/mocko/skills/mocko

The command copies the skill into your repository. Commit it like any other file: teammates and CI agents pick it up on checkout, and the version you reviewed is the version your agents use. Re-run the same command to update it.

What the skill covers

  • Mock file structure: mock blocks, matching, status, delay, headers, and labels.
  • Bigodon templating: the request context, helpers, conditionals, loops, and variables, including the differences from Handlebars.
  • Flags, data blocks, host blocks, and proxying, so it can build stateful and multi-service setups.
  • The @mocko/sdk client for reading and writing flags from automated tests.
  • Translating v1 Handlebars templates to v2 Bigodon.

What to ask for

The skill makes the agent precise about syntax, but the workflow is ordinary prompting. Some requests that work well:

  • Paste a real response from your backend, or a snippet of its OpenAPI spec, and ask for a mock that mimics it. Point the agent at a recipe when you want a specific pattern, like stateful CRUD or a polling flow.
  • Paste a template along with the wrong output it produced and ask the agent to find the bug. The skill covers the debugging signals from Templating, such as context mistakes and broken JSON.
  • Ask it to review the mock files in a pull request, checking matching overlaps and template correctness.
  • During a v1 migration, hand it the templates flagged as invalid and ask for Bigodon translations.
The skill tracks the latest Mocko release. If you run an older version, mention it in your prompt so the agent avoids features your install does not have yet.

Next

To judge what the agent writes, you want the fundamentals yourself: start with File Mocks and Templating.