# Spectral OpenAPI and AsyncAPI Linter

> Spectral is an open-source JSON/YAML linter by Stoplight with built-in support for OpenAPI 3.x, Swagger 2.0, AsyncAPI 2.x, and Arazzo 1.0. It enforces API style guides through custom and pre-built rulesets, ensuring consistency across all your API descriptions.

- Skill: `agentskillexchange/spectral-openapi-and-asyncapi-linter` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/spectral-openapi-and-asyncapi-linter`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/spectral-openapi-and-asyncapi-linter/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/spectral-openapi-and-asyncapi-linter

---


# Spectral OpenAPI and AsyncAPI Linter

Spectral is an open-source JSON/YAML linter by Stoplight with built-in support for OpenAPI 3.x, Swagger 2.0, AsyncAPI 2.x, and Arazzo 1.0. It enforces API style guides through custom and pre-built rulesets, ensuring consistency across all your API descriptions.

## Installation

Use the upstream install or setup path that matches your environment:
- npm install -g @stoplight/spectral-cli
- yarn global add @stoplight/spectral-cli

Basic usage or getting-started notes:
- [💻 Usage](#-usage)
- ## 💻 Usage
- To get started, run this command in your terminal to create a .spectral.yaml file that uses the Spectral predefined rulesets based on OpenAPI, Arazzo or AsyncAPI:

- Source: https://github.com/stoplightio/spectral
- Extracted from upstream docs: https://raw.githubusercontent.com/stoplightio/spectral/HEAD/README.md

## Documentation

- https://docs.stoplight.io/docs/spectral/674b27b261c3c-overview

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/spectral-openapi-asyncapi-linter/)

