openapi-spec-generator

openapi-spec-generator is a skill for Claude Code, Codex from LambdaTest/agent-skills. It costs 165 tokens per session (2,578 once invoked), scanned A, original, MIT.

A tool for generating OpenAPI 3.x or Swagger 2.0 specifications for REST APIs. An API specification is a machine-readable description of endpoints, inputs, outputs, authentication, and data models.

In plain words
What is it for?
Documenting REST endpoints, authentication methods, request and response models, and shared data types. It can create or extend specifications in YAML or JSON.
Why use it?
It turns a natural-language description, source code, or partial specification into a complete API contract. This helps document how clients and servers should communicate without writing the YAML or JSON structure by hand.

Skill for Claude CodeCodex

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

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.

agentmods
npx agentmods add skills/lambdatest/agent-skills/openapi-spec-generator
Any agent
npx skills add LambdaTest/agent-skills --skill openapi-spec-generator
Clone the repo
git clone --depth 1 https://github.com/LambdaTest/agent-skills

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 openapi-spec-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/lambdatest/agent-skills/openapi-spec-generator.svg)](https://agentmods.dev/skills/lambdatest/agent-skills/openapi-spec-generator)
Your own site
<a href="https://agentmods.dev/skills/lambdatest/agent-skills/openapi-spec-generator"><img src="https://agentmods.dev/badge/skills/lambdatest/agent-skills/openapi-spec-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00165 $0.02578
Opus 5 $0.00082 $0.01289
Sonnet 5 $0.00033 $0.00516
Haiku 4.5 $0.00016 $0.00258

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

Security

Grade A, and why

openapi-spec-generator 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 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.

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.

api-skill/openapi-spec-generator/SKILL.md · 335 lines

How it starts

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

OpenAPI / Swagger Specification Generator

Generate complete, valid OpenAPI 3.x or Swagger 2.0 specifications from descriptions, code, or partial specs.

Workflow

Step 1 — Gather Context

Before writing any YAML/JSON, ask (or infer from context) the following:

Question Why it matters
OpenAPI 3.x or Swagger 2.0? Different info, servers/host, components/definitions structure
Output format: YAML or JSON? YAML default unless user specifies JSON
What does this API do? Sets info.title, info.description, tags
List of endpoints (or code to extract from)? Core paths object
Authentication type(s)? securitySchemes — see reference
Common data models or entities? components/schemas / definitions
Any existing partial spec to extend? Merge rather than overwrite

If the user provides code (Express routes, FastAPI, Django URLs, Spring controllers, etc.), extract endpoints automatically — do not ask what the user already told you.

Step 2 — Build the Spec

Follow the structure guide for the chosen version. Always produce a complete, valid spec — never leave placeholder comments like # TODO: add schema.

OpenAPI 3.x Skeleton
openapi: "3.1.0"
info:
  title: <API Title>
  version: "1.0.0"
  description: <Short description>
  contact:
    name: <Team or Author>
    email: <[email protected]>
servers:
  - url: https://api.example.com/v1
    description: Production
  - url: https://staging-api.example.com/v1
    description: Staging
tags:
  - name: <Tag>
    description: <Tag description>
paths:
  /resource:
    get:
      summary: List resources
      operationId: listResources
      tags: [<Tag>]
      parameters: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResourceList"
              example:
                items: []
                total: 0
        "401":
          $ref: "#/components/responses/Unauthorized"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
        - BearerAuth: []
components:
  schemas: {}
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
  securitySchemes: {}

Read the full file on GitHub · 335 lines

Files

What ships with it

2 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 · 335 lines · 165 tokens per session scan A bef98678e2f4

Subscribe to this mod's changes

openapi-spec-generator is a skill published in the GitHub repository LambdaTest/agent-skills (366 stars, last pushed 1mo ago), licensed MIT. It adds 165 tokens to every session and 2,578 once invoked, about $0.0008 per session on Opus 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-30.

Related

Other skills, from other repositories

detecting-broken-object-property-level-authorization

Detect and test for OWASP API3:2023 Broken Object Property Level Authorization vulnerabilities including excessive data exposure and mass assignment attacks.

xalgorix/xalgorix · 36 tokens

API Test Suite Generator

Automatically generate comprehensive API test suites from OpenAPI specifications covering CRUD operations, error handling, authentication, pagination, and edge cases.

PramodDutta/qaskills · 29 tokens

flowforge-testing

Generate, modify, validate, execute and triage Flow Forge API test cases. Use when the user wants to turn requirement documents, API documents, table structures or business rules into executable YAML/Excel test cases, revise existing cases after requirement/API changes, run cases with the Flow Forge executor and…

Remon-16/flow-forge · 90 tokens

kahea

Safely use HTTP APIs and finite WebSocket sessions through the Kāhea deterministic invocation kernel. Use when an agent must discover operations from OpenAPI, Postman, HAR, cURL, HTTP files, direct descriptors, websocket-session JSON/YAML, or the supported AsyncAPI 2.6/3.0 WebSocket subset; create and review sealed…

copyleftdev/kahea · 102 tokens

bruno

Comprehensive operational skill specification for Anthropic Claude to automate, script, troubleshoot, and optimize Bruno API Client, Bru markup language (.bru), CLI runner (@usebruno/cli), and CI/CD test pipelines.

alivirgo/Major-AI-Skills · 46 tokens

api-spec-generator

Generate a ready-to-import Postman or Bruno collection from an API spec, Swagger/OpenAPI file, or endpoint description. Use this skill whenever the user wants to create, export, or scaffold an API test collection. Triggers on: "generate Postman collection", "create Bruno spec", "import-ready collection", "generate…

oumaimah-QA/QIOS · 110 tokens