agentleFS
AsiaOstrichAsiaOstrich/EngramGraph/.agents/skills/api-design-assistant/SKILL.md

api-design

Skill4 starsChanged 28 days agoMITView on GitHub

Guide API design following REST, GraphQL, and gRPC best practices. Use when: designing APIs, reviewing endpoints, API versioning decisions. Not for: verifying a running API against its consumers — use /contract-test; schema design behind the API — use /database. Keywords: API, REST, GraphQL, gRPC, endpoint, versioning.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use db-design, everything-claude-code and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • yuexueyuSkill

    db-design

    数据库工程师技能 - Schema设计、索引优化、并发安全、数据库审计。当你涉及数据库表/字段/索引/SQL/迁移/MCP数据库操作、建表改表、写查询时必须使用此技能。即使用户只是说"加个字段"或"查下数据",也应触发。

    Also in 4 projects that use this

  • InfopibeSkill

    everything-claude-code

    Also in 9 projects that use this

  • mryeastcodeSkill

    everything-claude-code-conventions

    Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

    Also in 8 projects that use this

  • tpavanipradeepSkill

    nextjs-turbopack

    Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

    Also in 15 projects that use this

  • Indium-AI-LabsSkill

    data-pipeline-design

    Design batch or incremental ETL and ELT pipelines and warehouse models: grain, partitioning, idempotent loads, late-arriving data, data quality tests, PII controls, and cost monitoring, before building them. Use when adding or changing a dbt model, warehouse table, scheduled transformation, or ingestion job. Not for transactional schema design (use the database-design skill) or event-sourced stores (use the event-sourcing-architecture skill).

    Also in 3 projects that use this

  • thejordanleopoldSkill

    third-party-integration

    Use when integrating with external APIs, payment processors (Stripe), webhooks, or third-party services. Use when implementing API clients with authentication and rate limiting, handling webhooks with signature verification and idempotency, writing contract tests for external services, or isolating third-party dependencies behind adapters. Triggers: \"Stripe\", \"payment integration\", \"webhook\", \"third-party API\", \"external service\", \"API client\", \"integrate with\", \"signature verification\", \"idempotency key\".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 165 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check naming consistency, error format uniformity, pagination patterns.

    line 73
  2. Very specific:

    After /api-design completes, the AI assistant should suggest:

    line 100

“Common” is measured: kept by at least 6 in 10 of the 165 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

API Design Assistant | API 設計助手

Guide API design following REST, GraphQL, and gRPC best practices.

引導 API 設計,遵循 REST、GraphQL 和 gRPC 最佳實踐。

Quick Reference — REST Conventions | 快速參考

HTTP Methods | HTTP 方法

MethodPurposeIdempotent用途
GETRead resourceYes讀取資源
POSTCreate resourceNo建立資源
PUTReplace resourceYes替換資源
PATCHPartial updateNo部分更新
DELETERemove resourceYes刪除資源

Status Codes | 狀態碼

CodeMeaning說明
200OK成功
201Created已建立
204No Content無內容(刪除成功)
400Bad Request請求格式錯誤
401Unauthorized未認證
403Forbidden無權限
404Not Found資源不存在
409Conflict資源衝突
422Unprocessable Entity驗證失敗
429Too Many Requests請求過多(限流)
500Internal Server Error伺服器內部錯誤

URL Naming | URL 命名規則

PatternExample說明
Collection/users資源集合
Singleton/users/{id}單一資源
Sub-resource/users/{id}/orders子資源
Action/users/{id}/activate動作(僅限 POST)

Design Workflow | 設計工作流程

DEFINE ──► DESIGN ──► VALIDATE ──► DOCUMENT

1. Define — Identify Requirements | 定義需求

Clarify consumers, use cases, data models, and non-functional requirements.

釐清使用者、使用情境、資料模型和非功能性需求。

2. Design — Structure Endpoints | 設計端點

Apply RESTful conventions, define request/response schemas, plan versioning.

套用 RESTful 慣例、定義請求/回應 Schema、規劃版本策略。

3. Validate — Review Consistency | 驗證一致性

Check naming consistency, error format uniformity, pagination patterns.

檢查命名一致性、錯誤格式統一、分頁模式。

4. Document — Generate Specs | 產生文件

Produce OpenAPI/Swagger specs or GraphQL schema documentation.

產出 OpenAPI/Swagger 規格或 GraphQL Schema 文件。

Versioning Strategy | 版本策略

StrategyExamplePros優點
URL Path/v1/usersSimple, explicit簡單、明確
HeaderAccept: application/vnd.api+json;v=1Clean URLsURL 乾淨
Query/users?version=1Easy to test容易測試

Usage | 使用方式

/api-design              - Interactive API design guide | 互動式 API 設計引導
/api-design /users       - Review specific endpoint design | 審查特定端點設計
/api-design --graphql    - GraphQL schema design guide | GraphQL Schema 設計引導

Next Steps Guidance | 下一步引導

After /api-design completes, the AI assistant should suggest:

API 設計完成。建議下一步 / API design complete. Suggested next steps:

  • 執行 /sdd 建立正式規格文件 ⭐ Recommended / 推薦 — Create formal specification
  • 執行 /testing 規劃 API 測試策略 — Plan API testing strategy
  • 執行 /docs 產生 API 文件 — Generate API documentation
  • 審查安全性 → 執行 /security — Review security → Run /security

Reference | 參考

  • Core standard: api-design-standards.md

Version History | 版本歷史

VersionDateChanges變更說明
1.0.02026-03-23Initial release初始版本

License | 授權

CC BY 4.0 — Documentation content

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.