---
title: "OpenAPI Spec Validator"
description: "Validates and lints OpenAPI 3.0/3.1 specifications using Spectral CLI rules and the Swagger Parser library. Detects breaking changes between spec versions and generates migration guides."
verification: "security_reviewed"
source: "https://github.com/stoplightio/spectral"
author: "Stoplight"
category:
  - "Developer Tools"
framework:
  - "Custom Agents"
tool_ecosystem:
  github_repo: "stoplightio/spectral"
  github_stars: 3084
  npm_package: "@stoplight/spectral-cli"
  npm_weekly_downloads: 1165411
---

# OpenAPI Spec Validator

Validates and lints OpenAPI 3.0/3.1 specifications using Spectral CLI rules and the Swagger Parser library. Detects breaking changes between spec versions and generates migration guides.

## Prerequisites

Node.js

## Installation

Choose whichever fits your setup:

1. Copy this skill folder into your local skills directory.
2. Clone the repo and symlink or copy the skill into your agent workspace.
3. Add the repo as a git submodule if you manage shared skills centrally.
4. Install it through your internal provisioning or packaging workflow.
5. Download the folder directly from GitHub and place it in your skills collection.

Install command or upstream instructions:

```
npm install -g @stoplight/spectral-cli
```

## Documentation

- https://docs.stoplight.io/docs/spectral/ZG9jOjExNw-overview

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/openapi-spec-validator-agent/)
