microcks-openapi-mocking

microcks-openapi-mocking is a skill for Claude Code, Codex from emmanuelperu/microcks-skills. It costs 47 tokens per session (2,734 once invoked), scanned A, original, Apache-2.0.

A guide for writing OpenAPI specifications that Microcks can use to return mocked API responses. Microcks is a tool that simulates an API for testing without running the real service.

In plain words
What is it for?
Use it when adding success or error scenarios, pairing request examples with responses, configuring request-based routing, or debugging unexpected mock results.
Why use it?
It helps avoid mismatched request and response examples or dispatcher settings that cause a mock API to return the wrong response.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is ./mocking/import-openapi.sh path/to/api-spec.yaml.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for microcks-openapi-mocking

README.md
[![agentmods](https://agentmods.dev/badge/skills/emmanuelperu/microcks-skills/microcks-openapi-mocking.svg)](https://agentmods.dev/skills/emmanuelperu/microcks-skills/microcks-openapi-mocking)
Your own site
<a href="https://agentmods.dev/skills/emmanuelperu/microcks-skills/microcks-openapi-mocking"><img src="https://agentmods.dev/badge/skills/emmanuelperu/microcks-skills/microcks-openapi-mocking.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,734 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.02734
Opus 5 $0.00023 $0.01367
Sonnet 5 $0.00009 $0.00547
Haiku 4.5 $0.00005 $0.00273

Measured 6d ago against content hash 13c4f11afc08, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

microcks-openapi-mocking scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST http://localhost:8080/api/mocks/User%20API/1.0.0/users \
skills/microcks-openapi-mocking/SKILL.md · 405 lines

How it starts

The opening of the file, as written. The whole thing — 405 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Microcks OpenAPI Mocking

Help write and configure OpenAPI specifications with examples that work correctly in Microcks.

When to Use This Skill

Use this skill when:

  • Writing or editing named examples in an OpenAPI spec for Microcks mocking
  • Adding a new endpoint to an OpenAPI spec with multiple example scenarios (success, errors)
  • Configuring a dispatcher to control how Microcks routes requests to different responses
  • Debugging a mock response that isn't returning the expected data
  • Setting up example pairing between request and response examples in OpenAPI

Core Rules

Microcks mocking depends on correct example pairing and dispatcher configuration. Here are the key rules:

Rule 1: Example Names Must Match Across Locations

Every named example in path/query parameters and request body must have a corresponding response example with the same name.

paths:
  /pets/{petId}:
    get:
      parameters:
        - name: petId
          examples:
            success:      # ← example name
              value: 1
            not_found:    # ← example name
              value: 999
      responses:
        '200':
          content:
            application/json:
              examples:
                success:    # ← same name
                  value: { id: 1, name: Fluffy }
        '404':
          content:
            application/json:
              examples:
                not_found:  # ← same name
                  value: { error: Not found }

Details: See example-pairing.md

Rule 2: No-Body Responses Need Content Block with value: null

Responses with no body (204, 304) must still have a content block with explicit value: null:

delete:
  responses:
    '204':
      description: Deleted
      content:
        application/json:
          examples:
            success:
              value: null  # ← Required for no-body responses

Rule 3: All Error Examples Need Input Examples

Read the full file on GitHub · 405 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 405 lines · 47 tokens per session scan A 13c4f11afc08

Subscribe to this mod's changes

microcks-openapi-mocking is a skill published in the GitHub repository emmanuelperu/microcks-skills (4 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 47 tokens to every session and 2,734 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.