← Back to list

spectral
by mcclowes
A constraint and probability-based programming language
⭐ 1🍴 0📅 Jan 12, 2026
SKILL.md
name: spectral
prettier-ignore
description: Use when configuring Spectral for API linting, creating custom rulesets, and validating OpenAPI or AsyncAPI specifications
Spectral API Linting
Quick Start
# .spectral.yaml
extends: spectral:oas
rules:
operation-operationId: error
info-contact: warn
oas3-api-servers: off
Core Concepts
- Rulesets: Collections of rules; extend built-in (
spectral:oas,spectral:asyncapi) - Severity:
error,warn,info,hint, oroffto disable - Given: JSONPath expression targeting what to validate
- Then: Functions and conditions to check
Custom Rules
rules:
must-have-description:
description: All operations must have descriptions
given: $.paths[*][get,post,put,patch,delete]
severity: error
then:
field: description
function: truthy
path-must-be-kebab-case:
given: $.paths[*]~
then:
function: pattern
functionOptions:
match: "^(/[a-z0-9-]+)+$"
Built-in Functions
truthy/falsy- Value exists / is emptypattern- Regex matchinglength- String/array length constraintsenumeration- Value in allowed listschema- Validate against JSON Schemaalphabetical- Keys in orderundefined- Property must not exist
CLI Usage
spectral lint openapi.yaml
spectral lint openapi.yaml --ruleset .spectral.yaml
spectral lint openapi.yaml -f json # JSON output
Reference Files
- references/functions.md - All built-in functions
- references/custom-functions.md - Writing custom functions
- references/jsonpath.md - JSONPath expressions
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon