openapi-spec-generation
Skill36 starsChanged 6 months agoMITView on GitHub
This skill should be used when creating API documentation, generating SDKs, or ensuring API contract compliance. It generates and maintains OpenAPI 3.1 specifications.
7 other projects use a version of this, 4 of them edited.
Adopted by
Most recently taken up by
- imMamdouhaboammar/tiktok-growth-automation-meshedited, first seen Oct 1, 2026
- enes9103/my-claude-agents-skillsedited, first seen Sep 28, 2026
- iCesofT/awesome-aitheir own version, first seen Apr 16, 2026
- ai4brands-design/claude-skillsedited, first seen Mar 22, 2026
- CodeWithBehnam/cc-docstheir own version, first seen Mar 15, 2026
- Harmeet10000/skillstheir own version, first seen Mar 15, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 4
- xfstudio/skills★ 928% same
- ai4brands-design/claude-skills★ 228% same
- enes9103/my-claude-agents-skills★ 017% same
- imMamdouhaboammar/tiktok-growth-automation-mesh★ 017% same
Wrote their own version · 3
- Harmeet10000/skills★ 7same name
- CodeWithBehnam/cc-docs★ 2same name
- iCesofT/awesome-ai★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository157 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a2ui-angularSkill
- accessibility-auditSkill
- adk-deploy-guideSkill
- adk-dev-guideSkill
- adk-eval-guideSkill
- adk-observability-guideSkill
- agentic-ai-coding-standardSkill
- agentic-ai-devSkill
- ai-auditSkill
- ai-chatSkill
- ai-decision-recordSkill
- ai-incident-responseSkill
- ai-launch-checkSkill
- ai-playbookSkill
- angular-best-practicesSkill
- angularSkill
- angular-spaSkill
- angular-ui-patternsSkill
- api-design-principlesSkill
- app-store-optimizationSkill
- architect-reviewSkill
- architecture-decision-recordsSkill
- architecture-designSkill
- asc-cli-usageSkill
- asc-crash-triageSkill
- asc-id-resolverSkill
- asc-release-flowSkill
- asc-signing-setupSkill
- asc-submission-healthSkill
- asc-testflight-orchestrationSkill
- browser-testingSkill
- changelog-generatorSkill
- claude-actions-auditorSkill
- clean-codeSkill
- codebase-onboardingSkill
- code-explainerSkill
- code-reviewerSkill
- code-simplifierSkill
- comment-analyzerSkill
- database-schema-designerSkill
- ddd-architectSkill
- decision-frameworksSkill
- dedup-code-agentSkill
- deployment-ci-cdSkill
- design-systemSkill
- dockerSkill
- documentation-generationSkill
- domain-finderSkill
- error-detectiveSkill
- eval-guideSkill
- feature-forgeSkill
- firebase-basicsSkill
- firebase-hosting-basicsSkill
- fixing-accessibilitySkill
- fixing-motion-performanceSkill
- flutter-animationsSkill
- flutter-genuiSkill
- flutter-mobileSkill
- flutter-security-expertSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Iron Law: Never generate an OpenAPI spec without running it through a validator.
- Distinctive: line 34
Add paths and schemas for the domain
- Very specific: line 67
Read reference/complete-api-example.md for a full User Management API spec demonstrating all features: CRUD paths, pagination, filtering, …
- Very specific: line 115
Schema validation failures: Run the spec through an OpenAPI validator before committing.
- Distinctive: line 117
Breaking changes detected: When modifying existing endpoints, check for removed fields, changed types, or new required parameters.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Iron Law: Never generate an OpenAPI spec without running it through a validator; always produce machine-parseable YAML/JSON, not prose descriptions.
OpenAPI Spec Generation
Generate, validate, and maintain OpenAPI 3.1 specifications for RESTful APIs. Supports design-first, code-first, and hybrid approaches across Java/Spring, Python/FastAPI, and TypeScript stacks.
When to Use
- Creating API documentation from scratch
- Generating OpenAPI specs from existing code
- Designing API contracts (design-first approach)
- Validating API implementations against specs
- Generating client SDKs from specs
- Setting up API documentation portals
Quick Start
Design-First:
- Copy the minimal skeleton from
reference/openapi-skeleton-template.mdintoopenapi.yaml - Add paths and schemas for the domain
- Validate:
spectral lint openapi.yaml - Preview:
redocly preview-docs openapi.yaml
Code-First:
| Stack | Command |
| FastAPI | python -c "import json; from main import app; print(json.dumps(app.openapi(), indent=2))" > openapi.json |
| Spring Boot | curl http://localhost:8080/v3/api-docs > openapi.json |
| tsoa | npx tsoa spec |
Process Steps
Step 1: Choose Approach
| Approach | When to Use | Reference |
| Design-First | New APIs, contracts, external consumers | reference/openapi-skeleton-template.md |
| Code-First | Existing APIs, rapid iteration | reference/code-first-patterns.md |
| Hybrid | Evolving APIs, keep spec in sync | Both references above |
Step 2: Generate the Spec
Design-first -- Read reference/openapi-skeleton-template.md for the starter template. Copy the minimal skeleton, then customize paths, schemas, and security for the domain.
Code-first -- Read reference/code-first-patterns.md for annotated examples in:
- Java/Spring Boot (springdoc-openapi) -- annotations, config bean, DTOs
- Python/FastAPI -- Pydantic models, type hints, endpoint decorators
- TypeScript/tsoa -- decorators, interfaces, route controllers
Step 3: Add a Complete Example (if needed)
Read reference/complete-api-example.md for a full User Management API spec demonstrating all features: CRUD paths, pagination, filtering, error responses, rate limiting headers, security schemes, and reusable components.
Step 4: Validate and Lint
Read reference/validation-and-linting.md for:
- Spectral configuration (
.spectral.yaml) - Redocly configuration
- Validation commands
- Custom linting rules (naming conventions, required fields)
Step 5a: Write the Developer Guide (if needed)
Read reference/developer-guide-patterns.md for:
- 9-section documentation structure (Introduction → Authentication → Quick Start → Endpoints → Data Models → Errors → Rate Limiting → Changelog → SDKs)
- Auth flow documentation template (obtain → use → refresh token)
- Multi-language code examples for all 3 backend stacks: Java/Spring Boot WebFlux (WebClient), Python/FastAPI (httpx async), TypeScript/NestJS (HttpService + fetch)
- Error handling reference (status codes, error response format, per-stack handling patterns)
- 4 common pitfalls with solutions (sync drift, missing errors, broken examples, unclear parameters)
Step 5b: Generate SDKs and Set Up CI/CD
Read reference/sdk-and-cicd.md for:
- SDK generation commands (TypeScript, Python, Java, Dart)
- GitHub Actions workflow for validation
- Full CI/CD pipeline (validate, generate, publish)
Reference Files
| File | Content | Size |
reference/openapi-skeleton-template.md | Minimal starter skeleton, structure overview, customization checklist | ~5KB |
reference/code-first-patterns.md | Java/Spring, Python/FastAPI, TypeScript/tsoa annotated examples | ~10KB |
reference/validation-and-linting.md | Spectral rules, Redocly config, validation commands, common mistakes and best practices | ~5KB |
reference/sdk-and-cicd.md | SDK generation commands, GitHub Actions workflows | ~5KB |
reference/complete-api-example.md | Full User Management API with all OpenAPI features | ~10KB |
reference/developer-guide-patterns.md | 9-section doc structure, auth flow template, multi-language code examples (Java WebFlux / Python FastAPI / TypeScript NestJS), error handling reference, 4 common pitfalls | ~8KB |
Resources
Error Handling
Schema validation failures: Run the spec through an OpenAPI validator before committing. Fix all $ref resolution errors first.
Breaking changes detected: When modifying existing endpoints, check for removed fields, changed types, or new required parameters. Document breaking changes in the spec description.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

