@cubis/foundry 0.3.71 → 0.3.72

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 (270) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cli/core.js +4 -18
  3. package/dist/cli/core.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +4 -18
  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
@@ -1,154 +1,169 @@
1
1
  ---
2
2
  name: i18n-localization
3
- description: Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.
4
- allowed-tools: Read, Glob, Grep
3
+ description: Implement internationalization and localization including RTL support, pluralization, date/number formatting, translation workflows, and locale-aware UI.
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
- # i18n & Localization
11
+ # I18N & Localization
8
12
 
9
- > Internationalization (i18n) and Localization (L10n) best practices.
13
+ ## Purpose
10
14
 
11
- ---
15
+ Guide internationalization (i18n) and localization (l10n) implementation. Ensure applications can be adapted for different languages, regions, and cultural conventions without code changes.
12
16
 
13
- ## 1. Core Concepts
17
+ ## When to Use
14
18
 
15
- | Term | Meaning |
16
- |------|---------|
17
- | **i18n** | Internationalization - making app translatable |
18
- | **L10n** | Localization - actual translations |
19
- | **Locale** | Language + Region (en-US, tr-TR) |
20
- | **RTL** | Right-to-left languages (Arabic, Hebrew) |
19
+ - Adding multi-language support to an application
20
+ - Implementing RTL (right-to-left) layout support
21
+ - Handling dates, numbers, and currencies across locales
22
+ - Setting up translation workflows and string management
23
+ - Reviewing code for i18n readiness
24
+ - Building locale-aware UI components
21
25
 
22
- ---
26
+ ## Instructions
23
27
 
24
- ## 2. When to Use i18n
28
+ ### Step 1 Externalize All User-Facing Strings
25
29
 
26
- | Project Type | i18n Needed? |
27
- |--------------|--------------|
28
- | Public web app | ✅ Yes |
29
- | SaaS product | ✅ Yes |
30
- | Internal tool | ⚠️ Maybe |
31
- | Single-region app | ⚠️ Consider future |
32
- | Personal project | ❌ Optional |
30
+ **Never hardcode user-visible text**:
33
31
 
34
- ---
32
+ ```typescript
33
+ // DON'T
34
+ <button>Save Changes</button>
35
35
 
36
- ## 3. Implementation Patterns
36
+ // DO
37
+ <button>{t('actions.save_changes')}</button>
38
+ ```
37
39
 
38
- ### React (react-i18next)
40
+ **String keys**:
39
41
 
40
- ```tsx
41
- import { useTranslation } from 'react-i18next';
42
+ - Use namespaced dot notation: `page.section.element`
43
+ - Keys should be descriptive, not the English text
44
+ - Group by feature/page, not by component
42
45
 
43
- function Welcome() {
44
- const { t } = useTranslation();
45
- return <h1>{t('welcome.title')}</h1>;
46
+ **Message format** (ICU MessageFormat):
47
+
48
+ ```json
49
+ {
50
+ "items.count": "{count, plural, =0 {No items} one {# item} other {# items}}",
51
+ "greeting": "Hello, {name}!",
52
+ "order.total": "Total: {total, number, currency}"
46
53
  }
47
54
  ```
48
55
 
49
- ### Next.js (next-intl)
56
+ ### Step 2 — Handle Pluralization
50
57
 
51
- ```tsx
52
- import { useTranslations } from 'next-intl';
58
+ Different languages have different plural rules (Arabic has 6 plural forms):
53
59
 
54
- export default function Page() {
55
- const t = useTranslations('Home');
56
- return <h1>{t('title')}</h1>;
60
+ ```json
61
+ {
62
+ "en": { "items": "{count, plural, one {# item} other {# items}}" },
63
+ "ar": {
64
+ "items": "{count, plural, zero {لا عناصر} one {عنصر واحد} two {عنصران} few {# عناصر} many {# عنصراً} other {# عنصر}}"
65
+ }
57
66
  }
58
67
  ```
59
68
 
60
- ### Python (gettext)
69
+ Never build pluralization with ternaries — always use the ICU plural syntax or equivalent library (Intl.PluralRules).
61
70
 
62
- ```python
63
- from gettext import gettext as _
71
+ ### Step 3 — Format Dates, Numbers, and Currencies
64
72
 
65
- print(_("Welcome to our app"))
66
- ```
73
+ Use `Intl` APIs — never format manually:
67
74
 
68
- ---
75
+ ```typescript
76
+ // Date
77
+ new Intl.DateTimeFormat("de-DE", { dateStyle: "long" }).format(date);
78
+ // → "15. Januar 2025"
69
79
 
70
- ## 4. File Structure
80
+ // Number
81
+ new Intl.NumberFormat("ja-JP").format(1234567);
82
+ // → "1,234,567"
71
83
 
72
- ```
73
- locales/
74
- ├── en/
75
- │ ├── common.json
76
- │ ├── auth.json
77
- │ └── errors.json
78
- ├── tr/
79
- │ ├── common.json
80
- │ ├── auth.json
81
- │ └── errors.json
82
- └── ar/ # RTL
83
- └── ...
84
+ // Currency
85
+ new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(
86
+ 42.5,
87
+ );
88
+ // → "$42.50"
89
+
90
+ // Relative time
91
+ new Intl.RelativeTimeFormat("fr", { numeric: "auto" }).format(-1, "day");
92
+ // → "hier"
84
93
  ```
85
94
 
86
- ---
95
+ ### Step 4 — Support RTL Languages
87
96
 
88
- ## 5. Best Practices
97
+ **CSS logical properties** (replace physical with logical):
89
98
 
90
- ### DO
99
+ | Physical (DON'T) | Logical (DO) |
100
+ | ------------------ | --------------------- |
101
+ | `margin-left` | `margin-inline-start` |
102
+ | `padding-right` | `padding-inline-end` |
103
+ | `text-align: left` | `text-align: start` |
104
+ | `float: left` | `float: inline-start` |
105
+ | `border-left` | `border-inline-start` |
91
106
 
92
- - Use translation keys, not raw text
93
- - Namespace translations by feature
94
- - Support pluralization
95
- - Handle date/number formats per locale
96
- - Plan for RTL from the start
97
- - Use ICU message format for complex strings
107
+ **Layout**:
98
108
 
99
- ### DON'T
109
+ - Use `dir="auto"` on user-generated content
110
+ - Set `<html dir="rtl" lang="ar">` at the document level
111
+ - Flexbox and Grid respect `direction` automatically
112
+ - Mirror icons that indicate direction (arrows, back buttons)
113
+ - Don't mirror: logos, numbers, media controls, checkmarks
100
114
 
101
- - Hardcode strings in components
102
- - Concatenate translated strings
103
- - Assume text length (German is 30% longer)
104
- - Forget about RTL layout
105
- - Mix languages in same file
115
+ ### Step 5 Translation Workflow
106
116
 
107
- ---
117
+ **File structure**:
108
118
 
109
- ## 6. Common Issues
119
+ ```
120
+ locales/
121
+ ├── en/
122
+ │ ├── common.json (shared strings)
123
+ │ ├── auth.json (login/signup)
124
+ │ └── dashboard.json (dashboard page)
125
+ ├── fr/
126
+ ├── ja/
127
+ └── ar/
128
+ ```
110
129
 
111
- | Issue | Solution |
112
- |-------|----------|
113
- | Missing translation | Fallback to default language |
114
- | Hardcoded strings | Use linter/checker script |
115
- | Date format | Use Intl.DateTimeFormat |
116
- | Number format | Use Intl.NumberFormat |
117
- | Pluralization | Use ICU message format |
130
+ **Process**:
118
131
 
119
- ---
132
+ 1. Developer adds key + English string
133
+ 2. CI extracts new/changed keys automatically
134
+ 3. Strings sent to translators (Crowdin, Lokalise, or equivalent)
135
+ 4. Translations imported back as JSON/YAML
136
+ 5. CI validates: no missing keys, no untranslated strings, valid ICU syntax
120
137
 
121
- ## 7. RTL Support
138
+ **Rules**:
122
139
 
123
- ```css
124
- /* CSS Logical Properties */
125
- .container {
126
- margin-inline-start: 1rem; /* Not margin-left */
127
- padding-inline-end: 1rem; /* Not padding-right */
128
- }
140
+ - Never concatenate translated strings (`t('hello') + ' ' + name` breaks in many languages)
141
+ - Provide context for translators (comments in message files)
142
+ - Max string length varies by language (German ~30% longer than English)
143
+ - Test with pseudo-localization (e.g., "Ŝàvé Çhàñgéŝ") to catch hardcoded strings
144
+
145
+ ## Output Format
129
146
 
130
- [dir="rtl"] .icon {
131
- transform: scaleX(-1);
132
- }
133
147
  ```
148
+ ## I18N Assessment
149
+ [current state and gaps]
134
150
 
135
- ---
151
+ ## Implementation
152
+ [code changes for i18n support]
136
153
 
137
- ## 8. Checklist
154
+ ## Translation Setup
155
+ [file structure, workflow, tooling]
138
156
 
139
- Before shipping:
157
+ ## RTL Support
158
+ [layout changes for bidirectional support]
159
+ ```
140
160
 
141
- - [ ] All user-facing strings use translation keys
142
- - [ ] Locale files exist for all supported languages
143
- - [ ] Date/number formatting uses Intl API
144
- - [ ] RTL layout tested (if applicable)
145
- - [ ] Fallback language configured
146
- - [ ] No hardcoded strings in components
161
+ ## Examples
147
162
 
148
- ---
163
+ **User**: "Add multi-language support to our React app"
164
+
165
+ **Response approach**: Set up react-intl or next-intl. Externalize all strings with namespaced keys. Configure locale detection (URL, browser, user preference). Set up ICU MessageFormat for plurals and interpolation. Show translation file structure.
149
166
 
150
- ## Script
167
+ **User**: "Our app needs to support Arabic"
151
168
 
152
- | Script | Purpose | Command |
153
- |--------|---------|---------|
154
- | `scripts/i18n_checker.py` | Detect hardcoded strings & missing translations | `python scripts/i18n_checker.py <project_path>` |
169
+ **Response approach**: Add RTL support with CSS logical properties. Set `dir="rtl"` on html element. Audit all physical CSS properties. Mirror directional icons. Test with Arabic translations for text expansion.
@@ -5,39 +5,64 @@ name: "java-pro"
5
5
  description: "Use for modern Java backend and platform engineering with Java 25-era language/runtime practices."
6
6
  license: MIT
7
7
  metadata:
8
- version: "1.0.0"
9
- domain: "language"
10
- role: "specialist"
11
- stack: "java"
12
- baseline: "Java SE 25"
8
+ author: cubis-foundry
9
+ version: "1.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
13
11
  ---
14
12
 
15
13
  # Java Pro
16
14
 
17
- ## When to use
15
+ ## Purpose
16
+
17
+ Expert-level guidance for modern Java backend and platform engineering. Covers records, sealed types, virtual threads (Project Loom), null handling, performance profiling, and production observability using current JDK practices.
18
+
19
+ ## When to Use
18
20
 
19
21
  - Building or modernizing Java backend services.
20
22
  - Designing JVM architecture for high-throughput systems.
21
- - Improving reliability, observability, and maintainability.
23
+ - Improving reliability, observability, and maintainability of Java codebases.
24
+
25
+ ## Instructions
26
+
27
+ 1. **Clarify runtime target and deployment constraints** — confirm the JDK baseline approved by project policy and deployment environment before choosing language features.
28
+
29
+ 2. **Define module boundaries and API contracts** — separate domain, service, and infrastructure layers. Use records for immutable data carriers (API responses, DTOs, event payloads). Use sealed classes/interfaces for closed domain hierarchies with exhaustive pattern matching.
30
+
31
+ 3. **Implement with explicit null handling** — use `Optional<T>` for return types that may legitimately have no value, but never for parameters or fields. Use `@Nullable`/`@NonNull` annotations from JSpecify or Checker Framework. Fail fast with `Objects.requireNonNull()` at method entry. Do not return raw `null` from methods that could return `Optional` or empty collections because it creates silent NPE pathways.
32
+
33
+ 4. **Use virtual threads for blocking I/O workloads** — HTTP calls, database queries, and file reads benefit from virtual threads via `Executors.newVirtualThreadPerTaskExecutor()`. Do not use virtual threads for CPU-bound work because they share carrier threads and cause starvation. Do not use `synchronized` blocks in virtual-thread code because it causes carrier-thread pinning — use `ReentrantLock` instead.
34
+
35
+ 5. **Add structured logging and trace propagation** — capture request/job correlation IDs in logs and traces. Keep exception handling consistent between transport, service, and persistence layers. Do not expose stack traces in production responses.
36
+
37
+ 6. **Enforce dependency and API compatibility checks in CI** — use current JDK tooling, static analysis, and dependency verification. Separate transport DTOs from domain and persistence models to reduce cascade failures.
38
+
39
+ 7. **Profile before optimizing** — use `jcmd`, `async-profiler`, or JFR for production diagnostics without restart. Profile GC behavior with `-Xlog:gc*` before tuning heap sizes. Use escape analysis awareness to avoid large short-lived objects in hot loops. Prefer explicit timeouts, bulkheads, and retry budgets at I/O boundaries.
40
+
41
+ 8. **Add tests and performance checks for critical paths** — use JUnit 5, parameterized tests, and Testcontainers for integration testing. Do not use `Thread.sleep()` for retry logic because it blocks threads — use structured retry with backoff. Do not leak persistence entities directly into API contracts because it couples layers.
42
+
43
+ 9. **Do not use reflection-heavy magic when explicit code is clearer** because it hurts readability and debuggability. Do not build monolithic service classes with mixed responsibilities because they resist testing and change.
44
+
45
+ ## Output Format
46
+
47
+ Produces Java code using records, sealed types, and modern JDK APIs with clear layer separation, explicit null handling, and structured error propagation. Includes virtual-thread-aware patterns where applicable.
22
48
 
23
- ## Core workflow
49
+ ## References
24
50
 
25
- 1. Clarify runtime target and deployment constraints.
26
- 2. Define module boundaries and API contracts.
27
- 3. Implement with clear domain/service/infrastructure separation.
28
- 4. Add tests and performance checks for critical paths.
51
+ | File | Load when |
52
+ | ---------------------------------------- | -------------------------------------------------------------------------------------------------------- |
53
+ | `references/virtual-threads-patterns.md` | Virtual thread adoption, carrier pinning avoidance, or Loom migration patterns need detail. |
54
+ | `references/records-sealed-types.md` | Record design, sealed hierarchy modeling, or pattern matching with switch expressions need detail. |
55
+ | `references/stream-api-patterns.md` | Stream pipeline design, collector patterns, parallel stream tradeoffs, or functional idioms need detail. |
56
+ | `references/modern-testing.md` | JUnit 5 patterns, parameterized tests, Testcontainers, or test architecture decisions need detail. |
57
+ | `references/gc-and-allocation.md` | GC tuning, allocation profiling, escape analysis, or memory-sensitive design decisions need detail. |
29
58
 
30
- ## Baseline standards
59
+ ## Scripts
31
60
 
32
- - Use current LTS/JDK baseline approved by project policy.
33
- - Prefer records/sealed hierarchies where they simplify modeling.
34
- - Keep null-handling explicit; avoid silent NPE pathways.
35
- - Use structured logging and trace propagation.
36
- - Enforce dependency and API compatibility checks in CI.
61
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
37
62
 
38
- ## Avoid
63
+ ## Examples
39
64
 
40
- - Monolithic service classes with mixed responsibilities.
41
- - Reflection-heavy magic when explicit code is clearer.
42
- - Leaking persistence entities directly into API contracts.
65
+ - "Migrate this blocking HTTP client code to use virtual threads with proper carrier-thread pinning avoidance."
66
+ - "Refactor this service to use sealed classes and pattern matching instead of the visitor pattern."
67
+ - "Design the null-handling strategy for this API layer using Optional returns and JSpecify annotations."
43
68
  ````
@@ -3,38 +3,63 @@ name: "java-pro"
3
3
  description: "Use for modern Java backend and platform engineering with Java 25-era language/runtime practices."
4
4
  license: MIT
5
5
  metadata:
6
- version: "1.0.0"
7
- domain: "language"
8
- role: "specialist"
9
- stack: "java"
10
- baseline: "Java SE 25"
6
+ author: cubis-foundry
7
+ version: "1.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot
11
9
  ---
12
10
 
13
11
  # Java Pro
14
12
 
15
- ## When to use
13
+ ## Purpose
14
+
15
+ Expert-level guidance for modern Java backend and platform engineering. Covers records, sealed types, virtual threads (Project Loom), null handling, performance profiling, and production observability using current JDK practices.
16
+
17
+ ## When to Use
16
18
 
17
19
  - Building or modernizing Java backend services.
18
20
  - Designing JVM architecture for high-throughput systems.
19
- - Improving reliability, observability, and maintainability.
21
+ - Improving reliability, observability, and maintainability of Java codebases.
22
+
23
+ ## Instructions
24
+
25
+ 1. **Clarify runtime target and deployment constraints** — confirm the JDK baseline approved by project policy and deployment environment before choosing language features.
26
+
27
+ 2. **Define module boundaries and API contracts** — separate domain, service, and infrastructure layers. Use records for immutable data carriers (API responses, DTOs, event payloads). Use sealed classes/interfaces for closed domain hierarchies with exhaustive pattern matching.
28
+
29
+ 3. **Implement with explicit null handling** — use `Optional<T>` for return types that may legitimately have no value, but never for parameters or fields. Use `@Nullable`/`@NonNull` annotations from JSpecify or Checker Framework. Fail fast with `Objects.requireNonNull()` at method entry. Do not return raw `null` from methods that could return `Optional` or empty collections because it creates silent NPE pathways.
30
+
31
+ 4. **Use virtual threads for blocking I/O workloads** — HTTP calls, database queries, and file reads benefit from virtual threads via `Executors.newVirtualThreadPerTaskExecutor()`. Do not use virtual threads for CPU-bound work because they share carrier threads and cause starvation. Do not use `synchronized` blocks in virtual-thread code because it causes carrier-thread pinning — use `ReentrantLock` instead.
32
+
33
+ 5. **Add structured logging and trace propagation** — capture request/job correlation IDs in logs and traces. Keep exception handling consistent between transport, service, and persistence layers. Do not expose stack traces in production responses.
34
+
35
+ 6. **Enforce dependency and API compatibility checks in CI** — use current JDK tooling, static analysis, and dependency verification. Separate transport DTOs from domain and persistence models to reduce cascade failures.
36
+
37
+ 7. **Profile before optimizing** — use `jcmd`, `async-profiler`, or JFR for production diagnostics without restart. Profile GC behavior with `-Xlog:gc*` before tuning heap sizes. Use escape analysis awareness to avoid large short-lived objects in hot loops. Prefer explicit timeouts, bulkheads, and retry budgets at I/O boundaries.
38
+
39
+ 8. **Add tests and performance checks for critical paths** — use JUnit 5, parameterized tests, and Testcontainers for integration testing. Do not use `Thread.sleep()` for retry logic because it blocks threads — use structured retry with backoff. Do not leak persistence entities directly into API contracts because it couples layers.
40
+
41
+ 9. **Do not use reflection-heavy magic when explicit code is clearer** because it hurts readability and debuggability. Do not build monolithic service classes with mixed responsibilities because they resist testing and change.
42
+
43
+ ## Output Format
44
+
45
+ Produces Java code using records, sealed types, and modern JDK APIs with clear layer separation, explicit null handling, and structured error propagation. Includes virtual-thread-aware patterns where applicable.
20
46
 
21
- ## Core workflow
47
+ ## References
22
48
 
23
- 1. Clarify runtime target and deployment constraints.
24
- 2. Define module boundaries and API contracts.
25
- 3. Implement with clear domain/service/infrastructure separation.
26
- 4. Add tests and performance checks for critical paths.
49
+ | File | Load when |
50
+ | ---------------------------------------- | -------------------------------------------------------------------------------------------------------- |
51
+ | `references/virtual-threads-patterns.md` | Virtual thread adoption, carrier pinning avoidance, or Loom migration patterns need detail. |
52
+ | `references/records-sealed-types.md` | Record design, sealed hierarchy modeling, or pattern matching with switch expressions need detail. |
53
+ | `references/stream-api-patterns.md` | Stream pipeline design, collector patterns, parallel stream tradeoffs, or functional idioms need detail. |
54
+ | `references/modern-testing.md` | JUnit 5 patterns, parameterized tests, Testcontainers, or test architecture decisions need detail. |
55
+ | `references/gc-and-allocation.md` | GC tuning, allocation profiling, escape analysis, or memory-sensitive design decisions need detail. |
27
56
 
28
- ## Baseline standards
57
+ ## Scripts
29
58
 
30
- - Use current LTS/JDK baseline approved by project policy.
31
- - Prefer records/sealed hierarchies where they simplify modeling.
32
- - Keep null-handling explicit; avoid silent NPE pathways.
33
- - Use structured logging and trace propagation.
34
- - Enforce dependency and API compatibility checks in CI.
59
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
35
60
 
36
- ## Avoid
61
+ ## Examples
37
62
 
38
- - Monolithic service classes with mixed responsibilities.
39
- - Reflection-heavy magic when explicit code is clearer.
40
- - Leaking persistence entities directly into API contracts.
63
+ - "Migrate this blocking HTTP client code to use virtual threads with proper carrier-thread pinning avoidance."
64
+ - "Refactor this service to use sealed classes and pattern matching instead of the visitor pattern."
65
+ - "Design the null-handling strategy for this API layer using Optional returns and JSpecify annotations."
@@ -2,57 +2,70 @@
2
2
  ---
3
3
  inclusion: manual
4
4
  name: "javascript-pro"
5
- description: "Use for modern JavaScript architecture and implementation across browser, Node, and edge runtimes with ES2025+ practices."
5
+ description: "Use for modern JavaScript architecture and implementation across browser, Node, and edge runtimes with runtime-aware production practices."
6
6
  license: MIT
7
7
  metadata:
8
- version: "2.0.0"
9
- domain: "language"
10
- role: "specialist"
11
- stack: "javascript"
12
- baseline: "ES2025+"
8
+ author: cubis-foundry
9
+ version: "3.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
13
11
  ---
14
12
 
15
13
  # JavaScript Pro
16
14
 
17
- ## When to use
15
+ ## Purpose
16
+
17
+ Expert-level guidance for modern JavaScript development across browser, Node.js, and edge runtimes. Covers module design, async orchestration, runtime-specific patterns, and production-grade error handling with a focus on runtime-aware code that respects platform boundaries.
18
+
19
+ ## When to Use
18
20
 
19
21
  - Implementing feature work in plain JavaScript.
20
22
  - Refactoring legacy JS toward modern modules and async flows.
21
- - Improving performance and reliability in browser/Node runtimes.
23
+ - Improving performance and reliability in browser, Node, or edge runtimes.
24
+ - Serving as the language baseline before framework-specific skills are loaded.
25
+
26
+ ## Instructions
27
+
28
+ 1. **Confirm runtime constraints** — identify browser targets, Node version, or edge runtime before choosing APIs or module formats. Runtime determines available features and performance characteristics.
29
+
30
+ 2. **Choose module boundaries and format** — prefer ESM (`import`/`export`) for new code. Configure `"type": "module"` in `package.json`. Keep modules focused to one responsibility. Use barrel exports (`index.js`) only for the public API to preserve tree-shaking.
31
+
32
+ 3. **Design async strategy** — use `AbortSignal` and `AbortController` for cancellable operations. Use `Promise.allSettled()` when all results matter regardless of individual failures. Limit concurrent operations with semaphore patterns to prevent resource exhaustion.
33
+
34
+ 4. **Implement with explicit error and cancellation handling** — always attach `.catch()` or use `try/catch` in async flows. Do not leave promise rejections unhandled because they terminate Node.js processes and cause silent failures in browsers.
35
+
36
+ 5. **Keep side effects at module edges** — pure logic belongs in reusable modules. Side-effectful initialization at module top-level prevents tree-shaking and complicates testing.
37
+
38
+ 6. **Validate untrusted input at boundaries** — sanitize at system entry points such as API handlers and form inputs. Keep dependency surface intentionally small.
39
+
40
+ 7. **Use runtime-appropriate tooling** — Vitest or `node --test` for testing, Biome or ESLint for linting, Vite or esbuild for bundling. Use lockfile-based installs (`npm ci`, `pnpm install --frozen-lockfile`) in CI. Enable `corepack` for consistent package manager versions.
41
+
42
+ 8. **Debug in the target environment** — reproduce runtime-specific failures in the exact target (browser, Node, or edge). Use structured logging with consistent error shapes. Profile with Chrome DevTools or `node --prof` before redesigning hot paths.
22
43
 
23
- ## Core workflow
44
+ 9. **Optimize deliberately** — use streams for large payloads to avoid memory spikes. Use `Promise.all` for independent parallel operations. Use dynamic `import()` for code-splitting heavy modules. Do not use UA sniffing in browser code because feature detection is more reliable and maintainable.
24
45
 
25
- 1. Confirm runtime constraints (browser targets, Node/edge version).
26
- 2. Choose module boundaries and async strategy.
27
- 3. Implement with explicit error and cancellation handling.
28
- 4. Verify behavior with tests and runtime checks.
46
+ 10. **Do not use heavy framework coupling in low-level modules** because it prevents reuse. Do not allow copy-paste utility proliferation without consolidation because it causes drift and duplication.
29
47
 
30
- ## Baseline standards
48
+ ## Output Format
31
49
 
32
- - Prefer ESM for new code unless compatibility blocks it.
33
- - Use `AbortSignal` for cancellable async operations.
34
- - Keep side effects at edges; pure logic in reusable modules.
35
- - Validate untrusted input at boundaries.
36
- - Keep dependency surface intentionally small.
50
+ Produces JavaScript code following ESM module conventions with explicit async error handling, runtime-appropriate API usage, and clear module boundaries. Includes structured error objects and cancellation support where applicable.
37
51
 
38
- ## Implementation guidance
52
+ ## References
39
53
 
40
- - Use `Promise.all` for independent parallel operations.
41
- - Use structured logging and consistent error shapes.
42
- - Use streams for large payloads to avoid memory spikes.
43
- - Use feature detection, not UA sniffing, in browser code.
54
+ | File | Load when |
55
+ | ------------------------------- | --------------------------------------------------------------------------- |
56
+ | `references/modern-syntax.md` | Choosing modern syntax/features for current runtime targets. |
57
+ | `references/async-patterns.md` | Cancellation, retries, concurrency, or promise orchestration needs detail. |
58
+ | `references/modules.md` | ESM/CJS/module-boundary tradeoffs are in scope. |
59
+ | `references/browser-apis.md` | Browser-specific APIs, capability checks, or UX/runtime constraints matter. |
60
+ | `references/node-essentials.md` | Node runtime behavior, streams, files, or process concerns matter. |
44
61
 
45
- ## Avoid
62
+ ## Scripts
46
63
 
47
- - Silent promise rejections.
48
- - Heavy framework coupling in low-level modules.
49
- - Copy-paste utility proliferation without consolidation.
64
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
50
65
 
51
- ## Reference files
66
+ ## Examples
52
67
 
53
- - `references/modern-syntax.md`
54
- - `references/async-patterns.md`
55
- - `references/modules.md`
56
- - `references/browser-apis.md`
57
- - `references/node-essentials.md`
68
+ - "Refactor this callback-heavy Express handler to use async/await with proper error handling and AbortController for timeout."
69
+ - "Design the module structure for a shared utility library that needs to support both ESM and CJS consumers."
70
+ - "Optimize this Node.js data pipeline to use streams instead of loading the full dataset into memory."
58
71
  ````