Development v0.1.2

schemaguard

Detect breaking changes in OpenAPI specs. Use when reviewing API changes, validating PRs that modify API specs, checking...

sethclawd 更新于 2026-02-21 1 浏览
下载 SKILL

技能说明

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.

使用场景

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.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/schemaguard
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

3 个文件 · 13 kB
SKILL.md text/markdown
---
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

```bash
# Diff two specs (breaking vs non-breaking)
npx @sethclawd/schemaguard diff old.yaml new.yaml

# CI check (exit 0=safe, 1=breaking, 2=error)
npx @sethclawd/schemaguard ci --spec ./openapi.yaml --baseline ./baseline.yaml

# Lint spec quality
npx @sethclawd/schemaguard lint ./openapi.yaml

# JSON output for programmatic use
npx @sethclawd/schemaguard diff old.yaml new.yaml --format json
```

## When to Use

- Before committing changes to an OpenAPI spec
- When reviewing PRs that modify API routes
- After generating/updating OpenAPI specs from code
- Before deploying API changes to production
- Validating that a migration maintains backward compatibility

## 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:
```bash
npx @sethclawd/schemaguard --mcp
```

Exposes: `schemaguard_diff`, `schemaguard_lint`, `schemaguard_check`

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。