Agent skill

Route To Openapi

by zebbern in zebbern/claude-code-guide

Generates RESTful API documentation (OpenAPI 3.0 / Swagger spec) by scanning route definitions in code for Flask, FastAPI, Express, Gin, and other frameworks.

MITAuto-check passedBackend & APIs

Install Route To Openapi

skills CLI
$ npx skills add zebbern/claude-code-guide --skill route-to-openapi -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zebbern/claude-code-guide route-to-openapi --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zebbern/claude-code-guide.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/route-to-openapi .claude/skills/route-to-openapi && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
route-to-openapi
GitHub stars
4.7k
Token cost
~1.1k tokens
SKILL.md length
299 words
Files
3 (incl. scripts)
Skills in repo
46
Repo updated
First seen
Licence
MIT

At a glance

Generates RESTful API documentation (OpenAPI 3.0 / Swagger spec) by scanning route definitions in code for Flask, FastAPI, Express, Gin, and other frameworks.

  • Users ask about API documentation
  • SKILL.md covers Quick Start, Supported Frameworks, Extraction Capabilities and Path Parameter Format Conversion, plus 3 more sections
  • Runs Python scripts from its folder; calls python
  • Generating docs from code

What it does

Route To Openapi is an agent skill from zebbern/claude-code-guide. Generates RESTful API documentation (OpenAPI 3.0 / Swagger spec) by scanning route definitions in code for Flask, FastAPI, Express, Gin, and other frameworks. Trigger when users ask about API documentation, OpenAPI, Swagger, endpoint docs, generating docs from code, or extracting endpoints.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/generate_api_doc.py`).

It sits in Backend & APIs, covering OpenAPI specifications and Technical documentation. It works with OpenAPI, FastAPI, Flask and Python. The repository describes itself as: Claude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks from beginner to power user! The licence is MIT.

When your agent uses it

  • Users ask about API documentation
  • Generating docs from code
  • Extracting endpoints

Example prompts

  • “Use the route-to-openapi skill to generate RESTful API documentation (OpenAPI 3.0 / Swagger spec) by scanning route definitions in code for Flask…”
  • “/route-to-openapi”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit e62775c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • spec.openapis.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Route To Openapi loads about 1.1k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 299 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from zebbern/claude-code-guide at commit e62775c, republished under its MIT licence (© zebbern). 299 words, ~1,150 tokens.

Download SKILL.mdSave it as .claude/skills/route-to-openapi/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
route-to-openapi
description
Generates RESTful API documentation (OpenAPI 3.0 / Swagger spec) by scanning route definitions in code for Flask, FastAPI, Express, Gin, and other frameworks. Trigger when users ask about API documentation, OpenAPI, Swagger, endpoint docs, generating docs from code, or extracting endpoints.
license
MIT

route-to-openapi

Automatically scan route/endpoint definitions in source code and generate RESTful API documentation conforming to the OpenAPI 3.0.3 specification.

Supports major web frameworks with automatic framework detection. Extracts HTTP methods, paths, parameters, request bodies, response models, and doc comments, then outputs a standard OpenAPI spec file ready to import into Swagger UI or Redoc.

Quick Start

bash
# Scan source directory, output OpenAPI spec in JSON format
python scripts/generate_api_doc.py ./src

# Specify output format and file
python scripts/generate_api_doc.py ./src --format yaml --output api-spec.yaml

# Specify framework and API metadata
python scripts/generate_api_doc.py ./app --framework flask --title "My API" --version 2.0.0

# Add server URLs
python scripts/generate_api_doc.py ./routes --server http://localhost:3000 --server https://api.example.com

Supported Frameworks

LanguageFrameworkParsing Method
PythonFlaskAST parsing (decorators + type annotations + docstrings)
PythonFastAPIAST parsing (decorators + Pydantic models + type annotations)
PythonDjango REST FrameworkAST parsing (@api_view decorators)
JavaScript/TypeScriptExpress.jsRegex matching (app.get() / router.get() + JSDoc)
GoGinRegex matching (r.GET() / group.GET() + comments)
GoEchoRegex matching (e.GET() + comments)

Extraction Capabilities

The script automatically extracts the following information:

  • HTTP Methods: GET / POST / PUT / DELETE / PATCH, etc.
  • Route Paths: Automatically converts each framework's path parameter format to the OpenAPI {param} format
  • Path Parameters: Extracted from route patterns (with type inference)
  • Query Parameters: Extracted from function signatures (Python frameworks)
  • Request Bodies: Inferred from type annotations and Pydantic models (FastAPI)
  • Response Models: Extracted from the response_model parameter (FastAPI)
  • Endpoint Descriptions: Extracted from docstrings / JSDoc / inline comments
  • Tag Grouping: Automatically grouped by source file module name

Path Parameter Format Conversion

FrameworkSource FormatConverted Result
Flask<int:user_id>{user_id} (type: integer)
FastAPI{user_id}{user_id} (unchanged)
Express:user_id{user_id}
Gin/Echo:user_id{user_id}

Parameters

ParameterDescriptionDefault
source_dirSource directory to scan (required)-
-f, --formatOutput format: json or yamljson
-o, --outputOutput file pathstdout
--frameworkForce a specific framework (skip auto-detection)Auto-detect
--titleAPI documentation titleAPI Documentation
--versionAPI version number1.0.0
--descriptionAPI description textEmpty
--serverServer URL (can be specified multiple times)None

Output Example

json
{
  "openapi": "3.0.3",
  "info": {
    "title": "My API",
    "version": "1.0.0"
  },
  "paths": {
    "/users": {
      "get": {
        "summary": "List all users",
        "operationId": "list_users",
        "tags": ["users"],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": { "description": "Successful response" }
        }
      }
    },
    "/users/{user_id}": {
      "get": {
        "summary": "Get user by ID",
        "operationId": "get_user",
        "tags": ["users"],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": { "description": "Successful response" }
        }
      }
    }
  }
}

Prerequisites

  • Python 3.8+
  • No additional dependencies required — uses only the Python standard library
  • The scanned project must use one of the supported web frameworks listed above

© zebbern, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in skills/route-to-openapi of zebbern/claude-code-guide.

  • SKILL.md
  • LICENSE
  • scripts/generate_api_doc.py

Open the folder on GitHubat commit e62775c

Compare with similar skills

Route To Openapi next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Route To Openapi compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Route To Openapi this skillzebbern/claude-code-guide4.7k—~1.1kAutomated safety check: PassMIT
API Documenteralirezarezvani/claude-code-tresor777—~1.5kAutomated safety check: PassMIT
FastAPI ExpertJeffallan/claude-skills12k—~1.8kAutomated safety check: PassMIT
Fastapi Init Skilljiushiwon/wg-skills112—~1.8kAutomated safety check: NotesApache-2.0
Python Fastapi Patternsaiskillstore/marketplace4301 repos~1.3kAutomated safety check: NotesNone
Openapi To Python Lungoagntcy/coffeeAgntcy112—~4.3kAutomated safety check: PassApache-2.0

Similar skills

  • API Documenter

    alirezarezvani/claude-code-tresor

    Auto-generate API documentation from code and comments. An agent skill from alirezarezvani/claude-code-tresor.

    777 GitHub stars~1.5k tokensUpdated 3 mo ago
    Backend & APIsAuto-check passed
  • FastAPI Expert

    Jeffallan/claude-skills

    Builds async Python APIs with FastAPI and Pydantic V2, covering endpoints, JWT authentication, async SQLAlchemy, WebSockets and pytest checks against the OpenAPI docs.

    12k GitHub stars~1.8k tokensUpdated 5 days ago
    Backend & APIsAuto-check passed
  • Fastapi Init Skill

    jiushiwon/wg-skills

    FastAPI 项目一键初始化技能。面向零基础小白,提供环境探测、自动安装、完整 Web 骨架生成、SSE 流式框架、JWT 鉴权、统一响应封装、文件上传接口、一键启动/重启脚本、Swagger 文档,内置 MySQL(默认)/ PostgreSQL / MongoDB 数据库选择。用户只需说"帮我搭一个 FastAPI 项目"即可一条命令完成从零到跑的完整链路。触发词:"FastAPI…

    112 GitHub stars~1.8k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Python Fastapi Patterns

    aiskillstore/marketplace

    FastAPI web framework patterns. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~1.3k tokens
    Backend & APIsAuto-check: notes
  • Openapi To Python Lungo

    agntcy/coffeeAgntcy

    Generates and validates Python FastAPI routers and DTOs from the OpenAPI schemas in coffeeAGNTCY/coffeeagents/lungo/schema/openapi for the lungo subproject.

    112 GitHub stars~4.3k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • API Docs Generator

    Mathews-Tom/armory

    Audits and enhances FastAPI and REST API documentation: missing descriptions, response codes, examples, docstrings, Pydantic models, OpenAPI spec.

    328 GitHub stars~1.7k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed

More from zebbern/claude-code-guide

All 46 skills in this repo
  • Code To Diagram

    zebbern/claude-code-guide

    Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts.

    4.7k GitHub starsUsed in 1 repo~972 tokens
    Auto-check passed
  • Localization Toolkit

    zebbern/claude-code-guide

    This skill should be used when setting up, auditing, or enforcing internationalization/localization in UI codebases (React/TS, i18next or similar, JSON locales), including installing/configuring the…

    4.7k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Audit Flow

    zebbern/claude-code-guide

    Interactive system flow tracing across CODE, API, AUTH, DATA, NETWORK layers with SQLite persistence and Mermaid export.

    4.7k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Chart Image

    zebbern/claude-code-guide

    Generate publication-quality PNG chart images from data, supporting line, bar, area, candlestick, pie, and heatmap charts.

    4.7k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Code Vuln Audit

    zebbern/claude-code-guide

    Scan code for security issues: dependency vulnerabilities (npm/pip audit), secret leaks (regex and entropy analysis), and OWASP anti-patterns like SQL injection, XSS, or command injection.

    4.7k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Linux Shell Scripting

    zebbern/claude-code-guide

    This skill should be used when the user asks to "create bash scripts", "automate Linux tasks", "monitor system resources", "backup files", "manage users", or "write production shell scripts".

    4.7k GitHub starsUsed in 9 repos~3.1k tokens
    Auto-check: notes

Categories

Questions about Route To Openapi

What does Route To Openapi do?

Generates RESTful API documentation (OpenAPI 3.0 / Swagger spec) by scanning route definitions in code for Flask, FastAPI, Express, Gin, and other frameworks. Route To Openapi is an agent skill from zebbern/claude-code-guide.0 / Swagger spec) by scanning route definitions in code for Flask, FastAPI, Express, Gin, and other frameworks.

When should I use Route To Openapi?

Route To Openapi fits situations like: users ask about API documentation; generating docs from code; extracting endpoints.

How do I install Route To Openapi in Claude Code?

Run `npx skills add zebbern/claude-code-guide --skill route-to-openapi -a claude-code`. Or copy the skill folder (skills/route-to-openapi in zebbern/claude-code-guide) into .claude/skills/route-to-openapi in your project. Claude Code loads it when a task matches its description.

How do I install Route To Openapi in Codex?

Run `npx skills add zebbern/claude-code-guide --skill route-to-openapi -a codex`. Or copy the skill folder (skills/route-to-openapi in zebbern/claude-code-guide) into .agents/skills/route-to-openapi in your project. Codex loads it when a task matches its description.

Can I use Route To Openapi in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zebbern/claude-code-guide --skill route-to-openapi -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/route-to-openapi, .gemini/skills/route-to-openapi, .github/skills/route-to-openapi and .opencode/skills/route-to-openapi in your project.

What does Route To Openapi need to run?

Going by SKILL.md and its folder, Route To Openapi needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Route To Openapi access the network?

SKILL.md names 1 domain. As links in the text: spec.openapis.org. This is read from the text; nothing was executed.

Is Route To Openapi safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Route To Openapi use?

Route To Openapi is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Route To Openapi use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Route To Openapi?

Skills that share tags, products or a category with Route To Openapi: API Documenter (alirezarezvani/claude-code-tresor, 777 stars), FastAPI Expert (Jeffallan/claude-skills, 12k stars), Fastapi Init Skill (jiushiwon/wg-skills, 112 stars) and Python Fastapi Patterns (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Route To Openapi?

zebbern (a GitHub user) maintains it in zebbern/claude-code-guide, which has 4,650 GitHub stars. The repository holds 46 skills in this directory. The repository was last updated on October 8, 2026.

Source: zebbern/claude-code-guide on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.