mockapi

mockapi is a skill for Codex from devctllabs/mockapi. It costs 72 tokens per session (1,354 once invoked), scanned A, original, Apache-2.0.

A tool for creating stateful mock application programming interfaces from OpenAPI 3.0 or 3.1 contracts. OpenAPI is a format that describes how an API works.

In plain words
What is it for?
Building or repairing TypeScript/Hono mock servers, validating mock profiles, generating admin state endpoints, and working with .mockapi behavior files.
Why use it?
It provides a defined way to test API-based software before the real service is available, while checking the contract and simulated behavior.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Building or repairing TypeScript/Hono mock servers, validating mock profiles, generating admin state endpoints, and working with .mockapi behavior files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/devctllabs/mockapi/mockapi
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add devctllabs/mockapi --skill mockapi
Clone the repo
git clone --depth 1 https://github.com/devctllabs/mockapi

Made for: 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 mockapi

README.md
[![agentmods](https://agentmods.dev/badge/skills/devctllabs/mockapi/mockapi/github.svg)](https://agentmods.dev/skills/devctllabs/mockapi/mockapi)
Your own site
<a href="https://agentmods.dev/skills/devctllabs/mockapi/mockapi"><img src="https://agentmods.dev/badge/skills/devctllabs/mockapi/mockapi/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mockapi

Your own site · 80×15
<a href="https://agentmods.dev/skills/devctllabs/mockapi/mockapi"><img src="https://agentmods.dev/badge/skills/devctllabs/mockapi/mockapi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,354 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00072 $0.01354
Opus 5.5 $0.00029 $0.00542
Sonnet 5.5 $0.00014 $0.00271
Haiku 4.5 $0.00007 $0.00135

Measured 1mo ago against content hash 7e39f1964dfc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mockapi scanned grade A with 0 findings 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 1mo ago.

The scan reads SKILL.md. This mod also ships 41 executable files (assets/templates/mock-server/scripts/build.mjs, assets/templates/mock-server/scripts/codegen-admin-openapi.ts, assets/templates/mock-server/scripts/lib/mockRuntimeCodegen.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/mockapi/SKILL.md · 132 lines

How it starts

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

mockapi

Use this skill to create stateful mock API servers from OpenAPI contracts. The agent owns behavior analysis and sidecar authoring; bundled scripts only perform structural validation and deterministic typed scaffolding. Generated operation services are TODOs; the agent completes wiring and behavior from .mockapi/behavior.md anchors.

Command Router

Route invocations:

  1. No argument: show a short menu with profile, generate, and freeform examples. Ask what the user wants to do.
  2. First word profile: read reference/profile.md and follow that workflow. Everything after profile is the target or context.
  3. First word generate: before any OpenAPI search or repo-wide file scan, read reference/generate.md and run the generate sidecar preflight from that workflow. Everything after generate is the target or context. After the profile and sidecars are present and validation succeeds, always run <python> <skill-root>/scripts/generate.py; do not satisfy a generate command by only describing, planning, or hand-writing the scaffold.
  4. Any other first word: treat the entire argument as a general mockapi request. Do not reject unknown first words merely because they are not commands.

General mockapi request routing:

  • Mock-server creation requests such as "make", "build", "create", "generate", "scaffold", or "use this OpenAPI" route to reference/generate.md. generate auto-runs the profile workflow when sidecars are missing.
  • Profile, analyze, describe, or sidecar-only requests route to reference/profile.md.
  • Validate, check, repair, or diagnose sidecar requests run scripts/validate_profile.py, read reference/sidecars.md, and repair or report blockers as needed. The validator checks profile.toml and behavior.md unless --profile-only is used.
  • Questions about existing generated mock-server code read reference/generated-server.md, reference/mock-server-structure.md, and reference/mock-server-examples.md, then inspect the relevant files. When finishing or reviewing LLM-owned generated server code, also read reference/mock-server-quality.md.

Read the full file on GitHub · 132 lines

Files

What ships with it

60 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. 1mo ago First seen · 132 lines · 72 tokens per session scan A 7e39f1964dfc

Subscribe to this mod's changes

mockapi is a skill published in the GitHub repository devctllabs/mockapi (3 stars, last pushed 13d ago), licensed Apache-2.0. It adds 72 tokens to every session and 1,354 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ocli-api

Turn any OpenAPI, Swagger, or OpenRPC API into CLI commands and call them. Search endpoints with BM25, check parameters, execute — no MCP server needed.

EvilFreelancer/openapi-to-cli · 38 tokens

skmtc-lang-kotlin

The Kotlin target-language layer for Skmtc generators (@skmtc/lang-kotlin): base factories, KtSnippet, the seven entity kinds, packages-from-paths imports, the head+value render model, KtAnnotation and the composition classes, sanitization and @SerialName placement, plus the current-API worked example (the shipped…

skmtc/skmtc · 117 tokens

skmtc-cli

Use the Skmtc CLI to scaffold projects, install or clone generators from JSR, configure schema sources and enrichments, and produce code artifacts from an OpenAPI v3 or GraphQL SDL schema. Teaches the workspace mental model ( /.skmtc/ /, client.json, bundle, manifest) and the agent contract (strict text / strict JSON…

skmtc/skmtc · 307 tokens

skmtc-graphql

The GraphQL pipeline for SKMTC generators — authoring generators whose input schema is GraphQL SDL rather than OpenAPI. Covers toGqlOperationEntry, GqlOperation, synthesizeArgsObject (mutation args -> object schema), the GQL enrichment routing ([id][rootKind][fieldName][variant] — two nested subject keys where OAS has…

skmtc/skmtc · 211 tokens

migrate-mcp-between-projects

Redeploy one Platform-managed MCP server from an explicit source AICP project to an explicit target project in the same organization, complete secure setup there, verify readiness, distribute it, and optionally retire the source with a safe cutover through the Speakeasy AI Control Plane Platform MCP.

speakeasy-api/gram · 64 tokens

mock-server

Spin up mock API servers for frontend development and testing: static responses, record/replay real API calls, dynamic response generation.

JansenAnalytics/claudex · 28 tokens