Skip to content
Back to skills

Openapi Spec Generator

ASecurity

Automated OpenAPI specification generation from code annotations, comments, and interface definitions

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 2, 2026
ai-agentstypescriptpythongobashexpressfastapispringapidocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add a5c-ai/babysitter --skill openapi-spec-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Openapi Spec Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Openapi Spec Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-openapi-spec-generator-babysitter/badge)](https://www.skillsdirectory.com/skills/a5c-ai-openapi-spec-generator-babysitter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: openapi-spec-generator
description: Automated OpenAPI specification generation from code annotations, comments, and interface definitions
allowed-tools:
  - Read
  - Write
  - Edit
  - Glob
  - Grep
  - Bash
graph:
  domains: [domain:software-engineering]
  specializations: [specialization:sdk-platform-development]
  skillAreas: [skill-area:api-design, skill-area:api-doc-generation]
  roles: [role:platform-engineer]
  topics: [topic:api-design, topic:developer-experience]
---

# OpenAPI Spec Generator Skill

## Overview

This skill automates the generation of OpenAPI 3.x specifications from code annotations, comments, and interface definitions. It parses source code to extract API endpoints, schemas, and documentation to produce comprehensive and accurate API specifications.

## Capabilities

- Parse code to extract API endpoints and schemas from annotations
- Generate OpenAPI 3.x specifications in YAML or JSON format
- Validate spec completeness and correctness against OpenAPI standards
- Auto-update specs from code changes with incremental generation
- Support multiple frameworks (Express, FastAPI, Spring, ASP.NET, etc.)
- Extract request/response schemas from TypeScript types, Python type hints, Go structs
- Generate examples from code-level documentation

## Target Processes

- API Design Specification
- API Documentation System
- SDK Code Generation Pipeline

## Integration Points

- Code analysis tools (AST parsers)
- Schema validators (Spectral, openapi-spec-validator)
- Swagger/OpenAPI tooling ecosystem
- IDE extensions for spec preview

## Input Requirements

- Source code with API route definitions
- Annotation/decorator conventions used in the codebase
- Target OpenAPI version (3.0.x or 3.1.x)
- Output format preference (YAML/JSON)

## Output Artifacts

- OpenAPI specification file (openapi.yaml or openapi.json)
- Validation report with any issues found
- Schema extraction summary
- Change diff from previous spec version (if applicable)

## Usage Example

```yaml
skill:
  name: openapi-spec-generator
  context:
    sourceDirectory: ./src/api
    framework: express
    outputFormat: yaml
    openapiVersion: "3.1.0"
    includeExamples: true
```

## Best Practices

1. Use consistent annotation patterns across the codebase
2. Include JSDoc/docstrings for all endpoints
3. Define reusable schema components
4. Validate generated specs before publishing
5. Version control generated specifications

Files in this skill

  • README.md730 B
  • SKILL.md2.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.