[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AP00J1X7CDCDB0G29EF3K9":3,"skill-same:01M7AP00J1X7CDCDB0G29EF3K9":57},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M7AP00J1X7CDCDB0G29EF3K9","backend-architecture",null,"Guides backend and API architecture — service layers, REST\u002FGraphQL design, databases, caching, async jobs, and scalability trade-offs. Use when designing APIs, microservices vs monolith boundaries, data models, authentication flows, or infrastructure-facing code.","Vinayak-RZ\u002FImproveness","Vinayak-RZ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F179278780?v=4","01M7ANW079C0NQMM13ZJ9AFNNB","Vinayak Raizada","01M7ANW07W35RJP6KJQ6448V08",1,"MIT","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fbackend-architecture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: backend-architecture\npaths:\n  - \"**\u002Fapi\u002F**\"\n  - \"**\u002Fservices\u002F**\"\n  - \"**\u002Fserver\u002F**\"\n  - \"**\u002F*route*.ts\"\n  - \"**\u002F*handler*.ts\"\ndescription: Guides backend and API architecture — service layers, REST\u002FGraphQL design, databases, caching, async jobs, and scalability trade-offs. Use when designing APIs, microservices vs monolith boundaries, data models, authentication flows, or infrastructure-facing code.\n---\n\n# Backend Architecture\n\nApply before new services, API surfaces, database schemas, or auth\u002Fpayment flows.\n\n## Decision checklist\n\n1. **Topology** — monolith module vs separate service vs serverless functions\n2. **API style** — REST, GraphQL, RPC, events\n3. **Data store** — relational, document, cache, queue\n4. **Consistency** — strong vs eventual; saga\u002Foutbox needs\n5. **Auth model** — session, JWT, OAuth, API keys; where authZ runs\n6. **Failure model** — timeouts, retries, idempotency, circuit breakers\n\n## Layer boundaries (non-negotiable default)\n\n```text\nHTTP \u002F transport     → routes, controllers, handlers (thin)\nService layer        → business rules, orchestration, authZ checks\nDomain \u002F models      → entities, invariants, domain errors\nData access          → repositories, queries (parameterized only)\nInfrastructure       → email, queues, third-party clients\n```\n\n**Rules:**\n- Handlers validate input shape; services enforce business rules\n- No SQL\u002FORM in route handlers\n- AuthZ in service layer, not only at route edge\n- External calls have timeouts and structured errors\n\n## API design defaults\n\n| Concern | Default |\n|---------|---------|\n| Errors | `{ success, error: { code, message, details? } }` + correct HTTP status |\n| Lists | Cursor or offset pagination; never unbounded |\n| Versioning | `\u002Fv1\u002F` prefix or header when public API |\n| Idempotency | `Idempotency-Key` for payments\u002Fwrites |\n| Validation | Schema at boundary (Zod, Pydantic, etc.) |\n\n## Trade-offs to surface\n\n| Decision | Options | Default for greenfield |\n|----------|---------|------------------------|\n| Architecture | Modular monolith vs microservices | Modular monolith until team\u002Fscale forces split |\n| DB | PostgreSQL vs MongoDB | PostgreSQL unless document model is dominant |\n| Cache | None vs in-process vs Redis | None first; Redis when measured need |\n| Async | Sync handler vs job queue | Queue when work >500ms or retries needed |\n| Consistency | Strong vs eventual | Strong for money\u002Fauth; eventual for analytics |\n\nDocument chosen trade-offs in ADR or plan using `trade-offs.mdc`.\n\n## Scalability checklist\n\n- [ ] Stateless app tier where possible\n- [ ] Connection pooling for DB\n- [ ] Indexes on hot query paths\n- [ ] No N+1 queries\n- [ ] Rate limits on auth and public endpoints\n- [ ] Secrets from environment only\n\n## Anti-patterns to reject\n\n- Anemic domain — all logic in controllers\n- God service class\n- String-interpolated SQL\n- Swallowed exceptions\n- Distributed monolith (microservices sharing one DB with tight coupling)\n\n## Output when architecting\n\nProduce **Backend Architecture Note**:\n\n1. Topology and module boundaries\n2. API contract sketch (resources, auth)\n3. Data model overview\n4. Async\u002Fcache\u002Fretry strategy\n5. Security and observability hooks\n6. Phased rollout plan\n\n## Additional reference\n\nSee [references\u002Fpatterns.md](references\u002Fpatterns.md).\n","# Backend Architecture\n\nApply before new services, API surfaces, database schemas, or auth\u002Fpayment flows.\n\n## Decision checklist\n\n1. **Topology** — monolith module vs separate service vs serverless functions\n2. **API style** — REST, GraphQL, RPC, events\n3. **Data store** — relational, document, cache, queue\n4. **Consistency** — strong vs eventual; saga\u002Foutbox needs\n5. **Auth model** — session, JWT, OAuth, API keys; where authZ runs\n6. **Failure model** — timeouts, retries, idempotency, circuit breakers\n\n## Layer boundaries (non-negotiable default)\n\n```text\nHTTP \u002F transport     → routes, controllers, handlers (thin)\nService layer        → business rules, orchestration, authZ checks\nDomain \u002F models      → entities, invariants, domain errors\nData access          → repositories, queries (parameterized only)\nInfrastructure       → email, queues, third-party clients\n```\n\n**Rules:**\n- Handlers validate input shape; services enforce business rules\n- No SQL\u002FORM in route handlers\n- AuthZ in service layer, not only at route edge\n- External calls have timeouts and structured errors\n\n## API design defaults\n\n| Concern | Default |\n|---------|---------|\n| Errors | `{ success, error: { code, message, details? } }` + correct HTTP status |\n| Lists | Cursor or offset pagination; never unbounded |\n| Versioning | `\u002Fv1\u002F` prefix or header when public API |\n| Idempotency | `Idempotency-Key` for payments\u002Fwrites |\n| Validation | Schema at boundary (Zod, Pydantic, etc.) |\n\n## Trade-offs to surface\n\n| Decision | Options | Default for greenfield |\n|----------|---------|------------------------|\n| Architecture | Modular monolith vs microservices | Modular monolith until team\u002Fscale forces split |\n| DB | PostgreSQL vs MongoDB | PostgreSQL unless document model is dominant |\n| Cache | None vs in-process vs Redis | None first; Redis when measured need |\n| Async | Sync handler vs job queue | Queue when work >500ms or retries needed |\n| Consistency | Strong vs eventual | Strong for money\u002Fauth; eventual for analytics |\n\nDocument chosen trade-offs in ADR or plan using `trade-offs.mdc`.\n\n## Scalability checklist\n\n- [ ] Stateless app tier where possible\n- [ ] Connection pooling for DB\n- [ ] Indexes on hot query paths\n- [ ] No N+1 queries\n- [ ] Rate limits on auth and public endpoints\n- [ ] Secrets from environment only\n\n## Anti-patterns to reject\n\n- Anemic domain — all logic in controllers\n- God service class\n- String-interpolated SQL\n- Swallowed exceptions\n- Distributed monolith (microservices sharing one DB with tight coupling)\n\n## Output when architecting\n\nProduce **Backend Architecture Note**:\n\n1. Topology and module boundaries\n2. API contract sketch (resources, auth)\n3. Data model overview\n4. Async\u002Fcache\u002Fretry strategy\n5. Security and observability hooks\n6. Phased rollout plan\n\n## Additional reference\n\nSee [references\u002Fpatterns.md](references\u002Fpatterns.md).\n",{"name":5,"paths":24,"description":7},[25,26,27,28,29],"**\u002Fapi\u002F**","**\u002Fservices\u002F**","**\u002Fserver\u002F**","**\u002F*route*.ts","**\u002F*handler*.ts","main","9fb685c39f4231d1c854d8d1b95935d2e1a2e709",".cursor\u002Fskills\u002Fbackend-architecture",0,"https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness","https:\u002F\u002Fgithub.com\u002FVinayak-RZ","2026-09-15 15:09:50",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Vinayak-RZ\u002FImproveness --skill backend-architecture",{"tool":43,"command":44},"bunx","bunx skills add Vinayak-RZ\u002FImproveness --skill backend-architecture",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Vinayak-RZ\u002FImproveness --skill backend-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fbackend-architecture\u002FSKILL.md",true,[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fpatterns.md","REFERENCE","参考文档",1235,"https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fbackend-architecture\u002Freferences\u002Fpatterns.md",[58,65,72,79,85,92],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7APA22BN6W9SVF4SCEAP3B1","greet","A greeting skill for testing","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Fmarketplace\u002Ffixtures\u002Fvalid-marketplace\u002Fplugins\u002Fhello-plugin\u002Fskills\u002Fgreet\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7AP9ZV2PZ7EZAVMP021GT88","valid-skill","A valid skill for testing purposes.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fvalid-skill\u002FSKILL.md",[],[],{"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":19},"01M7AP9YRRCH92DRVN61AQTNAZ","unknown-field","A skill with an unknown frontmatter field.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Funknown-field\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7AP9XDBJJSP9XRNGP6JQ2BX","no-frontmatter","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"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":19},"01M7AP9WAGKGA2C3FN9B92RKAD","child-skill","A nested skill in a subdirectory.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fnested\u002Fchild-skill\u002FSKILL.md",[],[],{"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":19},"01M7AP9SRFAAYTQ44GWGXG5ERX","different-name","A skill with a name that doesn't match the directory.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fname-mismatch\u002FSKILL.md",[],[]]