@kensaurus/skills 0.0.0-stage → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/.claude-plugin/marketplace.json +53 -0
  2. package/.claude-plugin/plugin.json +40 -0
  3. package/.cursor-plugin/plugin.json +38 -0
  4. package/.mcp.json +28 -0
  5. package/CHANGELOG.md +1761 -0
  6. package/LICENSE +21 -0
  7. package/NOTICE +13 -0
  8. package/README.md +820 -2
  9. package/SECURITY.md +55 -0
  10. package/agents/code-reviewer.md +60 -0
  11. package/agents/completion-judge.md +89 -0
  12. package/agents/db-migrator.md +125 -0
  13. package/agents/debugger.md +47 -0
  14. package/agents/deploy-checker.md +100 -0
  15. package/agents/perf-monitor.md +74 -0
  16. package/assets/favicon.png +0 -0
  17. package/assets/logo-light.png +0 -0
  18. package/assets/logo.png +0 -0
  19. package/assets/logo.svg +6 -0
  20. package/assets/og.png +0 -0
  21. package/bin/install.mjs +1127 -0
  22. package/bin/kenji.js +2 -0
  23. package/commands/adr.md +17 -0
  24. package/commands/aeo-plan.md +18 -0
  25. package/commands/arch-boundaries.md +17 -0
  26. package/commands/aso-plan.md +18 -0
  27. package/commands/auth-flows.md +19 -0
  28. package/commands/backup-plan.md +17 -0
  29. package/commands/burndown-full.md +25 -0
  30. package/commands/capacitor-plan.md +18 -0
  31. package/commands/codemod-safety.md +22 -0
  32. package/commands/commit.md +18 -0
  33. package/commands/complete-everything.md +40 -0
  34. package/commands/cost-plan.md +19 -0
  35. package/commands/deadcode-plan.md +26 -0
  36. package/commands/deadcode.md +32 -0
  37. package/commands/debug-issue.md +17 -0
  38. package/commands/deps-plan.md +18 -0
  39. package/commands/docs-plan.md +17 -0
  40. package/commands/doctrine.md +19 -0
  41. package/commands/error-plan.md +19 -0
  42. package/commands/feedback-to-closure.md +36 -0
  43. package/commands/fix-issue.md +76 -0
  44. package/commands/gate-logic.md +26 -0
  45. package/commands/green-repo.md +36 -0
  46. package/commands/grill-me.md +19 -0
  47. package/commands/gtm-plan.md +21 -0
  48. package/commands/gtm-weekly.md +17 -0
  49. package/commands/gtm.md +22 -0
  50. package/commands/handoff.md +15 -0
  51. package/commands/housekeep-backlog.md +18 -0
  52. package/commands/housekeep-files.md +22 -0
  53. package/commands/housekeep-gates.md +18 -0
  54. package/commands/instant-nav.md +11 -0
  55. package/commands/integrity-plan.md +19 -0
  56. package/commands/launch-kit.md +16 -0
  57. package/commands/mcp-guide.md +40 -0
  58. package/commands/mobile-plan.md +19 -0
  59. package/commands/native-rn-monorepo/README.md +78 -0
  60. package/commands/native-rn-monorepo/android-build.md +26 -0
  61. package/commands/native-rn-monorepo/android-install.md +32 -0
  62. package/commands/native-rn-monorepo/android-logcat.md +37 -0
  63. package/commands/native-rn-monorepo/ios-ci-logs.md +56 -0
  64. package/commands/native-rn-monorepo/ios-ci-status.md +52 -0
  65. package/commands/native-rn-monorepo/ios-ci-trigger.md +59 -0
  66. package/commands/native-rn-monorepo/rn-reset.md +50 -0
  67. package/commands/native-rn-monorepo/rn-ship-ios.md +67 -0
  68. package/commands/native-rn-monorepo/rn-verify.md +53 -0
  69. package/commands/perf-plan.md +18 -0
  70. package/commands/plan-mode.md +74 -0
  71. package/commands/pr.md +16 -0
  72. package/commands/pricing-plan.md +20 -0
  73. package/commands/privacy-plan.md +18 -0
  74. package/commands/readability.md +12 -0
  75. package/commands/readme.md +15 -0
  76. package/commands/refactor.md +15 -0
  77. package/commands/release-prep.md +17 -0
  78. package/commands/research.md +25 -0
  79. package/commands/responsive-audit.md +21 -0
  80. package/commands/review-code.md +18 -0
  81. package/commands/rls-plan.md +18 -0
  82. package/commands/secrets-plan.md +18 -0
  83. package/commands/security-plan.md +19 -0
  84. package/commands/ship-and-observe.md +36 -0
  85. package/commands/skill-conflicts.md +19 -0
  86. package/commands/slop-plan.md +18 -0
  87. package/commands/stub-plan.md +18 -0
  88. package/commands/test-mutation.md +16 -0
  89. package/commands/test-plan.md +17 -0
  90. package/commands/test.md +29 -0
  91. package/commands/thirdparty-web-interface-guidelines.md +185 -0
  92. package/commands/uiux-plan.md +18 -0
  93. package/commands/uiux.md +45 -0
  94. package/commands/update-deps.md +21 -0
  95. package/commands/validation-plan.md +19 -0
  96. package/commands-portable/fix-issue.md +72 -0
  97. package/commands-portable/plan-mode.md +92 -0
  98. package/commands-portable/research.md +91 -0
  99. package/docs/screenshots/README.md +5 -0
  100. package/docs/screenshots/audit-dark.png +0 -0
  101. package/docs/screenshots/build-dark.png +0 -0
  102. package/docs/screenshots/grill-dark.png +0 -0
  103. package/docs/screenshots/hero-dark.png +0 -0
  104. package/docs/screenshots/hero-light.png +0 -0
  105. package/docs/screenshots/ship-dark.png +0 -0
  106. package/docs/screenshots/src/showcase.html +320 -0
  107. package/hooks/completion-gate.mjs +258 -0
  108. package/hooks/cursor-hooks.json +13 -0
  109. package/hooks/hooks.json +15 -0
  110. package/install.sh +21 -0
  111. package/llms.txt +40 -0
  112. package/mcp/README.md +266 -0
  113. package/mcp/VERSIONS.md +41 -0
  114. package/mcp/mcp-full.json.template +124 -0
  115. package/mcp/mcp.json.template +29 -0
  116. package/mcp/pinned-versions.json +27 -0
  117. package/package.json +93 -4
  118. package/rules/approved-plan-execution.mdc +65 -0
  119. package/rules/full-stack-ship-discipline.mdc +37 -0
  120. package/rules/native-rn-monorepo/README.md +63 -0
  121. package/rules/native-rn-monorepo/_project.mdc +69 -0
  122. package/rules/native-rn-monorepo/native-android.mdc +72 -0
  123. package/rules/native-rn-monorepo/native-ios.mdc +61 -0
  124. package/rules/native-rn-monorepo/react-native-js.mdc +78 -0
  125. package/rules/native-rn-monorepo/web.mdc +60 -0
  126. package/rules/project-starter/components.mdc +54 -0
  127. package/rules/project-starter/data-fetching.mdc +77 -0
  128. package/rules/project-starter/git.mdc +41 -0
  129. package/rules/project-starter/supabase.mdc +37 -0
  130. package/rules/project-starter/tailwind.mdc +48 -0
  131. package/rules/project-starter/typescript.mdc +36 -0
  132. package/rules/project-starter/web-performance.mdc +42 -0
  133. package/rules/senior-engineer.mdc +30 -0
  134. package/rules/shell-first-search.mdc +19 -0
  135. package/rules/skill-workflows.mdc +35 -0
  136. package/rules/verification-before-completion.mdc +57 -0
  137. package/skills/audit-accessibility/SKILL.md +441 -0
  138. package/skills/audit-agent-speed/SKILL.md +181 -0
  139. package/skills/audit-agent-speed/scripts/stop-typecheck.mjs +151 -0
  140. package/skills/audit-analytics/SKILL.md +138 -0
  141. package/skills/audit-auth-flows/SKILL.md +267 -0
  142. package/skills/audit-backend-architecture/SKILL.md +266 -0
  143. package/skills/audit-backend-architecture/references/patterns.md +386 -0
  144. package/skills/audit-bundle-size/SKILL.md +296 -0
  145. package/skills/audit-cicd/SKILL.md +218 -0
  146. package/skills/audit-code-quality/SKILL.md +314 -0
  147. package/skills/audit-code-review/SKILL.md +289 -0
  148. package/skills/audit-codemod-safety/SKILL.md +159 -0
  149. package/skills/audit-db-schema/SKILL.md +465 -0
  150. package/skills/audit-db-schema/references/details.md +110 -0
  151. package/skills/audit-doctrine/SKILL.md +189 -0
  152. package/skills/audit-env-parity/SKILL.md +133 -0
  153. package/skills/audit-fe-api/SKILL.md +458 -0
  154. package/skills/audit-gate-logic/SKILL.md +219 -0
  155. package/skills/audit-i18n/SKILL.md +339 -0
  156. package/skills/audit-infra-cost/SKILL.md +142 -0
  157. package/skills/audit-langfuse-llm/SKILL.md +468 -0
  158. package/skills/audit-langfuse-llm/references/details.md +226 -0
  159. package/skills/audit-llm-security/SKILL.md +147 -0
  160. package/skills/audit-monetization-iap/SKILL.md +137 -0
  161. package/skills/audit-payment-system/SKILL.md +268 -0
  162. package/skills/audit-payment-system/references/checklist.md +283 -0
  163. package/skills/audit-performance/SKILL.md +383 -0
  164. package/skills/audit-performance/references/loading-priority-2026.md +81 -0
  165. package/skills/audit-realworld/SKILL.md +287 -0
  166. package/skills/audit-registry-listing/SKILL.md +122 -0
  167. package/skills/audit-resilience/SKILL.md +154 -0
  168. package/skills/audit-responsive/SKILL.md +221 -0
  169. package/skills/audit-responsive/references/checklist.md +166 -0
  170. package/skills/audit-security/SKILL.md +289 -0
  171. package/skills/audit-skill-conflicts/SKILL.md +178 -0
  172. package/skills/audit-ui-states/SKILL.md +146 -0
  173. package/skills/audit-uiux-design-system/SKILL.md +475 -0
  174. package/skills/audit-uiux-design-system/references/details.md +71 -0
  175. package/skills/audit-ux/SKILL.md +379 -0
  176. package/skills/audit-ux/references/details.md +245 -0
  177. package/skills/audit-ux-journeys/SKILL.md +215 -0
  178. package/skills/audit-ux-journeys/references/checklist.md +179 -0
  179. package/skills/backend-db-performance/SKILL.md +441 -0
  180. package/skills/backend-error-handling/SKILL.md +489 -0
  181. package/skills/backend-error-handling/references/details.md +58 -0
  182. package/skills/backend-observability/SKILL.md +88 -0
  183. package/skills/backend-patterns/SKILL.md +499 -0
  184. package/skills/backend-patterns/references/architecture-patterns.md +298 -0
  185. package/skills/backend-realtime/SKILL.md +403 -0
  186. package/skills/backend-realtime/references/patterns.md +74 -0
  187. package/skills/burndown-full/SKILL.md +174 -0
  188. package/skills/complete-everything/SKILL.md +295 -0
  189. package/skills/data-pipeline/SKILL.md +109 -0
  190. package/skills/data-visualization/SKILL.md +488 -0
  191. package/skills/debug-error/SKILL.md +322 -0
  192. package/skills/debug-fe-be-integration/SKILL.md +459 -0
  193. package/skills/debug-sentry-monitor/SKILL.md +497 -0
  194. package/skills/debug-sentry-monitor/references/details.md +165 -0
  195. package/skills/deploy-npm/SKILL.md +394 -0
  196. package/skills/deploy-npm/references/example-mushi-mushi.md +52 -0
  197. package/skills/deploy-verify/SKILL.md +489 -0
  198. package/skills/design-api/SKILL.md +379 -0
  199. package/skills/design-canvas/SKILL.md +155 -0
  200. package/skills/design-email/SKILL.md +370 -0
  201. package/skills/design-frontend/SKILL.md +143 -0
  202. package/skills/design-generative-art/SKILL.md +474 -0
  203. package/skills/design-mobile-first/SKILL.md +506 -0
  204. package/skills/design-motion/SKILL.md +333 -0
  205. package/skills/design-motion/references/delight-interactions.md +191 -0
  206. package/skills/design-prd/SKILL.md +443 -0
  207. package/skills/design-system/SKILL.md +457 -0
  208. package/skills/design-theme/SKILL.md +226 -0
  209. package/skills/design-theme/themes/tsumagoi-ranch.md +150 -0
  210. package/skills/docs-adr/SKILL.md +168 -0
  211. package/skills/docs-coauthor/SKILL.md +368 -0
  212. package/skills/docs-comparison-pages/SKILL.md +117 -0
  213. package/skills/docs-domain-modeling/SKILL.md +97 -0
  214. package/skills/docs-launch-kit/SKILL.md +139 -0
  215. package/skills/docs-writer/SKILL.md +469 -0
  216. package/skills/enhance-agent-guardrails/SKILL.md +164 -0
  217. package/skills/enhance-arch-boundaries/SKILL.md +154 -0
  218. package/skills/enhance-capacitor-ui/SKILL.md +463 -0
  219. package/skills/enhance-capacitor-ui/references/details.md +750 -0
  220. package/skills/enhance-email-deliverability/SKILL.md +143 -0
  221. package/skills/enhance-growth-loops/SKILL.md +122 -0
  222. package/skills/enhance-lifecycle-email/SKILL.md +130 -0
  223. package/skills/enhance-motion/SKILL.md +193 -0
  224. package/skills/enhance-onboarding/SKILL.md +148 -0
  225. package/skills/enhance-pwa/SKILL.md +304 -0
  226. package/skills/enhance-readability/SKILL.md +146 -0
  227. package/skills/enhance-readme/SKILL.md +496 -0
  228. package/skills/enhance-readme/package-lock.json +187 -0
  229. package/skills/enhance-readme/package.json +17 -0
  230. package/skills/enhance-readme/scripts/generate-readme-blocks.mjs +199 -0
  231. package/skills/enhance-readme/scripts/record-readme-tour.mjs +442 -0
  232. package/skills/enhance-skill-prompts/SKILL.md +167 -0
  233. package/skills/enhance-skill-prompts/references/exemplar-audit-auth-flows.md +311 -0
  234. package/skills/enhance-web-conversion/SKILL.md +155 -0
  235. package/skills/enhance-web-forms/SKILL.md +154 -0
  236. package/skills/enhance-web-instant-nav/SKILL.md +138 -0
  237. package/skills/enhance-web-instant-nav/references/bfcache-blockers.md +23 -0
  238. package/skills/enhance-web-instant-nav/references/early-hints.md +33 -0
  239. package/skills/enhance-web-instant-nav/references/speculation-rules.md +44 -0
  240. package/skills/enhance-web-landing/SKILL.md +459 -0
  241. package/skills/enhance-web-landing/references/details.md +773 -0
  242. package/skills/enhance-web-redesign/SKILL.md +228 -0
  243. package/skills/enhance-web-seo/SKILL.md +276 -0
  244. package/skills/enhance-web-ui/SKILL.md +473 -0
  245. package/skills/enhance-web-ui/references/details.md +674 -0
  246. package/skills/enhance-web-ux/HEURISTICS.md +242 -0
  247. package/skills/enhance-web-ux/PATTERNS.md +375 -0
  248. package/skills/enhance-web-ux/SKILL.md +464 -0
  249. package/skills/enhance-web-ux/examples.md +222 -0
  250. package/skills/enhance-web-ux/references/details.md +406 -0
  251. package/skills/enhance-web-web3d/SKILL.md +397 -0
  252. package/skills/enhance-web-web3d/references/css-canvas-effects.md +180 -0
  253. package/skills/handoff/SKILL.md +66 -0
  254. package/skills/housekeep-backlog/SKILL.md +149 -0
  255. package/skills/housekeep-dead-code/SKILL.md +387 -0
  256. package/skills/housekeep-dead-code/references/ratchet-ci.md +205 -0
  257. package/skills/housekeep-dead-code/references/supabase-hygiene.md +152 -0
  258. package/skills/housekeep-design/SKILL.md +207 -0
  259. package/skills/housekeep-files/SKILL.md +220 -0
  260. package/skills/housekeep-files/references/naming-and-catalog.md +86 -0
  261. package/skills/housekeep-files/scripts/housekeep-files.ps1 +360 -0
  262. package/skills/housekeep-files/scripts/housekeep-files.sh +238 -0
  263. package/skills/housekeep-gates/SKILL.md +174 -0
  264. package/skills/iterate-agent-harness/SKILL.md +137 -0
  265. package/skills/iterate-gtm-weekly/SKILL.md +103 -0
  266. package/skills/iterate-post-launch/SKILL.md +292 -0
  267. package/skills/meta-mcp-builder/SKILL.md +313 -0
  268. package/skills/meta-skill-creator/SKILL.md +304 -0
  269. package/skills/mobile-capacitor-platform/SKILL.md +104 -0
  270. package/skills/mobile-emulator-start/SKILL.md +296 -0
  271. package/skills/mobile-emulator-test/SKILL.md +491 -0
  272. package/skills/mobile-emulator-test/references/details.md +478 -0
  273. package/skills/mobile-rn-performance/SKILL.md +107 -0
  274. package/skills/mobile-rn-screen/SKILL.md +476 -0
  275. package/skills/mobile-rn-screen/references/details.md +785 -0
  276. package/skills/mushi-health/SKILL.md +206 -0
  277. package/skills/mushi-integration/SKILL.md +257 -0
  278. package/skills/plan-aeo-readiness/SKILL.md +166 -0
  279. package/skills/plan-antislop/SKILL.md +281 -0
  280. package/skills/plan-aso/SKILL.md +149 -0
  281. package/skills/plan-backup-dr/SKILL.md +131 -0
  282. package/skills/plan-capacitor-hardening/SKILL.md +217 -0
  283. package/skills/plan-data-integrity/SKILL.md +187 -0
  284. package/skills/plan-dead-code/SKILL.md +386 -0
  285. package/skills/plan-dead-code/references/knip-config.md +214 -0
  286. package/skills/plan-dead-code/references/output-templates.md +133 -0
  287. package/skills/plan-dead-code/references/preservation-contract.md +50 -0
  288. package/skills/plan-dead-code/references/residue-greps.md +84 -0
  289. package/skills/plan-dependency-provenance/SKILL.md +200 -0
  290. package/skills/plan-docs-sync/SKILL.md +143 -0
  291. package/skills/plan-docs-sync/references/drift-taxonomy.md +43 -0
  292. package/skills/plan-docs-sync/references/output-templates.md +33 -0
  293. package/skills/plan-docs-sync/references/preservation-contract.md +17 -0
  294. package/skills/plan-error-handling/SKILL.md +205 -0
  295. package/skills/plan-gtm/SKILL.md +276 -0
  296. package/skills/plan-gtm/references/benchmarks-2026.md +183 -0
  297. package/skills/plan-input-validation/SKILL.md +179 -0
  298. package/skills/plan-llm-cost-guardrails/SKILL.md +176 -0
  299. package/skills/plan-mobile-readiness/SKILL.md +171 -0
  300. package/skills/plan-perf-audit/SKILL.md +145 -0
  301. package/skills/plan-perf-audit/references/audit-scope.md +51 -0
  302. package/skills/plan-perf-audit/references/output-templates.md +33 -0
  303. package/skills/plan-perf-audit/references/preservation-contract.md +13 -0
  304. package/skills/plan-pricing/SKILL.md +173 -0
  305. package/skills/plan-privacy-compliance/SKILL.md +148 -0
  306. package/skills/plan-rls-audit/SKILL.md +231 -0
  307. package/skills/plan-secrets-audit/SKILL.md +181 -0
  308. package/skills/plan-security-audit/SKILL.md +168 -0
  309. package/skills/plan-security-audit/references/output-templates.md +36 -0
  310. package/skills/plan-security-audit/references/owasp-supabase-scope.md +55 -0
  311. package/skills/plan-security-audit/references/preservation-contract.md +18 -0
  312. package/skills/plan-stub-checker/SKILL.md +216 -0
  313. package/skills/plan-stub-checker/references/detection-methodology.md +75 -0
  314. package/skills/plan-stub-checker/references/detection-taxonomy.md +34 -0
  315. package/skills/plan-stub-checker/references/output-templates.md +63 -0
  316. package/skills/plan-stub-checker/references/preservation-contract.md +24 -0
  317. package/skills/plan-test-coverage/SKILL.md +170 -0
  318. package/skills/plan-test-coverage/references/methodology.md +54 -0
  319. package/skills/plan-test-coverage/references/output-templates.md +34 -0
  320. package/skills/plan-test-coverage/references/preservation-contract.md +15 -0
  321. package/skills/plan-uiux-unification/SKILL.md +230 -0
  322. package/skills/plan-uiux-unification/references/output-templates.md +67 -0
  323. package/skills/plan-uiux-unification/references/phase-workbook.md +85 -0
  324. package/skills/plan-uiux-unification/references/preservation-contract.md +24 -0
  325. package/skills/protocol-browser-anti-stall/SKILL.md +211 -0
  326. package/skills/protocol-browser-anti-stall/references/mcp-to-cli-map.md +113 -0
  327. package/skills/protocol-browser-anti-stall/references/playwright-session-coordination.md +170 -0
  328. package/skills/research/SKILL.md +422 -0
  329. package/skills/test-exploratory/SKILL.md +165 -0
  330. package/skills/test-exploratory/references/charter-template.md +29 -0
  331. package/skills/test-load/SKILL.md +126 -0
  332. package/skills/test-mutation/SKILL.md +160 -0
  333. package/skills/test-playwright/SKILL.md +354 -0
  334. package/skills/test-qa/SKILL.md +364 -0
  335. package/skills/test-qa/references/details.md +268 -0
  336. package/skills/test-red-team/SKILL.md +387 -0
  337. package/skills/test-red-team/references/owasp-attack-checklist.md +193 -0
  338. package/skills/test-unit/SKILL.md +259 -0
  339. package/skills/test-unit/references/details.md +267 -0
  340. package/skills/test-visual-regression/SKILL.md +132 -0
  341. package/skills/thirdparty-emil-design-eng/ATTRIBUTION.md +20 -0
  342. package/skills/thirdparty-emil-design-eng/SKILL.md +21 -0
  343. package/skills/thirdparty-emil-design-eng/references/emil-design-eng.md +676 -0
  344. package/skills/thirdparty-ui-ux-pro-max/ATTRIBUTION.md +22 -0
  345. package/skills/thirdparty-ui-ux-pro-max/SKILL.md +304 -0
  346. package/skills/thirdparty-ui-ux-pro-max/data/charts.csv +26 -0
  347. package/skills/thirdparty-ui-ux-pro-max/data/colors.csv +97 -0
  348. package/skills/thirdparty-ui-ux-pro-max/data/icons.csv +101 -0
  349. package/skills/thirdparty-ui-ux-pro-max/data/landing.csv +31 -0
  350. package/skills/thirdparty-ui-ux-pro-max/data/products.csv +97 -0
  351. package/skills/thirdparty-ui-ux-pro-max/data/react-performance.csv +45 -0
  352. package/skills/thirdparty-ui-ux-pro-max/data/stacks/astro.csv +54 -0
  353. package/skills/thirdparty-ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  354. package/skills/thirdparty-ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  355. package/skills/thirdparty-ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  356. package/skills/thirdparty-ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  357. package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  358. package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  359. package/skills/thirdparty-ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  360. package/skills/thirdparty-ui-ux-pro-max/data/stacks/react.csv +54 -0
  361. package/skills/thirdparty-ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  362. package/skills/thirdparty-ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  363. package/skills/thirdparty-ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  364. package/skills/thirdparty-ui-ux-pro-max/data/stacks/vue.csv +50 -0
  365. package/skills/thirdparty-ui-ux-pro-max/data/styles.csv +68 -0
  366. package/skills/thirdparty-ui-ux-pro-max/data/typography.csv +58 -0
  367. package/skills/thirdparty-ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  368. package/skills/thirdparty-ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  369. package/skills/thirdparty-ui-ux-pro-max/data/web-interface.csv +31 -0
  370. package/skills/thirdparty-ui-ux-pro-max/scripts/core.py +253 -0
  371. package/skills/thirdparty-ui-ux-pro-max/scripts/design_system.py +1067 -0
  372. package/skills/thirdparty-ui-ux-pro-max/scripts/search.py +114 -0
  373. package/skills/thirdparty-web-interface-guidelines/ATTRIBUTION.md +23 -0
  374. package/skills/thirdparty-web-interface-guidelines/SKILL.md +190 -0
  375. package/skills/workflow-build-feature/SKILL.md +118 -0
  376. package/skills/workflow-coding-discipline/SKILL.md +140 -0
  377. package/skills/workflow-environment-ready/SKILL.md +128 -0
  378. package/skills/workflow-feature-flag/SKILL.md +262 -0
  379. package/skills/workflow-feedback-to-closure/SKILL.md +165 -0
  380. package/skills/workflow-fix-and-ship/SKILL.md +136 -0
  381. package/skills/workflow-git-commit/SKILL.md +200 -0
  382. package/skills/workflow-green-repo/SKILL.md +166 -0
  383. package/skills/workflow-grilling/SKILL.md +73 -0
  384. package/skills/workflow-gtm/SKILL.md +153 -0
  385. package/skills/workflow-housekeep/SKILL.md +453 -0
  386. package/skills/workflow-housekeep/references/templates.md +109 -0
  387. package/skills/workflow-launch-ready/SKILL.md +145 -0
  388. package/skills/workflow-merge-conflicts/SKILL.md +62 -0
  389. package/skills/workflow-onboard/SKILL.md +99 -0
  390. package/skills/workflow-parallel-agents/SKILL.md +164 -0
  391. package/skills/workflow-pr/SKILL.md +197 -0
  392. package/skills/workflow-quality-gate/SKILL.md +147 -0
  393. package/skills/workflow-refactor/SKILL.md +274 -0
  394. package/skills/workflow-release-prep/SKILL.md +207 -0
  395. package/skills/workflow-ship-and-observe/SKILL.md +164 -0
  396. package/skills/workflow-spec-tdd/SKILL.md +141 -0
  397. package/skills/workflow-spec-tdd/references/spec-template.md +126 -0
  398. package/skills/workflow-spec-tdd/references/tdd-patterns.md +167 -0
  399. package/skills-cursor/babysit/SKILL.md +17 -0
  400. package/skills-cursor/canvas/SKILL.md +142 -0
  401. package/skills-cursor/canvas/sdk/canvas-tokens.d.ts +235 -0
  402. package/skills-cursor/canvas/sdk/chart-primitives.d.ts +200 -0
  403. package/skills-cursor/canvas/sdk/dag-layout.d.ts +102 -0
  404. package/skills-cursor/canvas/sdk/diff-view.d.ts +130 -0
  405. package/skills-cursor/canvas/sdk/form-primitives.d.ts +194 -0
  406. package/skills-cursor/canvas/sdk/hooks.d.ts +117 -0
  407. package/skills-cursor/canvas/sdk/index.d.ts +47 -0
  408. package/skills-cursor/canvas/sdk/theme.d.ts +61 -0
  409. package/skills-cursor/canvas/sdk/todo-list.d.ts +49 -0
  410. package/skills-cursor/canvas/sdk/ui-primitives.d.ts +549 -0
  411. package/skills-cursor/canvas/sdk/ui-primitives.test.d.ts +2 -0
  412. package/skills-cursor/create-hook/SKILL.md +238 -0
  413. package/skills-cursor/create-rule/SKILL.md +185 -0
  414. package/skills-cursor/create-skill/SKILL.md +269 -0
  415. package/skills-cursor/create-skill/references/authoring-guide.md +182 -0
  416. package/skills-cursor/create-subagent/SKILL.md +228 -0
  417. package/skills-cursor/migrate-to-skills/SKILL.md +121 -0
  418. package/skills-cursor/shell/SKILL.md +22 -0
  419. package/skills-cursor/split-to-prs/SKILL.md +47 -0
  420. package/skills-cursor/statusline/SKILL.md +193 -0
  421. package/skills-cursor/update-cli-config/SKILL.md +85 -0
  422. package/skills-cursor/update-cursor-settings/SKILL.md +137 -0
  423. package/skills.sh.json +296 -0
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: audit-codemod-safety
3
+ description: >
4
+ Read-only check that a codemod or bulk transform preserved behavior —
5
+ compiling is not proof. Use when "did this codemod break anything", "audit
6
+ this bulk refactor", or before merging a mass find-replace. SQL →
7
+ plan-data-integrity.
8
+ license: MIT
9
+ effort: high
10
+ ---
11
+
12
+ # audit-codemod-safety — Compiles and lints is not behaves the same
13
+
14
+ **Degree of freedom: MIXED** — Phases 0–2 `[HIGH freedom]`; Phase 3
15
+ high-risk hand-trace `[LOW freedom — run exactly]`. Do not re-run the
16
+ transform.
17
+
18
+ Read-only. A codemod's danger is scale plus plausibility: it touches hundreds
19
+ of files and each diff looks trivially correct, so review fatigue waves it
20
+ through. A mechanical transform proves **syntax, not semantics**.
21
+
22
+ Present findings. Do not re-run the transform or edit the diffs. Hand fixes
23
+ to a follow-up session.
24
+
25
+ ## This skill vs neighbors
26
+
27
+ | Skill | Owns |
28
+ |---|---|
29
+ | **audit-codemod-safety** (this) | Source-transform correctness at scale — behavior, completeness, consistency |
30
+ | `audit-code-review` | General PR / diff quality on a named change set |
31
+ | `plan-data-integrity` | Data / SQL / destructive migrations — not JS/TS source mods |
32
+ | `audit-code-quality` | Repo-wide anti-patterns, not one mechanical pass |
33
+ | `burndown-full` | Drive a leftover MATCH pattern to zero — this *audits* whether the pass was safe |
34
+ | `audit-gate-logic` | If size defeated review and syntax defeated linters, that is also a gate-logic finding |
35
+
36
+ ## How to reason
37
+
38
+ 1. **Observe** — quote the rule, the before/after AST or text, and a concrete diff hunk
39
+ 2. **Interpret** — does the swap change runtime meaning, or only spelling?
40
+ 3. **Classify** — silent behavior change / incomplete migration / consistent-as-is / needs-a-probe
41
+ 4. **Severity** — silent runtime change on a hot path = critical
42
+
43
+ ## Worked example
44
+
45
+ > **Observe:** codemod rewrote `value || fallback` → `value ?? fallback` in
46
+ > `pricing.ts`. Tests still pass.
47
+ > **Interpret:** `0` and `''` now keep the left side; price `0` no longer
48
+ > falls back. Syntax-clean; semantics changed.
49
+ > **Classify:** silent behavior change (truthiness vs nullish).
50
+ > **Severity:** critical if money path; else major.
51
+ > **Finding:** `pricing.ts:41` | `||`→`??` | critical | `0` no longer defaults
52
+
53
+ ---
54
+
55
+ ## Phase 0 — Characterize the transform [HIGH freedom]
56
+
57
+ Establish what was done and how:
58
+
59
+ - Tool: jscodeshift / ts-morph / ast-grep / comby / regex `sed` / AI bulk edit
60
+ - Rule in plain terms ("replace X API with Y", "rename Z", "new import path")
61
+ - Blast radius (files touched, LOC)
62
+ - AST-based (structure-aware) vs text/regex (no scope awareness — higher risk)
63
+
64
+ Get the diff **and** the codemod script if it exists. Auditing the *rule*
65
+ often finds the gap faster than reading 300 diffs.
66
+
67
+ ---
68
+
69
+ ## Phase 1 — Behavior-preservation [HIGH freedom]
70
+
71
+ **Semantic-equivalence traps** — syntactic swap, different runtime meaning:
72
+
73
+ - Operator / precedence shifts (replacement needed parens and did not get them)
74
+ - Truthiness vs nullish (`||` → `??` or reverse changes `0` / `''` / `false`)
75
+ - Async/await vs `.then` that drop error propagation or change ordering
76
+ - Reference vs value, mutate-in-place vs copy, shallow vs deep
77
+ - Import swaps with different defaults, side effects, or tree-shaking
78
+ - Type-only changes that alter *runtime* (`enum` → `const`, `interface` →
79
+ `type` where declaration merging mattered)
80
+
81
+ **Comment / string / dynamic false hits** (regex sweeps especially) — pattern
82
+ matched inside strings, comments, template literals, or dynamic property
83
+ access. Text mods cannot tell code from a string that looks like code.
84
+
85
+ **Formatting-masked logic** — a reformat (Prettier bump, quote style) bundled
86
+ into the same commit as the codemod, so a real behavior change hides inside
87
+ thousands of whitespace diffs. Flag if logic and formatting were not
88
+ separated.
89
+
90
+ ---
91
+
92
+ ## Phase 2 — Coverage and consistency [HIGH freedom]
93
+
94
+ **Missed cases** — matched the common shape, not the variants: alias,
95
+ re-export, dynamic import, HOC-wrapped, JSX vs call expression, tests,
96
+ `.vue` / `.svelte` / `.mdx` the parser never reached. Grep the *old*
97
+ pattern's semantic footprint — not just the exact string. Survivors mean a
98
+ half-done migration (two conventions live at once), which is worse than none.
99
+
100
+ **Inconsistent application** — same construct transformed one way here,
101
+ another way there (passes drifted, or the AI drifted). Cross-check
102
+ `audit-code-quality`.
103
+
104
+ **Generated / vendored / ignored** — touched generated code that will be
105
+ overwritten, or skipped files the runtime still loads because the ignore
106
+ list the codemod respected is not the runtime's.
107
+
108
+ **Orphans** — old helpers / imports / types the transform was supposed to
109
+ remove but left dangling; or new ones it referenced but never created.
110
+
111
+ ---
112
+
113
+ ## Phase 3 — Verify, don't trust [LOW freedom — hand-trace high-risk files]
114
+
115
+ - **Test behavior, not compilation.** Did tests exercise the transformed
116
+ paths, or do they pass because coverage there is thin? Cross-check
117
+ `plan-test-coverage`. A codemod over untested code is unverified — say so.
118
+ - **Pair with visual / behavioral diffing** where UI is involved
119
+ (`test-visual-regression`). Mechanical JSX / style mods are prime
120
+ silent-break territory.
121
+ - **Gate interaction.** Did this large mechanical change slip a real bug
122
+ past CI because its size defeated review and its syntax defeated the
123
+ linters? If so, that is also a finding for `audit-gate-logic`.
124
+ - **Spot-probe.** Trace the highest-risk transformed files (auth, money,
125
+ data mutation) by hand end-to-end. Scale review effort by blast radius,
126
+ not evenly.
127
+
128
+ ---
129
+
130
+ ## Definition of Done
131
+
132
+ - [ ] Transform characterized: tool, rule, blast radius, AST vs text
133
+ - [ ] Codemod script / rule reviewed where available
134
+ - [ ] Semantic-equivalence traps checked (precedence, truthiness, async, refs, import semantics, type-affecting-runtime)
135
+ - [ ] Regex / text mods checked for matches inside strings / comments / dynamic access
136
+ - [ ] Formatting confirmed separated from logic (or the coupling flagged)
137
+ - [ ] Old-pattern footprint grepped for survivors → migration completeness assessed
138
+ - [ ] Inconsistent application across the repo surfaced
139
+ - [ ] Generated / vendored / ignored file handling verified
140
+ - [ ] Orphaned / dangling symbols found
141
+ - [ ] Transformed paths confirmed actually tested; high-risk files hand-traced
142
+ - [ ] Gate-bypass interaction noted for `audit-gate-logic` if the mod hid a bug past CI
143
+ - [ ] Read-only — findings presented, code not edited
144
+
145
+ ## Self-critique before reporting [LOW freedom — do not skip]
146
+
147
+ 1. **Evidenced** — quoted hunk or surviving old-pattern grep, not "looks fine"
148
+ 2. **Semantics not syntax** — compiles/lints is not a pass
149
+ 3. **Severity justified** — critical = silent runtime change
150
+ 4. **Right owner** — CI waved it through → also `audit-gate-logic`
151
+ 5. **No re-run** — findings only; do not re-apply the transform
152
+
153
+ ## Output format
154
+
155
+ 1. **Transform summary** — tool | rule | files touched | AST or text | tests covering the paths?
156
+ 2. **Behavior-change findings** — file:line | trap type | severity (critical = silent runtime change) | why the diff looks fine but isn't
157
+ 3. **Coverage / consistency findings** — surviving old-pattern instances | inconsistent conversions | orphans
158
+ 4. **Verification log** — high-risk files traced | result; test-coverage verdict on transformed paths
159
+ 5. **Fix plan** — silent behavior changes first, then migration completeness, then consistency; handoffs to `test-visual-regression`, `plan-test-coverage`, `audit-gate-logic`, a fix session. Present and stop.
@@ -0,0 +1,465 @@
1
+ ---
2
+ name: audit-db-schema
3
+ description: >
4
+ Audit a database schema for consistency, constraints, naming, indexes, and
5
+ migrations. Use when reviewing schema design. Destructive-op gates →
6
+ plan-data-integrity. RLS → plan-rls-audit. Restore/RPO → plan-backup-dr.
7
+ license: MIT
8
+ effort: high
9
+ ---
10
+
11
+ # Database Schema Audit Skill
12
+
13
+ **Degree of freedom: MIXED** — Steps 0, 1, 3 `[HIGH freedom]`; Steps 2 and 4
14
+ MCP/SQL probes `[LOW freedom — run exactly]` (run the query; do not invent a schema).
15
+
16
+ ## How to reason
17
+
18
+ 1. **Observe** — quote the column, constraint, advisor row, or query result
19
+ 2. **Interpret** — what fails at write-time, read-time, or migrate-time?
20
+ 3. **Classify** — naming / type / constraint / index / RLS / migration / correct
21
+ 4. **Severity** — missing FK/RLS on public data = P0; type/index drift = P1; naming = P2
22
+
23
+ ## Worked example
24
+
25
+ > **Observe:** `orders.user_id` is nullable `text`, no FK, no index; `rowsecurity = false`.
26
+ > **Interpret:** orphan rows can insert; the client can SELECT every order; lookups seq-scan.
27
+ > **Classify:** constraint + index + RLS (not a naming nit).
28
+ > **Severity:** P0 — public table, no RLS, no FK.
29
+ > **Finding:** `orders` | RLS+FK | P0 | enable RLS + `user_id uuid references users(id)` + index.
30
+
31
+ ## Self-critique before reporting [LOW freedom — do not skip]
32
+
33
+ 1. **Evidenced** — query result or advisor URL, not "Postgres usually…"
34
+ 2. **Reproducible** — same SQL twice; do not cite a stale `list_tables`
35
+ 3. **Severity justified** — P0 = data loss, leak, or unconstrained money type
36
+ 4. **Right owner** — who-can-read-what → `plan-rls-audit`; DELETE/TRUNCATE → `plan-data-integrity`; RPO → `plan-backup-dr`
37
+ 5. **No migrations applied** — findings only
38
+
39
+ ---
40
+
41
+ ## Step 0: Auto-Detect Database Environment
42
+
43
+ ### 0a. Detect Database and ORM
44
+
45
+ | Signal | Technology |
46
+ |--------|-----------|
47
+ | `@supabase/supabase-js` in `package.json` | Supabase (Postgres) |
48
+ | `prisma` in devDependencies, `prisma/schema.prisma` | Prisma ORM |
49
+ | `drizzle-orm` in dependencies, `drizzle/` directory | Drizzle ORM |
50
+ | `sequelize` in dependencies | Sequelize ORM |
51
+ | `sqlalchemy` in requirements | SQLAlchemy (Python) |
52
+ | `supabase/migrations/*.sql` directory | Supabase migrations |
53
+ | `prisma/migrations/` directory | Prisma migrations |
54
+ | `drizzle/migrations/` or `drizzle/*.sql` | Drizzle migrations |
55
+
56
+ ### 0b. Find Supabase Project ID
57
+
58
+ Take `PROJECT_ID` from the host of `SUPABASE_URL` in `.env` / `.env.local`
59
+ (`https://<ref>.supabase.co`; the `project_id` in `supabase/config.toml` is a
60
+ local name, not the ref), and confirm it with
61
+ `supabase:get_project_url`. Call `supabase:list_projects` only when the MCP
62
+ server exposes it (started without a project ref). A project-scoped server,
63
+ which is how the pack configures it, does not, and its tools take no
64
+ `project_id`; on an unscoped server, add `"project_id": "<PROJECT_ID>"` to
65
+ each call below.
66
+
67
+ ### 0c. Detect Schema Source Files
68
+
69
+ ```
70
+ Glob: **/supabase/migrations/*.sql → Supabase SQL migrations
71
+ Glob: **/prisma/schema.prisma → Prisma schema
72
+ Glob: **/drizzle/schema.ts → Drizzle schema
73
+ Glob: **/src/db/schema.ts → Drizzle alt location
74
+ Glob: **/knexfile.* → Knex migrations
75
+ Glob: **/alembic/versions/*.py → SQLAlchemy migrations
76
+ ```
77
+
78
+ ### 0d. Record Discovery
79
+
80
+ ```
81
+ DATABASE ENVIRONMENT:
82
+ - Database: [Supabase Postgres / raw Postgres / MySQL / SQLite]
83
+ - ORM: [Prisma / Drizzle / Sequelize / none]
84
+ - Project ID: [Supabase project ID or N/A]
85
+ - Migration tool: [Supabase CLI / Prisma Migrate / Drizzle Kit / Knex]
86
+ - Schema files: [list paths]
87
+ - Migration count: [N]
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Step 1: Research Schema Best Practices
93
+
94
+ ### 1a. Context7 — ORM Documentation
95
+
96
+ If using Prisma:
97
+
98
+ ```json
99
+ context7:resolve-library-id
100
+ {
101
+ "libraryName": "prisma",
102
+ "query": "schema best practices indexes relations"
103
+ }
104
+ ```
105
+
106
+ ```json
107
+ context7:query-docs
108
+ {
109
+ "libraryId": "<RESOLVED_ID>",
110
+ "query": "schema best practices naming conventions indexes onDelete"
111
+ }
112
+ ```
113
+
114
+ If using Drizzle, resolve `drizzle-orm` instead.
115
+
116
+ ### 1b. Firecrawl — Current Database Patterns
117
+
118
+ ```json
119
+ firecrawl:firecrawl_search
120
+ {
121
+ "query": "PostgreSQL schema design best practices [current year]",
122
+ "limit": 5,
123
+ "sources": [{ "type": "web" }]
124
+ }
125
+ ```
126
+
127
+ Additional searches based on detected stack:
128
+
129
+ | Stack | Search Query |
130
+ |-------|-------------|
131
+ | Supabase | `Supabase RLS policies best practices performance [current year]` |
132
+ | Prisma | `Prisma schema design relations indexes best practices [current year]` |
133
+ | Drizzle | `Drizzle ORM schema patterns migrations [current year]` |
134
+ | General | `PostgreSQL indexing strategy production optimization` |
135
+
136
+ Scrape the most authoritative result:
137
+
138
+ ```json
139
+ firecrawl:firecrawl_scrape
140
+ {
141
+ "url": "<BEST_RESULT_URL>",
142
+ "formats": ["markdown"],
143
+ "onlyMainContent": true
144
+ }
145
+ ```
146
+
147
+ ### 1c. Supabase Docs Search
148
+
149
+ If Supabase:
150
+
151
+ ```json
152
+ supabase:search_docs
153
+ {
154
+ "graphql_query": "{ searchDocs(query: \"RLS policy performance best practices\", limit: 3) { nodes { title href content } } }"
155
+ }
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Step 2: Gather Full Schema
161
+
162
+ ### 2a. List All Tables (Supabase MCP)
163
+
164
+ ```json
165
+ supabase:list_tables
166
+ {
167
+ "schemas": ["public"],
168
+ "verbose": true
169
+ }
170
+ ```
171
+
172
+ ### 2b. Run Detailed Audit Queries
173
+
174
+ ```json
175
+ supabase:execute_sql
176
+ {
177
+ "query": "SELECT table_name, column_name, data_type, is_nullable, column_default FROM information_schema.columns WHERE table_schema = 'public' ORDER BY table_name, ordinal_position"
178
+ }
179
+ ```
180
+
181
+ ```json
182
+ supabase:execute_sql
183
+ {
184
+ "query": "SELECT tc.table_name, tc.constraint_name, tc.constraint_type, kcu.column_name, ccu.table_name AS foreign_table FROM information_schema.table_constraints tc JOIN information_schema.key_column_usage kcu ON tc.constraint_name = kcu.constraint_name LEFT JOIN information_schema.constraint_column_usage ccu ON tc.constraint_name = ccu.constraint_name WHERE tc.table_schema = 'public'"
185
+ }
186
+ ```
187
+
188
+ ### 2c. Gather Indexes
189
+
190
+ ```json
191
+ supabase:execute_sql
192
+ {
193
+ "query": "SELECT tablename, indexname, indexdef FROM pg_indexes WHERE schemaname = 'public' ORDER BY tablename"
194
+ }
195
+ ```
196
+
197
+ ### 2d. Gather RLS Status and Policies
198
+
199
+ ```json
200
+ supabase:execute_sql
201
+ {
202
+ "query": "SELECT tablename, rowsecurity FROM pg_tables WHERE schemaname = 'public' ORDER BY tablename"
203
+ }
204
+ ```
205
+
206
+ ```json
207
+ supabase:execute_sql
208
+ {
209
+ "query": "SELECT schemaname, tablename, policyname, permissive, roles, cmd, qual, with_check FROM pg_policies WHERE schemaname = 'public' ORDER BY tablename"
210
+ }
211
+ ```
212
+
213
+ ### 2e. Run Supabase Advisors
214
+
215
+ ```json
216
+ supabase:get_advisors
217
+ {
218
+ "type": "security"
219
+ }
220
+ ```
221
+
222
+ ```json
223
+ supabase:get_advisors
224
+ {
225
+ "type": "performance"
226
+ }
227
+ ```
228
+
229
+ Include remediation URLs from advisor results in the final report as clickable links.
230
+
231
+ ---
232
+
233
+ ## Step 3: Audit Categories
234
+
235
+ ### 3.1 Naming Conventions
236
+
237
+ | Rule | Standard | Check |
238
+ |------|----------|-------|
239
+ | Tables | `snake_case`, plural (`users`, `posts`) | No camelCase, no singular |
240
+ | Columns | `snake_case` (`created_at`, `user_id`) | No camelCase |
241
+ | Primary keys | `id` | Not `user_id` on own table |
242
+ | Foreign keys | `{referenced_table_singular}_id` (`user_id`) | Consistent pattern |
243
+ | Indexes | `idx_{table}_{column(s)}` | Descriptive names |
244
+ | Constraints | `{table}_{column}_{type}` (`users_email_unique`) | Descriptive names |
245
+ | Enums | `snake_case` type, `UPPER_CASE` values | Consistent casing |
246
+ | Boolean columns | `is_` or `has_` prefix (`is_active`, `has_access`) | Clear intent |
247
+
248
+ **Audit query:**
249
+
250
+ ```sql
251
+ SELECT table_name FROM information_schema.tables
252
+ WHERE table_schema = 'public'
253
+ AND (table_name ~ '[A-Z]' OR table_name !~ 's$');
254
+
255
+ SELECT table_name, column_name FROM information_schema.columns
256
+ WHERE table_schema = 'public' AND column_name ~ '[A-Z]';
257
+ ```
258
+
259
+ ### 3.2 Data Types
260
+
261
+ | Rule | Standard |
262
+ |------|----------|
263
+ | Primary keys | `uuid` with `gen_random_uuid()` or `cuid` |
264
+ | Timestamps | `timestamptz` (NOT `timestamp`) |
265
+ | Money | `numeric(12,2)` or `bigint` (cents) — not `float`/`real` (binary rounding loses cents) |
266
+ | Email | `text` with CHECK constraint or `citext` |
267
+ | Status/enum | Postgres `enum` type or `text` with CHECK |
268
+ | JSON | `jsonb` (NOT `json`) |
269
+ | Short strings | `text` preferred over `varchar(n)` in Postgres |
270
+ | Booleans | `boolean` with NOT NULL DEFAULT |
271
+ | IP addresses | `inet` type |
272
+ | Arrays | Native `text[]`, `integer[]` where appropriate |
273
+
274
+ **Audit queries:**
275
+
276
+ ```sql
277
+ SELECT table_name, column_name, data_type FROM information_schema.columns
278
+ WHERE table_schema = 'public' AND data_type = 'timestamp without time zone';
279
+
280
+ SELECT table_name, column_name, data_type FROM information_schema.columns
281
+ WHERE table_schema = 'public'
282
+ AND data_type IN ('real', 'double precision')
283
+ AND (column_name LIKE '%price%' OR column_name LIKE '%amount%'
284
+ OR column_name LIKE '%cost%' OR column_name LIKE '%balance%');
285
+
286
+ SELECT table_name, column_name FROM information_schema.columns
287
+ WHERE table_schema = 'public' AND data_type = 'json';
288
+ ```
289
+
290
+ ### 3.3 Required Columns and Timestamps
291
+
292
+ Every table MUST have:
293
+
294
+ | Column | Type | Default | Notes |
295
+ |--------|------|---------|-------|
296
+ | `id` | `uuid` | `gen_random_uuid()` | Primary key |
297
+ | `created_at` | `timestamptz` | `now()` | NOT NULL |
298
+ | `updated_at` | `timestamptz` | `now()` | NOT NULL, auto-trigger |
299
+
300
+ **Audit queries:**
301
+
302
+ ```sql
303
+ SELECT t.table_name,
304
+ EXISTS(SELECT 1 FROM information_schema.columns c WHERE c.table_name = t.table_name AND c.column_name = 'created_at') AS has_created_at,
305
+ EXISTS(SELECT 1 FROM information_schema.columns c WHERE c.table_name = t.table_name AND c.column_name = 'updated_at') AS has_updated_at
306
+ FROM information_schema.tables t
307
+ WHERE t.table_schema = 'public' AND t.table_type = 'BASE TABLE';
308
+
309
+ SELECT event_object_table, trigger_name FROM information_schema.triggers
310
+ WHERE trigger_schema = 'public' AND action_statement LIKE '%updated_at%';
311
+ ```
312
+
313
+ ### 3.4 Constraints and Validation
314
+
315
+ | Constraint | When Required |
316
+ |------------|--------------|
317
+ | `NOT NULL` | Every column unless explicitly optional |
318
+ | `UNIQUE` | Emails, slugs, external IDs, usernames |
319
+ | `CHECK` | Enums, ranges, formats, positive numbers |
320
+ | `DEFAULT` | Booleans, timestamps, status fields |
321
+ | `FOREIGN KEY` | Every relationship column |
322
+ | `ON DELETE` | CASCADE for owned data, SET NULL for optional refs, RESTRICT for critical |
323
+
324
+ **Audit queries:**
325
+
326
+ ```sql
327
+ SELECT table_name, column_name FROM information_schema.columns
328
+ WHERE table_schema = 'public' AND column_name LIKE '%_id'
329
+ AND is_nullable = 'YES' AND column_name != 'id';
330
+
331
+ SELECT c.table_name, c.column_name FROM information_schema.columns c
332
+ WHERE c.table_schema = 'public' AND c.column_name LIKE '%_id' AND c.column_name != 'id'
333
+ AND NOT EXISTS (
334
+ SELECT 1 FROM information_schema.key_column_usage kcu
335
+ JOIN information_schema.table_constraints tc ON kcu.constraint_name = tc.constraint_name
336
+ WHERE tc.constraint_type = 'FOREIGN KEY'
337
+ AND kcu.table_name = c.table_name AND kcu.column_name = c.column_name
338
+ );
339
+
340
+ SELECT table_name, column_name FROM information_schema.columns
341
+ WHERE table_schema = 'public' AND data_type = 'boolean' AND column_default IS NULL;
342
+ ```
343
+
344
+ ### 3.5 Indexes
345
+
346
+ | Rule | Standard |
347
+ |------|----------|
348
+ | Foreign keys | Index on EVERY FK column |
349
+ | Frequent queries | Index on WHERE/ORDER BY columns |
350
+ | Unique lookups | Unique index on email, slug, external_id |
351
+ | Composite | Order: equality first, then range, then sort |
352
+ | RLS columns | Index columns used in RLS policies |
353
+ | `created_at` | DESC index for chronological queries |
354
+ | Partial indexes | WHERE clause for subset queries |
355
+
356
+ **Audit query:**
357
+
358
+ ```sql
359
+ SELECT c.table_name, c.column_name FROM information_schema.columns c
360
+ WHERE c.table_schema = 'public' AND c.column_name LIKE '%_id' AND c.column_name != 'id'
361
+ AND NOT EXISTS (
362
+ SELECT 1 FROM pg_indexes i
363
+ WHERE i.schemaname = 'public' AND i.tablename = c.table_name
364
+ AND i.indexdef LIKE '%' || c.column_name || '%'
365
+ );
366
+
367
+ SELECT t.table_name, COUNT(i.indexname) as idx_count
368
+ FROM information_schema.tables t
369
+ LEFT JOIN pg_indexes i ON i.tablename = t.table_name AND i.schemaname = 'public'
370
+ WHERE t.table_schema = 'public' AND t.table_type = 'BASE TABLE'
371
+ GROUP BY t.table_name HAVING COUNT(i.indexname) <= 1;
372
+ ```
373
+
374
+ ### 3.6 Row Level Security (Supabase)
375
+
376
+ | Rule | Standard |
377
+ |------|----------|
378
+ | RLS enabled | every public table has RLS on — without it the anon key reads every row |
379
+ | SELECT policy | Exists for every table |
380
+ | INSERT policy | WITH CHECK on user ownership |
381
+ | UPDATE policy | USING + WITH CHECK on ownership |
382
+ | DELETE policy | USING on ownership |
383
+ | Service role | Bypasses RLS (never expose to client) |
384
+ | Performance | `(select auth.uid())` subquery pattern |
385
+ | Indexes | On columns used in policies |
386
+
387
+ **Audit queries:**
388
+
389
+ ```sql
390
+ SELECT tablename FROM pg_tables WHERE schemaname = 'public' AND rowsecurity = false;
391
+
392
+ SELECT t.tablename FROM pg_tables t
393
+ WHERE t.schemaname = 'public' AND t.rowsecurity = true
394
+ AND NOT EXISTS (
395
+ SELECT 1 FROM pg_policies p WHERE p.tablename = t.tablename AND p.schemaname = 'public'
396
+ );
397
+
398
+ SELECT tablename, policyname, qual FROM pg_policies
399
+ WHERE schemaname = 'public'
400
+ AND qual::text LIKE '%auth.uid()%'
401
+ AND qual::text NOT LIKE '%(select auth.uid())%';
402
+ ```
403
+
404
+ ### 3.7 Relationships and Normalization
405
+
406
+ | Rule | Standard |
407
+ |------|----------|
408
+ | 3NF minimum | No transitive dependencies |
409
+ | Junction tables | For many-to-many (`user_roles`, not JSON arrays) |
410
+ | No data duplication | Normalize repeated data into lookup tables |
411
+ | Cascade rules | Defined on every FK relationship |
412
+ | Self-referencing | Use with `parent_id` pattern when needed |
413
+ | Polymorphic | Avoid — use junction tables or STI instead |
414
+
415
+ ### 3.8 Migrations
416
+
417
+ | Rule | Standard |
418
+ |------|----------|
419
+ | Sequential numbering | Timestamps or `0001_`, `0002_` prefixes |
420
+ | Descriptive names | `0003_add_user_roles.sql` not `0003_update.sql` |
421
+ | Idempotent | `IF NOT EXISTS`, `IF EXISTS` guards |
422
+ | No data loss | Down migrations or rollback plan |
423
+ | Atomic | One logical change per migration |
424
+ | No breaking changes | Additive first, then backfill, then cleanup |
425
+
426
+ ### 3.9 Security
427
+
428
+ | Rule | Standard |
429
+ |------|----------|
430
+ | No plaintext secrets | Passwords hashed, tokens encrypted |
431
+ | PII protection | Sensitive columns identified and protected |
432
+ | Audit trail | `created_by`, `updated_by` on sensitive tables |
433
+ | Grants | Minimal privileges per role |
434
+ | Extensions | Only necessary extensions enabled |
435
+ | Search path | Explicit schema references |
436
+
437
+ **Audit query:**
438
+
439
+ ```sql
440
+ SELECT table_name, column_name FROM information_schema.columns
441
+ WHERE table_schema = 'public'
442
+ AND (column_name LIKE '%password%' OR column_name LIKE '%secret%'
443
+ OR column_name LIKE '%token%' OR column_name LIKE '%ssn%'
444
+ OR column_name LIKE '%credit_card%');
445
+
446
+ SELECT grantee, table_name, privilege_type FROM information_schema.table_privileges
447
+ WHERE table_schema = 'public' ORDER BY grantee, table_name;
448
+ ```
449
+
450
+ ---
451
+
452
+ ## Step 4: Full Schema Health Check (Single Query)
453
+
454
+ ```json
455
+ supabase:execute_sql
456
+ {
457
+ "query": "WITH table_info AS (SELECT t.table_name, EXISTS(SELECT 1 FROM information_schema.columns c WHERE c.table_name = t.table_name AND c.column_name = 'id') AS has_id, EXISTS(SELECT 1 FROM information_schema.columns c WHERE c.table_name = t.table_name AND c.column_name = 'created_at') AS has_created_at, EXISTS(SELECT 1 FROM information_schema.columns c WHERE c.table_name = t.table_name AND c.column_name = 'updated_at') AS has_updated_at, (SELECT rowsecurity FROM pg_tables pt WHERE pt.tablename = t.table_name AND pt.schemaname = 'public') AS rls_enabled, (SELECT COUNT(*) FROM pg_policies p WHERE p.tablename = t.table_name AND p.schemaname = 'public') AS policy_count, (SELECT COUNT(*) FROM pg_indexes i WHERE i.tablename = t.table_name AND i.schemaname = 'public') AS index_count FROM information_schema.tables t WHERE t.table_schema = 'public' AND t.table_type = 'BASE TABLE') SELECT table_name, CASE WHEN has_id THEN 'Y' ELSE 'N' END AS id, CASE WHEN has_created_at THEN 'Y' ELSE 'N' END AS created_at, CASE WHEN has_updated_at THEN 'Y' ELSE 'N' END AS updated_at, CASE WHEN rls_enabled THEN 'Y' ELSE 'N' END AS rls, policy_count AS policies, index_count AS indexes FROM table_info ORDER BY table_name"
458
+ }
459
+ ```
460
+
461
+ ---
462
+
463
+ ## Further reading
464
+
465
+ - [Step 5: Prisma Schema Audit and more](references/details.md)