[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CWK6Y4VB6HFNKP84WA3C6G":3,"skill-same:01M6CWK6Y4VB6HFNKP84WA3C6G":71},{"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":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6CWK6Y4VB6HFNKP84WA3C6G","api-endpoint",null,"Scaffold a REST API endpoint with route, controller, validation, and tests. Use when creating new API endpoints, adding resources, or when asked to build a new backend route.","zakelfassi\u002Fskills-driven-development","zakelfassi","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1274085?v=4","01M6CWHB4BNG8NYGSW0YS08B7E","Zak El Fassi","01M6CWHB8QCK700M6B2S6Y1QPD",18,"MIT","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fapi-endpoint\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"endpoint","api","api endpoint","use","pattern","time","structure","route","build","endpoints","backend","codex","session","controller","REST","validation","scaffold","2026-11-10 10:12:30",false,"---\nname: api-endpoint\ndescription: Scaffold a REST API endpoint with route, controller, validation, and tests. Use when creating new API endpoints, adding resources, or when asked to build a new backend route.\nmetadata:\n  forged-by: codex-agent\n  forged-from: session-2026-02-18\n  forged-reason: \"Third endpoint scaffolded with identical structure — time to encode the pattern\"\n  usage-count: \"9\"\n  last-used: \"2026-02-26\"\n---\n\n# API Endpoint Scaffold\n\nCreate a new REST API endpoint following project conventions.\n\n## Inputs\n- Entity name (singular, e.g., `comment`)\n- Fields (name:type pairs, e.g., `body:string, author_id:number`)\n- Auth required? (boolean, defaults to `true`)\n- Nested under? (optional parent entity, e.g., `post`)\n\n## Steps\n\n1. **Create the route file**\n   ```\n   src\u002Froutes\u002F{entity}.routes.ts\n   ```\n   - Define CRUD routes: `GET \u002F`, `GET \u002F:id`, `POST \u002F`, `PUT \u002F:id`, `DELETE \u002F:id`\n   - If nested: `GET \u002F{parent}s\u002F:parentId\u002F{entity}s`\n\n2. **Create the controller**\n   ```\n   src\u002Fcontrollers\u002F{entity}.controller.ts\n   ```\n   - One method per route\n   - All responses use `{ data, error, meta }` shape\n   - Handle not-found with 404, validation with 422\n\n3. **Create the validation schema**\n   ```\n   src\u002Fvalidators\u002F{entity}.validator.ts\n   ```\n   - Use Zod schemas matching the field definitions\n   - Separate schemas for create vs. update (update = partial)\n\n4. **Create the test file**\n   ```\n   tests\u002Fapi\u002F{entity}.test.ts\n   ```\n   - Test each CRUD operation\n   - Test validation (bad input returns 422)\n   - Test auth (if required: 401 without token)\n   - Use test factories for fixtures\n\n5. **Register the route**\n   ```\n   src\u002Froutes\u002Findex.ts\n   ```\n   - Add import + `app.use('\u002F{entity}s', {entity}Routes)`\n   - If auth required: add auth middleware\n\n## Conventions\n- Route paths are plural (`\u002Fcomments`, not `\u002Fcomment`)\n- File names are singular (`comment.routes.ts`)\n- All endpoints return `{ data, error, meta }`\n- `meta` includes pagination for list endpoints\n- Auth middleware is applied at the route level, not controller level\n\n## Edge Cases\n- **File upload endpoints:** Add `multer` middleware, accept `multipart\u002Fform-data`\n- **Nested routes:** Parent ID is validated in middleware (404 if parent doesn't exist)\n- **Soft delete:** `DELETE` sets `deleted_at` timestamp, doesn't remove the row\n","# API Endpoint Scaffold\n\nCreate a new REST API endpoint following project conventions.\n\n## Inputs\n- Entity name (singular, e.g., `comment`)\n- Fields (name:type pairs, e.g., `body:string, author_id:number`)\n- Auth required? (boolean, defaults to `true`)\n- Nested under? (optional parent entity, e.g., `post`)\n\n## Steps\n\n1. **Create the route file**\n   ```\n   src\u002Froutes\u002F{entity}.routes.ts\n   ```\n   - Define CRUD routes: `GET \u002F`, `GET \u002F:id`, `POST \u002F`, `PUT \u002F:id`, `DELETE \u002F:id`\n   - If nested: `GET \u002F{parent}s\u002F:parentId\u002F{entity}s`\n\n2. **Create the controller**\n   ```\n   src\u002Fcontrollers\u002F{entity}.controller.ts\n   ```\n   - One method per route\n   - All responses use `{ data, error, meta }` shape\n   - Handle not-found with 404, validation with 422\n\n3. **Create the validation schema**\n   ```\n   src\u002Fvalidators\u002F{entity}.validator.ts\n   ```\n   - Use Zod schemas matching the field definitions\n   - Separate schemas for create vs. update (update = partial)\n\n4. **Create the test file**\n   ```\n   tests\u002Fapi\u002F{entity}.test.ts\n   ```\n   - Test each CRUD operation\n   - Test validation (bad input returns 422)\n   - Test auth (if required: 401 without token)\n   - Use test factories for fixtures\n\n5. **Register the route**\n   ```\n   src\u002Froutes\u002Findex.ts\n   ```\n   - Add import + `app.use('\u002F{entity}s', {entity}Routes)`\n   - If auth required: add auth middleware\n\n## Conventions\n- Route paths are plural (`\u002Fcomments`, not `\u002Fcomment`)\n- File names are singular (`comment.routes.ts`)\n- All endpoints return `{ data, error, meta }`\n- `meta` includes pagination for list endpoints\n- Auth middleware is applied at the route level, not controller level\n\n## Edge Cases\n- **File upload endpoints:** Add `multer` middleware, accept `multipart\u002Fform-data`\n- **Nested routes:** Parent ID is validated in middleware (404 if parent doesn't exist)\n- **Soft delete:** `DELETE` sets `deleted_at` timestamp, doesn't remove the row\n",{"name":5,"metadata":41,"description":7},{"forged-by":42,"last-used":43,"forged-from":44,"usage-count":45,"forged-reason":46},"codex-agent","2026-02-26","session-2026-02-18","9","Third endpoint scaffolded with identical structure — time to encode the pattern","main","e959db0147cafe70b738efbd5a128985763fd0df","examples\u002Fwebapp-starter\u002Fskills\u002Fapi-endpoint",1,"https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development","https:\u002F\u002Fskdd.dev","https:\u002F\u002Fgithub.com\u002Fzakelfassi","https:\u002F\u002Fzakelfassi.com","I build systems and write about what they do to us. Founder @TalkAndComment.","2026-11-06 14:19:15",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add zakelfassi\u002Fskills-driven-development --skill api-endpoint",{"tool":63,"command":64},"bunx","bunx skills add zakelfassi\u002Fskills-driven-development --skill api-endpoint",{"tool":66,"command":67},"pnpm","pnpm dlx skills add zakelfassi\u002Fskills-driven-development --skill api-endpoint","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fapi-endpoint\u002FSKILL.md",true,[],[72,87,92,110,126,147],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":36},"01M6CWKMXZDBQ8TK30ZV1X2KM7","skillforge","Create or update a reusable agent skill. Use when you notice a repeated pattern, when a workflow should be persisted for future sessions, or when asked to forge\u002Fcreate\u002Fscaffold a new skill.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fskillforge\u002FSKILL.md",[],[74,79,80,23,81,82,22,83,84,85,35,86],"sessions","agentskills","new skill","reusable","forge","update","create","workflow",{"skillNo":88,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":36},"01M6CWKJF5Y1PQBZ4QWA9DDES1","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fplugins\u002Fskdd-claude\u002Fskills\u002Fskillforge\u002FSKILL.md",[],[74,79,86,35,22,85,80,23,81,82,83,84],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":36},"01M6CWKFTNP9RBAD9SBEKRVMR2","deploy-preview","Deploy a preview branch to the staging environment for review. Use when a feature branch is ready for visual review, when someone asks to \"deploy this for review\", or before opening a PR.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fdeploy-preview\u002FSKILL.md",[],[99,100,101,102,103,24,104,105,22,31,106,107,30,108,109],"deploy preview","preview","deploy","branches","visual","opening a pr","ready","environment","pr","review","branch",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":36},"01M6CWKCSCQ6PV8TVKV2MDRAHH","component-scaffold","Create a new React component with co-located test, story, and styles. Use when creating new UI components, when asked to scaffold\u002Fgenerate a component, or when building new pages.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fcomponent-scaffold\u002FSKILL.md",[],[117,35,118,24,119,25,120,22,31,121,122,85,123,124,125],"component","component scaffold","file","Story","ui","generate","react","components","test",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":36},"01M6CWKA7S16TW2KZZ7ADK9YSA","bug-triage","Triage a bug report into an actionable GitHub issue with severity, reproduction steps, and assignment. Use when a bug is reported, when error logs need investigation, or when asked to file\u002Ftriage an issue.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fbug-triage\u002FSKILL.md",[],[133,134,135,136,22,137,31,138,139,140,119,141,142,143,144,145,146],"bug triage","triage","bug","toolkit","ops","investigation","severity","logs","report","github issue","bug report","github","project","issue",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":36},"01M6CWK2Y64KAR32G6A4GQ77WR","finish-the-loop","Close implementation loops with target-bound independent evidence and a portable proof receipt. Use when an agent changes a real system and must earn a completion claim that survives the session.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fproof-carrying-skill\u002Ffinish-the-loop\u002FSKILL.md",[],[154,155,156,157,158,159,22,31,160],"finish the loop","loop","finish","claim","implementation","evidence","system"]