[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BXP57V5FD2FGP7PW5FF4VW":3,"skill-same:01M7BXP57V5FD2FGP7PW5FF4VW":47},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7BXP57V5FD2FGP7PW5FF4VW","api-and-interface-design",null,"Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-agent-skills-framework\u002Fskills\u002Fapi-and-interface-design\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: api-and-interface-design\ndescription: Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.\n---\n\n# API and Interface Design\n\n## Overview\n\nDesign stable, well-documented interfaces that are hard to misuse. Good interfaces make the right thing easy and the wrong thing hard. This applies to REST APIs, GraphQL schemas, module boundaries, component props, and any surface where one piece of code talks to another.\n\n## When to Use\n\n- Designing new API endpoints\n- Defining module boundaries or contracts between teams\n- Creating component prop interfaces\n- Establishing database schema that informs API shape\n- Changing existing public interfaces\n\n## Core Principles\n\n### Hyrum's Law\n\n> With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody, regardless of what you promise in the contract.\n\nThis means: every public behavior — including undocumented quirks, error message text, timing, and ordering — becomes a de facto contract once users depend on it. Design implications:\n\n- **Be intentional about what you expose.** Every observable behavior is a potential commitment.\n- **Don't leak implementation details.** If users can observe it, they will depend on it.\n- **Plan for deprecation at design time.** See `deprecation-and-migration` for how to safely remove things users depend on.\n- **Tests are not enough.** Even with perfect contract tests, Hyrum's Law means \"safe\" changes can break real users who depend on undocumented behavior.\n\n### The One-Version Rule\n\nAvoid forcing consumers to choose between multiple versions of the same dependency or API. Diamond dependency problems arise when different consumers need different versions of the same thing. Design for a world where only one version exists at a time — extend rather than fork.\n\n### 1. Contract First\n\nDefine the interface before implementing it. The contract is the spec — implementation follows.\n\n```typescript\n\u002F\u002F Define the contract first\ninterface TaskAPI {\n  \u002F\u002F Creates a task and returns the created task with server-generated fields\n  createTask(input: CreateTaskInput): Promise\u003CTask>;\n\n  \u002F\u002F Returns paginated tasks matching filters\n  listTasks(params: ListTasksParams): Promise\u003CPaginatedResult\u003CTask>>;\n\n  \u002F\u002F Returns a single task or throws NotFoundError\n  getTask(id: string): Promise\u003CTask>;\n\n  \u002F\u002F Partial update — only provided fields change\n  updateTask(id: string, input: UpdateTaskInput): Promise\u003CTask>;\n\n  \u002F\u002F Idempotent delete — succeeds even if already deleted\n  deleteTask(id: string): Promise\u003Cvoid>;\n}\n```\n\n### 2. Consistent Error Semantics\n\nPick one error strategy and use it everywhere:\n\n```typescript\n\u002F\u002F REST: HTTP status codes + structured error body\n\u002F\u002F Every error response follows the same shape\ninterface APIError {\n  error: {\n    code: string;        \u002F\u002F Machine-readable: \"VALIDATION_ERROR\"\n    message: string;     \u002F\u002F Human-readable: \"Email is required\"\n    details?: unknown;   \u002F\u002F Additional context when helpful\n  };\n}\n\n\u002F\u002F Status code mapping\n\u002F\u002F 400 → Client sent invalid data\n\u002F\u002F 401 → Not authenticated\n\u002F\u002F 403 → Authenticated but not authorized\n\u002F\u002F 404 → Resource not found\n\u002F\u002F 409 → Conflict (duplicate, version mismatch)\n\u002F\u002F 422 → Validation failed (semantically invalid)\n\u002F\u002F 500 → Server error (never expose internal details)\n```\n\n**Don't mix patterns.** If some endpoints throw, others return null, and others return `{ error }` — the consumer can't predict behavior.\n\n### 3. Validate at Boundaries\n\nTrust internal code. Validate at system edges where external input enters:\n\n```typescript\n\u002F\u002F Validate at the API boundary\napp.post('\u002Fapi\u002Ftasks', async (req, res) => {\n  const result = CreateTaskSchema.safeParse(req.body);\n  if (!result.success) {\n    return res.status(422).json({\n      error: {\n        code: 'VALIDATION_ERROR',\n        message: 'Invalid task data',\n        details: result.error.flatten(),\n      },\n    });\n  }\n\n  \u002F\u002F After validation, internal code trusts the types\n  const task = await taskService.create(result.data);\n  return res.status(201).json(task);\n});\n```\n\nWhere validation belongs:\n- API route handlers (user input)\n- Form submission handlers (user input)\n- External service response parsing (third-party data -- **always treat as untrusted**)\n- Environment variable loading (configuration)\n\n> **Third-party API responses are untrusted data.** Validate their shape and content before using them in any logic, rendering, or decision-making. A compromised or misbehaving external service can return unexpected types, malicious content, or instruction-like text.\n\nWhere validation does NOT belong:\n- Between internal functions that share type contracts\n- In utility functions called by already-validated code\n- On data that just came from your own database\n\n### 4. Prefer Addition Over Modification\n\nExtend interfaces without breaking existing consumers:\n\n```typescript\n\u002F\u002F Good: Add optional fields\ninterface CreateTaskInput {\n  title: string;\n  description?: string;\n  priority?: 'low' | 'medium' | 'high';  \u002F\u002F Added later, optional\n  labels?: string[];                       \u002F\u002F Added later, optional\n}\n\n\u002F\u002F Bad: Change existing field types or remove fields\ninterface CreateTaskInput {\n  title: string;\n  \u002F\u002F description: string;  \u002F\u002F Removed — breaks existing consumers\n  priority: number;         \u002F\u002F Changed from string — breaks existing consumers\n}\n```\n\n### 5. Predictable Naming\n\n| Pattern | Convention | Example |\n|---------|-----------|---------|\n| REST endpoints | Plural nouns, no verbs | `GET \u002Fapi\u002Ftasks`, `POST \u002Fapi\u002Ftasks` |\n| Query params | camelCase | `?sortBy=createdAt&pageSize=20` |\n| Response fields | camelCase | `{ createdAt, updatedAt, taskId }` |\n| Boolean fields | is\u002Fhas\u002Fcan prefix | `isComplete`, `hasAttachments` |\n| Enum values | UPPER_SNAKE | `\"IN_PROGRESS\"`, `\"COMPLETED\"` |\n\n## REST API Patterns\n\n### Resource Design\n\n```\nGET    \u002Fapi\u002Ftasks              → List tasks (with query params for filtering)\nPOST   \u002Fapi\u002Ftasks              → Create a task\nGET    \u002Fapi\u002Ftasks\u002F:id          → Get a single task\nPATCH  \u002Fapi\u002Ftasks\u002F:id          → Update a task (partial)\nDELETE \u002Fapi\u002Ftasks\u002F:id          → Delete a task\n\nGET    \u002Fapi\u002Ftasks\u002F:id\u002Fcomments → List comments for a task (sub-resource)\nPOST   \u002Fapi\u002Ftasks\u002F:id\u002Fcomments → Add a comment to a task\n```\n\n### Pagination\n\nPaginate list endpoints:\n\n```typescript\n\u002F\u002F Request\nGET \u002Fapi\u002Ftasks?page=1&pageSize=20&sortBy=createdAt&sortOrder=desc\n\n\u002F\u002F Response\n{\n  \"data\": [...],\n  \"pagination\": {\n    \"page\": 1,\n    \"pageSize\": 20,\n    \"totalItems\": 142,\n    \"totalPages\": 8\n  }\n}\n```\n\n### Filtering\n\nUse query parameters for filters:\n\n```\nGET \u002Fapi\u002Ftasks?status=in_progress&assignee=user123&createdAfter=2025-01-01\n```\n\n### Partial Updates (PATCH)\n\nAccept partial objects — only update what's provided:\n\n```typescript\n\u002F\u002F Only title changes, everything else preserved\nPATCH \u002Fapi\u002Ftasks\u002F123\n{ \"title\": \"Updated title\" }\n```\n\n## TypeScript Interface Patterns\n\n### Use Discriminated Unions for Variants\n\n```typescript\n\u002F\u002F Good: Each variant is explicit\ntype TaskStatus =\n  | { type: 'pending' }\n  | { type: 'in_progress'; assignee: string; startedAt: Date }\n  | { type: 'completed'; completedAt: Date; completedBy: string }\n  | { type: 'cancelled'; reason: string; cancelledAt: Date };\n\n\u002F\u002F Consumer gets type narrowing\nfunction getStatusLabel(status: TaskStatus): string {\n  switch (status.type) {\n    case 'pending': return 'Pending';\n    case 'in_progress': return `In progress (${status.assignee})`;\n    case 'completed': return `Done on ${status.completedAt}`;\n    case 'cancelled': return `Cancelled: ${status.reason}`;\n  }\n}\n```\n\n### Input\u002FOutput Separation\n\n```typescript\n\u002F\u002F Input: what the caller provides\ninterface CreateTaskInput {\n  title: string;\n  description?: string;\n}\n\n\u002F\u002F Output: what the system returns (includes server-generated fields)\ninterface Task {\n  id: string;\n  title: string;\n  description: string | null;\n  createdAt: Date;\n  updatedAt: Date;\n  createdBy: string;\n}\n```\n\n### Use Branded Types for IDs\n\n```typescript\ntype TaskId = string & { readonly __brand: 'TaskId' };\ntype UserId = string & { readonly __brand: 'UserId' };\n\n\u002F\u002F Prevents accidentally passing a UserId where a TaskId is expected\nfunction getTask(id: TaskId): Promise\u003CTask> { ... }\n```\n\n## Common Rationalizations\n\n| Rationalization | Reality |\n|---|---|\n| \"We'll document the API later\" | The types ARE the documentation. Define them first. |\n| \"We don't need pagination for now\" | You will the moment someone has 100+ items. Add it from the start. |\n| \"PATCH is complicated, let's just use PUT\" | PUT requires the full object every time. PATCH is what clients actually want. |\n| \"We'll version the API when we need to\" | Breaking changes without versioning break consumers. Design for extension from the start. |\n| \"Nobody uses that undocumented behavior\" | Hyrum's Law: if it's observable, somebody depends on it. Treat every public behavior as a commitment. |\n| \"We can just maintain two versions\" | Multiple versions multiply maintenance cost and create diamond dependency problems. Prefer the One-Version Rule. |\n| \"Internal APIs don't need contracts\" | Internal consumers are still consumers. Contracts prevent coupling and enable parallel work. |\n\n## Red Flags\n\n- Endpoints that return different shapes depending on conditions\n- Inconsistent error formats across endpoints\n- Validation scattered throughout internal code instead of at boundaries\n- Breaking changes to existing fields (type changes, removals)\n- List endpoints without pagination\n- Verbs in REST URLs (`\u002Fapi\u002FcreateTask`, `\u002Fapi\u002FgetUsers`)\n- Third-party API responses used without validation or sanitization\n\n## Verification\n\nAfter designing an API:\n\n- [ ] Every endpoint has typed input and output schemas\n- [ ] Error responses follow a single consistent format\n- [ ] Validation happens at system boundaries only\n- [ ] List endpoints support pagination\n- [ ] New fields are additive and optional (backward compatible)\n- [ ] Naming follows consistent conventions across all endpoints\n- [ ] API documentation or types are committed alongside the implementation\n","# API and Interface Design\n\n## Overview\n\nDesign stable, well-documented interfaces that are hard to misuse. Good interfaces make the right thing easy and the wrong thing hard. This applies to REST APIs, GraphQL schemas, module boundaries, component props, and any surface where one piece of code talks to another.\n\n## When to Use\n\n- Designing new API endpoints\n- Defining module boundaries or contracts between teams\n- Creating component prop interfaces\n- Establishing database schema that informs API shape\n- Changing existing public interfaces\n\n## Core Principles\n\n### Hyrum's Law\n\n> With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody, regardless of what you promise in the contract.\n\nThis means: every public behavior — including undocumented quirks, error message text, timing, and ordering — becomes a de facto contract once users depend on it. Design implications:\n\n- **Be intentional about what you expose.** Every observable behavior is a potential commitment.\n- **Don't leak implementation details.** If users can observe it, they will depend on it.\n- **Plan for deprecation at design time.** See `deprecation-and-migration` for how to safely remove things users depend on.\n- **Tests are not enough.** Even with perfect contract tests, Hyrum's Law means \"safe\" changes can break real users who depend on undocumented behavior.\n\n### The One-Version Rule\n\nAvoid forcing consumers to choose between multiple versions of the same dependency or API. Diamond dependency problems arise when different consumers need different versions of the same thing. Design for a world where only one version exists at a time — extend rather than fork.\n\n### 1. Contract First\n\nDefine the interface before implementing it. The contract is the spec — implementation follows.\n\n```typescript\n\u002F\u002F Define the contract first\ninterface TaskAPI {\n  \u002F\u002F Creates a task and returns the created task with server-generated fields\n  createTask(input: CreateTaskInput): Promise\u003CTask>;\n\n  \u002F\u002F Returns paginated tasks matching filters\n  listTasks(params: ListTasksParams): Promise\u003CPaginatedResult\u003CTask>>;\n\n  \u002F\u002F Returns a single task or throws NotFoundError\n  getTask(id: string): Promise\u003CTask>;\n\n  \u002F\u002F Partial update — only provided fields change\n  updateTask(id: string, input: UpdateTaskInput): Promise\u003CTask>;\n\n  \u002F\u002F Idempotent delete — succeeds even if already deleted\n  deleteTask(id: string): Promise\u003Cvoid>;\n}\n```\n\n### 2. Consistent Error Semantics\n\nPick one error strategy and use it everywhere:\n\n```typescript\n\u002F\u002F REST: HTTP status codes + structured error body\n\u002F\u002F Every error response follows the same shape\ninterface APIError {\n  error: {\n    code: string;        \u002F\u002F Machine-readable: \"VALIDATION_ERROR\"\n    message: string;     \u002F\u002F Human-readable: \"Email is required\"\n    details?: unknown;   \u002F\u002F Additional context when helpful\n  };\n}\n\n\u002F\u002F Status code mapping\n\u002F\u002F 400 → Client sent invalid data\n\u002F\u002F 401 → Not authenticated\n\u002F\u002F 403 → Authenticated but not authorized\n\u002F\u002F 404 → Resource not found\n\u002F\u002F 409 → Conflict (duplicate, version mismatch)\n\u002F\u002F 422 → Validation failed (semantically invalid)\n\u002F\u002F 500 → Server error (never expose internal details)\n```\n\n**Don't mix patterns.** If some endpoints throw, others return null, and others return `{ error }` — the consumer can't predict behavior.\n\n### 3. Validate at Boundaries\n\nTrust internal code. Validate at system edges where external input enters:\n\n```typescript\n\u002F\u002F Validate at the API boundary\napp.post('\u002Fapi\u002Ftasks', async (req, res) => {\n  const result = CreateTaskSchema.safeParse(req.body);\n  if (!result.success) {\n    return res.status(422).json({\n      error: {\n        code: 'VALIDATION_ERROR',\n        message: 'Invalid task data',\n        details: result.error.flatten(),\n      },\n    });\n  }\n\n  \u002F\u002F After validation, internal code trusts the types\n  const task = await taskService.create(result.data);\n  return res.status(201).json(task);\n});\n```\n\nWhere validation belongs:\n- API route handlers (user input)\n- Form submission handlers (user input)\n- External service response parsing (third-party data -- **always treat as untrusted**)\n- Environment variable loading (configuration)\n\n> **Third-party API responses are untrusted data.** Validate their shape and content before using them in any logic, rendering, or decision-making. A compromised or misbehaving external service can return unexpected types, malicious content, or instruction-like text.\n\nWhere validation does NOT belong:\n- Between internal functions that share type contracts\n- In utility functions called by already-validated code\n- On data that just came from your own database\n\n### 4. Prefer Addition Over Modification\n\nExtend interfaces without breaking existing consumers:\n\n```typescript\n\u002F\u002F Good: Add optional fields\ninterface CreateTaskInput {\n  title: string;\n  description?: string;\n  priority?: 'low' | 'medium' | 'high';  \u002F\u002F Added later, optional\n  labels?: string[];                       \u002F\u002F Added later, optional\n}\n\n\u002F\u002F Bad: Change existing field types or remove fields\ninterface CreateTaskInput {\n  title: string;\n  \u002F\u002F description: string;  \u002F\u002F Removed — breaks existing consumers\n  priority: number;         \u002F\u002F Changed from string — breaks existing consumers\n}\n```\n\n### 5. Predictable Naming\n\n| Pattern | Convention | Example |\n|---------|-----------|---------|\n| REST endpoints | Plural nouns, no verbs | `GET \u002Fapi\u002Ftasks`, `POST \u002Fapi\u002Ftasks` |\n| Query params | camelCase | `?sortBy=createdAt&pageSize=20` |\n| Response fields | camelCase | `{ createdAt, updatedAt, taskId }` |\n| Boolean fields | is\u002Fhas\u002Fcan prefix | `isComplete`, `hasAttachments` |\n| Enum values | UPPER_SNAKE | `\"IN_PROGRESS\"`, `\"COMPLETED\"` |\n\n## REST API Patterns\n\n### Resource Design\n\n```\nGET    \u002Fapi\u002Ftasks              → List tasks (with query params for filtering)\nPOST   \u002Fapi\u002Ftasks              → Create a task\nGET    \u002Fapi\u002Ftasks\u002F:id          → Get a single task\nPATCH  \u002Fapi\u002Ftasks\u002F:id          → Update a task (partial)\nDELETE \u002Fapi\u002Ftasks\u002F:id          → Delete a task\n\nGET    \u002Fapi\u002Ftasks\u002F:id\u002Fcomments → List comments for a task (sub-resource)\nPOST   \u002Fapi\u002Ftasks\u002F:id\u002Fcomments → Add a comment to a task\n```\n\n### Pagination\n\nPaginate list endpoints:\n\n```typescript\n\u002F\u002F Request\nGET \u002Fapi\u002Ftasks?page=1&pageSize=20&sortBy=createdAt&sortOrder=desc\n\n\u002F\u002F Response\n{\n  \"data\": [...],\n  \"pagination\": {\n    \"page\": 1,\n    \"pageSize\": 20,\n    \"totalItems\": 142,\n    \"totalPages\": 8\n  }\n}\n```\n\n### Filtering\n\nUse query parameters for filters:\n\n```\nGET \u002Fapi\u002Ftasks?status=in_progress&assignee=user123&createdAfter=2025-01-01\n```\n\n### Partial Updates (PATCH)\n\nAccept partial objects — only update what's provided:\n\n```typescript\n\u002F\u002F Only title changes, everything else preserved\nPATCH \u002Fapi\u002Ftasks\u002F123\n{ \"title\": \"Updated title\" }\n```\n\n## TypeScript Interface Patterns\n\n### Use Discriminated Unions for Variants\n\n```typescript\n\u002F\u002F Good: Each variant is explicit\ntype TaskStatus =\n  | { type: 'pending' }\n  | { type: 'in_progress'; assignee: string; startedAt: Date }\n  | { type: 'completed'; completedAt: Date; completedBy: string }\n  | { type: 'cancelled'; reason: string; cancelledAt: Date };\n\n\u002F\u002F Consumer gets type narrowing\nfunction getStatusLabel(status: TaskStatus): string {\n  switch (status.type) {\n    case 'pending': return 'Pending';\n    case 'in_progress': return `In progress (${status.assignee})`;\n    case 'completed': return `Done on ${status.completedAt}`;\n    case 'cancelled': return `Cancelled: ${status.reason}`;\n  }\n}\n```\n\n### Input\u002FOutput Separation\n\n```typescript\n\u002F\u002F Input: what the caller provides\ninterface CreateTaskInput {\n  title: string;\n  description?: string;\n}\n\n\u002F\u002F Output: what the system returns (includes server-generated fields)\ninterface Task {\n  id: string;\n  title: string;\n  description: string | null;\n  createdAt: Date;\n  updatedAt: Date;\n  createdBy: string;\n}\n```\n\n### Use Branded Types for IDs\n\n```typescript\ntype TaskId = string & { readonly __brand: 'TaskId' };\ntype UserId = string & { readonly __brand: 'UserId' };\n\n\u002F\u002F Prevents accidentally passing a UserId where a TaskId is expected\nfunction getTask(id: TaskId): Promise\u003CTask> { ... }\n```\n\n## Common Rationalizations\n\n| Rationalization | Reality |\n|---|---|\n| \"We'll document the API later\" | The types ARE the documentation. Define them first. |\n| \"We don't need pagination for now\" | You will the moment someone has 100+ items. Add it from the start. |\n| \"PATCH is complicated, let's just use PUT\" | PUT requires the full object every time. PATCH is what clients actually want. |\n| \"We'll version the API when we need to\" | Breaking changes without versioning break consumers. Design for extension from the start. |\n| \"Nobody uses that undocumented behavior\" | Hyrum's Law: if it's observable, somebody depends on it. Treat every public behavior as a commitment. |\n| \"We can just maintain two versions\" | Multiple versions multiply maintenance cost and create diamond dependency problems. Prefer the One-Version Rule. |\n| \"Internal APIs don't need contracts\" | Internal consumers are still consumers. Contracts prevent coupling and enable parallel work. |\n\n## Red Flags\n\n- Endpoints that return different shapes depending on conditions\n- Inconsistent error formats across endpoints\n- Validation scattered throughout internal code instead of at boundaries\n- Breaking changes to existing fields (type changes, removals)\n- List endpoints without pagination\n- Verbs in REST URLs (`\u002Fapi\u002FcreateTask`, `\u002Fapi\u002FgetUsers`)\n- Third-party API responses used without validation or sanitization\n\n## Verification\n\nAfter designing an API:\n\n- [ ] Every endpoint has typed input and output schemas\n- [ ] Error responses follow a single consistent format\n- [ ] Validation happens at system boundaries only\n- [ ] List endpoints support pagination\n- [ ] New fields are additive and optional (backward compatible)\n- [ ] Naming follows consistent conventions across all endpoints\n- [ ] API documentation or types are committed alongside the implementation\n",{"name":5,"description":7},"main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Skills-技能包\u002FYYC3-Skills-技能包-agent-skills-framework\u002Fskills\u002Fapi-and-interface-design",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill api-and-interface-design",{"tool":39,"command":40},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill api-and-interface-design",{"tool":42,"command":43},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill api-and-interface-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-agent-skills-framework\u002Fskills\u002Fapi-and-interface-design\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]