generate-spec

A tool that creates or updates an OpenAPI 3.0 specification from application code. OpenAPI is a standard document describing an API’s endpoints, inputs, outputs, and rules.

In plain words
What is it for?
Finding routes in common programming frameworks and generating or updating OpenAPI or Swagger documentation for them.
Why use it?
It removes the need to document routes and request details manually. The resulting specification can keep API documentation aligned with the code.

Skill for Claude CodeCodex

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/postman-devrel/postman-claude-code-plugin/generate-spec
Any agent
npx skills add Postman-Devrel/postman-claude-code-plugin --skill generate-spec
Clone the repo
git clone --depth 1 https://github.com/Postman-Devrel/postman-claude-code-plugin

Made for: Claude Code, Codex.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,755 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 $0.00047 $0.01755
Opus 5 $0.00023 $0.00877
Sonnet 5 $0.00009 $0.00351
Haiku 4.5 $0.00005 $0.00176

Measured 2d ago against content hash b2049fa33769, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generate-spec 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 2d 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.

skills/generate-spec/SKILL.md · 184 lines

How it starts

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

You are an API specification assistant that generates and updates OpenAPI 3.0 specifications by analyzing the user's codebase.

When to Use This Skill

Use this skill when the user wants to generate, create, or update an OpenAPI/Swagger spec or API definition from their existing routes and endpoints.

A reference file in this skill's directory, references/spec-template.md, contains the full OpenAPI structure template and example workflows. Read it with the Read tool when you reach Step 3.


Step 1: Discover API Endpoints in the Codebase

Scan the project for API route definitions. Check common patterns by framework:

Express.js / Node.js:

# Find route files
find . -type f \( -name "*.js" -o -name "*.ts" \) -not -path "*/node_modules/*" | head -30

Look for: app.get(), app.post(), router.get(), router.post(), @Get(), @Post() (NestJS)

Python (Flask/Django/FastAPI):

find . -type f -name "*.py" -not -path "*/.venv/*" -not -path "*/venv/*" | head -30

Look for: @app.route(), @router.get(), path(), url(), @app.get() (FastAPI)

Go:

find . -type f -name "*.go" -not -path "*/vendor/*" | head -30

Look for: http.HandleFunc(), r.GET(), e.GET() (Echo), router.Handle()

Java (Spring):

find . -type f -name "*.java" | head -30

Look for: @GetMapping, @PostMapping, @RequestMapping, @RestController

Ruby (Rails):

find . -type f -name "routes.rb" -o -name "*controller*.rb" | head -20

Look for: get, post, resources, namespace

Read the relevant source files to extract:

  • HTTP methods (GET, POST, PUT, PATCH, DELETE)
  • URL paths and path parameters
  • Query parameters
  • Request body schemas (from validation, types, or models)
  • Response schemas (from return types, serializers, or examples)
  • Authentication requirements
  • Status codes

Step 2: Check for Existing Spec

Look for an existing OpenAPI spec to update:

# Check Postman specs directory
ls postman/specs/**/*.yaml postman/specs/**/*.yml postman/specs/**/*.json 2>/dev/null

# Check common root locations
ls openapi.yaml openapi.yml openapi.json swagger.yaml swagger.yml swagger.json api-spec.yaml 2>/dev/null

Read the full file on GitHub · 184 lines

Files

What ships with it

1 file 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. 2d ago First seen · 184 lines · 47 tokens per session scan A b2049fa33769

Subscribe to this mod's changes

generate-spec is a skill published in the GitHub repository Postman-Devrel/postman-claude-code-plugin (38 stars, last pushed 27d ago), licensed Apache-2.0. It adds 47 tokens to every session and 1,755 once invoked, about $0.0002 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

postman

Full API lifecycle management through Postman. Sync OpenAPI specs to collections, generate typed client code, run API tests, create mock servers, publish documentation, audit security against OWASP Top 10, and discover APIs across workspaces. Requires the Postman MCP Server. Use this skill when the user mentions…

Postman-Devrel/agent-skills · 111 tokens

postman-api-readiness

Analyze any API for AI agent compatibility. Scans OpenAPI specs across 8 pillars (48 checks), scores agent-readiness 0-100, and provides prioritized fix recommendations. Use this skill when the user asks: "Is my API agent-ready?", "Scan my API", "Analyze my OpenAPI spec", "What's wrong with my API for AI agents?"…

Postman-Devrel/agent-skills · 108 tokens

taiyi-ui-design

TaiyiForge 第 4 阶段 — UI/UX 契约,产出 UI-DESIGN.md。四端通用。.

Dong90/oh-my-taiyiforge · 35 tokens

taiyi-evolve

TaiyiForge 辅助 — 实现后架构与文档同步(architecture-sync)。OpenCode / Claude / Codex / Cursor 通用。.

Dong90/oh-my-taiyiforge · 37 tokens

taiyi-diagram-c4

TaiyiForge 辅助 — 从代码反推 C4 架构文档(Observed/Inferred 分层 · Mermaid 真源)。OpenCode / Claude / Codex / Cursor 通用。.

Dong90/oh-my-taiyiforge · 48 tokens

writing-style

Use for technical communication - GitHub/GitLab tickets, PR/MR descriptions, issue comments, code review comments, commit messages. Direct, brief style with no AI-speak. NOT for README.md, public docs, or blog posts.

umputun/cc-thingz · 52 tokens