π¦ ClawHub
SchemGuard
by @sethclawd-prog
Detect breaking changes in OpenAPI specs. Use when reviewing API changes, validating PRs that modify API specs, checking backward compatibility, or linting O...
TERMINAL
clawhub install schemaguardπ About This Skill
name: schemaguard description: Detect breaking changes in OpenAPI specs. Use when reviewing API changes, validating PRs that modify API specs, checking backward compatibility, or linting OpenAPI spec quality. Provides diff, lint, and CI check tools. metadata: clawdbot: requires: bins: ["npx"]
SchemGuard β API Schema Drift Monitor
Quick Start
# Diff two specs (breaking vs non-breaking)
npx @sethclawd/schemaguard diff old.yaml new.yamlCI check (exit 0=safe, 1=breaking, 2=error)
npx @sethclawd/schemaguard ci --spec ./openapi.yaml --baseline ./baseline.yamlLint spec quality
npx @sethclawd/schemaguard lint ./openapi.yamlJSON output for programmatic use
npx @sethclawd/schemaguard diff old.yaml new.yaml --format json
When to Use
Breaking Changes Detected
| Rule | What It Catches |
|------|----------------|
| endpoint-removed | Deleted endpoints |
| required-param-added | New required parameters |
| field-type-changed | Changed field types |
| response-field-removed | Removed response fields |
| enum-value-removed | Narrowed enums |
| auth-requirement-changed | Changed security schemes |
Non-Breaking (Info Only)
Added endpoints, optional params, response fields, widened enums, deprecations.
MCP Server
For direct tool integration:
npx @sethclawd/schemaguard --mcp
Exposes: schemaguard_diff, schemaguard_lint, schemaguard_check
β‘ When to Use
π‘ Examples
# Diff two specs (breaking vs non-breaking)
npx @sethclawd/schemaguard diff old.yaml new.yamlCI check (exit 0=safe, 1=breaking, 2=error)
npx @sethclawd/schemaguard ci --spec ./openapi.yaml --baseline ./baseline.yamlLint spec quality
npx @sethclawd/schemaguard lint ./openapi.yamlJSON output for programmatic use
npx @sethclawd/schemaguard diff old.yaml new.yaml --format json