Xspoonai official api contract diff

From jiayaoqijia/cryptoskill · View interactive version

Xspoonai official api contract diff is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Compare OpenAPI and GraphQL schemas to identify breaking changes and incompatibilities. Provides detailed diff output for schema migrations.

How to use this skill

Skill file

Description

Compare OpenAPI and GraphQL schemas to identify breaking changes and incompatibilities. Provides detailed diff output for schema migrations.

Inputs

{
  "schema_type": "openapi|graphql",
  "schema1": "First schema object",
  "schema2": "Second schema object"
}

Outputs

{
  "ok": true,
  "data": {
    "changes": [],
    "breaking_changes": []
  }
}

Usage

Demo Mode

python scripts/main.py --demo

Compare Schemas

echo '{"schema_type": "openapi", "schema1": {}, "schema2": {}}' | python3 scripts/main.py

Examples

Example 1: Compare OpenAPI Schemas

$ echo '{"schema_type": "openapi", "schema1": {}, "schema2": {}}' | python3 scripts/main.py
{
  "ok": true,
  "data": {
    "changes": ["Removed endpoint /v1/users"],
    "breaking_changes": ["Parameter type changed from string to integer"]
  }
}

Error Handling

When an error occurs, the skill returns:

{
  "ok": false,
  "error": "Error description",
  "details": {
    "schema_type": "Invalid schema type"
  }
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.