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.

Good fit Documenting REST endpoints, authentication methods, request and response models, and shared data types. It can create or extend specifications in YAML or JSON.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lambdatest/agent-skills/openapi-spec-generator
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 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/github.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/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 openapi-spec-generator

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 61
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.5 $0.00066 $0.01031
Sonnet 5.5 $0.00033 $0.00516
Haiku 4.5 $0.00016 $0.00258

Measured 3mo ago against content hash bef98678e2f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (398 stars, last pushed 14d ago), licensed MIT. It adds 165 tokens to every session and 2,578 once invoked, about $0.0007 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-30.

Related

openapi-spec-generator compared with skills from other repositories

openapi-spec-generator next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
openapi-spec-generatorLambdaTest/agent-skillsSkill39814d agoMITA165Claude Code, Codex
detecting-broken-object-property-level-authorizationxalgorix/xalgorixSkill1.5k2d agoApache-2.0A36Claude Code, Codex
API Test Suite GeneratorPramodDutta/qaskillsSkill25328d agoMITA29Claude Code, Codex
brunoalivirgo/Major-AI-SkillsSkill6yesterdayMITA26Claude Code
kaheacopyleftdev/kaheaSkill21mo agoApache-2.0A102Claude Code, Codex
flowforge-testingRemon-16/flow-forgeSkill113mo agoMITA90Claude Code, Codex
contract-testingJPeetz/agent-skillsSkill21yesterdaynoneA62Claude Code, Codex