Skills Plugins MCP Prompt Model 博客 我的中心
开发编程 #design #api #ai

api-design-principles

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

DeepseekModel 官方收录技能 质量 优秀 · 90 v1.0.0

获取

https://deepseekmodel.com/api/download.php?id=wshobson-agents-plugins-backend-development-skills-api-design-principles-skill-md&format=skill
下载 .skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name api-design-principles description Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards. API Design Principles Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers and stand the test of time. When to Use This Skill Designing new REST or GraphQL APIs Refactoring existing APIs for better usability Establishing API design standards for your team Reviewing API specifications before implementation Migrating between API paradigms (REST to GraphQL, etc.) Creating developer-friendly API documentation Optimizing APIs for specific use cases (mobile, third-party integrations) Core Concepts 1. RESTful Design Principles Resource-Oriented Architecture Resources are nouns (users, orders, products), not verbs Use HTTP methods for actions (GET, POST, PUT, PATCH, DELETE) URLs represent resource hierarchies Consistent naming conventions HTTP Methods Semantics: GET : Retrieve resources (idempotent, safe) POST : Create new resources PUT : Replace entire resource (idempotent) PATCH : Partial resource updates DELETE : Remove resources (idempotent) 2. GraphQL Design Principles Schema-First Development Types define your domain model Queries for reading data Mutations for modifying data Subscriptions for real-time updates Query Structure: Clients request exactly what they need Single endpoint, multiple operations Strongly typed schema Introspection built-in 3. API Versioning Strategies URL Versioning: /api/v1/users /api/v2/users Header Versioning: Accept: application/vnd.api+json; version=1 Query Parameter Versioning: /api/users?version=1 Detailed patterns and worked examples Detailed pattern documentation lives in references/details.md . Read that file when the navigation tier above is insufficient. Best Practices REST APIs Consistent Naming : Use plural nouns for collections ( /users , not /user ) Stateless : Each request contains all necessary information Use HTTP Status Codes Correctly : 2xx success, 4xx client errors, 5xx server errors Version Your API : Plan for breaking changes from day one Pagination : Always paginate large collections Rate Limiting : Protect your API with rate limits Documentation : Use OpenAPI/Swagger for interactive docs GraphQL APIs Schema First : Design schema before writing resolvers Avoid N+1 : Use DataLoaders for efficient data fetching Input Validation : Validate at schema and resolver levels Error Handling : Return structured errors in mutation payloads Pagination : Use cursor-based pagination (Relay spec) Deprecation : Use @deprecated directive for gradual migration Monitoring : Track query complexity and execution time Common Pitfalls Over-fetching/Under-fetching (REST) : Fixed in GraphQL but requires DataLoaders Breaking Changes : Version APIs or use deprecation strategies Inconsistent Error Formats : Standardize error responses Missing Rate Limits : APIs without limits are vulnerable to abuse Poor Documentation : Undocumented APIs frustrate developers Ignoring HTTP Semantics : POST for idempotent operations breaks expectations Tight Coupling : API structure shouldn't mirror database schema
Agent 识别该技能的关键词,点击任意一个即可复制。

该技能未提供触发词。

下载的 .skill 包内含以下字段。
字段 说明
format格式标识(skill/v1)
skill_id技能唯一 ID
name技能名称
version版本号
description技能描述
category所属分类(数组)
trigger_words触发词列表
tags标签列表
source来源标识
source_url来源链接(本页地址)
exported_at导出时间(每次下载生成)
system_prompt系统提示词正文
model_config模型参数:provider / model / temperature / max_tokens / top_p
examples示例
install_guide各平台导入说明(Coze / Dify / Claude / 自定义框架)
同一份技能可按不同平台格式导出。
.skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用 下载
.skillpro 增强格式,额外含脚本 / 工具 / 依赖 / 钩子占位 下载
.json 纯 JSON 导出,只含 system_prompt 与模型参数 下载
Coze 带 frontmatter 的 Markdown,Coze 平台导入用 下载
Dify Dify DSL,创建应用后直接导入 下载

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。