Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Expert skill for OpenAPI/Swagger specification analysis, validation, and documentation generation. Parse and validate specs, detect breaking changes, generate code samples, and lint for best practices.
.claude/skills/a5c-ai-openapi-swagger/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 179% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 92% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 1501% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 127% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 136% | 0% |
Expert skill for OpenAPI/Swagger specification analysis and documentation generation.
Invoke this skill when you need to:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | specPath | string | Yes | Path to OpenAPI/Swagger spec file | | action | string | Yes | validate, lint, generate-docs, diff, generate-samples | | outputDir | string | No | Output directory for generated content | | targetVersion | string | No | Target OpenAPI version for migration | | languages | array | No | Languages for code sample generation | | rulesets | array | No | Spectral ruleset files to apply |
json{ "specPath": "./api/openapi.yaml", "action": "lint", "rulesets": [".spectral.yaml"], "outputDir": "docs/api" }
json{ "valid": true, "errors": [], "warnings": [ { "path": "paths./users.get.responses.200", "message": "Response should have a description", "severity": "warning" } ], "info": { "title": "My API", "version": "1.0.0", "openApiVersion": "3.1.0" } }
json{ "breaking": [ { "type": "removed-endpoint", "path": "DELETE /users/{id}", "description": "Endpoint removed in new version" }, { "type": "changed-type", "path": "POST /users.requestBody.email", "from": "string", "to": "object" } ], "nonBreaking": [ { "type": "added-endpoint", "path": "GET /users/{id}/profile" } ] }
yamlopenapi: 3.1.0 info: title: My API description: API description with **Markdown** support version: 1.0.0 contact: name: API Support email: support@example.com license: name: MIT identifier: MIT servers: - url: https://api.example.com/v1 description: Production - url: https://staging-api.example.com/v1 description: Staging tags: - name: users description: User management operations paths: /users: get: operationId: listUsers summary: List all users description: Returns a paginated list of users tags: - users parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/LimitParam' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/UserList' examples: success: $ref: '#/components/examples/UserListExample' '401': $ref: '#/components/responses/Unauthorized' components: schemas: User: type: object required: - id - email properties: id: type: string format: uuid description: Unique identifier email: type: string format: email description: User email address name: type: string description: Display name createdAt: type: string format: date-time UserList: type: object properties: data: type: array items: $ref: '#/components/schemas/User' pagination: $ref: '#/components/schemas/Pagination' parameters: PageParam: name: page in: query schema: type: integer minimum: 1 default: 1 LimitParam: name: limit in: query schema: type: integer minimum: 1 maximum: 100 default: 20 responses: Unauthorized: description: Authentication required content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT security: - bearerAuth: []
yamlextends: - spectral:oas rules: # Require descriptions operation-description: warn operation-operationId: error # Naming conventions operation-operationId-valid-in-url: true path-params: error # Security operation-security-defined: error # Custom rules path-must-have-tag: description: Every path must have at least one tag given: $.paths[*][*] severity: warn then: field: tags function: length functionOptions: min: 1 require-example: description: Responses should have examples given: $.paths[*][*].responses[*].content[*] severity: info then: field: examples function: truthy
javascript// JavaScript (fetch) const response = await fetch('https://api.example.com/v1/users', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_TOKEN', 'Content-Type': 'application/json' } }); const data = await response.json();
python# Python (requests) import requests response = requests.get( 'https://api.example.com/v1/users', headers={ 'Authorization': 'Bearer YOUR_TOKEN', 'Content-Type': 'application/json' } ) data = response.json()
bash# cURL curl -X GET 'https://api.example.com/v1/users' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json'
json{ "devDependencies": { "@stoplight/spectral-cli": "^6.11.0", "swagger-cli": "^4.0.0", "@redocly/cli": "^1.0.0", "openapi-generator-cli": "^2.7.0", "oasdiff": "^1.0.0" } }
bash# Validate spec npx @redocly/cli lint openapi.yaml # Spectral linting npx spectral lint openapi.yaml # Generate ReDoc documentation npx @redocly/cli build-docs openapi.yaml -o docs/index.html # Detect breaking changes oasdiff breaking old-api.yaml new-api.yaml # Generate code samples npx openapi-generator-cli generate -i openapi.yaml -g typescript-fetch -o ./sdk
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 14,122 | 13,941 | -1% | 1 | 1 | 0% | 1,433 | 3,991 | +179% | 0 | 0 | — |
case-02 | fail→pass | 23,807 | 23,748 | -0% | 1 | 1 | 0% | 2,691 | 5,158 | +92% | 0 | 0 | — |
case-03 | fail→pass | 8,528 | 31,714 | +272% | 1 | 1 | 0% | 394 | 6,308 | +1501% | 0 | 0 | — |
case-04 | pass→pass | 21,620 | 4,476 | -79% | 1 | 1 | 0% | 1,231 | 2,903 | +136% | 0 | 0 | — |
case-05 | fail→fail | 16,443 | 15,196 | -8% | 1 | 1 | 0% | 1,724 | 3,693 | +114% | 0 | 0 | — |
case-06 | fail→pass | 13,518 | 20,087 | +49% | 1 | 1 | 0% | 1,943 | 4,413 | +127% | 0 | 0 | — |
case-07 | pass→pass | 14,035 | 33,174 | +136% | 1 | 1 | 0% | 1,549 | 3,744 | +142% | 0 | 0 | — |
case-08 | pass→pass | 14,352 | 13,404 | -7% | 1 | 1 | 0% | 1,655 | 3,814 | +130% | 0 | 0 | — |
case-09 | pass→pass | 12,528 | 12,738 | +2% | 1 | 1 | 0% | 1,395 | 3,282 | +135% | 0 | 0 | — |
case-10 | pass→pass | 10,200 | 7,479 | -27% | 1 | 1 | 0% | 1,516 | 3,587 | +137% | 0 | 0 | — |
case-11 | pass→pass | 15,240 | 14,196 | -7% | 1 | 1 | 0% | 1,889 | 3,632 | +92% | 0 | 0 | — |
case-12 | pass→pass | 13,252 | 12,531 | -5% | 1 | 1 | 0% | 1,518 | 3,677 | +142% | 0 | 0 | — |
case-13 | pass→pass | 3,017 | 4,010 | +33% | 1 | 1 | 0% | 552 | 2,634 | +377% | 0 | 0 | — |
case-14 | pass→pass | 12,923 | 10,590 | -18% | 1 | 1 | 0% | 1,119 | 3,120 | +179% | 0 | 0 | — |
case-15 | pass→pass | 4,524 | 5,374 | +19% | 1 | 1 | 0% | 873 | 3,030 | +247% | 0 | 0 | — |
case-16 | pass→pass | 10,847 | 9,659 | -11% | 1 | 1 | 0% | 1,038 | 3,005 | +189% | 0 | 0 | — |
case-17 | pass→pass | 6,935 | 8,559 | +23% | 1 | 1 | 0% | 1,283 | 2,736 | +113% | 0 | 0 | — |
case-18 | pass→pass | 9,381 | 9,797 | +4% | 1 | 1 | 0% | 1,843 | 3,127 | +70% | 0 | 0 | — |
case-19 | fail→fail | 19,862 | 15,331 | -23% | 1 | 1 | 0% | 1,798 | 4,175 | +132% | 0 | 0 | — |
case-20 | pass→pass | 21,690 | 16,471 | -24% | 1 | 1 | 0% | 3,416 | 5,267 | +54% | 0 | 0 | — |
case-21 | fail→fail | 26,450 | 20,490 | -23% | 1 | 1 | 0% | 3,102 | 5,252 | +69% | 0 | 0 | — |
case-22 | pass→pass | 19,672 | 20,505 | +4% | 1 | 1 | 0% | 3,068 | 6,401 | +109% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.