openapi-summarizer
Summarizes an OpenAPI 3 or Swagger 2 JSON file into title, servers, endpoint counts per tag, unsecured operations, deprecated operations and a compact endpoint list. Use when the user shares an API spec and asks what it contains, wants an overview before integrating, or needs to
Install
npx skills add https://github.com/Lethe044/agentskill-kit/tree/main/skills/openapi-summarizer
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install lethe044-agentskill-kit@llmmart
git clone https://github.com/Lethe044/agentskill-kit.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole lethe044/agentskill-kit collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
OpenAPI summarizer
Turns a large spec into a short, structured overview that an agent can reason about.
When to use
- The user pastes or points to an
openapi.jsonorswagger.json. - Before writing a client, to see how big the API is and how it is organized.
- During a review, to list the operations that have no security requirement.
How to run
python scripts/summarize_openapi.py openapi.json
YAML specs must be converted to JSON first.
Output
JSON with:
title,version(the API version) andspec(the OpenAPI or Swagger version).servers: server URLs (for Swagger 2, built fromschemes,hostandbasePath).operations,deprecated,unsecured: counts. An operation is secured when it has its ownsecuritylist, or when it has none and the document defines a globalsecuritylist. An empty list means no security.by_tag: operations per tag (untaggedwhen missing).schemas: number of schema definitions.endpoints: a list of{"method", "path", "summary", "tags", "secured", "deprecated"}.
Reading the result
- Start with the title, version and the size (operations and schemas).
- Name the biggest tags and what they seem to cover.
- Point out
unsecuredoperations and ask whether they are meant to be public. - Mention deprecated operations so they are not used in new code.
Errors
A missing file exits with code 2. Invalid JSON, or a document that is not OpenAPI or Swagger, exits with code 3.
Files (agentskill-kit)
-
scripts
-
summarize_openapi.py 2.7 KB
Loading…
-
-
tests
-
cases.json 4 KB
Loading…
-
-
SKILL.md 1.9 KB
--- name: openapi-summarizer description: Summarizes an OpenAPI 3 or Swagger 2 JSON file into title, servers, endpoint counts per tag, unsecured operations, deprecated operations and a compact endpoint list. Use when the user shares an API spec and asks what it contains, wants an overview before integrating, or needs to find endpoints without authentication. license: MIT metadata: version: 1.0.0 author: Lethe044 tags: [openapi, swagger, api, documentation] --- # OpenAPI summarizer Turns a large spec into a short, structured overview that an agent can reason about. ## When to use - The user pastes or points to an `openapi.json` or `swagger.json`. - Before writing a client, to see how big the API is and how it is organized. - During a review, to list the operations that have no security requirement. ## How to run ```bash python scripts/summarize_openapi.py openapi.json ``` YAML specs must be converted to JSON first. ## Output JSON with: - `title`, `version` (the API version) and `spec` (the OpenAPI or Swagger version). - `servers`: server URLs (for Swagger 2, built from `schemes`, `host` and `basePath`). - `operations`, `deprecated`, `unsecured`: counts. An operation is secured when it has its own `security` list, or when it has none and the document defines a global `security` list. An empty list means no security. - `by_tag`: operations per tag (`untagged` when missing). - `schemas`: number of schema definitions. - `endpoints`: a list of `{"method", "path", "summary", "tags", "secured", "deprecated"}`. ## Reading the result 1. Start with the title, version and the size (operations and schemas). 2. Name the biggest tags and what they seem to cover. 3. Point out `unsecured` operations and ask whether they are meant to be public. 4. Mention deprecated operations so they are not used in new code. ## Errors A missing file exits with code 2. Invalid JSON, or a document that is not OpenAPI or Swagger, exits with code 3.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.