Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计通过

api-developmentAPI 开发

Agent Skill

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

总安装

31,440

周安装

1,310

GitHub Stars

1

下载量

10,480
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install api-development

简介

元技能通过将专业技能、代理和命令协调成无缝的构建工作流程来协调整个 API 开发生命周期(从设计到文档)。

SKILL.md

name
api-development
model
reasoning
description
Meta-skill that orchestrates the full API development lifecycle — from design through documentation — by coordinating specialized skills, agents, and commands into a seamless build workflow.

API Development

Orchestrate the full API development lifecycle by coordinating design, implementation, testing, and documentation into a single workflow.

When to Use This Skill

  • Building a new API from scratch
  • Adding endpoints to an existing API
  • Redesigning or refactoring an API
  • Planning API versioning and migration
  • Running a complete API development cycle (design → build → test → document → deploy)

Orchestration Flow

Follow these steps in order. Each step routes to the appropriate skill or tool.

1. Design the API

Load the api-design skill to establish resource models, URL structure, HTTP method semantics, error formats, and pagination strategy.

Deliverables: Resource list, endpoint map, request/response schemas, error format

2. Generate OpenAPI Spec

Produce a machine-readable OpenAPI 3.x specification from the design. Use the OpenAPI template in api-design/assets/openapi-template.yaml as a starting point.

Deliverables: openapi.yaml with all endpoints, schemas, auth schemes, and examples

3. Scaffold Endpoints

Generate route files, request/response types, and validation schemas for each endpoint. Group routes by resource.

Deliverables: Route files, type definitions, validation schemas per resource

4. Implement Business Logic

Write service-layer logic with input validation, authorization checks, database queries, and proper error propagation. Keep controllers thin — business logic lives in the service layer.

Deliverables: Service modules, repository layer, middleware (auth, rate limiting, CORS)

5. Test

Write tests at three levels:

  • Unit tests — service logic, validation, error handling
  • Integration tests — endpoint behavior with real DB
  • Contract tests — response shapes match OpenAPI spec

Deliverables: Test suite with coverage for happy paths, error cases, edge cases, and auth

6. Document

Generate human-readable API documentation with usage examples and SDK snippets. Ensure every endpoint has description, parameters, request/response examples, and error codes.

Deliverables: API docs, changelog, authentication guide

7. Version and Deploy

Apply a versioning strategy, tag the release, update changelogs, and deploy through the pipeline. Follow the api-versioning skill for deprecation and migration guidance.

Deliverables: Version tag, changelog entry, deployment confirmation


API Design Decision Table

Choose the right paradigm for your use case.

CriteriaRESTGraphQLgRPC
Best forCRUD-heavy public APIsComplex relational data, client-driven queriesInternal microservices, high-throughput
Data fetchingFixed response shape per endpointClient specifies exact fieldsStrongly typed protobuf messages
Over/under-fetchingCommon problemSolved by designMinimal — schema is explicit
CachingNative HTTP caching (ETags, Cache-Control)Requires custom cachingNo built-in HTTP caching
Real-timePolling or WebSocketsSubscriptions (built-in)Bidirectional streaming
ToolingMature — OpenAPI, Postman, curlGrowing — Apollo, Relay, GraphiQLMature — protoc, grpcurl, Buf
Learning curveLowMediumMedium-High
VersioningURL or header versioningSchema evolution with @deprecatedPackage versioning in .proto

Rule of thumb: Default to REST for public APIs. Use GraphQL when clients need flexible queries across related data. Use gRPC for internal service-to-service communication.


API Checklist

Run through this checklist before marking any API work as complete.

Authentication & Authorization

  • [ ] Authentication mechanism chosen (JWT, OAuth2, API key)
  • [ ] Authorization rules enforced at every endpoint
  • [ ] Tokens validated and scoped correctly
  • [ ] Secrets stored securely (never in code or logs)

Rate Limiting

  • [ ] Rate limits configured per endpoint or consumer tier
  • [ ] RateLimit-* headers included in responses
  • [ ] 429 Too Many Requests returned with Retry-After header
  • [ ] Rate limit strategy documented for consumers

Pagination

  • [ ] All collection endpoints paginated
  • [ ] Pagination style chosen (cursor-based or offset-based)
  • [ ] page_size bounded with a sensible maximum
  • [ ] Total count or hasNextPage indicator included

Filtering & Sorting

  • [ ] Filter parameters validated and sanitized
  • [ ] Sort fields allow-listed (no arbitrary column sorting)
  • [ ] Default sort order defined and documented

Error Handling

  • [ ] Consistent error response schema across all endpoints
  • [ ] Correct HTTP status codes (4xx for client, 5xx for server)
  • [ ] Validation errors return field-level detail
  • [ ] Internal errors never leak stack traces or sensitive data

Versioning

  • [ ] Versioning strategy selected and applied uniformly
  • [ ] Breaking vs non-breaking change policy documented
  • [ ] Deprecation timeline communicated via Sunset header

CORS

  • [ ] Allowed origins configured (no wildcard * in production with credentials)
  • [ ] Allowed methods and headers explicitly listed
  • [ ] Preflight (OPTIONS) requests handled correctly

Documentation

  • [ ] OpenAPI / Swagger spec generated and up to date
  • [ ] Every endpoint has description, parameters, and example responses
  • [ ] Authentication requirements documented
  • [ ] Error codes and meanings listed
  • [ ] Changelog maintained for each version

Security

  • [ ] Input validation on all fields
  • [ ] SQL injection prevention
  • [ ] HTTPS enforced
  • [ ] Sensitive data never in URLs or logs
  • [ ] CORS configured correctly

Monitoring

  • [ ] Structured logging with request IDs
  • [ ] Error tracking configured (Sentry, Datadog, etc.)
  • [ ] Performance metrics collected (latency, error rate)
  • [ ] Health check endpoint available (/health)
  • [ ] Alerts configured for error rate spikes

Skill Routing Table

NeedSkillPurpose
API design principlesapi-designResource modeling, HTTP semantics, pagination, error formats
Versioning strategyapi-versioningVersion lifecycle, deprecation, migration patterns
Authenticationauth-patternsJWT, OAuth2, sessions, RBAC, MFA
Error handlingerror-handlingError types, retry patterns, circuit breakers, HTTP errors
Rate limitingrate-limitingAlgorithms, HTTP headers, tiered limits, distributed limiting
CachingcachingCache strategies, HTTP caching, invalidation, Redis patterns
Database migrationsdatabase-migrationsSchema evolution, zero-downtime patterns, rollback strategies

NEVER Do

  1. NEVER skip the design phase — jumping straight to code produces inconsistent APIs that are expensive to fix
  2. NEVER expose database schema directly — API resources are not database tables; design around consumer use cases
  3. NEVER ship without authentication — every production endpoint must have an auth strategy
  4. NEVER return inconsistent error formats — every error response must follow the same schema
  5. NEVER break a published API without a versioning plan — breaking changes require a new version, migration guide, and deprecation timeline
  6. NEVER deploy without tests and documentation — untested APIs ship bugs, undocumented APIs frustrate developers

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

94.21%
按下载量换算9,873

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills