From oastools
Validate an OpenAPI spec, explain errors clearly, and suggest or apply fixes
How this skill is triggered — by the user, by Claude, or both
Slash command
/oastools:validate-specThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Call the `validate` tool on the user's spec:
Call the validate tool on the user's spec:
{"spec": {"file": "<path>"}}
If the user wants strict validation, add "strict": true.
⚠️ Tip for large specs: Use "no_warnings": true for initial triage. Large specs can produce hundreds of warnings that obscure the actual errors. Get the error picture first, then run again without no_warnings to review warnings separately.
If the spec is valid:
no_warnings was set)If the spec has errors:
$ref targets)Results are paginated (default limit: 100). When returned < error_count, there are more errors:
{"spec": {"file": "<path>"}, "offset": 100, "limit": 100}
⚠️ Strategy for large error sets: Analyze the first page for patterns — if errors are repetitive (e.g., hundreds of missing path parameters), summarize the pattern and total count rather than paging through all of them. Only page further when errors appear diverse or the user needs specifics.
For each error, explain how to fix it. Common patterns:
| Error type | Suggested fix |
|---|---|
| Missing path parameter | Add the parameter to the operation's parameters array |
| Duplicate operationId | Rename to be unique, following a verb+resource pattern |
Invalid $ref target | Fix the reference path, or stub the missing schema |
| Missing required field | Add the field with an appropriate value |
If the errors are auto-fixable, offer to run the fix tool:
{"spec": {"file": "<path>"}, "dry_run": true}
Show the user the planned fixes before applying. ✅ When applying, use output to persist:
{"spec": {"file": "<path>"}, "output": "<output-path>"}
⚠️ The fix tool does not modify the input file. Without output, the fixed document is not persisted to disk.
After any changes, ✅ run validate on the output file (not the original input):
{"spec": {"file": "<output-path>"}}
Report the final status.
npx claudepluginhub erraggy/oastools --plugin oastoolsStructures OpenAPI 3.x specs with consistent naming, reusable schemas, error modeling, pagination, security schemes, and examples to produce a spec that works as a contract for code generation.
Generates and validates OpenAPI specifications from codebase. Covers endpoint design, schema validation, and documentation generation.
Diagnoses root causes of Speakeasy SDK generation failures from OpenAPI specs using linting and provides fix strategies like overlays or spec changes. Triggers on 'generation failed', 'speakeasy run failed', or build errors.