@cubis/foundry 0.3.71 → 0.3.73

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 (276) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/dist/cli/core.js +9 -22
  3. package/dist/cli/core.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +13 -22
  6. package/workflows/powers/accessibility/POWER.md +83 -94
  7. package/workflows/powers/accessibility/SKILL.md +82 -94
  8. package/workflows/powers/agent-design/POWER.md +201 -0
  9. package/workflows/powers/agent-design/SKILL.md +198 -0
  10. package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
  11. package/workflows/powers/agent-design/references/skill-testing.md +164 -0
  12. package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
  13. package/workflows/powers/agentic-eval/POWER.md +62 -0
  14. package/workflows/powers/agentic-eval/SKILL.md +59 -0
  15. package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
  16. package/workflows/powers/api-designer/POWER.md +43 -71
  17. package/workflows/powers/api-designer/SKILL.md +43 -71
  18. package/workflows/powers/api-patterns/POWER.md +42 -56
  19. package/workflows/powers/api-patterns/SKILL.md +42 -57
  20. package/workflows/powers/architecture-designer/POWER.md +43 -60
  21. package/workflows/powers/architecture-designer/SKILL.md +43 -60
  22. package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
  23. package/workflows/powers/auth-architect/POWER.md +69 -0
  24. package/workflows/powers/auth-architect/SKILL.md +66 -0
  25. package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
  26. package/workflows/powers/behavioral-modes/POWER.md +100 -9
  27. package/workflows/powers/c-pro/POWER.md +105 -0
  28. package/workflows/powers/c-pro/SKILL.md +102 -0
  29. package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
  30. package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
  31. package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
  32. package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
  33. package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
  34. package/workflows/powers/changelog-generator/POWER.md +127 -63
  35. package/workflows/powers/changelog-generator/SKILL.md +126 -63
  36. package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
  37. package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
  38. package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
  39. package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
  40. package/workflows/powers/cli-developer/POWER.md +152 -95
  41. package/workflows/powers/cli-developer/SKILL.md +152 -95
  42. package/workflows/powers/cpp-pro/POWER.md +111 -0
  43. package/workflows/powers/cpp-pro/SKILL.md +108 -0
  44. package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
  45. package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
  46. package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
  47. package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
  48. package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
  49. package/workflows/powers/csharp-pro/POWER.md +47 -22
  50. package/workflows/powers/csharp-pro/SKILL.md +47 -22
  51. package/workflows/powers/dart-pro/POWER.md +68 -0
  52. package/workflows/powers/dart-pro/SKILL.md +65 -0
  53. package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
  54. package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
  55. package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
  56. package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
  57. package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
  58. package/workflows/powers/database-design/POWER.md +47 -33
  59. package/workflows/powers/database-design/SKILL.md +47 -33
  60. package/workflows/powers/database-optimizer/POWER.md +43 -64
  61. package/workflows/powers/database-optimizer/SKILL.md +43 -64
  62. package/workflows/powers/database-skills/POWER.md +59 -93
  63. package/workflows/powers/database-skills/SKILL.md +59 -93
  64. package/workflows/powers/debugging-strategies/POWER.md +69 -0
  65. package/workflows/powers/debugging-strategies/SKILL.md +66 -0
  66. package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
  67. package/workflows/powers/deep-research/POWER.md +67 -0
  68. package/workflows/powers/deep-research/SKILL.md +64 -0
  69. package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
  70. package/workflows/powers/design-system-builder/POWER.md +130 -116
  71. package/workflows/powers/design-system-builder/SKILL.md +130 -116
  72. package/workflows/powers/devops-engineer/POWER.md +120 -57
  73. package/workflows/powers/devops-engineer/SKILL.md +120 -57
  74. package/workflows/powers/docker-kubernetes/POWER.md +94 -0
  75. package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
  76. package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
  77. package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
  78. package/workflows/powers/documentation-templates/POWER.md +158 -127
  79. package/workflows/powers/documentation-templates/SKILL.md +158 -127
  80. package/workflows/powers/drizzle-expert/POWER.md +66 -0
  81. package/workflows/powers/drizzle-expert/SKILL.md +63 -0
  82. package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
  83. package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
  84. package/workflows/powers/error-ux-observability/POWER.md +144 -131
  85. package/workflows/powers/error-ux-observability/SKILL.md +143 -131
  86. package/workflows/powers/fastapi-expert/POWER.md +46 -60
  87. package/workflows/powers/fastapi-expert/SKILL.md +46 -60
  88. package/workflows/powers/firebase/POWER.md +65 -0
  89. package/workflows/powers/firebase/SKILL.md +62 -0
  90. package/workflows/powers/firebase/references/platform-routing.md +16 -0
  91. package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
  92. package/workflows/powers/flutter-design-system/POWER.md +63 -0
  93. package/workflows/powers/flutter-design-system/SKILL.md +60 -0
  94. package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
  95. package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
  96. package/workflows/powers/flutter-drift/POWER.md +65 -0
  97. package/workflows/powers/flutter-drift/SKILL.md +62 -0
  98. package/workflows/powers/flutter-drift/references/migrations.md +22 -0
  99. package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
  100. package/workflows/powers/flutter-feature/POWER.md +65 -0
  101. package/workflows/powers/flutter-feature/SKILL.md +62 -0
  102. package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
  103. package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
  104. package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
  105. package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
  106. package/workflows/powers/flutter-go-router/POWER.md +64 -0
  107. package/workflows/powers/flutter-go-router/SKILL.md +61 -0
  108. package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
  109. package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
  110. package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
  111. package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
  112. package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
  113. package/workflows/powers/flutter-repository/POWER.md +64 -0
  114. package/workflows/powers/flutter-repository/SKILL.md +61 -0
  115. package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
  116. package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
  117. package/workflows/powers/flutter-riverpod/POWER.md +70 -0
  118. package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
  119. package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
  120. package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
  121. package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
  122. package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
  123. package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
  124. package/workflows/powers/flutter-state-machine/POWER.md +62 -0
  125. package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
  126. package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
  127. package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
  128. package/workflows/powers/flutter-testing/POWER.md +64 -0
  129. package/workflows/powers/flutter-testing/SKILL.md +61 -0
  130. package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
  131. package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
  132. package/workflows/powers/frontend-code-review/POWER.md +137 -0
  133. package/workflows/powers/frontend-code-review/SKILL.md +134 -0
  134. package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
  135. package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
  136. package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
  137. package/workflows/powers/frontend-design/POWER.md +163 -362
  138. package/workflows/powers/frontend-design/SKILL.md +163 -362
  139. package/workflows/powers/game-development/POWER.md +57 -140
  140. package/workflows/powers/game-development/SKILL.md +57 -140
  141. package/workflows/powers/geo-fundamentals/POWER.md +64 -126
  142. package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
  143. package/workflows/powers/git-workflow/POWER.md +135 -0
  144. package/workflows/powers/git-workflow/SKILL.md +132 -0
  145. package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
  146. package/workflows/powers/golang-pro/POWER.md +46 -35
  147. package/workflows/powers/golang-pro/SKILL.md +46 -35
  148. package/workflows/powers/graphql-architect/POWER.md +44 -62
  149. package/workflows/powers/graphql-architect/SKILL.md +44 -62
  150. package/workflows/powers/i18n-localization/POWER.md +118 -103
  151. package/workflows/powers/i18n-localization/SKILL.md +118 -103
  152. package/workflows/powers/java-pro/POWER.md +47 -22
  153. package/workflows/powers/java-pro/SKILL.md +47 -22
  154. package/workflows/powers/javascript-pro/POWER.md +47 -34
  155. package/workflows/powers/javascript-pro/SKILL.md +47 -34
  156. package/workflows/powers/kotlin-pro/POWER.md +46 -23
  157. package/workflows/powers/kotlin-pro/SKILL.md +46 -23
  158. package/workflows/powers/legacy-modernizer/POWER.md +43 -60
  159. package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
  160. package/workflows/powers/mcp-builder/POWER.md +65 -0
  161. package/workflows/powers/mcp-builder/SKILL.md +62 -0
  162. package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
  163. package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
  164. package/workflows/powers/microservices-architect/POWER.md +43 -70
  165. package/workflows/powers/microservices-architect/SKILL.md +43 -70
  166. package/workflows/powers/mobile-design/POWER.md +110 -345
  167. package/workflows/powers/mobile-design/SKILL.md +110 -345
  168. package/workflows/powers/mongodb/POWER.md +67 -0
  169. package/workflows/powers/mongodb/SKILL.md +64 -0
  170. package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
  171. package/workflows/powers/mysql/POWER.md +67 -0
  172. package/workflows/powers/mysql/SKILL.md +64 -0
  173. package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
  174. package/workflows/powers/neki/POWER.md +67 -0
  175. package/workflows/powers/neki/SKILL.md +64 -0
  176. package/workflows/powers/neki/references/neki-checklist.md +18 -0
  177. package/workflows/powers/nestjs-expert/POWER.md +45 -91
  178. package/workflows/powers/nestjs-expert/SKILL.md +45 -91
  179. package/workflows/powers/nextjs-developer/POWER.md +51 -44
  180. package/workflows/powers/nextjs-developer/SKILL.md +51 -44
  181. package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
  182. package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
  183. package/workflows/powers/observability/POWER.md +109 -0
  184. package/workflows/powers/observability/SKILL.md +106 -0
  185. package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
  186. package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
  187. package/workflows/powers/openai-docs/POWER.md +61 -0
  188. package/workflows/powers/openai-docs/SKILL.md +58 -0
  189. package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
  190. package/workflows/powers/performance-profiling/POWER.md +61 -114
  191. package/workflows/powers/performance-profiling/SKILL.md +61 -114
  192. package/workflows/powers/php-pro/POWER.md +116 -0
  193. package/workflows/powers/php-pro/SKILL.md +113 -0
  194. package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
  195. package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
  196. package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
  197. package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
  198. package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
  199. package/workflows/powers/playwright-e2e/POWER.md +85 -0
  200. package/workflows/powers/playwright-e2e/SKILL.md +82 -0
  201. package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
  202. package/workflows/powers/postgres/POWER.md +67 -0
  203. package/workflows/powers/postgres/SKILL.md +64 -0
  204. package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
  205. package/workflows/powers/prompt-engineer/POWER.md +47 -30
  206. package/workflows/powers/prompt-engineer/SKILL.md +47 -30
  207. package/workflows/powers/python-pro/POWER.md +47 -36
  208. package/workflows/powers/python-pro/SKILL.md +47 -36
  209. package/workflows/powers/react-best-practices/POWER.md +56 -33
  210. package/workflows/powers/react-best-practices/SKILL.md +56 -33
  211. package/workflows/powers/react-expert/POWER.md +47 -37
  212. package/workflows/powers/react-expert/SKILL.md +47 -37
  213. package/workflows/powers/redis/POWER.md +67 -0
  214. package/workflows/powers/redis/SKILL.md +64 -0
  215. package/workflows/powers/redis/references/redis-checklist.md +19 -0
  216. package/workflows/powers/ruby-pro/POWER.md +118 -0
  217. package/workflows/powers/ruby-pro/SKILL.md +115 -0
  218. package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
  219. package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
  220. package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
  221. package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
  222. package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
  223. package/workflows/powers/rust-pro/POWER.md +45 -31
  224. package/workflows/powers/rust-pro/SKILL.md +45 -31
  225. package/workflows/powers/security-engineer/POWER.md +129 -0
  226. package/workflows/powers/security-engineer/SKILL.md +126 -0
  227. package/workflows/powers/seo-fundamentals/POWER.md +59 -102
  228. package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
  229. package/workflows/powers/serverless-patterns/POWER.md +171 -0
  230. package/workflows/powers/serverless-patterns/SKILL.md +168 -0
  231. package/workflows/powers/skill-creator/POWER.md +90 -0
  232. package/workflows/powers/skill-creator/SKILL.md +87 -0
  233. package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
  234. package/workflows/powers/skill-creator/references/schemas.md +430 -0
  235. package/workflows/powers/spec-miner/POWER.md +49 -57
  236. package/workflows/powers/spec-miner/SKILL.md +49 -57
  237. package/workflows/powers/sqlite/POWER.md +67 -0
  238. package/workflows/powers/sqlite/SKILL.md +64 -0
  239. package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
  240. package/workflows/powers/sre-engineer/POWER.md +123 -64
  241. package/workflows/powers/sre-engineer/SKILL.md +123 -64
  242. package/workflows/powers/static-analysis/POWER.md +121 -77
  243. package/workflows/powers/static-analysis/SKILL.md +121 -77
  244. package/workflows/powers/stripe-best-practices/POWER.md +140 -17
  245. package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
  246. package/workflows/powers/supabase/POWER.md +67 -0
  247. package/workflows/powers/supabase/SKILL.md +64 -0
  248. package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
  249. package/workflows/powers/swift-pro/POWER.md +118 -0
  250. package/workflows/powers/swift-pro/SKILL.md +115 -0
  251. package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
  252. package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
  253. package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
  254. package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
  255. package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
  256. package/workflows/powers/tailwind-patterns/POWER.md +71 -240
  257. package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
  258. package/workflows/powers/testing-patterns/POWER.md +155 -10
  259. package/workflows/powers/testing-patterns/SKILL.md +155 -10
  260. package/workflows/powers/typescript-pro/POWER.md +47 -38
  261. package/workflows/powers/typescript-pro/SKILL.md +47 -38
  262. package/workflows/powers/vitess/POWER.md +67 -0
  263. package/workflows/powers/vitess/SKILL.md +64 -0
  264. package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
  265. package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
  266. package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
  267. package/workflows/powers/web-perf/POWER.md +43 -170
  268. package/workflows/powers/web-perf/SKILL.md +43 -170
  269. package/workflows/powers/webapp-testing/POWER.md +43 -164
  270. package/workflows/powers/webapp-testing/SKILL.md +43 -164
  271. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +65 -42
  272. package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +8 -6
  273. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +65 -41
  274. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +8 -6
  275. package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +9 -8
  276. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +1 -1
@@ -1,394 +1,159 @@
1
1
  ---
2
2
  name: mobile-design
3
- description: Mobile-first design thinking and decision-making for iOS and Android apps. Touch interaction, performance patterns, platform conventions. Teaches principles, not fixed values. Use when building React Native, Flutter, or native mobile apps.
4
- allowed-tools: Read, Glob, Grep, Bash
3
+ description: Design mobile interfaces with touch psychology, platform-native patterns, iOS and Android guidelines, gesture handling, and responsive mobile layouts.
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: cubis-foundry
7
+ version: "3.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
5
9
  ---
6
10
 
7
- # Mobile Design System
11
+ # Mobile Design
8
12
 
9
- > **Philosophy:** Touch-first. Battery-conscious. Platform-respectful. Offline-capable.
10
- > **Core Principle:** Mobile is NOT a small desktop. THINK mobile constraints, ASK platform choice.
13
+ ## Purpose
11
14
 
12
- ---
13
-
14
- ## 🔧 Runtime Scripts
15
-
16
- **Execute these for validation (don't read, just run):**
17
-
18
- | Script | Purpose | Usage |
19
- |--------|---------|-------|
20
- | `scripts/mobile_audit.py` | Mobile UX & Touch Audit | `python scripts/mobile_audit.py <project_path>` |
21
-
22
- ---
23
-
24
- ## 🔴 MANDATORY: Read Reference Files Before Working!
25
-
26
- **⛔ DO NOT start development until you read the relevant files:**
15
+ Guide mobile interface design with platform-native patterns, touch ergonomics, and mobile-specific UX principles. Covers both native (iOS/Android) and responsive web mobile experiences.
27
16
 
28
- ### Universal (Always Read)
17
+ ## When to Use
29
18
 
30
- | File | Content | Status |
31
- |------|---------|--------|
32
- | **[mobile-design-thinking.md](mobile-design-thinking.md)** | **⚠️ ANTI-MEMORIZATION: Forces thinking, prevents AI defaults** | **⬜ CRITICAL FIRST** |
33
- | **[touch-psychology.md](touch-psychology.md)** | **Fitts' Law, gestures, haptics, thumb zone** | **⬜ CRITICAL** |
34
- | **[mobile-performance.md](mobile-performance.md)** | **RN/Flutter performance, 60fps, memory** | **⬜ CRITICAL** |
35
- | **[mobile-backend.md](mobile-backend.md)** | **Push notifications, offline sync, mobile API** | **⬜ CRITICAL** |
36
- | **[mobile-testing.md](mobile-testing.md)** | **Testing pyramid, E2E, platform-specific** | **⬜ CRITICAL** |
37
- | **[mobile-debugging.md](mobile-debugging.md)** | **Native vs JS debugging, Flipper, Logcat** | **⬜ CRITICAL** |
38
- | [mobile-navigation.md](mobile-navigation.md) | Tab/Stack/Drawer, deep linking | ⬜ Read |
39
- | [mobile-typography.md](mobile-typography.md) | System fonts, Dynamic Type, a11y | ⬜ Read |
40
- | [mobile-color-system.md](mobile-color-system.md) | OLED, dark mode, battery-aware | ⬜ Read |
41
- | [decision-trees.md](decision-trees.md) | Framework/state/storage selection | ⬜ Read |
19
+ - Designing or reviewing mobile app interfaces
20
+ - Building responsive web experiences for mobile devices
21
+ - Implementing touch interactions and gestures
22
+ - Adapting desktop designs for mobile
23
+ - Choosing between native patterns and cross-platform consistency
24
+ - Optimizing mobile performance and perceived speed
42
25
 
43
- > 🧠 **mobile-design-thinking.md is PRIORITY!** This file ensures AI thinks instead of using memorized patterns.
26
+ ## Instructions
44
27
 
45
- ### Platform-Specific (Read Based on Target)
28
+ ### Step 1 Design for Touch
46
29
 
47
- | Platform | File | Content | When to Read |
48
- |----------|------|---------|--------------|
49
- | **iOS** | [platform-ios.md](platform-ios.md) | Human Interface Guidelines, SF Pro, SwiftUI patterns | Building for iPhone/iPad |
50
- | **Android** | [platform-android.md](platform-android.md) | Material Design 3, Roboto, Compose patterns | Building for Android |
51
- | **Cross-Platform** | Both above | Platform divergence points | React Native / Flutter |
30
+ **Touch target sizes**:
31
+ | Platform | Minimum | Recommended |
32
+ |----------|---------|-------------|
33
+ | iOS (HIG) | 44×44 pt | 48×48 pt |
34
+ | Android (Material) | 48×48 dp | 56×56 dp |
35
+ | Web (WCAG) | 44×44 CSS px | 48×48 CSS px |
52
36
 
53
- > 🔴 **If building for iOS Read platform-ios.md FIRST!**
54
- > 🔴 **If building for Android → Read platform-android.md FIRST!**
55
- > 🔴 **If cross-platform → Read BOTH and apply conditional platform logic!**
37
+ **Thumb zones** (for one-handed use on phones):
56
38
 
57
- ---
58
-
59
- ## ⚠️ CRITICAL: ASK BEFORE ASSUMING (MANDATORY)
60
-
61
- > **STOP! If the user's request is open-ended, DO NOT default to your favorites.**
62
-
63
- ### You MUST Ask If Not Specified:
39
+ - Easy reach: bottom center of screen
40
+ - Hard reach: top corners
41
+ - Primary actions go in the easy zone (bottom navigation, FABs)
42
+ - Destructive actions go in the hard zone (require deliberate reach)
64
43
 
65
- | Aspect | Ask | Why |
66
- |--------|-----|-----|
67
- | **Platform** | "iOS, Android, or both?" | Affects EVERY design decision |
68
- | **Framework** | "React Native, Flutter, or native?" | Determines patterns and tools |
69
- | **Navigation** | "Tab bar, drawer, or stack-based?" | Core UX decision |
70
- | **State** | "What state management? (Zustand/Redux/Riverpod/BLoC?)" | Architecture foundation |
71
- | **Offline** | "Does this need to work offline?" | Affects data strategy |
72
- | **Target devices** | "Phone only, or tablet support?" | Layout complexity |
44
+ **Touch feedback**:
73
45
 
74
- ### AI MOBILE ANTI-PATTERNS (YASAK LİSTESİ)
46
+ - Every tap should produce immediate visual feedback (< 100ms)
47
+ - Use ripple (Android), highlight (iOS), or scale transform (web)
48
+ - Long-press actions need a visual indication of the hold
75
49
 
76
- > 🚫 **These are AI default tendencies that MUST be avoided!**
50
+ ### Step 2 Follow Platform Conventions
77
51
 
78
- #### Performance Sins
52
+ **iOS (Human Interface Guidelines)**:
79
53
 
80
- | NEVER DO | Why It's Wrong | ALWAYS DO |
81
- |-------------|----------------|--------------|
82
- | **ScrollView for long lists** | Renders ALL items, memory explodes | Use `FlatList` / `FlashList` / `ListView.builder` |
83
- | **Inline renderItem function** | New function every render, all items re-render | `useCallback` + `React.memo` |
84
- | **Missing keyExtractor** | Index-based keys cause bugs on reorder | Unique, stable ID from data |
85
- | **Skip getItemLayout** | Async layout = janky scroll | Provide when items have fixed height |
86
- | **setState() everywhere** | Unnecessary widget rebuilds | Targeted state, `const` constructors |
87
- | **Native driver: false** | Animations blocked by JS thread | `useNativeDriver: true` always |
88
- | **console.log in production** | Blocks JS thread severely | Remove before release build |
89
- | **Skip React.memo/const** | Every item re-renders on any change | Memoize list items ALWAYS |
54
+ - Navigation: tab bar at bottom, navigation bar at top with back button
55
+ - Modals: sheet presentations, slide up from bottom
56
+ - Actions: swipe-to-delete, pull-to-refresh
57
+ - Typography: SF Pro, Dynamic Type (accessibility scaling)
58
+ - Safe areas: respect notch, home indicator, status bar
90
59
 
91
- #### Touch/UX Sins
60
+ **Android (Material Design)**:
92
61
 
93
- | NEVER DO | Why It's Wrong | ✅ ALWAYS DO |
94
- |-------------|----------------|--------------|
95
- | **Touch target < 44px** | Impossible to tap accurately, frustrating | Minimum 44pt (iOS) / 48dp (Android) |
96
- | **Spacing < 8px between targets** | Accidental taps on neighbors | Minimum 8-12px gap |
97
- | **Gesture-only interactions** | Motor impaired users excluded | Always provide button alternative |
98
- | **No loading state** | User thinks app crashed | ALWAYS show loading feedback |
99
- | **No error state** | User stuck, no recovery path | Show error with retry option |
100
- | **No offline handling** | Crash/block when network lost | Graceful degradation, cached data |
101
- | **Ignore platform conventions** | Users confused, muscle memory broken | iOS feels iOS, Android feels Android |
62
+ - Navigation: bottom navigation or navigation drawer
63
+ - Modals: bottom sheets, dialogs
64
+ - Actions: FAB for primary action, swipe gestures
65
+ - Typography: Roboto, system font scaling
66
+ - Edge-to-edge: draw behind system bars
102
67
 
103
- #### Security Sins
68
+ **Cross-platform (React Native, Flutter)**:
104
69
 
105
- | NEVER DO | Why It's Wrong | ✅ ALWAYS DO |
106
- |-------------|----------------|--------------|
107
- | **Token in AsyncStorage** | Easily accessible, stolen on rooted device | `SecureStore` / `Keychain` / `EncryptedSharedPreferences` |
108
- | **Hardcode API keys** | Reverse engineered from APK/IPA | Environment variables, secure storage |
109
- | **Skip SSL pinning** | MITM attacks possible | Pin certificates in production |
110
- | **Log sensitive data** | Logs can be extracted | Never log tokens, passwords, PII |
111
-
112
- #### Architecture Sins
113
-
114
- | ❌ NEVER DO | Why It's Wrong | ✅ ALWAYS DO |
115
- |-------------|----------------|--------------|
116
- | **Business logic in UI** | Untestable, unmaintainable | Service layer separation |
117
- | **Global state for everything** | Unnecessary re-renders, complexity | Local state default, lift when needed |
118
- | **Deep linking as afterthought** | Notifications, shares broken | Plan deep links from day one |
119
- | **Skip dispose/cleanup** | Memory leaks, zombie listeners | Clean up subscriptions, timers |
120
-
121
- ---
70
+ - Use platform-adaptive components when possible
71
+ - Match navigation patterns to the platform (not one pattern for both)
72
+ - Test on both platforms don't assume iOS behavior works on Android
122
73
 
123
- ## 📱 Platform Decision Matrix
74
+ ### Step 3 Optimize Mobile Layouts
124
75
 
125
- ### When to Unify vs Diverge
76
+ **Mobile-first hierarchy**:
126
77
 
127
- ```
128
- UNIFY (same on both) DIVERGE (platform-specific)
129
- ─────────────────── ──────────────────────────
130
- Business Logic ✅ Always -
131
- Data Layer ✅ Always -
132
- Core Features ✅ Always -
133
-
134
- Navigation - ✅ iOS: edge swipe, Android: back button
135
- Gestures - ✅ Platform-native feel
136
- Icons - ✅ SF Symbols vs Material Icons
137
- Date Pickers - ✅ Native pickers feel right
138
- Modals/Sheets - ✅ iOS: bottom sheet vs Android: dialog
139
- Typography - ✅ SF Pro vs Roboto (or custom)
140
- Error Dialogs - ✅ Platform conventions for alerts
141
- ```
78
+ 1. One primary action per screen
79
+ 2. Vertical scrolling only (avoid horizontal scroll for content)
80
+ 3. Full-width elements (no tiny desktop-sized cards)
81
+ 4. Progressive disclosure (show summary, expand for details)
142
82
 
143
- ### Quick Reference: Platform Defaults
83
+ **Common mobile patterns**:
84
+ | Pattern | When to Use |
85
+ |---------|-------------|
86
+ | Bottom sheet | Secondary actions, filters, options |
87
+ | Pull-to-refresh | List/feed content updates |
88
+ | Infinite scroll | Feeds, search results |
89
+ | Swipe actions | Quick operations on list items |
90
+ | Bottom navigation | 3-5 top-level destinations |
91
+ | FAB | Single primary action per screen |
92
+ | Skeleton screens | Content loading states |
144
93
 
145
- | Element | iOS | Android |
146
- |---------|-----|---------|
147
- | **Primary Font** | SF Pro / SF Compact | Roboto |
148
- | **Min Touch Target** | 44pt × 44pt | 48dp × 48dp |
149
- | **Back Navigation** | Edge swipe left | System back button/gesture |
150
- | **Bottom Tab Icons** | SF Symbols | Material Symbols |
151
- | **Action Sheet** | UIActionSheet from bottom | Bottom Sheet / Dialog |
152
- | **Progress** | Spinner | Linear progress (Material) |
153
- | **Pull to Refresh** | Native UIRefreshControl | SwipeRefreshLayout |
94
+ **Text on mobile**:
154
95
 
155
- ---
96
+ - Body text ≥ 16px (prevents iOS zoom on input focus)
97
+ - Line length: 35-50 characters per line
98
+ - Generous line-height (1.5+) for readability
99
+ - Left-aligned (or start-aligned for RTL) — never justified
156
100
 
157
- ## 🧠 Mobile UX Psychology (Quick Reference)
101
+ ### Step 4 Handle Mobile-Specific Challenges
158
102
 
159
- ### Fitts' Law for Touch
103
+ **Keyboards**:
160
104
 
161
- ```
162
- Desktop: Cursor is precise (1px)
163
- Mobile: Finger is imprecise (~7mm contact area)
105
+ - Use correct `inputmode` for each field (`numeric`, `email`, `tel`, `url`)
106
+ - Scroll input into view when keyboard appears
107
+ - Dismiss keyboard on background tap
108
+ - Show "Next" button to move between fields, "Done" on the last field
164
109
 
165
- Touch targets MUST be 44-48px minimum
166
- → Important actions in THUMB ZONE (bottom of screen)
167
- → Destructive actions AWAY from easy reach
168
- ```
110
+ **Offline & connectivity**:
169
111
 
170
- ### Thumb Zone (One-Handed Usage)
112
+ - Show clear offline indicator
113
+ - Queue actions for retry when connection returns
114
+ - Cache critical content for offline access
115
+ - Never silently fail — tell the user what's happening
171
116
 
172
- ```
173
- ┌─────────────────────────────┐
174
- │ HARD TO REACH │ ← Navigation, menu, back
175
- │ (stretch) │
176
- ├─────────────────────────────┤
177
- │ OK TO REACH │ ← Secondary actions
178
- │ (natural) │
179
- ├─────────────────────────────┤
180
- │ EASY TO REACH │ ← PRIMARY CTAs, tab bar
181
- │ (thumb's natural arc) │ ← Main content interaction
182
- └─────────────────────────────┘
183
- [ HOME ]
184
- ```
117
+ **Performance**:
185
118
 
186
- ### Mobile-Specific Cognitive Load
119
+ - Target < 3s first meaningful paint on 3G
120
+ - Lazy-load images below the fold
121
+ - Minimize JS bundle — mobile CPUs are 3-5x slower than desktop
122
+ - Use native scrolling (`-webkit-overflow-scrolling: touch` or `overscroll-behavior`)
123
+ - Avoid heavy animations on low-end devices
187
124
 
188
- | Desktop | Mobile Difference |
189
- |---------|-------------------|
190
- | Multiple windows | ONE task at a time |
191
- | Keyboard shortcuts | Touch gestures |
192
- | Hover states | NO hover (tap or nothing) |
193
- | Large viewport | Limited space, scroll vertical |
194
- | Stable attention | Interrupted constantly |
125
+ ### Step 5 Test on Real Devices
195
126
 
196
- For deep dive: [touch-psychology.md](touch-psychology.md)
127
+ - Test on both iOS and Android
128
+ - Test on at least one low-end device (performance)
129
+ - Test with large text / accessibility settings
130
+ - Test in landscape orientation
131
+ - Test with slow network (3G simulation)
132
+ - Test keyboard interactions on every form
133
+ - Test gesture conflicts (system gestures vs. app gestures)
197
134
 
198
- ---
135
+ ## Output Format
199
136
 
200
- ## ⚡ Performance Principles (Quick Reference)
201
-
202
- ### React Native Critical Rules
203
-
204
- ```typescript
205
- // ✅ CORRECT: Memoized renderItem + React.memo wrapper
206
- const ListItem = React.memo(({ item }: { item: Item }) => (
207
- <View style={styles.item}>
208
- <Text>{item.title}</Text>
209
- </View>
210
- ));
211
-
212
- const renderItem = useCallback(
213
- ({ item }: { item: Item }) => <ListItem item={item} />,
214
- []
215
- );
216
-
217
- // ✅ CORRECT: FlatList with all optimizations
218
- <FlatList
219
- data={items}
220
- renderItem={renderItem}
221
- keyExtractor={(item) => item.id} // Stable ID, NOT index
222
- getItemLayout={(data, index) => ({
223
- length: ITEM_HEIGHT,
224
- offset: ITEM_HEIGHT * index,
225
- index,
226
- })}
227
- removeClippedSubviews={true}
228
- maxToRenderPerBatch={10}
229
- windowSize={5}
230
- />
231
137
  ```
138
+ ## Mobile Design Review
139
+ [platform, device considerations, and approach]
232
140
 
233
- ### Flutter Critical Rules
234
-
235
- ```dart
236
- // ✅ CORRECT: const constructors prevent rebuilds
237
- class MyWidget extends StatelessWidget {
238
- const MyWidget({super.key}); // CONST!
239
-
240
- @override
241
- Widget build(BuildContext context) {
242
- return const Column( // CONST!
243
- children: [
244
- Text('Static content'),
245
- MyConstantWidget(),
246
- ],
247
- );
248
- }
249
- }
250
-
251
- // ✅ CORRECT: Targeted state with ValueListenableBuilder
252
- ValueListenableBuilder<int>(
253
- valueListenable: counter,
254
- builder: (context, value, child) => Text('$value'),
255
- child: const ExpensiveWidget(), // Won't rebuild!
256
- )
257
- ```
141
+ ## Layout
142
+ [responsive structure and component choices]
258
143
 
259
- ### Animation Performance
144
+ ## Touch & Interaction
145
+ [gesture handling, feedback, and accessibility]
260
146
 
147
+ ## Platform-Specific Notes
148
+ [iOS / Android / web differences]
261
149
  ```
262
- GPU-accelerated (FAST): CPU-bound (SLOW):
263
- ├── transform ├── width, height
264
- ├── opacity ├── top, left, right, bottom
265
- └── (use these ONLY) ├── margin, padding
266
- └── (AVOID animating these)
267
- ```
268
-
269
- For complete guide: [mobile-performance.md](mobile-performance.md)
270
-
271
- ---
272
-
273
- ## 📝 CHECKPOINT (MANDATORY Before Any Mobile Work)
274
150
 
275
- > **Before writing ANY mobile code, you MUST complete this checkpoint:**
276
-
277
- ```
278
- 🧠 CHECKPOINT:
151
+ ## Examples
279
152
 
280
- Platform: [ iOS / Android / Both ]
281
- Framework: [ React Native / Flutter / SwiftUI / Kotlin ]
282
- Files Read: [ List the skill files you've read ]
153
+ **User**: "Design a mobile checkout flow"
283
154
 
284
- 3 Principles I Will Apply:
285
- 1. _______________
286
- 2. _______________
287
- 3. _______________
155
+ **Response approach**: Single-column layout, large touch targets (48px+), numeric keyboard for card input, auto-advance between fields, Apple Pay / Google Pay as primary CTA (bottom of screen), inline validation, minimal form fields.
288
156
 
289
- Anti-Patterns I Will Avoid:
290
- 1. _______________
291
- 2. _______________
292
- ```
293
-
294
- **Example:**
295
- ```
296
- 🧠 CHECKPOINT:
297
-
298
- Platform: iOS + Android (Cross-platform)
299
- Framework: React Native + Expo
300
- Files Read: touch-psychology.md, mobile-performance.md, platform-ios.md, platform-android.md
301
-
302
- 3 Principles I Will Apply:
303
- 1. FlatList with React.memo + useCallback for all lists
304
- 2. 48px touch targets, thumb zone for primary CTAs
305
- 3. Platform-specific navigation (edge swipe iOS, back button Android)
306
-
307
- Anti-Patterns I Will Avoid:
308
- 1. ScrollView for lists → FlatList
309
- 2. Inline renderItem → Memoized
310
- 3. AsyncStorage for tokens → SecureStore
311
- ```
312
-
313
- > 🔴 **Can't fill the checkpoint? → GO BACK AND READ THE SKILL FILES.**
314
-
315
- ---
316
-
317
- ## 🔧 Framework Decision Tree
318
-
319
- ```
320
- WHAT ARE YOU BUILDING?
321
-
322
- ├── Need OTA updates + rapid iteration + web team
323
- │ └── ✅ React Native + Expo
324
-
325
- ├── Need pixel-perfect custom UI + performance critical
326
- │ └── ✅ Flutter
327
-
328
- ├── Deep native features + single platform focus
329
- │ ├── iOS only → SwiftUI
330
- │ └── Android only → Kotlin + Jetpack Compose
331
-
332
- ├── Existing RN codebase + new features
333
- │ └── ✅ React Native (bare workflow)
334
-
335
- └── Enterprise + existing Flutter codebase
336
- └── ✅ Flutter
337
- ```
338
-
339
- For complete decision trees: [decision-trees.md](decision-trees.md)
340
-
341
- ---
342
-
343
- ## 📋 Pre-Development Checklist
344
-
345
- ### Before Starting ANY Mobile Project
346
-
347
- - [ ] **Platform confirmed?** (iOS / Android / Both)
348
- - [ ] **Framework chosen?** (RN / Flutter / Native)
349
- - [ ] **Navigation pattern decided?** (Tabs / Stack / Drawer)
350
- - [ ] **State management selected?** (Zustand / Redux / Riverpod / BLoC)
351
- - [ ] **Offline requirements known?**
352
- - [ ] **Deep linking planned from day one?**
353
- - [ ] **Target devices defined?** (Phone / Tablet / Both)
354
-
355
- ### Before Every Screen
356
-
357
- - [ ] **Touch targets ≥ 44-48px?**
358
- - [ ] **Primary CTA in thumb zone?**
359
- - [ ] **Loading state exists?**
360
- - [ ] **Error state with retry exists?**
361
- - [ ] **Offline handling considered?**
362
- - [ ] **Platform conventions followed?**
363
-
364
- ### Before Release
365
-
366
- - [ ] **console.log removed?**
367
- - [ ] **SecureStore for sensitive data?**
368
- - [ ] **SSL pinning enabled?**
369
- - [ ] **Lists optimized (memo, keyExtractor)?**
370
- - [ ] **Memory cleanup on unmount?**
371
- - [ ] **Tested on low-end devices?**
372
- - [ ] **Accessibility labels on all interactive elements?**
373
-
374
- ---
375
-
376
- ## 📚 Reference Files
377
-
378
- For deeper guidance on specific areas:
379
-
380
- | File | When to Use |
381
- |------|-------------|
382
- | [mobile-design-thinking.md](mobile-design-thinking.md) | **FIRST! Anti-memorization, forces context-based thinking** |
383
- | [touch-psychology.md](touch-psychology.md) | Understanding touch interaction, Fitts' Law, gesture design |
384
- | [mobile-performance.md](mobile-performance.md) | Optimizing RN/Flutter, 60fps, memory/battery |
385
- | [platform-ios.md](platform-ios.md) | iOS-specific design, HIG compliance |
386
- | [platform-android.md](platform-android.md) | Android-specific design, Material Design 3 |
387
- | [mobile-navigation.md](mobile-navigation.md) | Navigation patterns, deep linking |
388
- | [mobile-typography.md](mobile-typography.md) | Type scale, system fonts, accessibility |
389
- | [mobile-color-system.md](mobile-color-system.md) | OLED optimization, dark mode, battery |
390
- | [decision-trees.md](decision-trees.md) | Framework, state, storage decisions |
391
-
392
- ---
157
+ **User**: "Adapt our desktop dashboard for mobile"
393
158
 
394
- > **Remember:** Mobile users are impatient, interrupted, and using imprecise fingers on small screens. Design for the WORST conditions: bad network, one hand, bright sun, low battery. If it works there, it works everywhere.
159
+ **Response approach**: Prioritize key metrics (don't show everything). Replace side navigation with bottom tabs. Stack cards vertically. Make charts scrollable or simplified. Replace hover interactions with tap-to-reveal. Consider pull-to-refresh for data updates.
@@ -0,0 +1,67 @@
1
+ ````markdown
2
+ ---
3
+ inclusion: manual
4
+ name: mongodb
5
+ description: "Use when the task is specifically MongoDB: document-model design, aggregation pipelines, index strategy, shard-key tradeoffs, and operational guidance for document workloads."
6
+ license: MIT
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "3.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
11
+ ---
12
+
13
+ # MongoDB
14
+
15
+ ## Purpose
16
+
17
+ Use when the task is specifically MongoDB: document-model design, aggregation pipelines, index strategy, shard-key tradeoffs, and operational guidance for document workloads.
18
+
19
+ ## When to Use
20
+
21
+ - The engine is MongoDB or a MongoDB-compatible managed service.
22
+ - The task depends on document modeling, aggregation pipelines, compound indexes, or shard-key behavior.
23
+ - You need MongoDB-aware schema evolution or query guidance.
24
+
25
+ ## Instructions
26
+
27
+ 1. Confirm document boundaries, write patterns, and query shape.
28
+ 2. Choose embed vs reference deliberately from update and read behavior.
29
+ 3. Design indexes and aggregation stages around actual filters, sorts, and fan-out.
30
+ 4. Make schema evolution, validation, and shard-key risk explicit when relevant.
31
+ 5. Re-check operational impact with evidence from query behavior and workload hotspots.
32
+
33
+ ### Baseline standards
34
+
35
+ - Model documents from access patterns, not from relational habit alone.
36
+ - Keep schema validation and lifecycle rules explicit even in flexible models.
37
+ - Treat shard-key choice as a product-level scaling decision.
38
+ - Use aggregation only when it improves the real workflow, not because it can.
39
+
40
+ ### Constraints
41
+
42
+ - Avoid unbounded document growth.
43
+ - Avoid overusing references or embeds without workload evidence.
44
+ - Avoid weak validation because the database is “schema-less.”.
45
+ - Avoid premature sharding with no distribution evidence.
46
+
47
+ ## Output Format
48
+
49
+ Provide implementation guidance, code examples, and configuration as appropriate to the task.
50
+
51
+ ## References
52
+
53
+ Load on demand. Do not preload all reference files.
54
+
55
+ | File | Load when |
56
+ | --- | --- |
57
+ | `references/mongodb-checklist.md` | You need deeper MongoDB guidance for embed-vs-reference choices, aggregation, indexing, validation, and shard-key tradeoffs. |
58
+
59
+ ## Scripts
60
+
61
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
62
+
63
+ ## Examples
64
+
65
+ - "Help me with mongodb best practices in this project"
66
+ - "Review my mongodb implementation for issues"
67
+ ````
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: mongodb
3
+ description: "Use when the task is specifically MongoDB: document-model design, aggregation pipelines, index strategy, shard-key tradeoffs, and operational guidance for document workloads."
4
+ license: MIT
5
+ metadata:
6
+ author: cubis-foundry
7
+ version: "3.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot
9
+ ---
10
+
11
+ # MongoDB
12
+
13
+ ## Purpose
14
+
15
+ Use when the task is specifically MongoDB: document-model design, aggregation pipelines, index strategy, shard-key tradeoffs, and operational guidance for document workloads.
16
+
17
+ ## When to Use
18
+
19
+ - The engine is MongoDB or a MongoDB-compatible managed service.
20
+ - The task depends on document modeling, aggregation pipelines, compound indexes, or shard-key behavior.
21
+ - You need MongoDB-aware schema evolution or query guidance.
22
+
23
+ ## Instructions
24
+
25
+ 1. Confirm document boundaries, write patterns, and query shape.
26
+ 2. Choose embed vs reference deliberately from update and read behavior.
27
+ 3. Design indexes and aggregation stages around actual filters, sorts, and fan-out.
28
+ 4. Make schema evolution, validation, and shard-key risk explicit when relevant.
29
+ 5. Re-check operational impact with evidence from query behavior and workload hotspots.
30
+
31
+ ### Baseline standards
32
+
33
+ - Model documents from access patterns, not from relational habit alone.
34
+ - Keep schema validation and lifecycle rules explicit even in flexible models.
35
+ - Treat shard-key choice as a product-level scaling decision.
36
+ - Use aggregation only when it improves the real workflow, not because it can.
37
+
38
+ ### Constraints
39
+
40
+ - Avoid unbounded document growth.
41
+ - Avoid overusing references or embeds without workload evidence.
42
+ - Avoid weak validation because the database is “schema-less.”.
43
+ - Avoid premature sharding with no distribution evidence.
44
+
45
+ ## Output Format
46
+
47
+ Provide implementation guidance, code examples, and configuration as appropriate to the task.
48
+
49
+ ## References
50
+
51
+ Load on demand. Do not preload all reference files.
52
+
53
+ | File | Load when |
54
+ | --- | --- |
55
+ | `references/mongodb-checklist.md` | You need deeper MongoDB guidance for embed-vs-reference choices, aggregation, indexing, validation, and shard-key tradeoffs. |
56
+
57
+ ## Scripts
58
+
59
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
60
+
61
+ ## Examples
62
+
63
+ - "Help me with mongodb best practices in this project"
64
+ - "Review my mongodb implementation for issues"
@@ -0,0 +1,20 @@
1
+ # MongoDB Checklist
2
+
3
+ Load this when MongoDB document behavior is the main concern.
4
+
5
+ ## Document shape
6
+
7
+ - Choose embed vs reference from update and read behavior.
8
+ - Keep schema validation explicit even in flexible models.
9
+ - Avoid unbounded document growth.
10
+
11
+ ## Queries and aggregation
12
+
13
+ - Design compound indexes from real filters and sorts.
14
+ - Treat aggregation as a deliberate tool, not default glue.
15
+ - Make shard-key implications explicit before scaling decisions harden.
16
+
17
+ ## Operations
18
+
19
+ - Re-check validation, index coverage, and fan-out before shipping.
20
+ - Do not use “schema-less” as an excuse to skip lifecycle design.