Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

route-to-openapi

Skill by zebbern

Generates OpenAPI 3.0.3 API documentation by scanning route definitions in source code. Built for developers who want Swagger or OpenAPI specs from Flask, FastAPI, Express, Gin and other frameworks.

  • Score 91
  • 4.7k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install route-to-openapi

Built from the published package, never by AI.

git clone --depth 1 https://github.com/zebbern/claude-code-guide /tmp/claude-code-guide && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-guide/skills/route-to-openapi ~/.claude/skills/route-to-openapi

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install route-to-openapi in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

route-to-openapi scans route and endpoint definitions in source code and generates RESTful API documentation in the OpenAPI 3.0.3 format. It detects the web framework automatically, or accepts a forced framework setting. Supported frameworks include Flask, FastAPI, Django REST Framework, Express.js, Gin and Echo. The output is a standard spec file that can be imported into Swagger UI or Redoc.

The extraction covers HTTP methods, route paths, path and query parameters, request bodies, response models and doc comments. Path parameter formats are converted to the OpenAPI brace style. The bundled Python script uses only the standard library and can write JSON or YAML. It is aimed at developers who want API docs generated from existing code.

Written from the project's SKILL.md and checked against it.

What it can do

  • Framework detectionDetects the web framework automatically, or accepts a forced framework setting.
  • Route extractionExtracts HTTP methods and route paths from endpoint definitions in source code.
  • Path parameter conversionConverts each framework's path parameter format to the OpenAPI {param} format.
  • Query parameter extractionExtracts query parameters from function signatures in Python frameworks.
  • Request body and response modelsInfers request bodies from type annotations and Pydantic models, and reads FastAPI response_model.
  • Endpoint descriptionsPulls endpoint descriptions from docstrings, JSDoc or inline comments.
  • Spec outputWrites an OpenAPI spec in JSON or YAML, to stdout or a file.

What you need

  • Python 3.8+
  • A project that uses one of the supported web frameworks

Try asking

  • Generate an OpenAPI spec from my Flask app in ./src as YAML
  • Document all endpoints in my FastAPI routes folder as Swagger
  • Extract the endpoints from my Express project and list their methods

Good to know

  • Flask, FastAPI and Django REST Framework use AST parsing, while Express, Gin and Echo use regex matching.
  • Query parameters are extracted from function signatures for Python frameworks only.
  • Request body and response model inference is described for FastAPI.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/route-to-openapi/SKILL.md, skills/route-to-openapi/scripts/generate_api_doc.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • LICENSE1 KB
  • SKILL.md4 KB
  • scripts/generate_api_doc.py26 KB

Alternatives to route-to-openapi

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

route-to-openapi: common questions

Which frameworks does route-to-openapi support?

It supports Flask, FastAPI and Django REST Framework for Python, Express.js for JavaScript and TypeScript, and Gin and Echo for Go.

Does route-to-openapi need extra packages installed?

No. The source says the script uses only the Python standard library, so no additional dependencies are required.

What output formats can it produce?

It outputs an OpenAPI 3.0.3 spec in JSON by default, or in YAML when the format option is set to yaml.

How do I install route-to-openapi?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is route-to-openapi free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is route-to-openapi safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to route-to-openapi?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

route-to-openapi Install

Add to stack

Loading.