[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M782HR4ACH60M9BH8X01Y1G1":3,"skill-same:01M782HR4ACH60M9BH8X01Y1G1":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M782HR4ACH60M9BH8X01Y1G1","API Designer",null,"Design REST and GraphQL APIs. Use when creating backend APIs, defining API contracts, or integrating third-party services. Covers endpoint design, authentication, versioning, documentation, and best practices.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_daffy0208_ai-dev-standards_api-designer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: API Designer\ndescription: Design REST and GraphQL APIs. Use when creating backend APIs, defining API contracts, or integrating third-party services. Covers endpoint design, authentication, versioning, documentation, and best practices.\nversion: 1.0.0\n---\n\n# API Designer\n\nDesign robust, scalable, and developer-friendly APIs.\n\n## Core Principles\n\n### 1. Developer Experience First\n\n- Clear, predictable naming conventions\n- Comprehensive documentation\n- Helpful error messages\n- Consistent patterns across endpoints\n\n### 2. Design for Evolution\n\n- Versioning strategy from day one\n- Backward compatibility\n- Deprecation process\n- Migration guides for breaking changes\n\n### 3. Security by Default\n\n- Authentication and authorization\n- Rate limiting and throttling\n- Input validation and sanitization\n- HTTPS only, no exceptions\n\n### 4. Performance Matters\n\n- Efficient queries and indexing\n- Caching strategies\n- Pagination for large datasets\n- Compression (gzip, brotli)\n\n## REST API Design\n\n### Resource Naming Conventions\n\n```\n✅ Good (Nouns, plural, hierarchical):\nGET    \u002Fusers                  # List all users\nGET    \u002Fusers\u002F123              # Get specific user\nPOST   \u002Fusers                  # Create user\nPUT    \u002Fusers\u002F123              # Replace user\nPATCH  \u002Fusers\u002F123              # Update user\nDELETE \u002Fusers\u002F123              # Delete user\nGET    \u002Fusers\u002F123\u002Fposts        # User's posts (nested)\nGET    \u002Fusers\u002F123\u002Fposts\u002F456    # Specific post\n\n❌ Bad (Verbs, inconsistent, unclear):\nGET \u002FgetUsers\nPOST \u002FcreateUser\nGET \u002Fuser-list\nGET \u002FUserData?id=123\n```\n\n### HTTP Methods & Semantics\n\n| Method     | Purpose          | Idempotent | Safe | Request Body | Response Body   |\n| ---------- | ---------------- | ---------- | ---- | ------------ | --------------- |\n| **GET**    | Retrieve data    | Yes        | Yes  | No           | Yes             |\n| **POST**   | Create resource  | No         | No   | Yes          | Yes (created)   |\n| **PUT**    | Replace resource | Yes        | No   | Yes          | Yes (optional)  |\n| **PATCH**  | Partial update   | No         | No   | Yes          | Yes (optional)  |\n| **DELETE** | Remove resource  | Yes        | No   | No           | No (204) or Yes |\n\n**Idempotent**: Multiple identical requests have same effect as single request\n**Safe**: Request doesn't modify server state\n\n### HTTP Status Codes\n\n**Success (2xx)**:\n\n- `200 OK` - Successful GET, PUT, PATCH, DELETE\n- `201 Created` - Successful POST, includes `Location` header\n- `204 No Content` - Successful request, no response body (often DELETE)\n\n**Client Errors (4xx)**:\n\n- `400 Bad Request` - Invalid syntax, validation error\n- `401 Unauthorized` - Authentication required or failed\n- `403 Forbidden` - Authenticated but lacks permission\n- `404 Not Found` - Resource doesn't exist\n- `409 Conflict` - Request conflicts with current state\n- `422 Unprocessable Entity` - Validation error (semantic)\n- `429 Too Many Requests` - Rate limit exceeded\n\n**Server Errors (5xx)**:\n\n- `500 Internal Server Error` - Generic server error\n- `502 Bad Gateway` - Upstream service error\n- `503 Service Unavailable` - Temporary unavailability\n- `504 Gateway Timeout` - Upstream timeout\n\n### Response Format Standards\n\n**Success Response**:\n\n```json\n{\n  \"data\": {\n    \"id\": \"123\",\n    \"type\": \"user\",\n    \"attributes\": {\n      \"name\": \"John Doe\",\n      \"email\": \"john@example.com\",\n      \"created_at\": \"2025-01-15T10:30:00Z\"\n    }\n  }\n}\n```\n\n**Error Response**:\n\n```json\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Request validation failed\",\n    \"details\": [\n      {\n        \"field\": \"email\",\n        \"code\": \"REQUIRED\",\n        \"message\": \"Email is required\"\n      },\n      {\n        \"field\": \"age\",\n        \"code\": \"OUT_OF_RANGE\",\n        \"message\": \"Age must be between 18 and 120\"\n      }\n    ],\n    \"request_id\": \"req_abc123\",\n    \"documentation_url\": \"https:\u002F\u002Fapi.example.com\u002Fdocs\u002Ferrors\u002Fvalidation\"\n  }\n}\n```\n\n**List Response with Pagination**:\n\n```json\n{\n  \"data\": [...],\n  \"pagination\": {\n    \"cursor\": \"eyJpZCI6MTIzfQ==\",\n    \"has_more\": true,\n    \"total_count\": 1000\n  },\n  \"links\": {\n    \"next\": \"\u002Fusers?cursor=eyJpZCI6MTIzfQ==&limit=20\",\n    \"prev\": \"\u002Fusers?cursor=eyJpZCI6MTAwfQ==&limit=20\"\n  }\n}\n```\n\n### Pagination Strategies\n\n**Cursor-based (Recommended)**:\n\n```\nGET \u002Fusers?cursor=abc123&limit=20\n\nPros: Consistent results, efficient, handles real-time data\nCons: Can't jump to arbitrary page\nUse when: Large datasets, real-time data, performance critical\n```\n\n**Offset-based**:\n\n```\nGET \u002Fusers?page=1&per_page=20\nGET \u002Fusers?offset=0&limit=20\n\nPros: Simple, can jump to any page\nCons: Inconsistent with concurrent writes, inefficient at scale\nUse when: Small datasets, admin interfaces, simple use cases\n```\n\n### Filtering, Sorting, and Search\n\n**Filtering**:\n\n```\nGET \u002Fusers?status=active&role=admin&created_after=2025-01-01\n```\n\n**Sorting**:\n\n```\nGET \u002Fusers?sort=-created_at,name  # Descending created_at, then ascending name\n```\n\n**Search**:\n\n```\nGET \u002Fusers?q=john&fields=name,email  # Search across specified fields\n```\n\n### Authentication & Authorization\n\n**JWT Bearer Token (Recommended for SPAs)**:\n\n```\nAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\n\nPros: Stateless, includes user claims, works across domains\nCons: Can't revoke until expiry, larger payload\n```\n\n**API Keys (for service-to-service)**:\n\n```\nX-API-Key: sk_live_abc123...\n\nPros: Simple, easy to rotate, per-service keys\nCons: No user context, must be kept secret\n```\n\n**OAuth 2.0 (for third-party access)**:\n\n```\nAuthorization: Bearer access_token\n\nPros: Delegated auth, scoped permissions, industry standard\nCons: Complex setup, requires OAuth server\n```\n\n**Basic Auth (only for internal\u002Fadmin tools)**:\n\n```\nAuthorization: Basic base64(username:password)\n\nPros: Simple, built-in to HTTP\nCons: Credentials in every request, must use HTTPS\n```\n\n### Rate Limiting\n\n**Standard Headers**:\n\n```\nX-RateLimit-Limit: 1000          # Max requests per window\nX-RateLimit-Remaining: 999       # Requests left\nX-RateLimit-Reset: 1640995200    # Unix timestamp when limit resets\nRetry-After: 60                  # Seconds to wait (on 429)\n```\n\n**Common Strategies**:\n\n- Fixed window: 1000 requests per hour\n- Sliding window: 1000 requests per rolling hour\n- Token bucket: Burst allowance with refill rate\n- Per-user, per-IP, or per-API-key limits\n\n### Versioning Strategies\n\n**URL Versioning (Recommended)**:\n\n```\n\u002Fv1\u002Fusers\n\u002Fv2\u002Fusers\n\nPros: Explicit, easy to route, clear in logs\nCons: URL pollution, harder to evolve incrementally\n```\n\n**Header Versioning**:\n\n```\nAccept: application\u002Fvnd.myapp.v2+json\nAPI-Version: 2\n\nPros: Clean URLs, follows REST principles\nCons: Less visible, harder to test in browser\n```\n\n**Best Practices**:\n\n- Start with v1, not v0\n- Only increment for breaking changes\n- Support N and N-1 versions simultaneously\n- Provide migration guides\n- Announce deprecation 6-12 months ahead\n\n---\n\n## GraphQL API Design\n\n### Schema Design\n\n```graphql\ntype User {\n  id: ID!\n  name: String!\n  email: String!\n  posts(first: Int, after: String): PostConnection!\n  createdAt: DateTime!\n}\n\ntype PostConnection {\n  edges: [PostEdge!]!\n  pageInfo: PageInfo!\n}\n\ntype PostEdge {\n  node: Post!\n  cursor: String!\n}\n\ntype PageInfo {\n  hasNextPage: Boolean!\n  endCursor: String\n}\n\ntype Query {\n  user(id: ID!): User\n  users(first: Int, after: String): UserConnection!\n}\n\ntype Mutation {\n  createUser(input: CreateUserInput!): CreateUserPayload!\n  updateUser(id: ID!, input: UpdateUserInput!): UpdateUserPayload!\n}\n\ninput CreateUserInput {\n  name: String!\n  email: String!\n}\n\ntype CreateUserPayload {\n  user: User\n  errors: [Error!]\n}\n```\n\n### GraphQL Best Practices\n\n**1. Use Relay Connection Pattern for Pagination**:\n\n```graphql\nquery {\n  users(first: 10, after: \"cursor\") {\n    edges {\n      node {\n        id\n        name\n      }\n      cursor\n    }\n    pageInfo {\n      hasNextPage\n      endCursor\n    }\n  }\n}\n```\n\n**2. Input Types for Mutations**:\n\n```graphql\n# ✅ Good: Input type + payload\nmutation {\n  createUser(input: { name: \"John\", email: \"john@example.com\" }) {\n    user {\n      id\n      name\n    }\n    errors {\n      field\n      message\n    }\n  }\n}\n\n# ❌ Bad: Flat arguments\nmutation {\n  createUser(name: \"John\", email: \"john@example.com\") {\n    id\n    name\n  }\n}\n```\n\n**3. Error Handling**:\n\n```graphql\ntype Mutation {\n  createUser(input: CreateUserInput!): CreateUserPayload!\n}\n\ntype CreateUserPayload {\n  user: User # Null if errors\n  errors: [Error!] # Field-level errors\n}\n\ntype Error {\n  field: String!\n  code: String!\n  message: String!\n}\n```\n\n### REST vs GraphQL Decision\n\n**Use REST when**:\n\n- Simple CRUD operations\n- Caching is critical (HTTP caching)\n- Public API for third-parties\n- File uploads\u002Fdownloads\n- Team unfamiliar with GraphQL\n\n**Use GraphQL when**:\n\n- Clients need flexible queries\n- Reducing over-fetching\u002Funder-fetching\n- Rapid frontend iteration\n- Complex nested data relationships\n- Strong typing and schema benefits\n\n---\n\n## API Documentation\n\n### OpenAPI\u002FSwagger Specification\n\n```yaml\nopenapi: 3.0.0\ninfo:\n  title: User Management API\n  version: 1.0.0\n  description: API for managing users and posts\nservers:\n  - url: https:\u002F\u002Fapi.example.com\u002Fv1\npaths:\n  \u002Fusers:\n    get:\n      summary: List users\n      parameters:\n        - name: page\n          in: query\n          schema:\n            type: integer\n            default: 1\n        - name: per_page\n          in: query\n          schema:\n            type: integer\n            default: 20\n            maximum: 100\n      responses:\n        '200':\n          description: Success\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUserList'\n        '401':\n          $ref: '#\u002Fcomponents\u002Fresponses\u002FUnauthorized'\n    post:\n      summary: Create user\n      requestBody:\n        required: true\n        content:\n          application\u002Fjson:\n            schema:\n              $ref: '#\u002Fcomponents\u002Fschemas\u002FCreateUserInput'\n      responses:\n        '201':\n          description: User created\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUser'\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: string\n        name:\n          type: string\n        email:\n          type: string\n          format: email\n  securitySchemes:\n    bearerAuth:\n      type: http\n      scheme: bearer\n      bearerFormat: JWT\n```\n\n### Documentation Best Practices\n\n- ✅ Include request\u002Fresponse examples\n- ✅ Document all error codes\n- ✅ Provide authentication guides\n- ✅ Interactive API playground (Swagger UI, GraphQL Playground)\n- ✅ Code examples in multiple languages\n- ✅ Rate limit information\n- ✅ Changelog for API updates\n\n---\n\n## Security Checklist\n\n- [ ] HTTPS only (redirect HTTP → HTTPS)\n- [ ] Authentication required for protected endpoints\n- [ ] Authorization checks (user can only access own data)\n- [ ] Input validation (schema validation, sanitization)\n- [ ] Rate limiting per user\u002FIP\n- [ ] CORS configuration (whitelist origins)\n- [ ] SQL injection prevention (parameterized queries)\n- [ ] No sensitive data in URLs (use headers\u002Fbody)\n- [ ] Audit logging for sensitive operations\n- [ ] API keys rotatable and revocable\n\n---\n\n## Related Resources\n\n**Related Skills**:\n\n- `frontend-builder` - For consuming APIs from frontend\n- `deployment-advisor` - For API hosting decisions\n- `performance-optimizer` - For API performance tuning\n\n**Related Patterns**:\n\n- `META\u002FDECISION-FRAMEWORK.md` - REST vs GraphQL decisions\n- `STANDARDS\u002Farchitecture-patterns\u002Fapi-gateway-pattern.md` - API gateway architecture (when created)\n\n**Related Playbooks**:\n\n- `PLAYBOOKS\u002Fdeploy-api.md` - API deployment procedure (when created)\n- `PLAYBOOKS\u002Fversion-api.md` - API versioning workflow (when created)\n","# API Designer\n\nDesign robust, scalable, and developer-friendly APIs.\n\n## Core Principles\n\n### 1. Developer Experience First\n\n- Clear, predictable naming conventions\n- Comprehensive documentation\n- Helpful error messages\n- Consistent patterns across endpoints\n\n### 2. Design for Evolution\n\n- Versioning strategy from day one\n- Backward compatibility\n- Deprecation process\n- Migration guides for breaking changes\n\n### 3. Security by Default\n\n- Authentication and authorization\n- Rate limiting and throttling\n- Input validation and sanitization\n- HTTPS only, no exceptions\n\n### 4. Performance Matters\n\n- Efficient queries and indexing\n- Caching strategies\n- Pagination for large datasets\n- Compression (gzip, brotli)\n\n## REST API Design\n\n### Resource Naming Conventions\n\n```\n✅ Good (Nouns, plural, hierarchical):\nGET    \u002Fusers                  # List all users\nGET    \u002Fusers\u002F123              # Get specific user\nPOST   \u002Fusers                  # Create user\nPUT    \u002Fusers\u002F123              # Replace user\nPATCH  \u002Fusers\u002F123              # Update user\nDELETE \u002Fusers\u002F123              # Delete user\nGET    \u002Fusers\u002F123\u002Fposts        # User's posts (nested)\nGET    \u002Fusers\u002F123\u002Fposts\u002F456    # Specific post\n\n❌ Bad (Verbs, inconsistent, unclear):\nGET \u002FgetUsers\nPOST \u002FcreateUser\nGET \u002Fuser-list\nGET \u002FUserData?id=123\n```\n\n### HTTP Methods & Semantics\n\n| Method     | Purpose          | Idempotent | Safe | Request Body | Response Body   |\n| ---------- | ---------------- | ---------- | ---- | ------------ | --------------- |\n| **GET**    | Retrieve data    | Yes        | Yes  | No           | Yes             |\n| **POST**   | Create resource  | No         | No   | Yes          | Yes (created)   |\n| **PUT**    | Replace resource | Yes        | No   | Yes          | Yes (optional)  |\n| **PATCH**  | Partial update   | No         | No   | Yes          | Yes (optional)  |\n| **DELETE** | Remove resource  | Yes        | No   | No           | No (204) or Yes |\n\n**Idempotent**: Multiple identical requests have same effect as single request\n**Safe**: Request doesn't modify server state\n\n### HTTP Status Codes\n\n**Success (2xx)**:\n\n- `200 OK` - Successful GET, PUT, PATCH, DELETE\n- `201 Created` - Successful POST, includes `Location` header\n- `204 No Content` - Successful request, no response body (often DELETE)\n\n**Client Errors (4xx)**:\n\n- `400 Bad Request` - Invalid syntax, validation error\n- `401 Unauthorized` - Authentication required or failed\n- `403 Forbidden` - Authenticated but lacks permission\n- `404 Not Found` - Resource doesn't exist\n- `409 Conflict` - Request conflicts with current state\n- `422 Unprocessable Entity` - Validation error (semantic)\n- `429 Too Many Requests` - Rate limit exceeded\n\n**Server Errors (5xx)**:\n\n- `500 Internal Server Error` - Generic server error\n- `502 Bad Gateway` - Upstream service error\n- `503 Service Unavailable` - Temporary unavailability\n- `504 Gateway Timeout` - Upstream timeout\n\n### Response Format Standards\n\n**Success Response**:\n\n```json\n{\n  \"data\": {\n    \"id\": \"123\",\n    \"type\": \"user\",\n    \"attributes\": {\n      \"name\": \"John Doe\",\n      \"email\": \"john@example.com\",\n      \"created_at\": \"2025-01-15T10:30:00Z\"\n    }\n  }\n}\n```\n\n**Error Response**:\n\n```json\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Request validation failed\",\n    \"details\": [\n      {\n        \"field\": \"email\",\n        \"code\": \"REQUIRED\",\n        \"message\": \"Email is required\"\n      },\n      {\n        \"field\": \"age\",\n        \"code\": \"OUT_OF_RANGE\",\n        \"message\": \"Age must be between 18 and 120\"\n      }\n    ],\n    \"request_id\": \"req_abc123\",\n    \"documentation_url\": \"https:\u002F\u002Fapi.example.com\u002Fdocs\u002Ferrors\u002Fvalidation\"\n  }\n}\n```\n\n**List Response with Pagination**:\n\n```json\n{\n  \"data\": [...],\n  \"pagination\": {\n    \"cursor\": \"eyJpZCI6MTIzfQ==\",\n    \"has_more\": true,\n    \"total_count\": 1000\n  },\n  \"links\": {\n    \"next\": \"\u002Fusers?cursor=eyJpZCI6MTIzfQ==&limit=20\",\n    \"prev\": \"\u002Fusers?cursor=eyJpZCI6MTAwfQ==&limit=20\"\n  }\n}\n```\n\n### Pagination Strategies\n\n**Cursor-based (Recommended)**:\n\n```\nGET \u002Fusers?cursor=abc123&limit=20\n\nPros: Consistent results, efficient, handles real-time data\nCons: Can't jump to arbitrary page\nUse when: Large datasets, real-time data, performance critical\n```\n\n**Offset-based**:\n\n```\nGET \u002Fusers?page=1&per_page=20\nGET \u002Fusers?offset=0&limit=20\n\nPros: Simple, can jump to any page\nCons: Inconsistent with concurrent writes, inefficient at scale\nUse when: Small datasets, admin interfaces, simple use cases\n```\n\n### Filtering, Sorting, and Search\n\n**Filtering**:\n\n```\nGET \u002Fusers?status=active&role=admin&created_after=2025-01-01\n```\n\n**Sorting**:\n\n```\nGET \u002Fusers?sort=-created_at,name  # Descending created_at, then ascending name\n```\n\n**Search**:\n\n```\nGET \u002Fusers?q=john&fields=name,email  # Search across specified fields\n```\n\n### Authentication & Authorization\n\n**JWT Bearer Token (Recommended for SPAs)**:\n\n```\nAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\n\nPros: Stateless, includes user claims, works across domains\nCons: Can't revoke until expiry, larger payload\n```\n\n**API Keys (for service-to-service)**:\n\n```\nX-API-Key: sk_live_abc123...\n\nPros: Simple, easy to rotate, per-service keys\nCons: No user context, must be kept secret\n```\n\n**OAuth 2.0 (for third-party access)**:\n\n```\nAuthorization: Bearer access_token\n\nPros: Delegated auth, scoped permissions, industry standard\nCons: Complex setup, requires OAuth server\n```\n\n**Basic Auth (only for internal\u002Fadmin tools)**:\n\n```\nAuthorization: Basic base64(username:password)\n\nPros: Simple, built-in to HTTP\nCons: Credentials in every request, must use HTTPS\n```\n\n### Rate Limiting\n\n**Standard Headers**:\n\n```\nX-RateLimit-Limit: 1000          # Max requests per window\nX-RateLimit-Remaining: 999       # Requests left\nX-RateLimit-Reset: 1640995200    # Unix timestamp when limit resets\nRetry-After: 60                  # Seconds to wait (on 429)\n```\n\n**Common Strategies**:\n\n- Fixed window: 1000 requests per hour\n- Sliding window: 1000 requests per rolling hour\n- Token bucket: Burst allowance with refill rate\n- Per-user, per-IP, or per-API-key limits\n\n### Versioning Strategies\n\n**URL Versioning (Recommended)**:\n\n```\n\u002Fv1\u002Fusers\n\u002Fv2\u002Fusers\n\nPros: Explicit, easy to route, clear in logs\nCons: URL pollution, harder to evolve incrementally\n```\n\n**Header Versioning**:\n\n```\nAccept: application\u002Fvnd.myapp.v2+json\nAPI-Version: 2\n\nPros: Clean URLs, follows REST principles\nCons: Less visible, harder to test in browser\n```\n\n**Best Practices**:\n\n- Start with v1, not v0\n- Only increment for breaking changes\n- Support N and N-1 versions simultaneously\n- Provide migration guides\n- Announce deprecation 6-12 months ahead\n\n---\n\n## GraphQL API Design\n\n### Schema Design\n\n```graphql\ntype User {\n  id: ID!\n  name: String!\n  email: String!\n  posts(first: Int, after: String): PostConnection!\n  createdAt: DateTime!\n}\n\ntype PostConnection {\n  edges: [PostEdge!]!\n  pageInfo: PageInfo!\n}\n\ntype PostEdge {\n  node: Post!\n  cursor: String!\n}\n\ntype PageInfo {\n  hasNextPage: Boolean!\n  endCursor: String\n}\n\ntype Query {\n  user(id: ID!): User\n  users(first: Int, after: String): UserConnection!\n}\n\ntype Mutation {\n  createUser(input: CreateUserInput!): CreateUserPayload!\n  updateUser(id: ID!, input: UpdateUserInput!): UpdateUserPayload!\n}\n\ninput CreateUserInput {\n  name: String!\n  email: String!\n}\n\ntype CreateUserPayload {\n  user: User\n  errors: [Error!]\n}\n```\n\n### GraphQL Best Practices\n\n**1. Use Relay Connection Pattern for Pagination**:\n\n```graphql\nquery {\n  users(first: 10, after: \"cursor\") {\n    edges {\n      node {\n        id\n        name\n      }\n      cursor\n    }\n    pageInfo {\n      hasNextPage\n      endCursor\n    }\n  }\n}\n```\n\n**2. Input Types for Mutations**:\n\n```graphql\n# ✅ Good: Input type + payload\nmutation {\n  createUser(input: { name: \"John\", email: \"john@example.com\" }) {\n    user {\n      id\n      name\n    }\n    errors {\n      field\n      message\n    }\n  }\n}\n\n# ❌ Bad: Flat arguments\nmutation {\n  createUser(name: \"John\", email: \"john@example.com\") {\n    id\n    name\n  }\n}\n```\n\n**3. Error Handling**:\n\n```graphql\ntype Mutation {\n  createUser(input: CreateUserInput!): CreateUserPayload!\n}\n\ntype CreateUserPayload {\n  user: User # Null if errors\n  errors: [Error!] # Field-level errors\n}\n\ntype Error {\n  field: String!\n  code: String!\n  message: String!\n}\n```\n\n### REST vs GraphQL Decision\n\n**Use REST when**:\n\n- Simple CRUD operations\n- Caching is critical (HTTP caching)\n- Public API for third-parties\n- File uploads\u002Fdownloads\n- Team unfamiliar with GraphQL\n\n**Use GraphQL when**:\n\n- Clients need flexible queries\n- Reducing over-fetching\u002Funder-fetching\n- Rapid frontend iteration\n- Complex nested data relationships\n- Strong typing and schema benefits\n\n---\n\n## API Documentation\n\n### OpenAPI\u002FSwagger Specification\n\n```yaml\nopenapi: 3.0.0\ninfo:\n  title: User Management API\n  version: 1.0.0\n  description: API for managing users and posts\nservers:\n  - url: https:\u002F\u002Fapi.example.com\u002Fv1\npaths:\n  \u002Fusers:\n    get:\n      summary: List users\n      parameters:\n        - name: page\n          in: query\n          schema:\n            type: integer\n            default: 1\n        - name: per_page\n          in: query\n          schema:\n            type: integer\n            default: 20\n            maximum: 100\n      responses:\n        '200':\n          description: Success\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUserList'\n        '401':\n          $ref: '#\u002Fcomponents\u002Fresponses\u002FUnauthorized'\n    post:\n      summary: Create user\n      requestBody:\n        required: true\n        content:\n          application\u002Fjson:\n            schema:\n              $ref: '#\u002Fcomponents\u002Fschemas\u002FCreateUserInput'\n      responses:\n        '201':\n          description: User created\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUser'\ncomponents:\n  schemas:\n    User:\n      type: object\n      properties:\n        id:\n          type: string\n        name:\n          type: string\n        email:\n          type: string\n          format: email\n  securitySchemes:\n    bearerAuth:\n      type: http\n      scheme: bearer\n      bearerFormat: JWT\n```\n\n### Documentation Best Practices\n\n- ✅ Include request\u002Fresponse examples\n- ✅ Document all error codes\n- ✅ Provide authentication guides\n- ✅ Interactive API playground (Swagger UI, GraphQL Playground)\n- ✅ Code examples in multiple languages\n- ✅ Rate limit information\n- ✅ Changelog for API updates\n\n---\n\n## Security Checklist\n\n- [ ] HTTPS only (redirect HTTP → HTTPS)\n- [ ] Authentication required for protected endpoints\n- [ ] Authorization checks (user can only access own data)\n- [ ] Input validation (schema validation, sanitization)\n- [ ] Rate limiting per user\u002FIP\n- [ ] CORS configuration (whitelist origins)\n- [ ] SQL injection prevention (parameterized queries)\n- [ ] No sensitive data in URLs (use headers\u002Fbody)\n- [ ] Audit logging for sensitive operations\n- [ ] API keys rotatable and revocable\n\n---\n\n## Related Resources\n\n**Related Skills**:\n\n- `frontend-builder` - For consuming APIs from frontend\n- `deployment-advisor` - For API hosting decisions\n- `performance-optimizer` - For API performance tuning\n\n**Related Patterns**:\n\n- `META\u002FDECISION-FRAMEWORK.md` - REST vs GraphQL decisions\n- `STANDARDS\u002Farchitecture-patterns\u002Fapi-gateway-pattern.md` - API gateway architecture (when created)\n\n**Related Playbooks**:\n\n- `PLAYBOOKS\u002Fdeploy-api.md` - API deployment procedure (when created)\n- `PLAYBOOKS\u002Fversion-api.md` - API versioning workflow (when created)\n",{"name":5,"version":24,"description":7},"1.0.0","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fskills_sh\u002Fs\u002Fskills-sh_daffy0208_ai-dev-standards_api-designer",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill \"API Designer\"",{"tool":40,"command":41},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill \"API Designer\"",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill \"API Designer\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_daffy0208_ai-dev-standards_api-designer\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]