Token导航 LogoToken导航

Agent Skill · 开发

api-development-expert(API 开发 expert)

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

api-development-expert 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在开发类的 21,746 个 Skill 里排第 11,762。

总安装 1,597周安装 64GitHub Stars 25下载 517核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:api-development-expert(API 开发 expert)
来源仓库:https://github.com/oimiragieo/agent-studio
仓库路径:skills/api-development-expert
安装命令:
npx skills add https://github.com/oimiragieo/agent-studio --skill api-development-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill api-development-expert

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于辅助 API 设计和接口文档整理。适合梳理 endpoint、生成 OpenAPI 草稿或检查字段命名。需确认业务语义、鉴权方式和错误处理规则。生成接口文档时应从现有代码或样例中提取事实,避免凭空补字段。api-development-expert 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/api-development-expert

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/oimiragieo/agent-studio --skill api-developmen…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

api-development-expert 怎么安装?

在终端执行 npx skills add https://github.com/oimiragieo/agent-studio --skill api-development-expert。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

api-development-expert 支持哪些 AI 工具?

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

api-development-expert 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

api-development-expert 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

api-development-expert 用的人多吗?

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

api-development-expert 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

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

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
api-development-expert

API 开发 expert · 本页

1,59725接触敏感数据未明确未通过

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

SKILL.md 原文

Api Development Expert

When designing REST APIs, follow these core architectural principles:

Resource-Oriented Design

  • Use nouns for resources (plural form): /users, /products, /orders
  • Avoid verbs in URIs: ❌ /getUsers, /createProduct
  • Structure hierarchically: /users/{userId}/orders (orders belonging to a user)
  • Use lowercase with hyphens: /product-details not /productdetails
  • No trailing slashes: /users not /users/

HTTP Methods (Verbs with Purpose)

  • GET - Retrieve resources (idempotent & safe, no side effects)
  • POST - Create new resources (not idempotent, returns 201 Created with Location header)
  • PUT - Replace entire resource or upsert (idempotent)
  • PATCH - Partial update (not idempotent, use application/json-patch+json)
  • DELETE - Remove resource (idempotent, returns 204 No Content or 200 OK)

Query Parameters for Filtering, Sorting, and Pagination

  • Filtering: /products?category=electronics&price_gt=100
  • Sorting: /products?sort_by=price&order=desc
  • Pagination: /products?page=2&limit=10

- Use offset-based (simple but inefficient for deep pages) or cursor-based (efficient for large datasets)

API Versioning Strategies

Choose one and stick to it:

  • URI Versioning (Most common): /v1/users, /api/v2/products

- Simple for clients, but makes URIs less clean

  • Header Versioning: Accept: application/vnd.myapi.v1+json

- Cleaner URIs, but slightly complex for caching and some clients

  • Content Negotiation: Use Accept header to specify desired media type and version

OpenAPI/Swagger Specification

Use OpenAPI 3.0+ to define your API specification:

Benefits:

  • Machine-readable API specification
  • Auto-generates interactive documentation portals
  • Client SDK generation
  • Request/response schema validation
  • IDE and API tool auto-validation

Define schemas for:

  • Request parameters (required fields, allowed values, data types)
  • Response structures
  • Error responses
  • Authentication methods
  • Enum lists for restricted values

Example: Define validation rules so invalid requests are caught before reaching your backend

Rate Limiting Patterns

Protect against abuse and ensure fair usage:

Implementation strategies:

  • Use 429 Too Many Requests status code
  • Return rate limit headers:

- X-RateLimit-Limit: 1000 - X-RateLimit-Remaining: 999 - X-RateLimit-Reset: 1640000000

  • Common patterns:

- Fixed window: Simple but allows bursts at boundaries - Sliding window: More accurate, prevents boundary gaming - Token bucket: Allows controlled bursts - Leaky bucket: Smooths out traffic

Error Handling Standards

Consistent Error Response Structure:

{
  "error": {
    "code": "validation_error",
    "message": "Input validation failed.",
    "details": [{ "field": "email", "message": "Invalid email format." }]
  }
}

Use Appropriate HTTP Status Codes:

2xx Success: 200 OK, 201 Created, 204 No Content

3xx Redirection: 301 Moved Permanently, 304 Not Modified

4xx Client Error:

  • 400 Bad Request - General client error
  • 401 Unauthorized - Authentication missing/failed
  • 403 Forbidden - Authenticated but no permission
  • 404 Not Found - Resource doesn't exist
  • 405 Method Not Allowed - Invalid HTTP method
  • 409 Conflict - Resource already exists
  • 422 Unprocessable Entity - Semantic validation error
  • 429 Too Many Requests - Rate limiting

5xx Server Error:

  • 500 Internal Server Error - Generic server error
  • 503 Service Unavailable - Service temporarily down

Provide machine-readable codes AND human-readable messages

Authentication Patterns

OAuth 2.1 (Industry standard for delegated authorization)

  • Mandatory PKCE for all authorization code flows
  • Authorization Code + PKCE flow for SPAs, mobile, and web apps
  • Removed flows: Implicit grant and Resource Owner Password Credentials (security risks)
  • Exact redirect URI matching (no wildcards)
  • Never send bearer tokens in query strings (use Authorization header)
  • Implement refresh token rotation or sender-constrained tokens

JWT (JSON Web Tokens) for stateless authentication:

  • Short expiry times (≤15 minutes for access tokens)
  • Use refresh tokens for long-lived sessions
  • Include claims for authorization decisions
  • Validate signature, expiry, and issuer

API Keys for simpler integrations:

  • Use for service-to-service authentication
  • Rotate regularly
  • Never expose in client-side code
  • Implement rate limiting per key

Performance & Caching

HTTP Caching Headers:

  • Cache-Control: max-age=3600 - Cache for 1 hour
  • ETag - Entity tag for conditional requests
  • Expires - Absolute expiration time
  • 304 Not Modified - Return for unchanged resources

Caching strategies:

  • Client-side caching (browser cache)
  • Proxy/CDN caching (intermediate caches)
  • Server-side caching (database query cache, object cache)

Optimization techniques:

  • Compression: Use GZIP for large responses
  • Pagination: Return only needed data
  • Field selection: Allow clients to request specific fields (?fields=id,name)
  • Async operations: For long-running tasks, return 202 Accepted with status endpoint

API Documentation Best Practices

Comprehensive documentation must include:

  • Overview and getting started guide
  • Authentication and authorization details
  • Endpoint descriptions with HTTP methods
  • Request parameters and body schemas
  • Response structures with examples
  • Error codes and messages
  • Rate limits and usage policies
  • SDKs and client libraries
  • Changelog for version updates

Use tools:

  • Swagger UI / OpenAPI for interactive docs
  • Postman collections for testing
  • Code examples in multiple languages

OpenAPI 3.1 (2026 Best Practice)

Upgrade from OpenAPI 3.0 to 3.1 for full JSON Schema 2020-12 compliance:

Key differences from 3.0:

FeatureOpenAPI 3.0OpenAPI 3.1
JSON Schema complianceSubset + extensionsFull JSON Schema 2020-12
Nullable fieldsnullable: truetype: ["string", "null"]
WebhooksNot supportedwebhooks object at root
$schema declarationNot allowedAllowed at document root
example vs examplesBoth allowed togetherMutually exclusive

OpenAPI 3.1 Webhook definition:

openapi: '3.1.0'
info:
  title: My API
  version: '1.0.0'

webhooks:
  orderCreated:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderEvent'
      responses:
        '200':
          description: Webhook received successfully

OpenAPI Overlays (v1.1.0, Jan 2026):

Overlays are a companion spec that applies targeted transformations to an OpenAPI document without modifying the source. Use cases:

  • Adding environment-specific server URLs
  • Injecting partner-specific authentication metadata
  • Removing internal endpoints before publishing externally
# overlay.yaml
overlay: '1.0.0'
info:
  title: Partner API Overlay
  version: '1.0.0'
actions:
  - target: "$.paths['/internal/**']"
    remove: true
  - target: '$.info'
    update:
      x-partner-id: 'acme-corp'

OpenAPI 3.2 (September 2025) adds:

  • Hierarchical tag metadata (summary, parent, kind)
  • Streaming-friendly media types with itemSchema
  • query HTTP operations and querystring parameters
  • OAuth2 device flow and metadata URL support

API Versioning Strategies (2026)

Choose and document your versioning strategy before the first public release:

URI versioning (most common, most explicit):

GET /v1/users
GET /v2/users
  • Easy to test, cache, and route
  • Consider: version only on breaking changes (additive changes are backward compatible)

Header versioning:

Accept: application/vnd.myapi.v2+json
  • Cleaner URIs; slightly harder for browser-based testing

Deprecation lifecycle:

Deprecation: true
Sunset: Sat, 01 Jan 2027 00:00:00 GMT
Link: <https://api.example.com/v2/users>; rel="successor-version"

GraphQL schema evolution (no URI versioning needed):

  • Use @deprecated(reason: "Use newField instead") to phase out fields
  • Add new fields without removing old ones (additive-only changes)
  • Never rename or remove fields from a live schema; deprecate and provide migration path

Rate Limiting — Advanced Patterns (2026)

Standardized headers (IETF draft draft-ietf-httpapi-ratelimit-headers):

RateLimit-Limit: 100
RateLimit-Remaining: 87
RateLimit-Reset: 1
Retry-After: 30

Algorithm comparison:

AlgorithmBurst HandlingAccuracyUse Case
Fixed windowAllows boundary burstsLowSimple rate caps
Sliding window logNo burstHighStrict SLAs
Sliding window counterSmall burstMediumGeneral purpose
Token bucketControlled burstHighAPI gateways
Leaky bucketNo burst (smoothed)HighTraffic shaping

Tiered rate limiting — differentiate by caller type:

rate_limits:
  anonymous: 60/hour
  authenticated: 1000/hour
  premium: 10000/hour
  internal_service: unlimited

HATEOAS & Richardson Maturity Model

Design APIs for discoverability — include hypermedia links so clients can navigate state transitions:

Richardson Maturity Levels:

LevelDescriptionExample
0Single endpoint (RPC over HTTP)POST /api with action field
1Resource-based URIsGET /users/123
2HTTP verbs + status codesDELETE /users/123 returns 204
3HATEOAS (hypermedia controls)Response includes _links

Level 3 example response:

{
  "id": "order-42",
  "status": "pending",
  "total": 99.99,
  "_links": {
    "self": { "href": "/orders/42" },
    "confirm": { "href": "/orders/42/confirm", "method": "POST" },
    "cancel": { "href": "/orders/42/cancel", "method": "DELETE" },
    "customer": { "href": "/users/7" }
  }
}

Level 3 is aspirational; most production APIs operate at Level 2 and selectively add hypermedia links for complex workflows.

GraphQL Federation (2026)

For microservices architectures using GraphQL, federation enables a unified supergraph from distributed subgraphs:

Core concepts:

  • Supergraph: The combined schema exposed to clients
  • Subgraph: Individual service schemas that each own their type definitions
  • Router: Federates queries across subgraphs (Apollo Router, WunderGraph Cosmo)

Best practices:

  • One entity (e.g., User) can be defined in its owning subgraph and extended in others using @key and @extends
  • Schema governance: use a schema registry (Apollo Studio, Cosmo Schema Registry) to validate changes before deployment
  • AI/LLM traffic reshaping architecture requirements in 2026 — plan for high-volume, streaming-friendly subgraph operations

Iron Laws

  1. ALWAYS version your API from day 1 — never introduce breaking changes without a version bump; use URI versioning (/v1/, /v2/) so clients can migrate on their schedule.
  2. NEVER return 200 OK for errors — use proper HTTP status codes: 400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found), 422 (validation failed), 500 (server error).
  3. ALWAYS document every endpoint in OpenAPI 3.1 — undocumented APIs cannot be safely consumed; OpenAPI 3.1 provides JSON Schema 2020-12 compliance and webhook support.
  4. NEVER include sensitive data in error responses — stack traces, database schema, and internal file paths are attack vectors; return only machine-readable error codes and safe messages.
  5. ALWAYS implement rate limiting on all public endpoints — unauthenticated endpoints without rate limiting are DoS vectors; respond with 429 and Retry-After header.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Verbs in URIs (/getUser, /createOrder)Violates REST constraints; HTTP method conveys the verbUse nouns: /users, /orders with GET/POST
No API versioning from day 1Breaking changes instantly break all existing clientsURI versioning: /v1/resource from the start
Returning 200 OK for errorsClients can't distinguish success from failure programmaticallyUse correct HTTP status codes
No rate limiting on public endpointsDoS vulnerability; single client can exhaust resourcesRate limit with X-RateLimit-* headers + 429
Leaking server internals in errorsStack traces and DB errors are attack vectorsReturn error codes + safe messages only
No OpenAPI specificationClients must guess request/response formatDocument all endpoints in OpenAPI 3.1

Consolidated Skills

This expert skill consolidates 1 individual skills:

  • api-development-expert

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

平台分布

Codex

36.47%
按下载量换算189

Claude

33.19%
按下载量换算172

Cursor

18.61%
按下载量换算96

Gemini CLI

9.56%
按下载量换算49

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills