[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X65MDAKX77TP0PBF7NJF9E":3,"skill-same:01M6X65MDAKX77TP0PBF7NJF9E":110},{"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":37,"publishedAt":58,"linkOnly":59,"markdownContent":60,"markdownBody":61,"frontMatter":62,"refName":71,"commitSha":72,"skillDirectory":73,"forksCount":74,"repositoryHtmlUrl":75,"repositoryHomepageUrl":76,"ownerHtmlUrl":77,"ownerBlogUrl":76,"ownerDescription":78,"updatedAt":79,"install":80,"resources":93},"01M6X65MDAKX77TP0PBF7NJF9E","api-design",null,"Use when designing APIs, planning endpoints, REST conventions, versioning, or deprecation — even when the user just says 'expose this as an endpoint' without naming API design.","event4u-app\u002Fagent-config","event4u-app","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F199339632?v=4","01M6X5TWBNCQCE1VDKT4E9KF7N","event4u.app","01M6X5TWF4HRM266RG2Q5VVH1X",19,"MIT","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fapi-design\u002FSKILL.md",[18,23,26,29,34],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":30,"categoryName":31,"taxonomyType":32,"taxonomyTypeDesc":33},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":35,"categoryName":36,"taxonomyType":32,"taxonomyTypeDesc":33},"01JBSEEDCAT000000000000032","设计师",[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57],"api design","design","api","when","deprecation","naming","designing apis","founder","as","base","endpoints","backend","use","just","versioning","architect","endpoint","REST","developer","planning","2026-11-10 10:12:30",false,"---\nmodel_tier: medium\nname: api-design\ndescription: \"Use when designing APIs, planning endpoints, REST conventions, versioning, or deprecation — even when the user just says 'expose this as an endpoint' without naming API design.\"\npersonas:\n  - backend-architect\ndomain: engineering\nrecommended_for_user_types: [developer, founder]\nworkspaces:\n  - engineering\npacks:\n  - engineering-base\n---\n\n# api-design\n\n\n> **Grounded corpus (Tier-1 consultation):** pagination, versioning,\n> error shape (RFC 9457), idempotency, async ops, rate limiting, bulk,\n> naming, expansion, webhooks — query `node\n> \u003Cskills-root>\u002Fcorpus-grounding\u002Fscripts\u002Fground.mjs search --manifest\n> \u003Cskills-root>\u002Fapi-design\u002Fdata\u002Fmanifest.json \"\u003Cconcern>\"` and propose\n> the grounded pattern (+ hardening + anti-patterns + RFC link) before\n> designing from memory. Corpus: [`data\u002Fapi-patterns.csv`](data\u002Fapi-patterns.csv).\n\n## When to use\n\nUse this skill when designing new API endpoints, restructuring existing APIs, or deciding about versioning and deprecation.\n\nDo NOT use when:\n- Implementing an already-designed endpoint (use `api-endpoint` skill)\n- Writing tests for APIs (use `api-testing` skill)\n\n## Procedure: Design an API\n\n1. **Gather context** — read `agents\u002Fsettings\u002Fcontexts\u002Fapi-versioning.md`, `agents\u002Freference\u002Fdocs\u002Fapi-resources.md`, `agents\u002Freference\u002Fdocs\u002Fquery-filter.md`, `agents\u002Freference\u002Fdocs\u002Fcontroller.md`, and guideline `php\u002Fapi-design.md`.\n2. **Identify the resource** — determine the domain entity, its attributes, and relationships. Check existing models and resources for field naming patterns.\n3. **Define endpoints** — list each endpoint with HTTP method, URL path, request body, query parameters, and response structure. Follow existing route file patterns.\n4. **Decide versioning** — determine whether this extends the current version or requires a new version (see decision table below).\n5. **Design error responses** — define 4xx\u002F5xx responses matching the project's existing error format.\n6. **Validate against existing patterns** — compare your design with 2-3 similar existing endpoints. Flag any inconsistencies.\n7. **Run adversarial review** — use `adversarial-review` skill to check for breaking changes, consistency issues, and missing error cases.\n\n## Versioning decisions\n\n### URL-based versioning\n\nRoutes versioned via URL prefix: `\u002Fapi\u002Fv1\u002F...`, `\u002Fapi\u002Fv2\u002F...`\n\n```\nroutes\u002Fapi\u002Fv1\u002Fprojects.php  → \u002Fapi\u002Fv1\u002Fprojects   (Laravel)\napp\u002Fapi\u002Fv1\u002Fprojects\u002Froute.ts → \u002Fapi\u002Fv1\u002Fprojects   (Next.js)\nroutes\u002Fapi\u002Fv2\u002Fprojects.php  → \u002Fapi\u002Fv2\u002Fprojects\n```\n\n### Automatic fallback\n\nIf a route doesn't exist in the requested version, the system falls back to the next older version. Configured in the framework's app config (`config\u002Fapp.php` in Laravel):\n\n```php\n'api_versioning' => [\n    'versions' => 'v2,v1',  \u002F\u002F newest first\n],\n```\n\n### When to create a new version\n\n| Change type | Action |\n|---|---|\n| Add optional field | Extend current version |\n| Add new endpoint | Add to current version |\n| Remove\u002Frename field | New version |\n| Change field type | New version |\n| Change validation rules | New version |\n\n> If an existing client would break without code changes → **new version required**.\n\n### Deprecation workflow\n\n1. **Mark as deprecated** — add headers: `Deprecation: true`, `Sunset: YYYY-MM-DD`, `Link: \u003Csuccessor>`\n2. **Document** — add to API changelog with sunset date\n3. **Monitor usage** — track clients still using deprecated endpoints\n4. **Remove** — after sunset date, remove route + controller + docs\n\nMinimum 3 months between deprecation and removal.\n\n## Design review\n\nBefore presenting an API design, run the **`adversarial-review`** skill.\nFocus on: Breaking changes? Consistency? Error responses?\n\n## Output format\n\n1. Endpoint specification — method, path, request\u002Fresponse structure\n2. Versioning decision with rationale\n3. Error response format following existing project patterns\n\n## Gotcha\n\n- Consistency beats \"better\" design — check existing patterns first.\n- Always include pagination on list endpoints.\n- Max nesting depth: 2 levels (`\u002Fusers\u002F{id}\u002Forders\u002F{id}`).\n- Don't version internal APIs only your own frontend consumes.\n- Deprecation without migration path is useless — always provide the replacement.\n- Don't duplicate controllers for new versions — use fallback logic.\n\n## Do NOT\n\n- Do NOT introduce a new response format in an established API — match existing patterns.\n- Do NOT create v2 endpoints without a deprecation plan for v1.\n- Do NOT skip pagination on list endpoints.\n\n## Auto-trigger keywords\n\n- API design\n- REST API\n- endpoint design\n- resource structure\n- response format\n- API versioning\n- deprecation\n- breaking changes\n","# api-design\n\n\n> **Grounded corpus (Tier-1 consultation):** pagination, versioning,\n> error shape (RFC 9457), idempotency, async ops, rate limiting, bulk,\n> naming, expansion, webhooks — query `node\n> \u003Cskills-root>\u002Fcorpus-grounding\u002Fscripts\u002Fground.mjs search --manifest\n> \u003Cskills-root>\u002Fapi-design\u002Fdata\u002Fmanifest.json \"\u003Cconcern>\"` and propose\n> the grounded pattern (+ hardening + anti-patterns + RFC link) before\n> designing from memory. Corpus: [`data\u002Fapi-patterns.csv`](data\u002Fapi-patterns.csv).\n\n## When to use\n\nUse this skill when designing new API endpoints, restructuring existing APIs, or deciding about versioning and deprecation.\n\nDo NOT use when:\n- Implementing an already-designed endpoint (use `api-endpoint` skill)\n- Writing tests for APIs (use `api-testing` skill)\n\n## Procedure: Design an API\n\n1. **Gather context** — read `agents\u002Fsettings\u002Fcontexts\u002Fapi-versioning.md`, `agents\u002Freference\u002Fdocs\u002Fapi-resources.md`, `agents\u002Freference\u002Fdocs\u002Fquery-filter.md`, `agents\u002Freference\u002Fdocs\u002Fcontroller.md`, and guideline `php\u002Fapi-design.md`.\n2. **Identify the resource** — determine the domain entity, its attributes, and relationships. Check existing models and resources for field naming patterns.\n3. **Define endpoints** — list each endpoint with HTTP method, URL path, request body, query parameters, and response structure. Follow existing route file patterns.\n4. **Decide versioning** — determine whether this extends the current version or requires a new version (see decision table below).\n5. **Design error responses** — define 4xx\u002F5xx responses matching the project's existing error format.\n6. **Validate against existing patterns** — compare your design with 2-3 similar existing endpoints. Flag any inconsistencies.\n7. **Run adversarial review** — use `adversarial-review` skill to check for breaking changes, consistency issues, and missing error cases.\n\n## Versioning decisions\n\n### URL-based versioning\n\nRoutes versioned via URL prefix: `\u002Fapi\u002Fv1\u002F...`, `\u002Fapi\u002Fv2\u002F...`\n\n```\nroutes\u002Fapi\u002Fv1\u002Fprojects.php  → \u002Fapi\u002Fv1\u002Fprojects   (Laravel)\napp\u002Fapi\u002Fv1\u002Fprojects\u002Froute.ts → \u002Fapi\u002Fv1\u002Fprojects   (Next.js)\nroutes\u002Fapi\u002Fv2\u002Fprojects.php  → \u002Fapi\u002Fv2\u002Fprojects\n```\n\n### Automatic fallback\n\nIf a route doesn't exist in the requested version, the system falls back to the next older version. Configured in the framework's app config (`config\u002Fapp.php` in Laravel):\n\n```php\n'api_versioning' => [\n    'versions' => 'v2,v1',  \u002F\u002F newest first\n],\n```\n\n### When to create a new version\n\n| Change type | Action |\n|---|---|\n| Add optional field | Extend current version |\n| Add new endpoint | Add to current version |\n| Remove\u002Frename field | New version |\n| Change field type | New version |\n| Change validation rules | New version |\n\n> If an existing client would break without code changes → **new version required**.\n\n### Deprecation workflow\n\n1. **Mark as deprecated** — add headers: `Deprecation: true`, `Sunset: YYYY-MM-DD`, `Link: \u003Csuccessor>`\n2. **Document** — add to API changelog with sunset date\n3. **Monitor usage** — track clients still using deprecated endpoints\n4. **Remove** — after sunset date, remove route + controller + docs\n\nMinimum 3 months between deprecation and removal.\n\n## Design review\n\nBefore presenting an API design, run the **`adversarial-review`** skill.\nFocus on: Breaking changes? Consistency? Error responses?\n\n## Output format\n\n1. Endpoint specification — method, path, request\u002Fresponse structure\n2. Versioning decision with rationale\n3. Error response format following existing project patterns\n\n## Gotcha\n\n- Consistency beats \"better\" design — check existing patterns first.\n- Always include pagination on list endpoints.\n- Max nesting depth: 2 levels (`\u002Fusers\u002F{id}\u002Forders\u002F{id}`).\n- Don't version internal APIs only your own frontend consumes.\n- Deprecation without migration path is useless — always provide the replacement.\n- Don't duplicate controllers for new versions — use fallback logic.\n\n## Do NOT\n\n- Do NOT introduce a new response format in an established API — match existing patterns.\n- Do NOT create v2 endpoints without a deprecation plan for v1.\n- Do NOT skip pagination on list endpoints.\n\n## Auto-trigger keywords\n\n- API design\n- REST API\n- endpoint design\n- resource structure\n- response format\n- API versioning\n- deprecation\n- breaking changes\n",{"name":5,"packs":63,"domain":65,"personas":66,"model_tier":68,"workspaces":69,"description":7,"recommended_for_user_types":70},[64],"engineering-base","engineering",[67],"backend-architect","medium",[65],[56,45],"main","12bd765ce1d800501d45dfb8232102793af01290","src\u002Fskills\u002Fapi-design",1,"https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config","https:\u002F\u002Fevent4u.app","https:\u002F\u002Fgithub.com\u002Fevent4u-app","Your events in your hand","2026-11-13 03:25:49",{"source":8,"skillName":5,"commands":81,"prompt":91,"zipAvailable":92},[82,85,88],{"tool":83,"command":84},"npx","npx skills add event4u-app\u002Fagent-config --skill api-design",{"tool":86,"command":87},"bunx","bunx skills add event4u-app\u002Fagent-config --skill api-design",{"tool":89,"command":90},"pnpm","pnpm dlx skills add event4u-app\u002Fagent-config --skill api-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fapi-design\u002FSKILL.md",true,[94,100,106],{"path":95,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":98,"sourceHtmlUrl":99},"data\u002Fapi-patterns.csv","ASSET","资产文件",4512,"https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fapi-design\u002Fdata\u002Fapi-patterns.csv",{"path":101,"resourceType":102,"resourceTypeDesc":103,"sizeBytes":104,"sourceHtmlUrl":105},"data\u002Fmanifest.json","REFERENCE","参考文档",851,"https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fapi-design\u002Fdata\u002Fmanifest.json",{"path":107,"resourceType":102,"resourceTypeDesc":103,"sizeBytes":108,"sourceHtmlUrl":109},"evals\u002Ftriggers.json",4090,"https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fapi-design\u002Fevals\u002Ftriggers.json",[111,125,138,150,162,172],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":118,"publishedAt":58},"01M6X84PK96XBPENXH66JCTSD1","unknown-key-fixture","Declares a key the schema does not know.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Funknown-key\u002FSKILL.md",[117],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[119,120,121,122,123,124],"unknown key fixture","Unknown key","fixture","unknown","schema","package",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":132,"publishedAt":58},"01M6X84HW7NAHZ7GZMQ9RXK1XJ","portable-fixture","Declares only semantics the MCP-lite carrier transports whole.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fportable\u002FSKILL.md",[131],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[121,133,134,135,136,124,137],"portable","portable fixture","engineer","only","MCP",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":145,"publishedAt":58},"01M6X84F29FE0RGGZ1ZTFGZTX2","non-portable-fixture","Declares a runtime semantic the carrier drops.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fnon-portable\u002FSKILL.md",[144],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[134,146,133,121,147,148,149,124],"non portable fixture","semantic","high","runtime",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":157,"publishedAt":58},"01M6X848F706PT9MDCX75JKJ6B","candidate-zero-width","A candidate whose prose carries an invisible joiner.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fzero-width-injection\u002FSKILL.md",[156],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[158,159,160,161],"candidate zero width","candidate","ZeRO","prose",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":169,"publishedAt":58},"01M6X841SSC2T31VDF41SA6DG1","candidate-disclosure-suppression","A candidate whose prose tells the agent to withhold from the user.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdisclosure-suppression\u002FSKILL.md",[168],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[170,159,161,171],"candidate disclosure suppression","user",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":179,"publishedAt":58},"01M6X83TFS5AGPBPVTQNWP0BB3","candidate-dangerous-frontmatter","A candidate claiming an unscoped tool grant and a permission bypass.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdangerous-frontmatter\u002FSKILL.md",[178],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[180,159,181,182,183,184],"candidate dangerous frontmatter","frontmatter","shell","permission","tool"]