# OpenAPI Swagger review

> Audit OpenAPI and Swagger specs for code-generation readiness, missing types, and implementation drift.

OpenAPI Swagger review is a free AI agent skill on Agensi by Peter van Eijk, in Technical Documentation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Peter van Eijk](https://www.agensi.io/creators/peter-van-eijk)
- Category: [Technical Documentation](https://www.agensi.io/skills/technical-documentation)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-20
- Security: scan passed (2026-10-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/openapi-swagger-review
- Tags: documentation, code-review, api, openapi, swagger

## About this skill

A valid OpenAPI specification can still be a failure for code generation. Vague types, missing error shapes, and inconsistent naming get faithfully reproduced in generated clients, leading to broken builds or manual cleanup. This skill reviews specs through the lens of machine-readability and generation readiness.

### What it does
- **Identity & routing audit** ensures unique operationIds and parameter-to-path template alignment.
- **Schema verification** flags untyped objects, missing required arrays, and ambiguous nullability.
- **Response modeling** checks for 2xx schema presence and standard error shapes for 4xx/5xx codes.
- **Synthetic-data readiness** evaluates if a spec is self-contained enough to generate realistic mock data.
- **Drift detection** compares the specification against actual source code routes and handlers when available.
- **Security pattern analysis** identifies weak auth patterns, sensitive data in URLs, and credential leaking.

### How it works
1. **Locate and load** the spec file from common locations like `/docs` or the project root.
2. **Structural validation** runs via CLI tools or manual parsing to ensure the YAML/JSON is sound.
3. **Checklist execution** performs a comprehensive pass across all operations based on severity-ranked criteria.
4. **Report generation** delivers a categorized list of blockers, high, medium, and low severity findings.

### Frameworks & tools
Works with OpenAPI 3.x and Swagger 2.0 specifications in YAML or JSON. Integrates with `redocly/cli`, `swagger-cli`, or Python-based spec validators for structural checks.

### Why this beats prompting it yourself
Generic prompts often miss the subtle behavioral gaps like missing `429` retry headers or synthetic data referential integrity. This skill uses a tiered severity system specifically tuned for code-generation outcomes, ensuring you fix blockers before polish.

### Use cases
- Auditing a newly generated spec before using it to scaffold a frontend client.
- Identifying drift between a legacy API's documentation and its actual implementation.
- Strengthening a spec's data models to allow for automated mock server generation.
- Enforcing consistent naming conventions across a large, multi-file API definition.

### Known limitations
Does not perform dynamic security testing or detect logic-level authorization bugs. resolving external $ref pointers requires the referenced files to be present in the accessible workspace.

## Requires

- Optional: Web access

Web access is only for pulling a spec remotely.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the OpenAPI Swagger review skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this differ from standard OpenAPI linting tools?

This skill specifically audits specs for 'code-generation readiness.' While standard linters check for syntax, this tool identifies issues like vague types and inconsistent naming that cause broken builds or poor developer experiences in generated SDKs.

### Which versions of OpenAPI and file formats are supported?

The skill is compatible with OpenAPI 3.x and Swagger 2.0 specifications in both YAML and JSON formats. It can process local files, including multi-file definitions, provided all referenced $ref pointers are within the accessible workspace.

### Does this skill require any complex configuration to get started?

To use this skill, simply point it to your specification file or project root; it automatically locates common documentation directories. It integrates with existing tools like Redocly or swagger-cli to perform its initial structural validation. You can also point it to a public web page.

### Can the skill detect if my API implementation has diverged from the documentation?

Yes, it includes a drift detection feature that compares your specification against existing source code routes and handlers. This ensures your documentation reflects the actual implementation and flags any undocumented endpoints or parameter mismatches.

### Can this skill be used to perform active penetration testing on my live API?

No, the skill focuses on static analysis and specification quality. It does not perform dynamic security testing (DAST) or identify logical flaws in your API's authorization code.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
