@kensaurus/skills 0.0.0-stage → 2.1.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 (425) 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 +1790 -0
  6. package/LICENSE +21 -0
  7. package/LICENSE-APACHE +62 -0
  8. package/NOTICE +13 -0
  9. package/README.md +821 -2
  10. package/SECURITY.md +55 -0
  11. package/agents/code-reviewer.md +60 -0
  12. package/agents/completion-judge.md +89 -0
  13. package/agents/db-migrator.md +125 -0
  14. package/agents/debugger.md +47 -0
  15. package/agents/deploy-checker.md +100 -0
  16. package/agents/perf-monitor.md +74 -0
  17. package/assets/favicon.png +0 -0
  18. package/assets/logo-light.png +0 -0
  19. package/assets/logo.png +0 -0
  20. package/assets/logo.svg +6 -0
  21. package/assets/og.png +0 -0
  22. package/bin/install.mjs +1127 -0
  23. package/bin/kenji.js +2 -0
  24. package/commands/adr.md +17 -0
  25. package/commands/aeo-plan.md +18 -0
  26. package/commands/arch-boundaries.md +17 -0
  27. package/commands/aso-plan.md +18 -0
  28. package/commands/auth-flows.md +19 -0
  29. package/commands/backup-plan.md +17 -0
  30. package/commands/burndown-full.md +25 -0
  31. package/commands/capacitor-plan.md +18 -0
  32. package/commands/codemod-safety.md +22 -0
  33. package/commands/commit.md +18 -0
  34. package/commands/complete-everything.md +40 -0
  35. package/commands/cost-plan.md +19 -0
  36. package/commands/deadcode-plan.md +26 -0
  37. package/commands/deadcode.md +32 -0
  38. package/commands/debug-issue.md +17 -0
  39. package/commands/deps-plan.md +18 -0
  40. package/commands/docs-plan.md +17 -0
  41. package/commands/doctrine.md +19 -0
  42. package/commands/error-plan.md +19 -0
  43. package/commands/feedback-to-closure.md +36 -0
  44. package/commands/fix-issue.md +76 -0
  45. package/commands/gate-logic.md +26 -0
  46. package/commands/green-repo.md +36 -0
  47. package/commands/grill-me.md +19 -0
  48. package/commands/gtm-plan.md +21 -0
  49. package/commands/gtm-weekly.md +17 -0
  50. package/commands/gtm.md +22 -0
  51. package/commands/handoff.md +15 -0
  52. package/commands/housekeep-backlog.md +18 -0
  53. package/commands/housekeep-files.md +22 -0
  54. package/commands/housekeep-gates.md +18 -0
  55. package/commands/instant-nav.md +11 -0
  56. package/commands/integrity-plan.md +19 -0
  57. package/commands/launch-kit.md +16 -0
  58. package/commands/mcp-guide.md +40 -0
  59. package/commands/mobile-plan.md +19 -0
  60. package/commands/native-rn-monorepo/README.md +78 -0
  61. package/commands/native-rn-monorepo/android-build.md +26 -0
  62. package/commands/native-rn-monorepo/android-install.md +32 -0
  63. package/commands/native-rn-monorepo/android-logcat.md +37 -0
  64. package/commands/native-rn-monorepo/ios-ci-logs.md +56 -0
  65. package/commands/native-rn-monorepo/ios-ci-status.md +52 -0
  66. package/commands/native-rn-monorepo/ios-ci-trigger.md +59 -0
  67. package/commands/native-rn-monorepo/rn-reset.md +50 -0
  68. package/commands/native-rn-monorepo/rn-ship-ios.md +67 -0
  69. package/commands/native-rn-monorepo/rn-verify.md +53 -0
  70. package/commands/perf-plan.md +18 -0
  71. package/commands/plan-mode.md +74 -0
  72. package/commands/pr.md +16 -0
  73. package/commands/pricing-plan.md +20 -0
  74. package/commands/privacy-plan.md +18 -0
  75. package/commands/readability.md +12 -0
  76. package/commands/readme.md +15 -0
  77. package/commands/refactor.md +15 -0
  78. package/commands/release-prep.md +17 -0
  79. package/commands/research.md +25 -0
  80. package/commands/responsive-audit.md +21 -0
  81. package/commands/review-code.md +18 -0
  82. package/commands/rls-plan.md +18 -0
  83. package/commands/secrets-plan.md +18 -0
  84. package/commands/security-plan.md +19 -0
  85. package/commands/ship-and-observe.md +36 -0
  86. package/commands/skill-conflicts.md +19 -0
  87. package/commands/slop-plan.md +18 -0
  88. package/commands/stub-plan.md +18 -0
  89. package/commands/test-mutation.md +16 -0
  90. package/commands/test-plan.md +17 -0
  91. package/commands/test.md +29 -0
  92. package/commands/thirdparty-web-interface-guidelines.md +185 -0
  93. package/commands/uiux-plan.md +18 -0
  94. package/commands/uiux.md +45 -0
  95. package/commands/update-deps.md +21 -0
  96. package/commands/validation-plan.md +19 -0
  97. package/commands-portable/fix-issue.md +72 -0
  98. package/commands-portable/plan-mode.md +92 -0
  99. package/commands-portable/research.md +91 -0
  100. package/docs/screenshots/README.md +5 -0
  101. package/docs/screenshots/audit-dark.png +0 -0
  102. package/docs/screenshots/build-dark.png +0 -0
  103. package/docs/screenshots/grill-dark.png +0 -0
  104. package/docs/screenshots/hero-dark.png +0 -0
  105. package/docs/screenshots/hero-light.png +0 -0
  106. package/docs/screenshots/ship-dark.png +0 -0
  107. package/docs/screenshots/src/showcase.html +320 -0
  108. package/hooks/completion-gate.mjs +258 -0
  109. package/hooks/cursor-hooks.json +13 -0
  110. package/hooks/hooks.json +15 -0
  111. package/install.sh +21 -0
  112. package/llms.txt +40 -0
  113. package/mcp/README.md +266 -0
  114. package/mcp/VERSIONS.md +41 -0
  115. package/mcp/mcp-full.json.template +124 -0
  116. package/mcp/mcp.json.template +29 -0
  117. package/mcp/pinned-versions.json +27 -0
  118. package/package.json +94 -4
  119. package/rules/approved-plan-execution.mdc +65 -0
  120. package/rules/full-stack-ship-discipline.mdc +37 -0
  121. package/rules/native-rn-monorepo/README.md +63 -0
  122. package/rules/native-rn-monorepo/_project.mdc +69 -0
  123. package/rules/native-rn-monorepo/native-android.mdc +72 -0
  124. package/rules/native-rn-monorepo/native-ios.mdc +61 -0
  125. package/rules/native-rn-monorepo/react-native-js.mdc +78 -0
  126. package/rules/native-rn-monorepo/web.mdc +60 -0
  127. package/rules/project-starter/components.mdc +54 -0
  128. package/rules/project-starter/data-fetching.mdc +77 -0
  129. package/rules/project-starter/git.mdc +41 -0
  130. package/rules/project-starter/supabase.mdc +37 -0
  131. package/rules/project-starter/tailwind.mdc +48 -0
  132. package/rules/project-starter/typescript.mdc +36 -0
  133. package/rules/project-starter/web-performance.mdc +42 -0
  134. package/rules/senior-engineer.mdc +30 -0
  135. package/rules/shell-first-search.mdc +19 -0
  136. package/rules/skill-workflows.mdc +35 -0
  137. package/rules/verification-before-completion.mdc +57 -0
  138. package/skills/audit-accessibility/SKILL.md +441 -0
  139. package/skills/audit-agent-speed/SKILL.md +181 -0
  140. package/skills/audit-agent-speed/scripts/stop-typecheck.mjs +151 -0
  141. package/skills/audit-analytics/SKILL.md +138 -0
  142. package/skills/audit-auth-flows/SKILL.md +267 -0
  143. package/skills/audit-backend-architecture/SKILL.md +266 -0
  144. package/skills/audit-backend-architecture/references/patterns.md +386 -0
  145. package/skills/audit-bundle-size/SKILL.md +295 -0
  146. package/skills/audit-cicd/SKILL.md +218 -0
  147. package/skills/audit-code-quality/SKILL.md +314 -0
  148. package/skills/audit-code-review/SKILL.md +289 -0
  149. package/skills/audit-codemod-safety/SKILL.md +159 -0
  150. package/skills/audit-db-schema/SKILL.md +465 -0
  151. package/skills/audit-db-schema/references/details.md +110 -0
  152. package/skills/audit-doctrine/SKILL.md +189 -0
  153. package/skills/audit-env-parity/SKILL.md +133 -0
  154. package/skills/audit-fe-api/SKILL.md +458 -0
  155. package/skills/audit-gate-logic/SKILL.md +219 -0
  156. package/skills/audit-i18n/SKILL.md +339 -0
  157. package/skills/audit-infra-cost/SKILL.md +142 -0
  158. package/skills/audit-langfuse-llm/SKILL.md +468 -0
  159. package/skills/audit-langfuse-llm/references/details.md +226 -0
  160. package/skills/audit-llm-security/SKILL.md +147 -0
  161. package/skills/audit-monetization-iap/SKILL.md +137 -0
  162. package/skills/audit-payment-system/SKILL.md +268 -0
  163. package/skills/audit-payment-system/references/checklist.md +283 -0
  164. package/skills/audit-performance/SKILL.md +383 -0
  165. package/skills/audit-performance/references/loading-priority-2026.md +81 -0
  166. package/skills/audit-realworld/SKILL.md +287 -0
  167. package/skills/audit-registry-listing/SKILL.md +122 -0
  168. package/skills/audit-resilience/SKILL.md +153 -0
  169. package/skills/audit-responsive/SKILL.md +221 -0
  170. package/skills/audit-responsive/references/checklist.md +166 -0
  171. package/skills/audit-security/SKILL.md +289 -0
  172. package/skills/audit-skill-conflicts/SKILL.md +178 -0
  173. package/skills/audit-ui-states/SKILL.md +146 -0
  174. package/skills/audit-uiux-design-system/SKILL.md +475 -0
  175. package/skills/audit-uiux-design-system/references/details.md +71 -0
  176. package/skills/audit-ux/SKILL.md +381 -0
  177. package/skills/audit-ux/references/details.md +245 -0
  178. package/skills/audit-ux-journeys/SKILL.md +215 -0
  179. package/skills/audit-ux-journeys/references/checklist.md +179 -0
  180. package/skills/backend-db-performance/SKILL.md +441 -0
  181. package/skills/backend-error-handling/SKILL.md +489 -0
  182. package/skills/backend-error-handling/references/details.md +58 -0
  183. package/skills/backend-observability/SKILL.md +88 -0
  184. package/skills/backend-patterns/SKILL.md +499 -0
  185. package/skills/backend-patterns/references/architecture-patterns.md +298 -0
  186. package/skills/backend-realtime/SKILL.md +403 -0
  187. package/skills/backend-realtime/references/patterns.md +74 -0
  188. package/skills/burndown-full/SKILL.md +174 -0
  189. package/skills/complete-everything/SKILL.md +295 -0
  190. package/skills/data-pipeline/SKILL.md +109 -0
  191. package/skills/data-visualization/SKILL.md +488 -0
  192. package/skills/debug-error/SKILL.md +322 -0
  193. package/skills/debug-fe-be-integration/SKILL.md +459 -0
  194. package/skills/debug-sentry-monitor/SKILL.md +497 -0
  195. package/skills/debug-sentry-monitor/references/details.md +165 -0
  196. package/skills/deploy-npm/SKILL.md +394 -0
  197. package/skills/deploy-npm/references/example-mushi-mushi.md +52 -0
  198. package/skills/deploy-verify/SKILL.md +489 -0
  199. package/skills/design-api/SKILL.md +379 -0
  200. package/skills/design-canvas/SKILL.md +155 -0
  201. package/skills/design-email/SKILL.md +370 -0
  202. package/skills/design-frontend/SKILL.md +143 -0
  203. package/skills/design-generative-art/SKILL.md +474 -0
  204. package/skills/design-mobile-first/SKILL.md +506 -0
  205. package/skills/design-motion/SKILL.md +333 -0
  206. package/skills/design-motion/references/delight-interactions.md +191 -0
  207. package/skills/design-prd/SKILL.md +443 -0
  208. package/skills/design-system/SKILL.md +457 -0
  209. package/skills/design-theme/SKILL.md +226 -0
  210. package/skills/design-theme/themes/tsumagoi-ranch.md +150 -0
  211. package/skills/docs-adr/SKILL.md +168 -0
  212. package/skills/docs-coauthor/SKILL.md +368 -0
  213. package/skills/docs-comparison-pages/SKILL.md +117 -0
  214. package/skills/docs-domain-modeling/SKILL.md +97 -0
  215. package/skills/docs-launch-kit/SKILL.md +139 -0
  216. package/skills/docs-writer/SKILL.md +469 -0
  217. package/skills/enhance-agent-guardrails/SKILL.md +164 -0
  218. package/skills/enhance-arch-boundaries/SKILL.md +154 -0
  219. package/skills/enhance-capacitor-ui/SKILL.md +463 -0
  220. package/skills/enhance-capacitor-ui/references/details.md +750 -0
  221. package/skills/enhance-email-deliverability/SKILL.md +143 -0
  222. package/skills/enhance-growth-loops/SKILL.md +122 -0
  223. package/skills/enhance-lifecycle-email/SKILL.md +130 -0
  224. package/skills/enhance-motion/SKILL.md +193 -0
  225. package/skills/enhance-onboarding/SKILL.md +148 -0
  226. package/skills/enhance-pwa/SKILL.md +303 -0
  227. package/skills/enhance-readability/SKILL.md +146 -0
  228. package/skills/enhance-readme/SKILL.md +496 -0
  229. package/skills/enhance-readme/package-lock.json +187 -0
  230. package/skills/enhance-readme/package.json +17 -0
  231. package/skills/enhance-readme/scripts/generate-readme-blocks.mjs +199 -0
  232. package/skills/enhance-readme/scripts/record-readme-tour.mjs +442 -0
  233. package/skills/enhance-skill-prompts/SKILL.md +167 -0
  234. package/skills/enhance-skill-prompts/references/exemplar-audit-auth-flows.md +311 -0
  235. package/skills/enhance-ux-laws/SKILL.md +409 -0
  236. package/skills/enhance-web-conversion/SKILL.md +155 -0
  237. package/skills/enhance-web-forms/SKILL.md +154 -0
  238. package/skills/enhance-web-instant-nav/SKILL.md +138 -0
  239. package/skills/enhance-web-instant-nav/references/bfcache-blockers.md +23 -0
  240. package/skills/enhance-web-instant-nav/references/early-hints.md +33 -0
  241. package/skills/enhance-web-instant-nav/references/speculation-rules.md +44 -0
  242. package/skills/enhance-web-landing/SKILL.md +459 -0
  243. package/skills/enhance-web-landing/references/details.md +773 -0
  244. package/skills/enhance-web-redesign/SKILL.md +228 -0
  245. package/skills/enhance-web-seo/SKILL.md +276 -0
  246. package/skills/enhance-web-ui/SKILL.md +473 -0
  247. package/skills/enhance-web-ui/references/details.md +674 -0
  248. package/skills/enhance-web-ux/HEURISTICS.md +248 -0
  249. package/skills/enhance-web-ux/PATTERNS.md +375 -0
  250. package/skills/enhance-web-ux/SKILL.md +464 -0
  251. package/skills/enhance-web-ux/examples.md +222 -0
  252. package/skills/enhance-web-ux/references/details.md +406 -0
  253. package/skills/enhance-web-web3d/SKILL.md +397 -0
  254. package/skills/enhance-web-web3d/references/css-canvas-effects.md +180 -0
  255. package/skills/handoff/SKILL.md +66 -0
  256. package/skills/housekeep-backlog/SKILL.md +149 -0
  257. package/skills/housekeep-dead-code/SKILL.md +387 -0
  258. package/skills/housekeep-dead-code/references/ratchet-ci.md +205 -0
  259. package/skills/housekeep-dead-code/references/supabase-hygiene.md +152 -0
  260. package/skills/housekeep-design/SKILL.md +207 -0
  261. package/skills/housekeep-files/SKILL.md +220 -0
  262. package/skills/housekeep-files/references/naming-and-catalog.md +86 -0
  263. package/skills/housekeep-files/scripts/housekeep-files.ps1 +360 -0
  264. package/skills/housekeep-files/scripts/housekeep-files.sh +238 -0
  265. package/skills/housekeep-gates/SKILL.md +174 -0
  266. package/skills/iterate-agent-harness/SKILL.md +137 -0
  267. package/skills/iterate-gtm-weekly/SKILL.md +103 -0
  268. package/skills/iterate-post-launch/SKILL.md +292 -0
  269. package/skills/meta-mcp-builder/SKILL.md +313 -0
  270. package/skills/meta-skill-creator/SKILL.md +304 -0
  271. package/skills/mobile-capacitor-platform/SKILL.md +103 -0
  272. package/skills/mobile-emulator-start/SKILL.md +296 -0
  273. package/skills/mobile-emulator-test/SKILL.md +491 -0
  274. package/skills/mobile-emulator-test/references/details.md +478 -0
  275. package/skills/mobile-rn-performance/SKILL.md +107 -0
  276. package/skills/mobile-rn-screen/SKILL.md +476 -0
  277. package/skills/mobile-rn-screen/references/details.md +785 -0
  278. package/skills/mushi-health/SKILL.md +206 -0
  279. package/skills/mushi-integration/SKILL.md +257 -0
  280. package/skills/plan-aeo-readiness/SKILL.md +166 -0
  281. package/skills/plan-antislop/SKILL.md +281 -0
  282. package/skills/plan-aso/SKILL.md +149 -0
  283. package/skills/plan-backup-dr/SKILL.md +131 -0
  284. package/skills/plan-capacitor-hardening/SKILL.md +217 -0
  285. package/skills/plan-data-integrity/SKILL.md +187 -0
  286. package/skills/plan-dead-code/SKILL.md +386 -0
  287. package/skills/plan-dead-code/references/knip-config.md +214 -0
  288. package/skills/plan-dead-code/references/output-templates.md +133 -0
  289. package/skills/plan-dead-code/references/preservation-contract.md +50 -0
  290. package/skills/plan-dead-code/references/residue-greps.md +84 -0
  291. package/skills/plan-dependency-provenance/SKILL.md +200 -0
  292. package/skills/plan-docs-sync/SKILL.md +143 -0
  293. package/skills/plan-docs-sync/references/drift-taxonomy.md +43 -0
  294. package/skills/plan-docs-sync/references/output-templates.md +33 -0
  295. package/skills/plan-docs-sync/references/preservation-contract.md +17 -0
  296. package/skills/plan-error-handling/SKILL.md +205 -0
  297. package/skills/plan-gtm/SKILL.md +276 -0
  298. package/skills/plan-gtm/references/benchmarks-2026.md +183 -0
  299. package/skills/plan-input-validation/SKILL.md +179 -0
  300. package/skills/plan-llm-cost-guardrails/SKILL.md +176 -0
  301. package/skills/plan-mobile-readiness/SKILL.md +171 -0
  302. package/skills/plan-perf-audit/SKILL.md +145 -0
  303. package/skills/plan-perf-audit/references/audit-scope.md +51 -0
  304. package/skills/plan-perf-audit/references/output-templates.md +33 -0
  305. package/skills/plan-perf-audit/references/preservation-contract.md +13 -0
  306. package/skills/plan-pricing/SKILL.md +173 -0
  307. package/skills/plan-privacy-compliance/SKILL.md +148 -0
  308. package/skills/plan-rls-audit/SKILL.md +231 -0
  309. package/skills/plan-secrets-audit/SKILL.md +181 -0
  310. package/skills/plan-security-audit/SKILL.md +168 -0
  311. package/skills/plan-security-audit/references/output-templates.md +36 -0
  312. package/skills/plan-security-audit/references/owasp-supabase-scope.md +55 -0
  313. package/skills/plan-security-audit/references/preservation-contract.md +18 -0
  314. package/skills/plan-stub-checker/SKILL.md +216 -0
  315. package/skills/plan-stub-checker/references/detection-methodology.md +75 -0
  316. package/skills/plan-stub-checker/references/detection-taxonomy.md +34 -0
  317. package/skills/plan-stub-checker/references/output-templates.md +63 -0
  318. package/skills/plan-stub-checker/references/preservation-contract.md +24 -0
  319. package/skills/plan-test-coverage/SKILL.md +170 -0
  320. package/skills/plan-test-coverage/references/methodology.md +54 -0
  321. package/skills/plan-test-coverage/references/output-templates.md +34 -0
  322. package/skills/plan-test-coverage/references/preservation-contract.md +15 -0
  323. package/skills/plan-uiux-unification/SKILL.md +230 -0
  324. package/skills/plan-uiux-unification/references/output-templates.md +67 -0
  325. package/skills/plan-uiux-unification/references/phase-workbook.md +85 -0
  326. package/skills/plan-uiux-unification/references/preservation-contract.md +24 -0
  327. package/skills/protocol-browser-anti-stall/SKILL.md +211 -0
  328. package/skills/protocol-browser-anti-stall/references/mcp-to-cli-map.md +113 -0
  329. package/skills/protocol-browser-anti-stall/references/playwright-session-coordination.md +170 -0
  330. package/skills/research/SKILL.md +422 -0
  331. package/skills/test-exploratory/SKILL.md +165 -0
  332. package/skills/test-exploratory/references/charter-template.md +29 -0
  333. package/skills/test-load/SKILL.md +126 -0
  334. package/skills/test-mutation/SKILL.md +160 -0
  335. package/skills/test-playwright/SKILL.md +354 -0
  336. package/skills/test-qa/SKILL.md +364 -0
  337. package/skills/test-qa/references/details.md +268 -0
  338. package/skills/test-red-team/SKILL.md +386 -0
  339. package/skills/test-red-team/references/owasp-attack-checklist.md +193 -0
  340. package/skills/test-unit/SKILL.md +259 -0
  341. package/skills/test-unit/references/details.md +267 -0
  342. package/skills/test-visual-regression/SKILL.md +132 -0
  343. package/skills/thirdparty-emil-design-eng/ATTRIBUTION.md +20 -0
  344. package/skills/thirdparty-emil-design-eng/SKILL.md +21 -0
  345. package/skills/thirdparty-emil-design-eng/references/emil-design-eng.md +676 -0
  346. package/skills/thirdparty-ui-ux-pro-max/ATTRIBUTION.md +22 -0
  347. package/skills/thirdparty-ui-ux-pro-max/SKILL.md +304 -0
  348. package/skills/thirdparty-ui-ux-pro-max/data/charts.csv +26 -0
  349. package/skills/thirdparty-ui-ux-pro-max/data/colors.csv +97 -0
  350. package/skills/thirdparty-ui-ux-pro-max/data/icons.csv +101 -0
  351. package/skills/thirdparty-ui-ux-pro-max/data/landing.csv +31 -0
  352. package/skills/thirdparty-ui-ux-pro-max/data/products.csv +97 -0
  353. package/skills/thirdparty-ui-ux-pro-max/data/react-performance.csv +45 -0
  354. package/skills/thirdparty-ui-ux-pro-max/data/stacks/astro.csv +54 -0
  355. package/skills/thirdparty-ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  356. package/skills/thirdparty-ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  357. package/skills/thirdparty-ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  358. package/skills/thirdparty-ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  359. package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  360. package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  361. package/skills/thirdparty-ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  362. package/skills/thirdparty-ui-ux-pro-max/data/stacks/react.csv +54 -0
  363. package/skills/thirdparty-ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  364. package/skills/thirdparty-ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  365. package/skills/thirdparty-ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  366. package/skills/thirdparty-ui-ux-pro-max/data/stacks/vue.csv +50 -0
  367. package/skills/thirdparty-ui-ux-pro-max/data/styles.csv +68 -0
  368. package/skills/thirdparty-ui-ux-pro-max/data/typography.csv +58 -0
  369. package/skills/thirdparty-ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  370. package/skills/thirdparty-ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  371. package/skills/thirdparty-ui-ux-pro-max/data/web-interface.csv +31 -0
  372. package/skills/thirdparty-ui-ux-pro-max/scripts/core.py +253 -0
  373. package/skills/thirdparty-ui-ux-pro-max/scripts/design_system.py +1067 -0
  374. package/skills/thirdparty-ui-ux-pro-max/scripts/search.py +114 -0
  375. package/skills/thirdparty-web-interface-guidelines/ATTRIBUTION.md +23 -0
  376. package/skills/thirdparty-web-interface-guidelines/SKILL.md +190 -0
  377. package/skills/workflow-build-feature/SKILL.md +118 -0
  378. package/skills/workflow-coding-discipline/SKILL.md +140 -0
  379. package/skills/workflow-environment-ready/SKILL.md +128 -0
  380. package/skills/workflow-feature-flag/SKILL.md +262 -0
  381. package/skills/workflow-feedback-to-closure/SKILL.md +165 -0
  382. package/skills/workflow-fix-and-ship/SKILL.md +136 -0
  383. package/skills/workflow-git-commit/SKILL.md +200 -0
  384. package/skills/workflow-green-repo/SKILL.md +166 -0
  385. package/skills/workflow-grilling/SKILL.md +73 -0
  386. package/skills/workflow-gtm/SKILL.md +153 -0
  387. package/skills/workflow-housekeep/SKILL.md +453 -0
  388. package/skills/workflow-housekeep/references/templates.md +109 -0
  389. package/skills/workflow-launch-ready/SKILL.md +145 -0
  390. package/skills/workflow-merge-conflicts/SKILL.md +62 -0
  391. package/skills/workflow-onboard/SKILL.md +99 -0
  392. package/skills/workflow-parallel-agents/SKILL.md +164 -0
  393. package/skills/workflow-pr/SKILL.md +197 -0
  394. package/skills/workflow-quality-gate/SKILL.md +147 -0
  395. package/skills/workflow-refactor/SKILL.md +274 -0
  396. package/skills/workflow-release-prep/SKILL.md +207 -0
  397. package/skills/workflow-ship-and-observe/SKILL.md +164 -0
  398. package/skills/workflow-spec-tdd/SKILL.md +141 -0
  399. package/skills/workflow-spec-tdd/references/spec-template.md +126 -0
  400. package/skills/workflow-spec-tdd/references/tdd-patterns.md +167 -0
  401. package/skills-cursor/babysit/SKILL.md +17 -0
  402. package/skills-cursor/canvas/SKILL.md +142 -0
  403. package/skills-cursor/canvas/sdk/canvas-tokens.d.ts +235 -0
  404. package/skills-cursor/canvas/sdk/chart-primitives.d.ts +200 -0
  405. package/skills-cursor/canvas/sdk/dag-layout.d.ts +102 -0
  406. package/skills-cursor/canvas/sdk/diff-view.d.ts +130 -0
  407. package/skills-cursor/canvas/sdk/form-primitives.d.ts +194 -0
  408. package/skills-cursor/canvas/sdk/hooks.d.ts +117 -0
  409. package/skills-cursor/canvas/sdk/index.d.ts +47 -0
  410. package/skills-cursor/canvas/sdk/theme.d.ts +61 -0
  411. package/skills-cursor/canvas/sdk/todo-list.d.ts +49 -0
  412. package/skills-cursor/canvas/sdk/ui-primitives.d.ts +549 -0
  413. package/skills-cursor/canvas/sdk/ui-primitives.test.d.ts +2 -0
  414. package/skills-cursor/create-hook/SKILL.md +238 -0
  415. package/skills-cursor/create-rule/SKILL.md +185 -0
  416. package/skills-cursor/create-skill/SKILL.md +269 -0
  417. package/skills-cursor/create-skill/references/authoring-guide.md +182 -0
  418. package/skills-cursor/create-subagent/SKILL.md +228 -0
  419. package/skills-cursor/migrate-to-skills/SKILL.md +121 -0
  420. package/skills-cursor/shell/SKILL.md +22 -0
  421. package/skills-cursor/split-to-prs/SKILL.md +47 -0
  422. package/skills-cursor/statusline/SKILL.md +193 -0
  423. package/skills-cursor/update-cli-config/SKILL.md +85 -0
  424. package/skills-cursor/update-cursor-settings/SKILL.md +137 -0
  425. package/skills.sh.json +297 -0
@@ -0,0 +1,205 @@
1
+ # Ratchet install — scripts, lint, CI, aggregator
2
+
3
+ The point: the next agent session cannot leave the repo with more dead code
4
+ than it found. One number, shrink-only, enforced in CI. Cleanup without this
5
+ regrows within weeks.
6
+
7
+ ## 1. `package.json` scripts
8
+
9
+ CI calls the scripts, never raw flags, so local and CI cannot drift.
10
+
11
+ ```json
12
+ {
13
+ "scripts": {
14
+ "knip": "knip --production --max-issues 0",
15
+ "knip:all": "knip --max-issues 3 --treat-config-hints-as-errors",
16
+ "typecheck": "tsc --noEmit"
17
+ }
18
+ }
19
+ ```
20
+
21
+ Pin `knip` exactly as a devDependency (`npm view knip version` at install
22
+ time); never `^` and never `latest` in a gate.
23
+
24
+ **`--treat-config-hints-as-errors` goes on the default-mode script only.**
25
+ Knip computes `isDisableConfigHints = --no-config-hints || isProduction`, so
26
+ under `--production` hints are never collected and the flag is inert. Putting
27
+ it there looks like drift protection and provides none.
28
+
29
+ If the production count is not yet 0, use `--max-issues <N>` there too and
30
+ write the rule down in `CONTRIBUTING.md`:
31
+
32
+ > `knip` and `knip:all` carry `--max-issues` ceilings. A PR may lower a
33
+ > ceiling, never raise it. Raising one is a separate PR titled
34
+ > `chore(dead-code): raise ceiling` with the reason in the body.
35
+
36
+ Per-type ceilings are possible with `--reporter json` plus a compare script,
37
+ but one number is easier to review and harder to game. Start with one number.
38
+
39
+ ## 2. Guard the ratchet, not just the number
40
+
41
+ `--max-issues` totals only issue types whose rule is `error`. Everything below
42
+ moves the metric without removing code:
43
+
44
+ | Bypass | Why it works |
45
+ |---|---|
46
+ | `rules: { files: "warn" }` | **The quietest one.** Warns are excluded from the total, so every dead file is reported and the job still exits `0` |
47
+ | `--no-exit-code` | Green unconditionally |
48
+ | `--exclude <type>` / narrowed `--include` | Whole issue classes vanish from the run |
49
+ | `--workspace <one>` | Scopes a monorepo run to the clean package |
50
+ | `ignore`, `ignoreFiles`, `ignoreIssues`, `ignoreDependencies` | Hides findings rather than resolving them |
51
+ | `noUnusedLocals: false`, disabling the lint rule | Zeroes the in-file surface |
52
+
53
+ Review changes to `knip.json`, the scripts, and the job's flags with the same
54
+ care as the count. A scope or rule change is a baseline change and belongs in
55
+ its own reviewed PR.
56
+
57
+ ## 3. tsconfig
58
+
59
+ ```json
60
+ {
61
+ "compilerOptions": {
62
+ "noUnusedLocals": true,
63
+ "noUnusedParameters": true,
64
+ "verbatimModuleSyntax": true
65
+ }
66
+ }
67
+ ```
68
+
69
+ `verbatimModuleSyntax` keeps type-only imports type-only, which helps both
70
+ Knip's graph and tree-shaking.
71
+
72
+ Turning these on in an AI-written repo produces a burst of errors. That burst
73
+ *is* the unused-locals cascade, so enable them **during** the export/cascade
74
+ category, not after — otherwise the typecheck gate between commits is red for
75
+ reasons unrelated to the batch.
76
+
77
+ ## 4. ESLint (flat config)
78
+
79
+ ```js
80
+ // eslint.config.js
81
+ import unusedImports from "eslint-plugin-unused-imports";
82
+
83
+ export default [
84
+ // ...existing config
85
+ {
86
+ plugins: { "unused-imports": unusedImports },
87
+ rules: {
88
+ "unused-imports/no-unused-imports": "error",
89
+ "unused-imports/no-unused-vars": [
90
+ "warn",
91
+ { vars: "all", varsIgnorePattern: "^_", args: "after-used", argsIgnorePattern: "^_" },
92
+ ],
93
+ "no-console": ["error", { allow: ["warn", "error"] }],
94
+ "no-debugger": "error",
95
+ },
96
+ },
97
+ ];
98
+ ```
99
+
100
+ `no-unused-imports` autofixes; core `no-unused-vars` does not. The `^_`
101
+ patterns keep deliberate placeholders legal.
102
+
103
+ Biome or oxlint instead: `noUnusedImports` / `noUnusedVariables` are
104
+ equivalent and faster. Keep **one** linter — `audit-gate-logic` flags two as
105
+ duplicate enforcement.
106
+
107
+ ## 5. lint-staged, and why Knip is not in pre-commit
108
+
109
+ ```json
110
+ {
111
+ "lint-staged": {
112
+ "*.{ts,tsx}": ["eslint --fix --max-warnings=0", "prettier --write"]
113
+ }
114
+ }
115
+ ```
116
+
117
+ Knip is repo-wide and too slow for pre-commit. If a local gate is wanted, use
118
+ pre-push, calling the same script CI calls:
119
+
120
+ ```bash
121
+ # .husky/pre-push
122
+ npm run knip
123
+ ```
124
+
125
+ ## 6. GitHub Actions job
126
+
127
+ ```yaml
128
+ # add to the existing ci.yml rather than a new workflow if one exists
129
+ dead-code:
130
+ runs-on: ubuntu-latest
131
+ timeout-minutes: 10
132
+ steps:
133
+ - uses: actions/checkout@<pinned-sha>
134
+ - uses: actions/setup-node@<pinned-sha>
135
+ with:
136
+ node-version-file: .nvmrc
137
+ cache: npm
138
+ - run: npm ci --ignore-scripts
139
+ - run: npm run knip # production, ceiling 0
140
+ - run: npm run knip:all # default mode + config-hint drift
141
+ ```
142
+
143
+ Pin action SHAs per `plan-dependency-provenance`. Add `merge_group` to the
144
+ workflow triggers if a merge queue is in use, and keep check names identical
145
+ across `pull_request` and `merge_group`, or queued PRs wait on checks that
146
+ never start.
147
+
148
+ Exit codes: `0` clean · `1` issues found · `2` Knip failed to run. A job that
149
+ only distinguishes `0` from `1` reports a **crashed** run as green.
150
+
151
+ `--cache` is deliberately absent: Knip caches into
152
+ `node_modules/.cache/knip`, which `npm ci` wipes, and `cache: npm` only
153
+ restores `~/.npm`. Add an explicit `actions/cache` step if you want it.
154
+
155
+ ## 7. Aggregator wiring (`housekeep-gates` contract)
156
+
157
+ Add one job to the existing aggregator's `needs:` — do not create a second
158
+ required check.
159
+
160
+ ```yaml
161
+ gate:
162
+ needs: [typecheck, lint, test, build, dead-code]
163
+ if: always()
164
+ runs-on: ubuntu-latest
165
+ steps:
166
+ - run: echo '${{ toJSON(needs) }}' | jq -e 'to_entries | all(.value.result == "success")'
167
+ ```
168
+
169
+ `if: always()` plus the explicit result check is what makes a **skipped**
170
+ `dead-code` job fail the gate instead of silently passing it. If the repo has
171
+ no aggregator, mark `dead-code` required and leave a note for
172
+ `housekeep-gates`.
173
+
174
+ ## 8. Types-drift guard (Supabase repos)
175
+
176
+ A generated types file that no longer matches the schema is how sessions end
177
+ up querying columns that do not exist.
178
+
179
+ ```yaml
180
+ supabase-types:
181
+ runs-on: ubuntu-latest
182
+ steps:
183
+ - uses: actions/checkout@<pinned-sha>
184
+ - uses: supabase/setup-cli@<pinned-sha>
185
+ - run: supabase gen types typescript --project-id "$SUPABASE_PROJECT_REF" > /tmp/supabase.ts
186
+ env:
187
+ SUPABASE_PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_REF }}
188
+ SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
189
+ - run: diff -u /tmp/supabase.ts src/types/supabase.ts
190
+ ```
191
+
192
+ Add it to the aggregator's `needs:` as well.
193
+
194
+ ## 9. Ratchet the other counts
195
+
196
+ A metric with no gate grows back. Once the Knip job is green, add the residue
197
+ numbers from the plan's baseline: duplication percentage, suppression count,
198
+ `console.*` count. Same shrink-only rule, same review discipline.
199
+
200
+ ## 10. Agent rule (hand to `enhance-agent-guardrails`)
201
+
202
+ One line for `.cursor/rules/*.mdc` or `AGENTS.md`:
203
+
204
+ > Before claiming a task done: `npm run typecheck && npm run knip`. New unused
205
+ > exports, files, or dependencies are not done.
@@ -0,0 +1,152 @@
1
+ # Supabase arm — dead schema, orphan functions, drift
2
+
3
+ Knip stops at the JavaScript boundary. AI-generated Supabase projects carry
4
+ the same debt on the other side: tables created for a feature that was
5
+ rewritten, RPCs nobody calls, Edge Functions nobody invokes, forty tiny
6
+ migrations, and a `supabase.ts` that no longer matches the schema.
7
+
8
+ **Discovery here is read-only and safe against any target, including
9
+ production. Every drop is a migration, requires the approved plan row, and
10
+ stops before `db push` unless the plan says push.**
11
+
12
+ Subcommand names move between CLI versions. Run `supabase inspect db --help`
13
+ once and use what your installed version actually has.
14
+
15
+ ## 0. Precondition — how old are the statistics?
16
+
17
+ ```bash
18
+ psql "$DB_URL" -c "select datname, stats_reset from pg_stat_database where datname = current_database();"
19
+ ```
20
+
21
+ `pg_stat_*` counters accumulate since `stats_reset`. **A table with zero scans
22
+ on a database reset yesterday proves nothing.** Require ~30 days, or one known
23
+ full traffic cycle, before calling anything dead on usage evidence — and
24
+ record the window in the report. Below that, rely on the code cross-reference
25
+ alone.
26
+
27
+ This is also why usage statistics are best read from **production**: a staging
28
+ database with no real traffic makes everything look dead.
29
+
30
+ ## 1. What the code actually touches
31
+
32
+ ```bash
33
+ rg -o "\.from\(['\"][a-zA-Z0-9_]+['\"]\)" src supabase/functions | sed -E "s/.*\(['\"]//; s/['\"]\)//" | sort | uniq -c | sort -rn > /tmp/sb-tables
34
+ rg -o "\.rpc\(['\"][a-zA-Z0-9_]+['\"]" src supabase/functions | sed -E "s/.*\(['\"]//; s/['\"]//" | sort -u > /tmp/sb-rpcs
35
+ rg -o "functions\.invoke\(['\"][a-zA-Z0-9_-]+['\"]" src | sed -E "s/.*\(['\"]//; s/['\"]//" | sort -u > /tmp/sb-fns
36
+ rg -o "storage\.from\(['\"][a-zA-Z0-9_-]+['\"]" src supabase/functions | sed -E "s/.*\(['\"]//; s/['\"]//" | sort -u > /tmp/sb-buckets
37
+ rg -o "channel\(['\"][^'\"]+['\"]" src | sort -u > /tmp/sb-channels
38
+ ```
39
+
40
+ A table reached only through a view needs the view name grepped too.
41
+
42
+ ## 2. Schema inventory (read-only SQL)
43
+
44
+ ```sql
45
+ -- Usage counters per table
46
+ select relname, seq_scan, idx_scan, n_live_tup,
47
+ n_tup_ins + n_tup_upd + n_tup_del as writes
48
+ from pg_stat_user_tables where schemaname = 'public'
49
+ order by seq_scan + idx_scan, writes;
50
+
51
+ -- Functions
52
+ select p.proname, pg_get_function_identity_arguments(p.oid) as args
53
+ from pg_proc p join pg_namespace n on n.oid = p.pronamespace
54
+ where n.nspname = 'public' order by 1;
55
+
56
+ -- In-database callers the client grep can never see
57
+ select tgname, tgrelid::regclass as tbl, tgfoid::regproc as fn
58
+ from pg_trigger where not tgisinternal;
59
+ select policyname, tablename, qual, with_check
60
+ from pg_policies where schemaname = 'public';
61
+ select proname from pg_proc where prosrc ilike '%<candidate_name>%';
62
+ select jobname, command from cron.job; -- only if pg_cron is enabled
63
+
64
+ select id, public from storage.buckets;
65
+ ```
66
+
67
+ That third block is the one people skip. **An RPC called only from an RLS
68
+ policy, a trigger, or a `pg_cron` job has zero client references and is
69
+ fully alive.** Deleting it silently breaks authorization.
70
+
71
+ CLI equivalents, documented at the time of writing: `supabase inspect db
72
+ unused-indexes`, `seq-scans`, `table-sizes`, `index-sizes`, `cache-hit`,
73
+ `bloat`. The set has changed across CLI releases, so confirm with
74
+ `supabase inspect db --help` before scripting any of them; the SQL above is
75
+ the version-independent path.
76
+
77
+ ## 3. Cross-reference → candidates
78
+
79
+ | Object | Dead when… | **Not** dead if… |
80
+ |---|---|---|
81
+ | Table | absent from `/tmp/sb-tables`, unreferenced by any function/trigger/policy body, zero reads and writes across a valid stats window | written by a trigger or cron; read by an Edge Function; a webhook target; an audit/log table by design |
82
+ | Function (RPC) | absent from `/tmp/sb-rpcs`, not a trigger function, not in any policy `qual`/`with_check`, not called from another function body | an RLS helper (`is_admin()`, `auth.uid()` wrapper) or a trigger target |
83
+ | Edge Function | directory exists, absent from `/tmp/sb-fns` | `verify_jwt = false` in `config.toml`, or a Stripe / GitHub / Resend webhook points at it — **external callers never appear in your grep** |
84
+ | Index | reported by `unused-indexes` **and** not backing a PK or unique constraint | it backs a constraint, or supports a query that runs monthly (check the stats window) |
85
+ | Bucket | absent from `/tmp/sb-buckets` **and** empty | non-empty — objects are data, not dead code. Escalate as data retention |
86
+ | Migration file | every earlier migration is applied in every environment | any environment is behind — do not squash |
87
+
88
+ Repo-vs-deployed drift: `supabase functions list` shows functions deployed
89
+ from someone's laptop that never landed in git. Those are candidates to
90
+ **redeploy from git first**, then delete if still unreferenced.
91
+
92
+ ## 4. Function-body hygiene
93
+
94
+ ```bash
95
+ supabase db lint --level warning # add --linked or --db-url for a remote target
96
+ ```
97
+
98
+ `plpgsql_check` reports unused variables and arguments, dead code after
99
+ `RETURN`, missing returns, hidden casts, and `EXECUTE` strings open to
100
+ injection. Fix findings in the function's migration, never in the dashboard —
101
+ a dashboard edit is drift the repo cannot see.
102
+
103
+ ## 5. Migration sprawl
104
+
105
+ Agent sessions produce one migration per thought. Only once every environment
106
+ is at the same version:
107
+
108
+ ```bash
109
+ ls supabase/migrations | wc -l
110
+ supabase migration squash # squashes local migrations to one file
111
+ supabase db reset # prove the squashed set builds a clean database
112
+ supabase test db # pgTAP, if present
113
+ ```
114
+
115
+ Keep the squash in its own PR. It is a large diff that says nothing about
116
+ behavior, and mixing it with deletions makes both unreviewable.
117
+
118
+ ## 6. Types drift
119
+
120
+ ```bash
121
+ supabase gen types typescript --linked > /tmp/supabase.ts
122
+ diff -u /tmp/supabase.ts src/types/supabase.ts || echo "DRIFT"
123
+ ```
124
+
125
+ Regenerate in the **same commit** as the schema change, and install the CI
126
+ guard from [`ratchet-ci.md`](ratchet-ci.md) §8 so it cannot drift again.
127
+
128
+ ## 7. Drops — the only writes in this arm
129
+
130
+ Ask the human to name the target database first and wait for the reply. Do not
131
+ infer it from `.env` or a linked project ref.
132
+
133
+ - **Tables — two steps.** Migration 1 renames to `_deprecated_<name>`: errors
134
+ surface immediately, the data is intact, and rollback is another rename.
135
+ Migration 2 drops, one release cycle later. A rename is reversible; a drop
136
+ destroys data.
137
+ - **Functions / Edge Functions** — direct drop or directory delete. Cheap to
138
+ restore from git.
139
+ - **Indexes** — `drop index concurrently`. Never a PK or unique index.
140
+ - **Policies** — never dropped here. A table that stays needs RLS →
141
+ `plan-rls-audit`.
142
+ - **Buckets holding objects** — never here. Retention is a product decision.
143
+
144
+ Every migration: `supabase db reset` green locally, `supabase db lint` clean,
145
+ types regenerated in the same commit. Then stop.
146
+
147
+ ## 8. Advisors, last
148
+
149
+ Supabase's advisors (dashboard, or the Supabase MCP) flag RLS-off tables,
150
+ unindexed foreign keys, and duplicate or unused indexes. Run them **after**
151
+ the drops, since drops change the findings. RLS results belong to
152
+ `plan-rls-audit`, not this skill.
@@ -0,0 +1,207 @@
1
+ ---
2
+ name: housekeep-design
3
+ description: >
4
+ Consolidate a drifted design system into one token and component source of
5
+ truth. Use after an approved plan-uiux-unification, or when "clean up the
6
+ design system now", "migrate to one button", or "resolve token conflicts".
7
+ license: MIT
8
+ ---
9
+
10
+ # housekeep-design — Consolidate a Drifted Design System to One SSOT
11
+
12
+ **Degree of freedom: MIXED.** Canonical-form judgment `[HIGH freedom]`;
13
+ inventory searches, migration batches, and the zero-hit re-search
14
+ `[LOW freedom — run exactly]`.
15
+
16
+ Multiple sessions and multiple devs leave a design system full of competing truths: three
17
+ button variants that look the same, `--brand`, `--primary`, and `#3B82F6` all meaning the
18
+ same blue, `text-[13px]` next to `text-sm`, Lucide and Heroicons side by side. This skill
19
+ picks one canonical form for each conflict, migrates everything to it, and locks the door
20
+ behind you.
21
+
22
+ ## How to reason
23
+
24
+ 1. **Observe** — which tokens, components, or icon libraries compete?
25
+ 2. **Interpret** — is this duplication or an intentional variant?
26
+ 3. **Classify** — merge-to-canonical / keep-as-variant / ask (visible brand change)
27
+ 4. **Severity** — a second Button that ships in prod outranks a unused hex alias
28
+
29
+ ## Worked example
30
+
31
+ > **Observe:** `--brand`, `--primary`, and `#3B82F6` are the same blue; two Button
32
+ > files; Lucide + Heroicons.
33
+ > **Interpret:** color and Button are duplicates; icon mix is library drift.
34
+ > **Classify:** merge colors to `--color-primary`; keep `components/ui/button.tsx`;
35
+ > standardize Lucide.
36
+ > **Verify:** `rg` for `--brand` and `#3B82F6` → 0 hits; screenshots stay equivalent.
37
+
38
+ ## Self-critique before reporting
39
+
40
+ - **Zero-hit** — every deprecated form was re-searched from scratch, not from memory
41
+ - **Equivalent** — screenshots or an explicit authorized upgrade; no silent restyle
42
+ - **One SSOT** — no leftover parallel token file or second Button
43
+ - **Right owner** — plan-only burndown still open → `plan-uiux-unification`, not this
44
+
45
+ > **One source of truth per decision.** When two patterns compete, take the **best of
46
+ > both** (more accessible, tokenized, more reused, better named) as canonical and migrate
47
+ > the rest to it — never leave both. Consolidation is mechanical and verifiable, not
48
+ > vibes: a fresh search for the deprecated form must return zero.
49
+
50
+ **This skill changes code.** It edits tokens, components, and usages. It is destructive to
51
+ *duplication*, never to *behavior*: the rendered result must stay visually equivalent
52
+ (verified) unless a conflict resolution intentionally upgrades it.
53
+
54
+ **Before any browser interaction, read `protocol-browser-anti-stall` and apply it.**
55
+
56
+ ---
57
+
58
+ ## Phase 0 — Detect and scope [HIGH freedom]
59
+
60
+ ### 0a. Consume an existing plan
61
+
62
+ If a `plan-uiux-unification` plan exists (in `.cursor/plans/` or provided), read it fully —
63
+ this skill is its executor. Otherwise run the detect loop below.
64
+
65
+ ### 0b. Detect the design system
66
+
67
+ Reuse the `audit-uiux-design-system` Step 0 detection: CSS framework (Tailwind v3/v4, CSS
68
+ Modules, CSS-in-JS), component library (shadcn/Radix/MUI/Chakra/custom), icon library, and
69
+ the token source file(s). Record it.
70
+
71
+ ---
72
+
73
+ ## Phase 1 — Establish the SSOT structure (3-layer tokens) [HIGH freedom]
74
+
75
+ Define (or normalize onto) a three-layer token taxonomy — the standard shape for
76
+ drift-proof systems:
77
+
78
+ | Layer | Role | Example |
79
+ |---|---|---|
80
+ | **Primitive / global** | Raw values, no meaning | `--blue-500: oklch(...)`, `--space-2: 0.5rem` |
81
+ | **Semantic** | Intent, references primitives | `--color-primary: var(--blue-500)`, `--radius-card` |
82
+ | **Component** | Component-scoped, references semantic | `--button-bg: var(--color-primary)` |
83
+
84
+ Components reference **semantic** tokens, never primitives or raw values. Record the
85
+ canonical token file as the SSOT and note where duplicate/parallel token sets live.
86
+
87
+ ---
88
+
89
+ ## Phase 2 — Detect every conflict (the drift inventory) [LOW freedom — run the searches exactly]
90
+
91
+ Search the whole repo (use Shell/`rg`, not the plan's file list) and build a durable
92
+ checklist at `.cursor/housekeep-design-state.md`. Hunt each conflict class:
93
+
94
+ ```bash
95
+ # Raw values that should be tokens
96
+ rg -n "#[0-9a-fA-F]{3,8}|rgb\(|hsl\([^v]" -g "*.{tsx,jsx,css,vue}"
97
+ rg -n "(text|p|m|gap|rounded|w|h)-\[" -g "*.{tsx,jsx}" # arbitrary values
98
+ # Duplicate / near-duplicate tokens (same value, different name)
99
+ rg -n "^\s*--" -g "*.css" # then group by value
100
+ # Competing component implementations
101
+ rg -n "function (Button|Card|Modal|Dialog|Input|Badge|Tabs)\b" -g "*.{tsx,jsx}" -l
102
+ rg -n "<button |<input |<select |<a " -g "*.{tsx,jsx}" # raw elements outside ui/
103
+ # Mixed icon libraries
104
+ rg -n "from '(lucide-react|@heroicons|react-icons|@phosphor)" -g "*.{tsx,jsx}" -c
105
+ ```
106
+
107
+ Conflict classes to record:
108
+ - **Token duplication** — same value under multiple names; near-duplicate values (e.g.
109
+ `#3B82F6` and `#3C82F7`) that should collapse to one.
110
+ - **Naming drift** — visual names (`--blue`) vs semantic (`--primary`); inconsistent scales.
111
+ - **Component duplication** — multiple implementations of the same UI (2 Buttons, 3 Cards).
112
+ - **Raw / arbitrary usage** — hardcoded colors, `text-[13px]`, off-scale spacing/radius.
113
+ - **Mixed icon libraries** — pick one, migrate the rest.
114
+ - **Dark-mode gaps** — tokens without dark variants; hardcoded `bg-white`/`text-black`.
115
+
116
+ State totals out loud: "Found N conflicts across M files."
117
+
118
+ ---
119
+
120
+ ## Phase 3 — Reconcile: pick the canonical (best-of-both) [HIGH freedom]
121
+
122
+ For each conflict, choose the canonical form using explicit criteria, and log the decision
123
+ in a **SSOT decision log** so future contributors know *why*:
124
+
125
+ Canonical wins if it is (in priority order): **more accessible** → **properly tokenized /
126
+ semantic** → **more widely used already** (least migration churn) → **better named** →
127
+ **more complete** (has all states/variants). When two are equal, keep the one closer to the
128
+ component library's idiom (e.g. shadcn `cva` variants).
129
+
130
+ ```md
131
+ ## SSOT decisions (in .cursor/housekeep-design-state.md)
132
+ - Blue: `--color-primary` ← merge `--brand`, `#3B82F6`, `--blue-accent` (reason: semantic, most used)
133
+ - Button: keep `components/ui/button.tsx` (cva variants) ← remove `components/Button2.tsx`, inline buttons
134
+ - Icons: standardize on `lucide-react` ← migrate 12 `@heroicons` usages
135
+ - Radius: `--radius-card` (8px) ← collapse `rounded-[6px]`, `rounded-lg` in card contexts
136
+ ```
137
+
138
+ STOP and ask the human only when a resolution changes visible behavior/brand in a way the
139
+ plan didn't authorize. Pure de-duplication proceeds.
140
+
141
+ ---
142
+
143
+ ## Phase 4 — Migrate all usages (mechanical, per-batch) [LOW freedom — run exactly]
144
+
145
+ Work the checklist in batches of 5–10 files. Batches are independent: when the sweep is large, launch one subagent per batch in one message, each briefed once with its file list and the canonical forms and returning only the files it changed; keep the Phase 6 zero-hit re-search in the main thread. Prefer codemods for coverage you can verify:
146
+
147
+ - **Token usages:** replace deprecated names/raw values with the canonical token
148
+ (`rg` → scripted replace, or `eslint --fix` with a custom rule).
149
+ - **Component usages:** replace duplicate/raw components with the canonical import;
150
+ migrate props to the canonical API.
151
+ - **Icons:** swap import + component name to the chosen library.
152
+
153
+ Flip each item `[ ]`→`[x]` in the state file **immediately** per batch (survives context
154
+ truncation). For large mechanical sweeps, hand the coverage loop to **`burndown-full`**
155
+ with MATCH=deprecated form, DONE=canonical form — its from-scratch-search gate proves
156
+ completeness. Append any newly discovered occurrences and burn them down too.
157
+
158
+ ---
159
+
160
+ ## Phase 5 — Install guardrails so drift can't recur [LOW freedom — run exactly]
161
+
162
+ Consolidation without guardrails regresses in a week. Add:
163
+
164
+ - **Lint-as-policy:** rules that block off-system styles — no raw hex/`rgb`/`hsl` in
165
+ components, no arbitrary Tailwind values (`no-restricted-syntax` / a Tailwind lint
166
+ plugin), single icon library. Wire into the repo's lint step.
167
+ - **Documented escape hatches:** one sanctioned way to add a new token (edit the SSOT
168
+ file) and to opt out (a commented, reviewed exception) — so the rules don't just get
169
+ disabled wholesale.
170
+ - Note (do not force) that a visual-regression check (Chromatic/Storybook) in CI is the
171
+ durable long-term guard; recommend it if Storybook exists.
172
+
173
+ For a deeper guardrail install (hooks + CI gates), hand off to `enhance-agent-guardrails`.
174
+
175
+ ---
176
+
177
+ ## Phase 6 — Verify and report [LOW freedom — do not skip]
178
+
179
+ - **Fresh search:** `rg` for every deprecated form → **zero** hits (except logged
180
+ exceptions). Any hit → back to Phase 4.
181
+ - **Visual equivalence:** playwright-cli before/after screenshots of key pages in light + dark;
182
+ confirm no unintended visual change. Save to `.playwright-mcp/`.
183
+ - **Build/typecheck/lint:** run the repo's commands; the new lint rules must pass.
184
+
185
+ ```markdown
186
+ ## Design Housekeep — report
187
+ **SSOT:** [token file] · 3-layer taxonomy established
188
+ **Conflicts resolved:** tokens [N→M] · components [N→M] · icons [→1 lib] · arbitrary values [N→0]
189
+ **Decision log:** [N] canonical choices recorded (.cursor/housekeep-design-state.md)
190
+ **Migration:** [M] files updated · deprecated-form search → 0 hits
191
+ **Guardrails:** lint-as-policy added (raw color/arbitrary/icon rules) · escape hatch documented
192
+ **Verification:** build ✓ · lint ✓ · visual before/after equivalent (screenshots [paths])
193
+ ```
194
+
195
+ Leave `.cursor/housekeep-design-state.md` as an audit trail unless asked to delete it.
196
+
197
+ ---
198
+
199
+ ## Related
200
+
201
+ - `plan-uiux-unification` — produces the plan this skill executes (audit → approve → here)
202
+ - `audit-uiux-design-system` — the read-only audit that surfaces the drift
203
+ - `enhance-agent-guardrails` — deeper guardrail install (hooks, CI gates)
204
+ - `burndown-full` — mechanical repo-wide coverage for the usage migration
205
+ - `enhance-motion` — consolidate motion incoherence as part of the same pass
206
+ - `workflow-housekeep` — the file/dependency counterpart (dead files, README, deps)
207
+ - `design-system` — authoring conventions for the canonical components