Agent skill

API Spectral

by AgentSecOps in AgentSecOps/SecOpsAgentKit

API specification linting and security validation using Stoplight's Spectral with support for OpenAPI, AsyncAPI, and Arazzo specifications.

Custom licenceAuto-check passedBackend & APIs

Install API Spectral

skills CLI
$ npx skills add AgentSecOps/SecOpsAgentKit --skill api-spectral -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AgentSecOps/SecOpsAgentKit api-spectral --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AgentSecOps/SecOpsAgentKit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/appsec/api-spectral .claude/skills/api-spectral && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-spectral
GitHub stars
219
Used in
1 other repo
Token cost
~5.6k tokens
SKILL.md length
1,084 words
Files
10 (incl. references, assets)
Skills in repo
24
Repo updated
First seen
Licence
Custom licence

At a glance

API specification linting and security validation using Stoplight's Spectral with support for OpenAPI, AsyncAPI, and Arazzo specifications.

  • Works in 6 steps: Ruleset Configuration → Security-Focused API Linting → OWASP API Security Validation → …
  • Validating OpenAPI/AsyncAPI specifications for security issues and design flaws
  • SKILL.md covers Overview, Quick Start, Core Workflow and Advanced Patterns, plus 5 more sections
  • Calls python3, docker and npm

What it does

API Spectral is an agent skill from AgentSecOps/SecOpsAgentKit. API specification linting and security validation using Stoplight's Spectral with support for OpenAPI, AsyncAPI, and Arazzo specifications. Validates API definitions against security best practices, OWASP API Security Top 10, and custom organizational standards. Use when: (1) Validating OpenAPI/AsyncAPI specifications for security issues and design flaws, (2) Enforcing API design standards and governance policies across API portfolios, (3) Creating custom security rules for API specifications in CI/CD pipelines…

Its SKILL.md is about 5.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files and assets (for example `assets/ci-config-template.yml`, `assets/github-actions-template.yml` and `assets/rule-template.yaml`).

It sits in Backend & APIs, covering OpenAPI specifications, Linting and formatting and Web application vulnerabilities. It works with OpenAPI. The repository describes itself as: Security operations toolkit for AI coding agents. Give Claude Code 25+ skills to catch vulnerabilities, scan containers, detect secrets, and enforce policies automatically.

When your agent uses it

  • Validating OpenAPI/AsyncAPI specifications for security issues and design flaws
  • Enforcing API design standards and governance policies across API portfolios
  • Creating custom security rules for API specifications in CI/CD pipelines
  • Detecting authentication

Example prompts

  • “/api-spectral”

Requirements

  • Python 3
  • Node.js
  • Docker

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Ruleset Configuration
  2. Security-Focused API Linting
  3. OWASP API Security Validation
  4. Custom Security Rule Development
  5. CI/CD Pipeline Integration
  6. Results Analysis and Remediation

What it can do on your machine

Read from SKILL.md and the folder at commit 6e25a4b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3
    • docker
    • npm
    • yarn
    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.stoplight.io
    • github.com
    • owasp.org
    • spec.openapis.org
    • asyncapi.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Spectral loads about 5.6k tokens when it runs, and up to ~19k if it reads all its reference files. Until then it costs about 182 tokens; SKILL.md has 1,084 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~182
When it runs · the whole SKILL.md, loaded when a task matches
~5.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~19k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 1,084 words (~5,558 tokens).

“Spectral is a flexible JSON/YAML linter from Stoplight that validates API specifications against security best practices and organizational standards. With built-in rulesets for OpenAPI v2/v3.x, AsyncAPI v2.x, and Arazzo v1.0, Spectral helps identify security vulnerabilities, design flaws, and compliance issues…”

— opening of SKILL.md by AgentSecOps, Custom licence
name
api-spectral
version
0.1.0
maintainer
SirAppSec
category
appsec
tags
api-security, openapi, asyncapi, linting, spectral, api-governance, owasp-api, specification-validation
frameworks
OWASP
dependencies.tools
node, npm
dependencies.optional
docker, git
references
https://docs.stoplight.io/docs/spectral/674b27b261c3c-overview, https://github.com/stoplightio/spectral…

Read the full SKILL.md on GitHub

Files

SKILL.md and 9 other files (references, assets) in skills/appsec/api-spectral of AgentSecOps/SecOpsAgentKit.

  • SKILL.md
  • assets/.gitkeep
  • assets/ci-config-template.yml
  • assets/github-actions-template.yml
  • assets/rule-template.yaml
  • assets/spectral-owasp.yaml
  • references/EXAMPLE.md
  • references/WORKFLOW_CHECKLIST.md
  • references/custom_rules_guide.md
  • references/owasp_api_mappings.md

Open the folder on GitHubat commit 6e25a4b

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in AgentSecOps/SecOpsAgentKit, which our catalogue first saw on October 7, 2026.

Compare with similar skills

API Spectral next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Spectral compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Spectral this skillAgentSecOps/SecOpsAgentKit2191 repos~5.6kAutomated safety check: PassCustom licence
Assisted Service Dev Modeopenshift/assisted-service138—~1.3kAutomated safety check: PassApache-2.0
Oryxos Initoryx-labs/oryxos187—~1.6kAutomated safety check: PassApache-2.0
Dotnet APInovotnyllc/dotnet-artisan233—~1.6kAutomated safety check: PassMIT
Update Ls Configswagger-api/apidom100—~5.9kAutomated safety check: PassNone
Counterfact Repo Basicscounterfact/api-simulator170—~868Automated safety check: PassMIT

Similar skills

  • Assisted Service Dev Mode

    openshift/assisted-service

    Build and code-generate assisted-service using skipper with podman.

    138 GitHub stars~1.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • Oryxos Init

    oryx-labs/oryxos

    初始化 OryxOS(或同类 JDK 21 + Spring Boot 3.x 企业级单体)的工程地基:Maven 多模块骨架、 结构化日志、Actuator + Prometheus 监控、Spring MVC + 虚拟线程、springdoc OpenAPI、 统一响应体与全局异常/错误码、Google 格式 + 阿里编码规约(Spotless + 阿里 P3C +…

    187 GitHub stars~1.6k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Dotnet API

    novotnyllc/dotnet-artisan

    Builds ASP.NET Core APIs, EF Core data access, gRPC, SignalR, and backend services with middleware, security (OAuth, JWT, OWASP), resilience, messaging, OpenAPI, .NET Aspire, Semantic Kernel…

    233 GitHub stars~1.6k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Update Ls Config

    swagger-api/apidom

    Updates apidom-ls configuration for a namespace package by analyzing the namespace structure and creating completion, documentation, and lint configurations

    100 GitHub stars~5.9k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Counterfact Repo Basics

    counterfact/api-simulator

    Provide Counterfact repository orientation, high-level architecture, and the canonical command reference for install/build/test/lint workflows.

    170 GitHub stars~868 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • API Security Review

    OWASP/secure-agent-playbook

    Comprehensive API security review against OWASP API Security Top 10 (2023).

    186 GitHub stars~744 tokensUpdated 12 days ago
    Backend & APIsAuto-check passed

More from AgentSecOps/SecOpsAgentKit

All 24 skills in this repo
  • Sast Semgrep

    AgentSecOps/SecOpsAgentKit

    Static application security testing (SAST) using Semgrep for vulnerability detection, security code review, and secure coding guidance with OWASP and CWE framework mapping.

    219 GitHub starsUsed in 2 repos~2.4k tokens
    Auto-check passed
  • Secrets Gitleaks

    AgentSecOps/SecOpsAgentKit

    Hardcoded secret detection and prevention in git repositories and codebases using Gitleaks.

    219 GitHub starsUsed in 2 repos~4.1k tokens
    Auto-check passed
  • DefectDojo Vulnerability Management

    AgentSecOps/SecOpsAgentKit

    Aggregates scanner results into DefectDojo, deduplicates findings, tracks remediation SLAs and prepares compliance reports across products and pipelines.

    219 GitHub stars~2.3k tokensUpdated 5 mo ago
    Auto-check passed
  • TShark Traffic Analysis

    AgentSecOps/SecOpsAgentKit

    Guides authorized packet capture and analysis with TShark, Wireshark's command-line tool, for security investigations, malware detection and forensic examination of network traffic.

    219 GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check: notes
  • Container Scanning with Grype

    AgentSecOps/SecOpsAgentKit

    Scans container images, filesystems and SBOMs with Grype for known vulnerabilities, ranks them by CVSS, EPSS and CISA KEV, and wires scans into CI/CD thresholds.

    219 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Hadolint Dockerfile Security Linting

    AgentSecOps/SecOpsAgentKit

    Lints Dockerfiles with Hadolint for security misconfigurations and best-practice violations, locally and in CI, with strict, balanced and permissive rule templates.

    219 GitHub starsUsed in 1 repo~4.4k tokens
    Auto-check passed

Works with

Categories

Questions about API Spectral

What does API Spectral do?

API specification linting and security validation using Stoplight's Spectral with support for OpenAPI, AsyncAPI, and Arazzo specifications. API Spectral is an agent skill from AgentSecOps/SecOpsAgentKit. API specification linting and security validation using Stoplight's Spectral with support for OpenAPI, AsyncAPI, and Arazzo specifications.

When should I use API Spectral?

API Spectral fits situations like: validating OpenAPI/AsyncAPI specifications for security issues and design flaws; enforcing API design standards and governance policies across API portfolios; creating custom security rules for API specifications in CI/CD pipelines; detecting authentication.

How do I install API Spectral in Claude Code?

Run `npx skills add AgentSecOps/SecOpsAgentKit --skill api-spectral -a claude-code`. Or copy the skill folder (skills/appsec/api-spectral in AgentSecOps/SecOpsAgentKit) into .claude/skills/api-spectral in your project. Claude Code loads it when a task matches its description.

How do I install API Spectral in Codex?

Run `npx skills add AgentSecOps/SecOpsAgentKit --skill api-spectral -a codex`. Or copy the skill folder (skills/appsec/api-spectral in AgentSecOps/SecOpsAgentKit) into .agents/skills/api-spectral in your project. Codex loads it when a task matches its description.

Can I use API Spectral in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AgentSecOps/SecOpsAgentKit --skill api-spectral -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-spectral, .gemini/skills/api-spectral, .github/skills/api-spectral and .opencode/skills/api-spectral in your project.

What does API Spectral need to run?

Going by SKILL.md and its folder, API Spectral needs the command-line tools its instructions call (python3, docker, npm, yarn, git and gh). Our summary lists: Python 3; Node.js; Docker.

Does API Spectral access the network?

SKILL.md names 5 domains. As links in the text: docs.stoplight.io, github.com, owasp.org, spec.openapis.org and asyncapi.com. This is read from the text; nothing was executed.

Is API Spectral safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Spectral use?

API Spectral has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does API Spectral use?

About 5.6k tokens (SKILL.md is roughly 22k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to API Spectral?

Skills that share tags, products or a category with API Spectral: Assisted Service Dev Mode (openshift/assisted-service, 138 stars), Oryxos Init (oryx-labs/oryxos, 187 stars), Dotnet API (novotnyllc/dotnet-artisan, 233 stars) and Update Ls Config (swagger-api/apidom, 100 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Spectral?

AgentSecOps (a GitHub organization) maintains it in AgentSecOps/SecOpsAgentKit, which has 219 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on April 15, 2026.

Source: AgentSecOps/SecOpsAgentKit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.