[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758RV9V6195EYXTWPM9MDX0":3,"skill-same:01M758RV9V6195EYXTWPM9MDX0":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":28,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M758RV9V6195EYXTWPM9MDX0","backend",null,"Go backend patterns for the api app — covering dependency injection, services, repositories, handlers, use cases, plugins, service registry, and TDD unit testing","CliqRelay\u002Fcliqrelay","CliqRelay","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F290753656?v=4","01M758RPDEB11FEYA2XK17DSHA","01M758RPEKP0NKH6P43GD2FBDG",41,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbackend\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: backend\ndescription: Go backend patterns for the api app — covering dependency injection, services, repositories, handlers, use cases, plugins, service registry, and TDD unit testing\n---\n\n# Backend Patterns\n\nReusable patterns for the Go backend (`apps\u002Fapi`). These skills cover the layered architecture: repositories → services → use cases → handlers, wired via constructor-based dependency injection and organized around a plugin system.\n\n## Architecture Overview\n\nDependencies flow bottom-up and are wired in `bootstrap.go`:\n\n- **Repositories** accept `bun.IDB` and return interfaces — data access only\n- **Services** accept repositories and return interfaces — business logic\n- **Use cases** accept services — orchestrate multi-service workflows\n- **Handlers** accept use cases — HTTP boundary only\n- **Plugins** accept a `PluginContext`, retrieve services from the registry, and expose routes\u002Fmigrations\n\n## Skills\n\n### [Dependency Injection](.\u002Fdependency-injection\u002FSKILL.md)\nConstructor-based DI — dependencies passed via parameters, interface-based, wired at bootstrap time. No service locators or global state.\n\n### [Repositories & Data Access](.\u002Frepositories-and-data-access\u002FSKILL.md)\nOne repository interface per domain model, implemented with Bun ORM. CRUD only, `WithTx` support, context-aware, no business logic.\n\n### [Services & Interfaces](.\u002Fservices-and-interfaces\u002FSKILL.md)\nServices encapsulate business logic — interfaces exported from `interfaces.go`, implemented by concrete structs with constructors that inject repositories.\n\n### [Use Cases & Orchestration](.\u002Fuse-cases-and-orchestration\u002FSKILL.md)\nOrchestrate multiple services for application-level workflows. Single `Execute` method, pure domain, no HTTP concerns.\n\n### [Handlers & HTTP](.\u002Fhandlers-and-http\u002FSKILL.md)\nThin HTTP boundary — parse\u002Fvalidate requests, delegate to use cases, map errors to status codes via `constants\u002Ferrors.go`, format responses with `reqCtx.SetJSONResponse`.\n\n### [Plugin Architecture](.\u002Fplugin-architecture\u002FSKILL.md)\nSelf-contained pluggable features (OAuth2, JWT, email-password) with metadata, `Init`, optional Routes\u002FMigrations\u002FMiddleware, and lifecycle cleanup.\n\n### [Service Registry](.\u002Fservice-registry\u002FSKILL.md)\nThread-safe registry for runtime service discovery between plugins. Register in `Init`, retrieve with type assertions, using `models.ServiceXxx` constants.\n\n### [TDD & Unit Testing](.\u002Ftdd-unit-testing\u002FSKILL.md)\nRed-Green-Refactor testing — mocked dependencies, table-driven tests, AAA pattern, real SQLite for repositories, httptest for handlers.\n","# Backend Patterns\n\nReusable patterns for the Go backend (`apps\u002Fapi`). These skills cover the layered architecture: repositories → services → use cases → handlers, wired via constructor-based dependency injection and organized around a plugin system.\n\n## Architecture Overview\n\nDependencies flow bottom-up and are wired in `bootstrap.go`:\n\n- **Repositories** accept `bun.IDB` and return interfaces — data access only\n- **Services** accept repositories and return interfaces — business logic\n- **Use cases** accept services — orchestrate multi-service workflows\n- **Handlers** accept use cases — HTTP boundary only\n- **Plugins** accept a `PluginContext`, retrieve services from the registry, and expose routes\u002Fmigrations\n\n## Skills\n\n### [Dependency Injection](.\u002Fdependency-injection\u002FSKILL.md)\nConstructor-based DI — dependencies passed via parameters, interface-based, wired at bootstrap time. No service locators or global state.\n\n### [Repositories & Data Access](.\u002Frepositories-and-data-access\u002FSKILL.md)\nOne repository interface per domain model, implemented with Bun ORM. CRUD only, `WithTx` support, context-aware, no business logic.\n\n### [Services & Interfaces](.\u002Fservices-and-interfaces\u002FSKILL.md)\nServices encapsulate business logic — interfaces exported from `interfaces.go`, implemented by concrete structs with constructors that inject repositories.\n\n### [Use Cases & Orchestration](.\u002Fuse-cases-and-orchestration\u002FSKILL.md)\nOrchestrate multiple services for application-level workflows. Single `Execute` method, pure domain, no HTTP concerns.\n\n### [Handlers & HTTP](.\u002Fhandlers-and-http\u002FSKILL.md)\nThin HTTP boundary — parse\u002Fvalidate requests, delegate to use cases, map errors to status codes via `constants\u002Ferrors.go`, format responses with `reqCtx.SetJSONResponse`.\n\n### [Plugin Architecture](.\u002Fplugin-architecture\u002FSKILL.md)\nSelf-contained pluggable features (OAuth2, JWT, email-password) with metadata, `Init`, optional Routes\u002FMigrations\u002FMiddleware, and lifecycle cleanup.\n\n### [Service Registry](.\u002Fservice-registry\u002FSKILL.md)\nThread-safe registry for runtime service discovery between plugins. Register in `Init`, retrieve with type assertions, using `models.ServiceXxx` constants.\n\n### [TDD & Unit Testing](.\u002Ftdd-unit-testing\u002FSKILL.md)\nRed-Green-Refactor testing — mocked dependencies, table-driven tests, AAA pattern, real SQLite for repositories, httptest for handlers.\n",{"name":5,"description":7},"main","f06510bcaf955afc66bbbc1606871e1a1576492e",".agents\u002Fskills\u002Fbackend",0,"https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay","https:\u002F\u002Fcliqrelay.com","https:\u002F\u002Fgithub.com\u002FCliqRelay","Capture and refine workflows instantly to help your teams and AI agents perform at their best.","2026-11-04 22:56:05",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add CliqRelay\u002Fcliqrelay --skill backend",{"tool":38,"command":39},"bunx","bunx skills add CliqRelay\u002Fcliqrelay --skill backend",{"tool":41,"command":42},"pnpm","pnpm dlx skills add CliqRelay\u002Fcliqrelay --skill backend","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbackend\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M758WG0JG18W5MZD6ZPM6PGG","typst","Typst document creation and package development. Use when: (1) Working with .typ files, (2) User mentions typst, typst.toml, or typst-cli, (3) Creating or using Typst packages, (4) Developing document templates, (5) Converting Markdown\u002FLaTeX to Typst","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftypst\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M758WACKQMHG2BFF7T758J12","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. 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\", or \"switch to --preset\".","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M758W82G2QQ5Q14FKYNHRXQW","handoff","Compact the current conversation into a handoff document for another agent to pick up.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M758W63H60EK55A93199B6NR","grilling","Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M758W4HD4PF66929V7MDGKW8","grill-me","A relentless interview to sharpen a plan or design.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fgrill-me\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M758VYC5CCTP7EA5VKE7YWM5","dont-waffle","Use this skill when answering questions, explaining concepts, writing technical responses, reviewing code, or helping with development tasks. Communicate in clear, simple, standard English. Keep answers concise and focused, remove unnecessary filler and repetition, explain technical ideas in plain language, and structure information so it is easy to read and understand. When showing code, present it clearly with enough context for the developer to understand what it does and where it belongs.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fdont-waffle\u002FSKILL.md",[],[]]