Token导航 LogoToken导航

Agent Skill · 研究检索

api-contract-sync-manager(API contract sync manager 搜索)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

api-contract-sync-manager 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 10,138。

总安装 13,043周安装 586GitHub Stars 678下载 4,365核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:api-contract-sync-manager(API contract sync manager 搜索)
来源仓库:https://github.com/ananddtyagi/cc-marketplace
仓库路径:skills/api-contract-sync-manager
安装命令:
npx skills add https://github.com/ananddtyagi/cc-marketplace --skill 'API Contract Sync Manager'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/ananddtyagi/cc-marketplace --skill 'API Contract Sync Manager'

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

维护 OpenAPI/Swagger 或 GraphQL 规范与实现的同步,检测破坏性变更并生成客户端类型。适用于前后端并行开发场景,确保契约变更及时通知相关方并更新依赖。使用时需比对 PR 中的 API 修改与规范文件,自动生成迁移指南与测试用例。

安装方式:通过 npx skills add 从指定仓库获取,兼容 Codex、Claude 等宿主环境。注意:版本策略应明确 breaking change 判定规则,避免误判影响交付节奏。

来源仓库内路径:skills/api-contract-sync-manager

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/ananddtyagi/cc-marketplace --skill 'API Contra…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

api-contract-sync-manager 怎么安装?

在终端执行 npx skills add https://github.com/ananddtyagi/cc-marketplace --skill 'API Contract Sync Ma…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

api-contract-sync-manager 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

api-contract-sync-manager 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

api-contract-sync-manager 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

api-contract-sync-manager 用的人多吗?

公开数据是累计安装 13,043 次,近一周安装 586 次,下载 4,365 次,GitHub 678 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

api-contract-sync-manager 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
api-contract-sync-manager

API contract sync manager 搜索 · 本页

13,043678需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

API Contract Sync Manager

Maintain synchronization between API specifications and their implementations, detect breaking changes, and generate client code to ensure contracts stay reliable across frontend and backend teams.

When to Use This Skill

Use this skill when:

  • Working with OpenAPI/Swagger specification files (.yaml, .json)
  • Managing GraphQL schemas (.graphql, .gql)
  • Reviewing API changes in pull requests
  • Generating TypeScript types or client code from specs
  • Validating that implementations match documented APIs
  • Detecting breaking vs. non-breaking API changes
  • Creating API versioning strategies
  • Onboarding new developers to an API-driven codebase

Core Capabilities

1. Spec Validation

Validate API specification files for correctness and completeness:

OpenAPI/Swagger Validation:

  • Check schema syntax and structure
  • Validate against OpenAPI 3.0/3.1 standards
  • Ensure all endpoints have proper descriptions
  • Verify request/response schemas are complete
  • Check for required security definitions
  • Validate parameter types and constraints

GraphQL Validation:

  • Parse and validate SDL (Schema Definition Language)
  • Check for schema stitching issues
  • Validate resolver coverage
  • Detect circular dependencies
  • Verify input/output type consistency

Validation Approach:

  1. Read the spec file using the Read tool
  2. Parse the structure (YAML/JSON for OpenAPI, SDL for GraphQL)
  3. Check for common issues:

- Missing required fields - Invalid references ($ref) - Inconsistent naming conventions - Missing examples or descriptions - Security scheme gaps

  1. Report findings with line numbers and suggestions

2. Implementation Matching

Cross-reference API specifications with actual code implementations:

For REST APIs:

  1. Extract all endpoints from OpenAPI spec (paths, methods)
  2. Search codebase for route definitions:

- Express.js: app.get(), router.post(), etc. - FastAPI: @app.get(), @router.post() - Django: path(), urlpatterns - Spring Boot: @GetMapping, @PostMapping

  1. Compare spec endpoints against implemented routes
  2. Flag discrepancies:

- Documented but not implemented - Implemented but not documented - Parameter mismatches - Response type differences

For GraphQL:

  1. Extract types, queries, mutations from schema
  2. Search for resolver implementations
  3. Verify all schema fields have resolvers
  4. Check resolver signatures match schema types

Implementation Matching Steps:

1. Parse spec → extract endpoints/operations
2. Use Grep to find route handlers in codebase
3. Compare and categorize:
   - ✓ Matched: spec and implementation align
   - ⚠ Drift: partial match with differences
   - ✗ Missing: documented but not implemented
   - ⚠ Undocumented: implemented but not in spec
4. Generate coverage report

3. Breaking Change Detection

Compare two versions of an API spec to detect breaking vs. non-breaking changes:

Breaking Changes (require version bump):

  • Removed endpoints or operations
  • Removed required request parameters
  • Changed parameter types (e.g., string → number)
  • Made optional parameters required
  • Removed response properties that clients depend on
  • Changed response status codes
  • Renamed endpoints, parameters, or fields
  • Stricter validation rules (e.g., regex patterns)

Non-Breaking Changes (safe to deploy):

  • Added new endpoints
  • Added optional parameters
  • Made required parameters optional
  • Added new response properties
  • Expanded enum values
  • Improved descriptions/examples
  • Added deprecation warnings

Change Detection Process:

  1. Read both spec versions (old and new)
  2. Compare schemas field by field
  3. Categorize each change as breaking or non-breaking
  4. Generate migration guide with:

- Summary of breaking changes - Impact on existing clients - Required client updates - Recommended versioning strategy

4. Client Code Generation

Generate type-safe client code from API specifications:

TypeScript Interfaces:

// From OpenAPI schema
interface User {
  id: string;
  email: string;
  name?: string;
  createdAt: Date;
}

interface CreateUserRequest {
  email: string;
  name?: string;
}

interface CreateUserResponse {
  user: User;
  token: string;
}

API Client Functions:

// HTTP client with proper typing
async function createUser(
  data: CreateUserRequest
): Promise<CreateUserResponse> {
  const response = await fetch('/api/users', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(data)
  });
  return response.json();
}

React Query Hooks:

// Auto-generated hooks for data fetching
function useUser(userId: string) {
  return useQuery(['user', userId], () =>
    fetch(`/api/users/${userId}`).then(r => r.json())
  );
}

function useCreateUser() {
  return useMutation((data: CreateUserRequest) =>
    fetch('/api/users', {
      method: 'POST',
      body: JSON.stringify(data)
    }).then(r => r.json())
  );
}

Generation Steps:

  1. Parse OpenAPI/GraphQL schema
  2. Extract all data models (schemas, types)
  3. Generate TypeScript interfaces with proper types
  4. Create client functions for each endpoint
  5. Optionally generate hooks for React Query/SWR
  6. Add JSDoc comments from spec descriptions

5. Coverage Analysis

Identify gaps between documentation and implementation:

Analysis Report Structure:

API Coverage Report
==================

Documented Endpoints: 45
Implemented Endpoints: 42
Coverage: 93%

Missing Implementations:
- DELETE /api/users/{id} (documented but not found)
- POST /api/users/{id}/suspend (documented but not found)

Undocumented Endpoints:
- GET /api/internal/health (found in code, not in spec)
- POST /api/debug/reset (found in code, not in spec)

Mismatched Signatures:
- POST /api/users
  Spec expects: { email, name, role }
  Code accepts: { email, name } (missing 'role')

Coverage Analysis Process:

  1. Run implementation matching (see section 2)
  2. Calculate coverage percentage
  3. List all discrepancies with file locations
  4. Prioritize issues by severity
  5. Suggest next steps to achieve 100% coverage

6. Migration Guides

Create upgrade guides when API versions change:

Migration Guide Template:

# API v2.0 Migration Guide

## Breaking Changes

### 1. User Creation Endpoint
**Change**: Required `role` field added to POST /api/users
**Impact**: All user creation calls will fail without this field
**Action Required**:
- Update all POST /api/users calls to include `role`
- Default to 'member' if no specific role needed

Before:

{ "email": "user@example.com", "name": "John" }


After:

{ "email": "user@example.com", "name": "John", "role": "member" }


### 2. Authentication Token Format

**Change**: JWT tokens now use RS256 instead of HS256 **Impact**: Token validation must be updated **Action Required**:

- Update JWT verification libraries
- Fetch new public key from /.well-known/jwks.json

Guide Generation Steps:

  1. Detect all breaking changes (see section 3)
  2. Group changes by endpoint or feature
  3. For each change, document:

- What changed and why - Impact on existing clients - Required code updates with before/after examples - Timeline for deprecation

  1. Add general upgrade instructions

Best Practices

For OpenAPI Specs

  1. Use $ref liberally: Define schemas once, reference everywhere
  2. Version your APIs: Use /v1/, /v2/ prefixes or version headers
  3. Add examples: Include request/response examples in spec
  4. Document errors: Define all possible error responses
  5. Security first: Always specify security requirements

For GraphQL Schemas

  1. Use descriptions: Document all types, fields, and arguments
  2. Deprecate, don't remove: Use @deprecated directive
  3. Input validation: Use custom scalars for validated types
  4. Pagination patterns: Use connection/edge patterns consistently
  5. Error handling: Define custom error types

For Breaking Changes

  1. Version bump: Major version for breaking changes
  2. Deprecation period: Maintain old version for transition
  3. Clear communication: Document changes prominently
  4. Backward compatibility: Provide adapters when possible
  5. Client coordination: Ensure clients can update before removal

Common Workflows

Workflow 1: Validate Existing Spec


1. User: "Validate the OpenAPI spec"
2. Read the spec file (usually openapi.yaml or swagger.json)
3. Parse and validate structure
4. Report any issues with suggestions

Workflow 2: Check Implementation Match


1. User: "Does our API implementation match the spec?"
2. Read spec file
3. Extract all endpoints
4. Search codebase for route handlers
5. Compare and generate coverage report

Workflow 3: Detect Breaking Changes


1. User: "Compare API v1 and v2 specs"
2. Read both spec files
3. Diff schemas systematically
4. Categorize changes as breaking/non-breaking
5. Generate migration guide

Workflow 4: Generate TypeScript Types


1. User: "Generate TypeScript types from the API spec"
2. Read OpenAPI/GraphQL schema
3. Extract all data models
4. Generate TypeScript interfaces
5. Create client functions or hooks if requested

Workflow 5: Find Coverage Gaps


1. User: "What endpoints are missing in our spec?"
2. Run implementation matching
3. Identify undocumented endpoints
4. Suggest adding them to spec with proper schemas

Tools and Commands

Validation Tools

When validation tools are available, use them:

  • OpenAPI: npx @stoplight/spectral-cli lint openapi.yaml
  • GraphQL: npx graphql-inspector validate schema.graphql

Comparison Tools

For advanced diff analysis:

  • OpenAPI: npx openapi-diff old.yaml new.yaml
  • GraphQL: npx graphql-inspector diff old.graphql new.graphql

Code Generation

Recommend these tools for automated generation:

  • openapi-typescript: Generate TypeScript from OpenAPI
  • graphql-code-generator: Generate TypeScript from GraphQL
  • orval: Generate React Query hooks from OpenAPI

Error Handling

When encountering issues:

Invalid Spec File:

  • Report specific syntax errors with line numbers
  • Suggest corrections based on spec version
  • Provide valid example structure

Missing Implementation:

  • List file locations where handlers should exist
  • Suggest framework-specific code to implement
  • Estimate implementation effort

Type Mismatches:

  • Show expected vs. actual types clearly
  • Explain impact of the mismatch
  • Suggest type coercion or spec updates

Additional Resources

For more detailed information on specific topics, see:

  • REFERENCE.md - Technical details on OpenAPI and GraphQL structures
  • EXAMPLES.md - Real-world usage scenarios and code samples

Requirements

This skill works best with:

  • API spec files in the codebase
  • Structured routing in backend code
  • TypeScript for type generation (optional but recommended)

No additional packages are required for basic validation and comparison. Advanced features may suggest installing validation tools via npm.

平台分布

Claude Code

27.73%
按下载量换算1,210

windsurf

22.44%
按下载量换算980

OpenCode

16.92%
按下载量换算739

Codex

10.95%
按下载量换算478

Antigravity

7.5%
按下载量换算327

Gemini CLI

3.57%
按下载量换算156

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills