@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,193 +1,66 @@
1
1
  ---
2
2
  name: web-perf
3
- description: Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (FCP, LCP, TBT, CLS, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed.
3
+ description: "Use for measuring and improving web performance with Core Web Vitals, rendering-path analysis, bundle and network prioritization, and framework-aware delivery tradeoffs."
4
+ license: MIT
5
+ metadata:
6
+ author: cubis-foundry
7
+ version: "3.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot
4
9
  ---
5
10
 
6
- # Web Performance Audit
11
+ # Web Perf
7
12
 
8
- Audit web page performance using Chrome DevTools MCP tools. This skill focuses on Core Web Vitals, network optimization, and high-level accessibility gaps.
13
+ ## Purpose
9
14
 
10
- ## FIRST: Verify MCP Tools Available
15
+ Use for measuring and improving web performance with Core Web Vitals, rendering-path analysis, bundle and network prioritization, and framework-aware delivery tradeoffs.
11
16
 
12
- **Run this before starting.** Try calling `navigate_page` or `performance_start_trace`. If unavailable, STOP—the chrome-devtools MCP server isn't configured.
17
+ ## When to Use
13
18
 
14
- Ask the user to add this to their MCP config:
19
+ - Auditing or improving Core Web Vitals and page-load behavior.
20
+ - Investigating slow rendering, hydration cost, bundle growth, or network waterfalls.
21
+ - Prioritizing frontend performance work by measured impact.
22
+ - Reviewing whether framework choices are helping or hurting delivery performance.
15
23
 
16
- ```json
17
- "chrome-devtools": {
18
- "type": "local",
19
- "command": ["npx", "-y", "chrome-devtools-mcp@latest"]
20
- }
21
- ```
24
+ ## Instructions
22
25
 
23
- ## Key Guidelines
26
+ 1. Measure first and identify the user-visible bottleneck.
27
+ 2. Separate document, network, bundle, render, and interaction causes.
28
+ 3. Fix the highest-impact path before touching low-value micro-optimizations.
29
+ 4. Verify the tradeoff does not regress accessibility, caching, or maintainability.
30
+ 5. Re-measure and report impact in concrete terms.
24
31
 
25
- - **Be assertive**: Verify claims by checking network requests, DOM, or codebase—then state findings definitively.
26
- - **Verify before recommending**: Confirm something is unused before suggesting removal.
27
- - **Quantify impact**: Use estimated savings from insights. Don't prioritize changes with 0ms impact.
28
- - **Skip non-issues**: If render-blocking resources have 0ms estimated impact, note but don't recommend action.
29
- - **Be specific**: Say "compress hero.png (450KB) to WebP" not "optimize images".
30
- - **Prioritize ruthlessly**: A site with 200ms LCP and 0 CLS is already excellent—say so.
32
+ ### Baseline standards
31
33
 
32
- ## Quick Reference
34
+ - Prioritize LCP, INP, and CLS with real bottleneck evidence.
35
+ - Keep critical resources discoverable and cacheable.
36
+ - Reduce hydration and JavaScript cost when server rendering can do the work.
37
+ - Treat bundle size, network order, and rendering behavior as one system.
38
+ - Prefer targeted fixes over generic “optimize everything” advice.
33
39
 
34
- | Task | Tool Call |
35
- |------|-----------|
36
- | Load page | `navigate_page(url: "...")` |
37
- | Start trace | `performance_start_trace(autoStop: true, reload: true)` |
38
- | Analyze insight | `performance_analyze_insight(insightSetId: "...", insightName: "...")` |
39
- | List requests | `list_network_requests(resourceTypes: ["Script", "Stylesheet", ...])` |
40
- | Request details | `get_network_request(reqid: <id>)` |
41
- | A11y snapshot | `take_snapshot(verbose: true)` |
40
+ ### Constraints
42
41
 
43
- ## Workflow
42
+ - Avoid recommending changes with no measured impact.
43
+ - Avoid fixating on bundle size while ignoring render path or network ordering.
44
+ - Avoid using performance tooling output without codebase context.
45
+ - Avoid trading correctness or accessibility for tiny synthetic wins.
44
46
 
45
- Copy this checklist to track progress:
46
-
47
- ```
48
- Audit Progress:
49
- - [ ] Phase 1: Performance trace (navigate + record)
50
- - [ ] Phase 2: Core Web Vitals analysis (includes CLS culprits)
51
- - [ ] Phase 3: Network analysis
52
- - [ ] Phase 4: Accessibility snapshot
53
- - [ ] Phase 5: Codebase analysis (skip if third-party site)
54
- ```
55
-
56
- ### Phase 1: Performance Trace
57
-
58
- 1. Navigate to the target URL:
59
- ```
60
- navigate_page(url: "<target-url>")
61
- ```
62
-
63
- 2. Start a performance trace with reload to capture cold-load metrics:
64
- ```
65
- performance_start_trace(autoStop: true, reload: true)
66
- ```
67
-
68
- 3. Wait for trace completion, then retrieve results.
69
-
70
- **Troubleshooting:**
71
- - If trace returns empty or fails, verify the page loaded correctly with `navigate_page` first
72
- - If insight names don't match, inspect the trace response to list available insights
73
-
74
- ### Phase 2: Core Web Vitals Analysis
75
-
76
- Use `performance_analyze_insight` to extract key metrics.
77
-
78
- **Note:** Insight names may vary across Chrome DevTools versions. If an insight name doesn't work, check the `insightSetId` from the trace response to discover available insights.
79
-
80
- Common insight names:
81
-
82
- | Metric | Insight Name | What to Look For |
83
- |--------|--------------|------------------|
84
- | LCP | `LCPBreakdown` | Time to largest contentful paint; breakdown of TTFB, resource load, render delay |
85
- | CLS | `CLSCulprits` | Elements causing layout shifts (images without dimensions, injected content, font swaps) |
86
- | Render Blocking | `RenderBlocking` | CSS/JS blocking first paint |
87
- | Document Latency | `DocumentLatency` | Server response time issues |
88
- | Network Dependencies | `NetworkRequestsDepGraph` | Request chains delaying critical resources |
89
-
90
- Example:
91
- ```
92
- performance_analyze_insight(insightSetId: "<id-from-trace>", insightName: "LCPBreakdown")
93
- ```
94
-
95
- **Key thresholds (good/needs-improvement/poor):**
96
- - TTFB: < 800ms / < 1.8s / > 1.8s
97
- - FCP: < 1.8s / < 3s / > 3s
98
- - LCP: < 2.5s / < 4s / > 4s
99
- - INP: < 200ms / < 500ms / > 500ms
100
- - TBT: < 200ms / < 600ms / > 600ms
101
- - CLS: < 0.1 / < 0.25 / > 0.25
102
- - Speed Index: < 3.4s / < 5.8s / > 5.8s
103
-
104
- ### Phase 3: Network Analysis
105
-
106
- List all network requests to identify optimization opportunities:
107
- ```
108
- list_network_requests(resourceTypes: ["Script", "Stylesheet", "Document", "Font", "Image"])
109
- ```
110
-
111
- **Look for:**
112
-
113
- 1. **Render-blocking resources**: JS/CSS in `<head>` without `async`/`defer`/`media` attributes
114
- 2. **Network chains**: Resources discovered late because they depend on other resources loading first (e.g., CSS imports, JS-loaded fonts)
115
- 3. **Missing preloads**: Critical resources (fonts, hero images, key scripts) not preloaded
116
- 4. **Caching issues**: Missing or weak `Cache-Control`, `ETag`, or `Last-Modified` headers
117
- 5. **Large payloads**: Uncompressed or oversized JS/CSS bundles
118
- 6. **Unused preconnects**: If flagged, verify by checking if ANY requests went to that origin. If zero requests, it's definitively unused—recommend removal. If requests exist but loaded late, the preconnect may still be valuable.
119
-
120
- For detailed request info:
121
- ```
122
- get_network_request(reqid: <id>)
123
- ```
124
-
125
- ### Phase 4: Accessibility Snapshot
126
-
127
- Take an accessibility tree snapshot:
128
- ```
129
- take_snapshot(verbose: true)
130
- ```
131
-
132
- **Flag high-level gaps:**
133
- - Missing or duplicate ARIA IDs
134
- - Elements with poor contrast ratios (check against WCAG AA: 4.5:1 for normal text, 3:1 for large text)
135
- - Focus traps or missing focus indicators
136
- - Interactive elements without accessible names
137
-
138
- ## Phase 5: Codebase Analysis
139
-
140
- **Skip if auditing a third-party site without codebase access.**
141
-
142
- Analyze the codebase to understand where improvements can be made.
143
-
144
- ### Detect Framework & Bundler
145
-
146
- Search for configuration files to identify the stack:
147
-
148
- | Tool | Config Files |
149
- |------|--------------|
150
- | Webpack | `webpack.config.js`, `webpack.*.js` |
151
- | Vite | `vite.config.js`, `vite.config.ts` |
152
- | Rollup | `rollup.config.js`, `rollup.config.mjs` |
153
- | esbuild | `esbuild.config.js`, build scripts with `esbuild` |
154
- | Parcel | `.parcelrc`, `package.json` (parcel field) |
155
- | Next.js | `next.config.js`, `next.config.mjs` |
156
- | Nuxt | `nuxt.config.js`, `nuxt.config.ts` |
157
- | SvelteKit | `svelte.config.js` |
158
- | Astro | `astro.config.mjs` |
159
-
160
- Also check `package.json` for framework dependencies and build scripts.
161
-
162
- ### Tree-Shaking & Dead Code
163
-
164
- - **Webpack**: Check for `mode: 'production'`, `sideEffects` in package.json, `usedExports` optimization
165
- - **Vite/Rollup**: Tree-shaking enabled by default; check for `treeshake` options
166
- - **Look for**: Barrel files (`index.js` re-exports), large utility libraries imported wholesale (lodash, moment)
167
-
168
- ### Unused JS/CSS
47
+ ## Output Format
169
48
 
170
- - Check for CSS-in-JS vs. static CSS extraction
171
- - Look for PurgeCSS/UnCSS configuration (Tailwind's `content` config)
172
- - Identify dynamic imports vs. eager loading
49
+ Provide implementation guidance, code examples, and configuration as appropriate to the task.
173
50
 
174
- ### Polyfills
51
+ ## References
175
52
 
176
- - Check for `@babel/preset-env` targets and `useBuiltIns` setting
177
- - Look for `core-js` imports (often oversized)
178
- - Check `browserslist` config for overly broad targeting
53
+ Load on demand. Do not preload all reference files.
179
54
 
180
- ### Compression & Minification
55
+ | File | Load when |
56
+ | --- | --- |
57
+ | `references/core-web-vitals-triage.md` | You need a stronger playbook for CWV bottleneck isolation, bundle/network/render tradeoffs, and verification after a fix. |
181
58
 
182
- - Check for `terser`, `esbuild`, or `swc` minification
183
- - Look for gzip/brotli compression in build output or server config
184
- - Check for source maps in production builds (should be external or disabled)
59
+ ## Scripts
185
60
 
186
- ## Output Format
61
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
187
62
 
188
- Present findings as:
63
+ ## Examples
189
64
 
190
- 1. **Core Web Vitals Summary** - Table with metric, value, and rating (good/needs-improvement/poor)
191
- 2. **Top Issues** - Prioritized list of problems with estimated impact (high/medium/low)
192
- 3. **Recommendations** - Specific, actionable fixes with code snippets or config changes
193
- 4. **Codebase Findings** - Framework/bundler detected, optimization opportunities (omit if no codebase access)
65
+ - "Help me with web perf best practices in this project"
66
+ - "Review my web perf implementation for issues"
@@ -2,189 +2,68 @@
2
2
  ---
3
3
  inclusion: manual
4
4
  name: webapp-testing
5
- description: Web application testing principles. E2E, Playwright, deep audit strategies.
6
- allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
+ description: "Use when choosing test depth for a web product, balancing unit, integration, browser, accessibility, and contract checks, or reviewing whether a change has the right verification shape before release."
6
+ license: MIT
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "1.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
7
11
  ---
8
12
 
9
- # Web App Testing
13
+ # Webapp Testing
10
14
 
11
- > Discover and test everything. Leave no route untested.
15
+ ## Purpose
12
16
 
13
- ## 🔧 Runtime Scripts
17
+ Use when choosing test depth for a web product, balancing unit, integration, browser, accessibility, and contract checks, or reviewing whether a change has the right verification shape before release.
14
18
 
15
- **Execute these for automated browser testing:**
19
+ ## When to Use
16
20
 
17
- | Script | Purpose | Usage |
18
- |--------|---------|-------|
19
- | `scripts/playwright_runner.py` | Basic browser test | `python scripts/playwright_runner.py https://example.com` |
20
- | | With screenshot | `python scripts/playwright_runner.py <url> --screenshot` |
21
- | | Accessibility check | `python scripts/playwright_runner.py <url> --a11y` |
21
+ - Planning verification depth for a web feature, refactor, bug fix, or release candidate.
22
+ - Choosing what belongs in unit, component, integration, contract, or browser coverage.
23
+ - Reviewing gaps in coverage, flaky suites, or low-signal tests.
24
+ - Auditing whether a frontend or API change has enough evidence to merge safely.
22
25
 
23
- **Requires:** `pip install playwright && playwright install chromium`
26
+ ## Instructions
24
27
 
25
- ---
26
-
27
- ## 1. Deep Audit Approach
28
-
29
- ### Discovery First
30
-
31
- | Target | How to Find |
32
- |--------|-------------|
33
- | Routes | Scan app/, pages/, router files |
34
- | API endpoints | Grep for HTTP methods |
35
- | Components | Find component directories |
36
- | Features | Read documentation |
37
-
38
- ### Systematic Testing
39
-
40
- 1. **Map** - List all routes/APIs
41
- 2. **Scan** - Verify they respond
42
- 3. **Test** - Cover critical paths
43
-
44
- ---
45
-
46
- ## 2. Testing Pyramid for Web
47
-
48
- ```
49
- /\ E2E (Few)
50
- / \ Critical user flows
51
- /----\
52
- / \ Integration (Some)
53
- /--------\ API, data flow
54
- / \
55
- /------------\ Component (Many)
56
- Individual UI pieces
57
- ```
58
-
59
- ---
60
-
61
- ## 3. E2E Test Principles
62
-
63
- ### What to Test
64
-
65
- | Priority | Tests |
66
- |----------|-------|
67
- | 1 | Happy path user flows |
68
- | 2 | Authentication flows |
69
- | 3 | Critical business actions |
70
- | 4 | Error handling |
71
-
72
- ### E2E Best Practices
73
-
74
- | Practice | Why |
75
- |----------|-----|
76
- | Use data-testid | Stable selectors |
77
- | Wait for elements | Avoid flaky tests |
78
- | Clean state | Independent tests |
79
- | Avoid implementation details | Test user behavior |
80
-
81
- ---
82
-
83
- ## 4. Playwright Principles
84
-
85
- ### Core Concepts
86
-
87
- | Concept | Use |
88
- |---------|-----|
89
- | Page Object Model | Encapsulate page logic |
90
- | Fixtures | Reusable test setup |
91
- | Assertions | Built-in auto-wait |
92
- | Trace Viewer | Debug failures |
28
+ 1. Map the change surface to business risk, user-visible impact, and regression blast radius.
29
+ 2. Put the cheapest reliable check at the lowest layer that can prove the behavior.
30
+ 3. Add browser coverage only for flows that need cross-layer confidence.
31
+ 4. Pair coverage with deterministic fixtures, contract clarity, and failure evidence.
32
+ 5. Call out what remains manual, unverified, or risky instead of hiding gaps behind suite size.
93
33
 
94
- ### Configuration
34
+ ### Baseline standards
95
35
 
96
- | Setting | Recommendation |
97
- |---------|----------------|
98
- | Retries | 2 on CI |
99
- | Trace | on-first-retry |
100
- | Screenshots | on-failure |
101
- | Video | retain-on-failure |
36
+ - Test behavior users or dependent systems care about, not implementation trivia.
37
+ - Keep component and integration checks faster and more numerous than browser tests.
38
+ - Include accessibility and error-state coverage in critical paths, not only happy paths.
39
+ - Prefer contract or integration checks for API correctness before adding UI duplication.
40
+ - Treat flaky tests as defects in the product, test, or environment, not a permanent condition.
102
41
 
103
- ---
104
-
105
- ## 5. Visual Testing
106
-
107
- ### When to Use
108
-
109
- | Scenario | Value |
110
- |----------|-------|
111
- | Design system | High |
112
- | Marketing pages | High |
113
- | Component library | Medium |
114
- | Dynamic content | Lower |
115
-
116
- ### Strategy
117
-
118
- - Baseline screenshots
119
- - Compare on changes
120
- - Review visual diffs
121
- - Update intentional changes
122
-
123
- ---
124
-
125
- ## 6. API Testing Principles
126
-
127
- ### Coverage Areas
128
-
129
- | Area | Tests |
130
- |------|-------|
131
- | Status codes | 200, 400, 404, 500 |
132
- | Response shape | Matches schema |
133
- | Error messages | User-friendly |
134
- | Edge cases | Empty, large, special chars |
42
+ ### Constraints
135
43
 
136
- ---
137
-
138
- ## 7. Test Organization
139
-
140
- ### File Structure
44
+ - Avoid one-size-fits-all coverage targets with no risk model.
45
+ - Avoid using browser tests to compensate for missing contract or unit design.
46
+ - Avoid counting snapshots or shallow assertions as evidence of behavior correctness.
47
+ - Avoid treating manual QA as a substitute for repeatable regression protection on critical paths.
141
48
 
142
- ```
143
- tests/
144
- ├── e2e/ # Full user flows
145
- ├── integration/ # API, data
146
- ├── component/ # UI units
147
- └── fixtures/ # Shared data
148
- ```
49
+ ## Output Format
149
50
 
150
- ### Naming Convention
151
-
152
- | Pattern | Example |
153
- |---------|---------|
154
- | Feature-based | `login.spec.ts` |
155
- | Descriptive | `user-can-checkout.spec.ts` |
156
-
157
- ---
51
+ Provide implementation guidance, code examples, and configuration as appropriate to the task.
158
52
 
159
- ## 8. CI Integration
53
+ ## References
160
54
 
161
- ### Pipeline Steps
55
+ Load on demand. Do not preload all reference files.
162
56
 
163
- 1. Install dependencies
164
- 2. Install browsers
165
- 3. Run tests
166
- 4. Upload artifacts (traces, screenshots)
57
+ | File | Load when |
58
+ | --- | --- |
59
+ | `references/browser-api-state-checklist.md` | You need a deeper playbook for test-layer selection, accessibility coverage, API-vs-UI duplication, flaky-suite triage, or release gating for web apps. |
167
60
 
168
- ### Parallelization
61
+ ## Scripts
169
62
 
170
- | Strategy | Use |
171
- |----------|-----|
172
- | Per file | Playwright default |
173
- | Sharding | Large suites |
174
- | Workers | Multiple browsers |
63
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
175
64
 
176
- ---
177
-
178
- ## 9. Anti-Patterns
179
-
180
- | ❌ Don't | ✅ Do |
181
- |----------|-------|
182
- | Test implementation | Test behavior |
183
- | Hardcode waits | Use auto-wait |
184
- | Skip cleanup | Isolate tests |
185
- | Ignore flaky tests | Fix root cause |
186
-
187
- ---
65
+ ## Examples
188
66
 
189
- > **Remember:** E2E tests are expensive. Use them for critical paths only.
67
+ - "Help me with webapp testing best practices in this project"
68
+ - "Review my webapp testing implementation for issues"
190
69
  ````