cp-toolkit 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/README.md +130 -0
  2. package/bin/cp-kit.js +72 -0
  3. package/package.json +46 -0
  4. package/src/commands/add.js +212 -0
  5. package/src/commands/doctor.js +149 -0
  6. package/src/commands/init.js +662 -0
  7. package/src/commands/list.js +128 -0
  8. package/src/index.js +13 -0
  9. package/templates/agents/backend-specialist.md +263 -0
  10. package/templates/agents/code-archaeologist.md +106 -0
  11. package/templates/agents/database-architect.md +226 -0
  12. package/templates/agents/debugger.md +225 -0
  13. package/templates/agents/devops-engineer.md +242 -0
  14. package/templates/agents/documentation-writer.md +104 -0
  15. package/templates/agents/explorer-agent.md +73 -0
  16. package/templates/agents/frontend-specialist.md +556 -0
  17. package/templates/agents/game-developer.md +162 -0
  18. package/templates/agents/mobile-developer.md +377 -0
  19. package/templates/agents/orchestrator.md +416 -0
  20. package/templates/agents/penetration-tester.md +188 -0
  21. package/templates/agents/performance-optimizer.md +187 -0
  22. package/templates/agents/product-manager.md +112 -0
  23. package/templates/agents/product-owner.md +95 -0
  24. package/templates/agents/project-planner.md +406 -0
  25. package/templates/agents/qa-automation-engineer.md +103 -0
  26. package/templates/agents/security-auditor.md +170 -0
  27. package/templates/agents/seo-specialist.md +111 -0
  28. package/templates/agents/test-engineer.md +158 -0
  29. package/templates/github/agents/backend-specialist.md +67 -0
  30. package/templates/github/agents/code-archaeologist.md +61 -0
  31. package/templates/github/agents/database-architect.md +73 -0
  32. package/templates/github/agents/debugger.md +71 -0
  33. package/templates/github/agents/devops-engineer.md +85 -0
  34. package/templates/github/agents/documentation-writer.md +107 -0
  35. package/templates/github/agents/explorer-agent.md +87 -0
  36. package/templates/github/agents/frontend-specialist.md +54 -0
  37. package/templates/github/agents/game-developer.md +94 -0
  38. package/templates/github/agents/mobile-developer.md +75 -0
  39. package/templates/github/agents/orchestrator.md +48 -0
  40. package/templates/github/agents/penetration-tester.md +87 -0
  41. package/templates/github/agents/performance-optimizer.md +70 -0
  42. package/templates/github/agents/product-manager.md +85 -0
  43. package/templates/github/agents/product-owner.md +77 -0
  44. package/templates/github/agents/project-planner.md +83 -0
  45. package/templates/github/agents/qa-automation-engineer.md +95 -0
  46. package/templates/github/agents/security-auditor.md +72 -0
  47. package/templates/github/agents/seo-specialist.md +78 -0
  48. package/templates/github/agents/test-engineer.md +79 -0
  49. package/templates/github/instructions/database.instructions.md +74 -0
  50. package/templates/github/instructions/python.instructions.md +76 -0
  51. package/templates/github/instructions/security.instructions.md +73 -0
  52. package/templates/github/instructions/typescript.instructions.md +50 -0
  53. package/templates/rules/GEMINI.md +273 -0
  54. package/templates/scripts/mcp-server.js +704 -0
  55. package/templates/skills/core/behavioral-modes/SKILL.md +242 -0
  56. package/templates/skills/core/brainstorming/SKILL.md +163 -0
  57. package/templates/skills/core/brainstorming/dynamic-questioning.md +350 -0
  58. package/templates/skills/core/clean-code/SKILL.md +201 -0
  59. package/templates/skills/core/intelligent-routing/SKILL.md +335 -0
  60. package/templates/skills/core/mcp-builder/SKILL.md +176 -0
  61. package/templates/skills/core/parallel-agents/SKILL.md +175 -0
  62. package/templates/skills/core/plan-writing/SKILL.md +152 -0
  63. package/templates/skills/optional/api-patterns/SKILL.md +81 -0
  64. package/templates/skills/optional/api-patterns/api-style.md +42 -0
  65. package/templates/skills/optional/api-patterns/auth.md +24 -0
  66. package/templates/skills/optional/api-patterns/documentation.md +26 -0
  67. package/templates/skills/optional/api-patterns/graphql.md +41 -0
  68. package/templates/skills/optional/api-patterns/rate-limiting.md +31 -0
  69. package/templates/skills/optional/api-patterns/response.md +37 -0
  70. package/templates/skills/optional/api-patterns/rest.md +40 -0
  71. package/templates/skills/optional/api-patterns/scripts/api_validator.py +211 -0
  72. package/templates/skills/optional/api-patterns/security-testing.md +122 -0
  73. package/templates/skills/optional/api-patterns/trpc.md +41 -0
  74. package/templates/skills/optional/api-patterns/versioning.md +22 -0
  75. package/templates/skills/optional/app-builder/SKILL.md +75 -0
  76. package/templates/skills/optional/app-builder/agent-coordination.md +71 -0
  77. package/templates/skills/optional/app-builder/feature-building.md +53 -0
  78. package/templates/skills/optional/app-builder/project-detection.md +34 -0
  79. package/templates/skills/optional/app-builder/scaffolding.md +118 -0
  80. package/templates/skills/optional/app-builder/tech-stack.md +40 -0
  81. package/templates/skills/optional/app-builder/templates/SKILL.md +39 -0
  82. package/templates/skills/optional/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  83. package/templates/skills/optional/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  84. package/templates/skills/optional/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  85. package/templates/skills/optional/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  86. package/templates/skills/optional/app-builder/templates/express-api/TEMPLATE.md +83 -0
  87. package/templates/skills/optional/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  88. package/templates/skills/optional/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  89. package/templates/skills/optional/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
  90. package/templates/skills/optional/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  91. package/templates/skills/optional/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  92. package/templates/skills/optional/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
  93. package/templates/skills/optional/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  94. package/templates/skills/optional/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  95. package/templates/skills/optional/architecture/SKILL.md +55 -0
  96. package/templates/skills/optional/architecture/context-discovery.md +43 -0
  97. package/templates/skills/optional/architecture/examples.md +94 -0
  98. package/templates/skills/optional/architecture/pattern-selection.md +68 -0
  99. package/templates/skills/optional/architecture/patterns-reference.md +50 -0
  100. package/templates/skills/optional/architecture/trade-off-analysis.md +77 -0
  101. package/templates/skills/optional/bash-linux/SKILL.md +199 -0
  102. package/templates/skills/optional/code-review-checklist/SKILL.md +109 -0
  103. package/templates/skills/optional/database-design/SKILL.md +52 -0
  104. package/templates/skills/optional/database-design/database-selection.md +43 -0
  105. package/templates/skills/optional/database-design/indexing.md +39 -0
  106. package/templates/skills/optional/database-design/migrations.md +48 -0
  107. package/templates/skills/optional/database-design/optimization.md +36 -0
  108. package/templates/skills/optional/database-design/orm-selection.md +30 -0
  109. package/templates/skills/optional/database-design/schema-design.md +56 -0
  110. package/templates/skills/optional/database-design/scripts/schema_validator.py +172 -0
  111. package/templates/skills/optional/deployment-procedures/SKILL.md +241 -0
  112. package/templates/skills/optional/documentation-templates/SKILL.md +194 -0
  113. package/templates/skills/optional/frontend-design/SKILL.md +418 -0
  114. package/templates/skills/optional/frontend-design/animation-guide.md +331 -0
  115. package/templates/skills/optional/frontend-design/color-system.md +311 -0
  116. package/templates/skills/optional/frontend-design/decision-trees.md +418 -0
  117. package/templates/skills/optional/frontend-design/motion-graphics.md +306 -0
  118. package/templates/skills/optional/frontend-design/scripts/accessibility_checker.py +183 -0
  119. package/templates/skills/optional/frontend-design/scripts/ux_audit.py +722 -0
  120. package/templates/skills/optional/frontend-design/typography-system.md +345 -0
  121. package/templates/skills/optional/frontend-design/ux-psychology.md +541 -0
  122. package/templates/skills/optional/frontend-design/visual-effects.md +383 -0
  123. package/templates/skills/optional/game-development/2d-games/SKILL.md +119 -0
  124. package/templates/skills/optional/game-development/3d-games/SKILL.md +135 -0
  125. package/templates/skills/optional/game-development/SKILL.md +167 -0
  126. package/templates/skills/optional/game-development/game-art/SKILL.md +185 -0
  127. package/templates/skills/optional/game-development/game-audio/SKILL.md +190 -0
  128. package/templates/skills/optional/game-development/game-design/SKILL.md +129 -0
  129. package/templates/skills/optional/game-development/mobile-games/SKILL.md +108 -0
  130. package/templates/skills/optional/game-development/multiplayer/SKILL.md +132 -0
  131. package/templates/skills/optional/game-development/pc-games/SKILL.md +144 -0
  132. package/templates/skills/optional/game-development/vr-ar/SKILL.md +123 -0
  133. package/templates/skills/optional/game-development/web-games/SKILL.md +150 -0
  134. package/templates/skills/optional/geo-fundamentals/SKILL.md +156 -0
  135. package/templates/skills/optional/geo-fundamentals/scripts/geo_checker.py +289 -0
  136. package/templates/skills/optional/i18n-localization/SKILL.md +154 -0
  137. package/templates/skills/optional/i18n-localization/scripts/i18n_checker.py +241 -0
  138. package/templates/skills/optional/lint-and-validate/SKILL.md +45 -0
  139. package/templates/skills/optional/lint-and-validate/scripts/lint_runner.py +172 -0
  140. package/templates/skills/optional/lint-and-validate/scripts/type_coverage.py +173 -0
  141. package/templates/skills/optional/mobile-design/SKILL.md +394 -0
  142. package/templates/skills/optional/mobile-design/decision-trees.md +516 -0
  143. package/templates/skills/optional/mobile-design/mobile-backend.md +491 -0
  144. package/templates/skills/optional/mobile-design/mobile-color-system.md +420 -0
  145. package/templates/skills/optional/mobile-design/mobile-debugging.md +122 -0
  146. package/templates/skills/optional/mobile-design/mobile-design-thinking.md +357 -0
  147. package/templates/skills/optional/mobile-design/mobile-navigation.md +458 -0
  148. package/templates/skills/optional/mobile-design/mobile-performance.md +767 -0
  149. package/templates/skills/optional/mobile-design/mobile-testing.md +356 -0
  150. package/templates/skills/optional/mobile-design/mobile-typography.md +433 -0
  151. package/templates/skills/optional/mobile-design/platform-android.md +666 -0
  152. package/templates/skills/optional/mobile-design/platform-ios.md +561 -0
  153. package/templates/skills/optional/mobile-design/scripts/mobile_audit.py +670 -0
  154. package/templates/skills/optional/mobile-design/touch-psychology.md +537 -0
  155. package/templates/skills/optional/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  156. package/templates/skills/optional/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  157. package/templates/skills/optional/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  158. package/templates/skills/optional/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  159. package/templates/skills/optional/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  160. package/templates/skills/optional/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  161. package/templates/skills/optional/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  162. package/templates/skills/optional/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  163. package/templates/skills/optional/nextjs-react-expert/SKILL.md +267 -0
  164. package/templates/skills/optional/nextjs-react-expert/scripts/convert_rules.py +222 -0
  165. package/templates/skills/optional/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  166. package/templates/skills/optional/nodejs-best-practices/SKILL.md +333 -0
  167. package/templates/skills/optional/performance-profiling/SKILL.md +143 -0
  168. package/templates/skills/optional/performance-profiling/scripts/lighthouse_audit.py +76 -0
  169. package/templates/skills/optional/powershell-windows/SKILL.md +167 -0
  170. package/templates/skills/optional/python-patterns/SKILL.md +441 -0
  171. package/templates/skills/optional/red-team-tactics/SKILL.md +199 -0
  172. package/templates/skills/optional/seo-fundamentals/SKILL.md +129 -0
  173. package/templates/skills/optional/seo-fundamentals/scripts/seo_checker.py +219 -0
  174. package/templates/skills/optional/server-management/SKILL.md +161 -0
  175. package/templates/skills/optional/systematic-debugging/SKILL.md +109 -0
  176. package/templates/skills/optional/tailwind-patterns/SKILL.md +269 -0
  177. package/templates/skills/optional/tdd-workflow/SKILL.md +149 -0
  178. package/templates/skills/optional/testing-patterns/SKILL.md +178 -0
  179. package/templates/skills/optional/testing-patterns/scripts/test_runner.py +219 -0
  180. package/templates/skills/optional/vulnerability-scanner/SKILL.md +276 -0
  181. package/templates/skills/optional/vulnerability-scanner/checklists.md +121 -0
  182. package/templates/skills/optional/vulnerability-scanner/scripts/security_scan.py +458 -0
  183. package/templates/skills/optional/web-design-guidelines/SKILL.md +57 -0
  184. package/templates/skills/optional/webapp-testing/SKILL.md +187 -0
  185. package/templates/skills/optional/webapp-testing/scripts/playwright_runner.py +173 -0
  186. package/templates/workflows/brainstorm.md +113 -0
  187. package/templates/workflows/create.md +59 -0
  188. package/templates/workflows/debug.md +103 -0
  189. package/templates/workflows/deploy.md +176 -0
  190. package/templates/workflows/enhance.md +63 -0
  191. package/templates/workflows/orchestrate.md +237 -0
  192. package/templates/workflows/plan.md +89 -0
  193. package/templates/workflows/preview.md +81 -0
  194. package/templates/workflows/status.md +86 -0
  195. package/templates/workflows/test.md +144 -0
  196. package/templates/workflows/ui-ux-pro-max.md +296 -0
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: nextjs-saas
3
+ description: Next.js SaaS template principles. Auth, payments, email.
4
+ ---
5
+
6
+ # Next.js SaaS Template
7
+
8
+ ## Tech Stack
9
+
10
+ | Component | Technology |
11
+ |-----------|------------|
12
+ | Framework | Next.js 14 (App Router) |
13
+ | Auth | NextAuth.js v5 |
14
+ | Payments | Stripe |
15
+ | Database | PostgreSQL + Prisma |
16
+ | Email | Resend |
17
+ | UI | Tailwind (ASK USER: shadcn/Headless UI/Custom?) |
18
+
19
+ ---
20
+
21
+ ## Directory Structure
22
+
23
+ ```
24
+ project-name/
25
+ ├── prisma/
26
+ ├── src/
27
+ │ ├── app/
28
+ │ │ ├── (auth)/ # Login, register
29
+ │ │ ├── (dashboard)/ # Protected routes
30
+ │ │ ├── (marketing)/ # Landing, pricing
31
+ │ │ └── api/
32
+ │ │ ├── auth/[...nextauth]/
33
+ │ │ └── webhooks/stripe/
34
+ │ ├── components/
35
+ │ │ ├── auth/
36
+ │ │ ├── billing/
37
+ │ │ └── dashboard/
38
+ │ ├── lib/
39
+ │ │ ├── auth.ts # NextAuth config
40
+ │ │ ├── stripe.ts # Stripe client
41
+ │ │ └── email.ts # Resend client
42
+ │ └── config/
43
+ │ └── subscriptions.ts
44
+ └── package.json
45
+ ```
46
+
47
+ ---
48
+
49
+ ## SaaS Features
50
+
51
+ | Feature | Implementation |
52
+ |---------|---------------|
53
+ | Auth | NextAuth + OAuth |
54
+ | Subscriptions | Stripe Checkout |
55
+ | Billing Portal | Stripe Portal |
56
+ | Webhooks | Stripe events |
57
+ | Email | Transactional via Resend |
58
+
59
+ ---
60
+
61
+ ## Database Schema
62
+
63
+ | Model | Fields |
64
+ |-------|--------|
65
+ | User | id, email, stripeCustomerId, subscriptionId |
66
+ | Account | OAuth provider data |
67
+ | Session | User sessions |
68
+
69
+ ---
70
+
71
+ ## Environment Variables
72
+
73
+ | Variable | Purpose |
74
+ |----------|---------|
75
+ | DATABASE_URL | Prisma |
76
+ | NEXTAUTH_SECRET | Auth |
77
+ | STRIPE_SECRET_KEY | Payments |
78
+ | STRIPE_WEBHOOK_SECRET | Webhooks |
79
+ | RESEND_API_KEY | Email |
80
+
81
+ ---
82
+
83
+ ## Setup Steps
84
+
85
+ 1. `npx create-next-app {{name}} --typescript --tailwind --app`
86
+ 2. Install: `npm install next-auth @auth/prisma-adapter stripe resend`
87
+ 3. Setup Stripe products/prices
88
+ 4. Configure environment
89
+ 5. `npm run db:push`
90
+ 6. `npm run stripe:listen` (webhooks)
91
+ 7. `npm run dev`
92
+
93
+ ---
94
+
95
+ ## Best Practices
96
+
97
+ - Route groups for layout separation
98
+ - Stripe webhooks for subscription sync
99
+ - NextAuth with Prisma adapter
100
+ - Email templates with React Email
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: nextjs-static
3
+ description: Next.js static site template principles. Landing pages, portfolios, marketing.
4
+ ---
5
+
6
+ # Next.js Static Site Template
7
+
8
+ ## Tech Stack
9
+
10
+ | Component | Technology |
11
+ |-----------|------------|
12
+ | Framework | Next.js 14 (Static Export) |
13
+ | Language | TypeScript |
14
+ | Styling | Tailwind CSS |
15
+ | Animations | Framer Motion |
16
+ | Icons | Lucide React |
17
+ | SEO | Next SEO |
18
+
19
+ ---
20
+
21
+ ## Directory Structure
22
+
23
+ ```
24
+ project-name/
25
+ ├── src/
26
+ │ ├── app/
27
+ │ │ ├── layout.tsx
28
+ │ │ ├── page.tsx # Landing
29
+ │ │ ├── about/
30
+ │ │ ├── contact/
31
+ │ │ └── blog/
32
+ │ ├── components/
33
+ │ │ ├── layout/ # Header, Footer
34
+ │ │ ├── sections/ # Hero, Features, CTA
35
+ │ │ └── ui/
36
+ │ └── lib/
37
+ ├── content/ # Markdown content
38
+ ├── public/
39
+ └── next.config.js
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Static Export Config
45
+
46
+ ```javascript
47
+ // next.config.js
48
+ const nextConfig = {
49
+ output: 'export',
50
+ images: { unoptimized: true },
51
+ trailingSlash: true,
52
+ };
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Landing Page Sections
58
+
59
+ | Section | Purpose |
60
+ |---------|---------|
61
+ | Hero | Main headline, CTA |
62
+ | Features | Product benefits |
63
+ | Testimonials | Social proof |
64
+ | Pricing | Plans |
65
+ | CTA | Final conversion |
66
+
67
+ ---
68
+
69
+ ## Animation Patterns
70
+
71
+ | Pattern | Use |
72
+ |---------|-----|
73
+ | Fade up | Content entry |
74
+ | Stagger | List items |
75
+ | Scroll reveal | On viewport |
76
+ | Hover | Interactive feedback |
77
+
78
+ ---
79
+
80
+ ## Setup Steps
81
+
82
+ 1. `npx create-next-app {{name}} --typescript --tailwind --app`
83
+ 2. Install: `npm install framer-motion lucide-react next-seo`
84
+ 3. Configure static export
85
+ 4. Create sections
86
+ 5. `npm run dev`
87
+
88
+ ---
89
+
90
+ ## Deployment
91
+
92
+ | Platform | Method |
93
+ |----------|--------|
94
+ | Vercel | Auto |
95
+ | Netlify | Auto |
96
+ | GitHub Pages | gh-pages branch |
97
+ | Any host | Upload `out` folder |
98
+
99
+ ---
100
+
101
+ ## Best Practices
102
+
103
+ - Static export for maximum performance
104
+ - Framer Motion for premium animations
105
+ - Responsive mobile-first design
106
+ - SEO metadata on every page
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: nuxt-app
3
+ description: Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma.
4
+ ---
5
+
6
+ # Nuxt 3 Full-Stack Template
7
+
8
+ ## Tech Stack
9
+
10
+ | Component | Technology |
11
+ |-----------|------------|
12
+ | Framework | Nuxt 3 |
13
+ | Language | TypeScript |
14
+ | UI | Vue 3 (Composition API) |
15
+ | State | Pinia |
16
+ | Database | PostgreSQL + Prisma |
17
+ | Styling | Tailwind CSS |
18
+ | Validation | Zod |
19
+
20
+ ---
21
+
22
+ ## Directory Structure
23
+
24
+ ```
25
+ project-name/
26
+ ├── prisma/
27
+ │ └── schema.prisma
28
+ ├── server/
29
+ │ ├── api/
30
+ │ │ └── [resource]/
31
+ │ │ └── index.ts
32
+ │ └── utils/
33
+ │ └── db.ts # Prisma client
34
+ ├── composables/
35
+ │ └── useAuth.ts
36
+ ├── stores/
37
+ │ └── user.ts # Pinia store
38
+ ├── components/
39
+ │ └── ui/
40
+ ├── pages/
41
+ │ ├── index.vue
42
+ │ └── [...slug].vue
43
+ ├── layouts/
44
+ │ └── default.vue
45
+ ├── assets/
46
+ │ └── css/
47
+ │ └── main.css
48
+ ├── .env.example
49
+ ├── nuxt.config.ts
50
+ └── package.json
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Key Concepts
56
+
57
+ | Concept | Description |
58
+ |---------|-------------|
59
+ | Auto-imports | Components, composables, utils |
60
+ | File-based routing | pages/ → routes |
61
+ | Server Routes | server/api/ → API endpoints |
62
+ | Composables | Reusable reactive logic |
63
+ | Pinia | State management |
64
+
65
+ ---
66
+
67
+ ## Environment Variables
68
+
69
+ | Variable | Purpose |
70
+ |----------|---------|
71
+ | DATABASE_URL | Prisma connection |
72
+ | NUXT_PUBLIC_APP_URL | Public URL |
73
+
74
+ ---
75
+
76
+ ## Setup Steps
77
+
78
+ 1. `npx nuxi@latest init {{name}}`
79
+ 2. `cd {{name}}`
80
+ 3. `npm install @pinia/nuxt @prisma/client prisma zod`
81
+ 4. `npm install -D @nuxtjs/tailwindcss`
82
+ 5. Add modules to `nuxt.config.ts`:
83
+ ```ts
84
+ modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss']
85
+ ```
86
+ 6. `npx prisma init`
87
+ 7. Configure schema
88
+ 8. `npx prisma db push`
89
+ 9. `npm run dev`
90
+
91
+ ---
92
+
93
+ ## Best Practices
94
+
95
+ - Use `<script setup>` for components
96
+ - Composables for reusable logic
97
+ - Pinia stores in `stores/` folder
98
+ - Server routes for API logic
99
+ - Auto-import for clean code
100
+ - TypeScript for type safety
101
+ - See `@[skills/vue-expert]` for Vue patterns
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: python-fastapi
3
+ description: FastAPI REST API template principles. SQLAlchemy, Pydantic, Alembic.
4
+ ---
5
+
6
+ # FastAPI API Template
7
+
8
+ ## Tech Stack
9
+
10
+ | Component | Technology |
11
+ |-----------|------------|
12
+ | Framework | FastAPI |
13
+ | Language | Python 3.11+ |
14
+ | ORM | SQLAlchemy 2.0 |
15
+ | Validation | Pydantic v2 |
16
+ | Migrations | Alembic |
17
+ | Auth | JWT + passlib |
18
+
19
+ ---
20
+
21
+ ## Directory Structure
22
+
23
+ ```
24
+ project-name/
25
+ ├── alembic/ # Migrations
26
+ ├── app/
27
+ │ ├── main.py # FastAPI app
28
+ │ ├── config.py # Settings
29
+ │ ├── database.py # DB connection
30
+ │ ├── models/ # SQLAlchemy models
31
+ │ ├── schemas/ # Pydantic schemas
32
+ │ ├── routers/ # API routes
33
+ │ ├── services/ # Business logic
34
+ │ ├── dependencies/ # DI
35
+ │ └── utils/
36
+ ├── tests/
37
+ ├── .env.example
38
+ └── requirements.txt
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Key Concepts
44
+
45
+ | Concept | Description |
46
+ |---------|-------------|
47
+ | Async | async/await throughout |
48
+ | Dependency Injection | FastAPI Depends |
49
+ | Pydantic v2 | Validation + serialization |
50
+ | SQLAlchemy 2.0 | Async sessions |
51
+
52
+ ---
53
+
54
+ ## API Structure
55
+
56
+ | Layer | Responsibility |
57
+ |-------|---------------|
58
+ | Routers | HTTP handling |
59
+ | Dependencies | Auth, validation |
60
+ | Services | Business logic |
61
+ | Models | Database entities |
62
+ | Schemas | Request/response |
63
+
64
+ ---
65
+
66
+ ## Setup Steps
67
+
68
+ 1. `python -m venv venv`
69
+ 2. `source venv/bin/activate`
70
+ 3. `pip install fastapi uvicorn sqlalchemy alembic pydantic`
71
+ 4. Create `.env`
72
+ 5. `alembic upgrade head`
73
+ 6. `uvicorn app.main:app --reload`
74
+
75
+ ---
76
+
77
+ ## Best Practices
78
+
79
+ - Use async everywhere
80
+ - Pydantic v2 for validation
81
+ - SQLAlchemy 2.0 async sessions
82
+ - Alembic for migrations
83
+ - pytest-asyncio for tests
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: react-native-app
3
+ description: React Native mobile app template principles. Expo, TypeScript, navigation.
4
+ ---
5
+
6
+ # React Native App Template
7
+
8
+ ## Tech Stack
9
+
10
+ | Component | Technology |
11
+ |-----------|------------|
12
+ | Framework | React Native + Expo |
13
+ | Language | TypeScript |
14
+ | Navigation | Expo Router |
15
+ | State | Zustand + React Query |
16
+ | Styling | NativeWind |
17
+ | Testing | Jest + RNTL |
18
+
19
+ ---
20
+
21
+ ## Directory Structure
22
+
23
+ ```
24
+ project-name/
25
+ ├── app/ # Expo Router (file-based)
26
+ │ ├── _layout.tsx # Root layout
27
+ │ ├── index.tsx # Home
28
+ │ ├── (tabs)/ # Tab navigation
29
+ │ └── [id].tsx # Dynamic route
30
+ ├── components/
31
+ │ ├── ui/ # Reusable
32
+ │ └── features/
33
+ ├── hooks/
34
+ ├── lib/
35
+ │ ├── api.ts
36
+ │ └── storage.ts
37
+ ├── store/
38
+ ├── constants/
39
+ └── app.json
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Navigation Patterns
45
+
46
+ | Pattern | Use |
47
+ |---------|-----|
48
+ | Stack | Page hierarchy |
49
+ | Tabs | Bottom navigation |
50
+ | Drawer | Side menu |
51
+ | Modal | Overlay screens |
52
+
53
+ ---
54
+
55
+ ## State Management
56
+
57
+ | Type | Tool |
58
+ |------|------|
59
+ | Local | Zustand |
60
+ | Server | React Query |
61
+ | Forms | React Hook Form |
62
+ | Storage | Expo SecureStore |
63
+
64
+ ---
65
+
66
+ ## Key Packages
67
+
68
+ | Package | Purpose |
69
+ |---------|---------|
70
+ | expo-router | File-based routing |
71
+ | zustand | Local state |
72
+ | @tanstack/react-query | Server state |
73
+ | nativewind | Tailwind styling |
74
+ | expo-secure-store | Secure storage |
75
+
76
+ ---
77
+
78
+ ## Setup Steps
79
+
80
+ 1. `npx create-expo-app {{name}} -t expo-template-blank-typescript`
81
+ 2. `npx expo install expo-router react-native-safe-area-context`
82
+ 3. Install state: `npm install zustand @tanstack/react-query`
83
+ 4. `npx expo start`
84
+
85
+ ---
86
+
87
+ ## Best Practices
88
+
89
+ - Expo Router for navigation
90
+ - Zustand for local, React Query for server state
91
+ - NativeWind for consistent styling
92
+ - Expo SecureStore for tokens
93
+ - Test on both iOS and Android
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: architecture
3
+ description: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.
4
+ allowed-tools: Read, Glob, Grep
5
+ ---
6
+
7
+ # Architecture Decision Framework
8
+
9
+ > "Requirements drive architecture. Trade-offs inform decisions. ADRs capture rationale."
10
+
11
+ ## 🎯 Selective Reading Rule
12
+
13
+ **Read ONLY files relevant to the request!** Check the content map, find what you need.
14
+
15
+ | File | Description | When to Read |
16
+ |------|-------------|--------------|
17
+ | `context-discovery.md` | Questions to ask, project classification | Starting architecture design |
18
+ | `trade-off-analysis.md` | ADR templates, trade-off framework | Documenting decisions |
19
+ | `pattern-selection.md` | Decision trees, anti-patterns | Choosing patterns |
20
+ | `examples.md` | MVP, SaaS, Enterprise examples | Reference implementations |
21
+ | `patterns-reference.md` | Quick lookup for patterns | Pattern comparison |
22
+
23
+ ---
24
+
25
+ ## 🔗 Related Skills
26
+
27
+ | Skill | Use For |
28
+ |-------|---------|
29
+ | `@[skills/database-design]` | Database schema design |
30
+ | `@[skills/api-patterns]` | API design patterns |
31
+ | `@[skills/deployment-procedures]` | Deployment architecture |
32
+
33
+ ---
34
+
35
+ ## Core Principle
36
+
37
+ **"Simplicity is the ultimate sophistication."**
38
+
39
+ - Start simple
40
+ - Add complexity ONLY when proven necessary
41
+ - You can always add patterns later
42
+ - Removing complexity is MUCH harder than adding it
43
+
44
+ ---
45
+
46
+ ## Validation Checklist
47
+
48
+ Before finalizing architecture:
49
+
50
+ - [ ] Requirements clearly understood
51
+ - [ ] Constraints identified
52
+ - [ ] Each decision has trade-off analysis
53
+ - [ ] Simpler alternatives considered
54
+ - [ ] ADRs written for significant decisions
55
+ - [ ] Team expertise matches chosen patterns
@@ -0,0 +1,43 @@
1
+ # Context Discovery
2
+
3
+ > Before suggesting any architecture, gather context.
4
+
5
+ ## Question Hierarchy (Ask User FIRST)
6
+
7
+ 1. **Scale**
8
+ - How many users? (10, 1K, 100K, 1M+)
9
+ - Data volume? (MB, GB, TB)
10
+ - Transaction rate? (per second/minute)
11
+
12
+ 2. **Team**
13
+ - Solo developer or team?
14
+ - Team size and expertise?
15
+ - Distributed or co-located?
16
+
17
+ 3. **Timeline**
18
+ - MVP/Prototype or long-term product?
19
+ - Time to market pressure?
20
+
21
+ 4. **Domain**
22
+ - CRUD-heavy or business logic complex?
23
+ - Real-time requirements?
24
+ - Compliance/regulations?
25
+
26
+ 5. **Constraints**
27
+ - Budget limitations?
28
+ - Legacy systems to integrate?
29
+ - Technology stack preferences?
30
+
31
+ ## Project Classification Matrix
32
+
33
+ ```
34
+ MVP SaaS Enterprise
35
+ ┌─────────────────────────────────────────────────────────────┐
36
+ │ Scale │ <1K │ 1K-100K │ 100K+ │
37
+ │ Team │ Solo │ 2-10 │ 10+ │
38
+ │ Timeline │ Fast (weeks) │ Medium (months)│ Long (years)│
39
+ │ Architecture │ Simple │ Modular │ Distributed │
40
+ │ Patterns │ Minimal │ Selective │ Comprehensive│
41
+ │ Example │ Next.js API │ NestJS │ Microservices│
42
+ └─────────────────────────────────────────────────────────────┘
43
+ ```
@@ -0,0 +1,94 @@
1
+ # Architecture Examples
2
+
3
+ > Real-world architecture decisions by project type.
4
+
5
+ ---
6
+
7
+ ## Example 1: MVP E-commerce (Solo Developer)
8
+
9
+ ```yaml
10
+ Requirements:
11
+ - <1000 users initially
12
+ - Solo developer
13
+ - Fast to market (8 weeks)
14
+ - Budget-conscious
15
+
16
+ Architecture Decisions:
17
+ App Structure: Monolith (simpler for solo)
18
+ Framework: Next.js (full-stack, fast)
19
+ Data Layer: Prisma direct (no over-abstraction)
20
+ Authentication: JWT (simpler than OAuth)
21
+ Payment: Stripe (hosted solution)
22
+ Database: PostgreSQL (ACID for orders)
23
+
24
+ Trade-offs Accepted:
25
+ - Monolith → Can't scale independently (team doesn't justify it)
26
+ - No Repository → Less testable (simple CRUD doesn't need it)
27
+ - JWT → No social login initially (can add later)
28
+
29
+ Future Migration Path:
30
+ - Users > 10K → Extract payment service
31
+ - Team > 3 → Add Repository pattern
32
+ - Social login requested → Add OAuth
33
+ ```
34
+
35
+ ---
36
+
37
+ ## Example 2: SaaS Product (5-10 Developers)
38
+
39
+ ```yaml
40
+ Requirements:
41
+ - 1K-100K users
42
+ - 5-10 developers
43
+ - Long-term (12+ months)
44
+ - Multiple domains (billing, users, core)
45
+
46
+ Architecture Decisions:
47
+ App Structure: Modular Monolith (team size optimal)
48
+ Framework: NestJS (modular by design)
49
+ Data Layer: Repository pattern (testing, flexibility)
50
+ Domain Model: Partial DDD (rich entities)
51
+ Authentication: OAuth + JWT
52
+ Caching: Redis
53
+ Database: PostgreSQL
54
+
55
+ Trade-offs Accepted:
56
+ - Modular Monolith → Some module coupling (microservices not justified)
57
+ - Partial DDD → No full aggregates (no domain experts)
58
+ - RabbitMQ later → Initial synchronous (add when proven needed)
59
+
60
+ Migration Path:
61
+ - Team > 10 → Consider microservices
62
+ - Domains conflict → Extract bounded contexts
63
+ - Read performance issues → Add CQRS
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Example 3: Enterprise (100K+ Users)
69
+
70
+ ```yaml
71
+ Requirements:
72
+ - 100K+ users
73
+ - 10+ developers
74
+ - Multiple business domains
75
+ - Different scaling needs
76
+ - 24/7 availability
77
+
78
+ Architecture Decisions:
79
+ App Structure: Microservices (independent scale)
80
+ API Gateway: Kong/AWS API GW
81
+ Domain Model: Full DDD
82
+ Consistency: Event-driven (eventual OK)
83
+ Message Bus: Kafka
84
+ Authentication: OAuth + SAML (enterprise SSO)
85
+ Database: Polyglot (right tool per job)
86
+ CQRS: Selected services
87
+
88
+ Operational Requirements:
89
+ - Service mesh (Istio/Linkerd)
90
+ - Distributed tracing (Jaeger/Tempo)
91
+ - Centralized logging (ELK/Loki)
92
+ - Circuit breakers (Resilience4j)
93
+ - Kubernetes/Helm
94
+ ```