@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,386 @@
1
+ ---
2
+ name: plan-dead-code
3
+ description: >
4
+ Plan-only dead-code audit: Knip baseline for unused files, exports, and
5
+ deps, plus duplication, debug residue, suppressions, orphan assets, env
6
+ drift. Deletes nothing. Use when "find dead code", "is this code used", or
7
+ "unused exports".
8
+ license: MIT
9
+ effort: high
10
+ ---
11
+
12
+ # plan-dead-code — Prove it is dead before anyone deletes it
13
+
14
+ **Degree of freedom: MIXED.** Tool config authoring and the baseline
15
+ command set `[LOW freedom — run exactly]`; judging *reachable vs
16
+ proven-dead*, and what must keep working, `[HIGH freedom]`.
17
+
18
+ **Plan-only. This pass deletes nothing** — not a file, not an export, not
19
+ a dependency, not a row. It produces `plan-dead-code.md`: a reviewed
20
+ keep/kill list plus a ratchet baseline.
21
+
22
+ The failure mode this skill exists to prevent: an agent runs `knip` on a
23
+ vibe-coded repo, gets 300 findings, and starts deleting. **On a first run,
24
+ most findings are misconfiguration, not dead code.** Knip's own docs are
25
+ explicit — running `--fix` "before your configuration is fully settled is
26
+ dangerous", and `ignore` patterns are "a last resort" because "hiding a
27
+ result is not the same as resolving it."
28
+
29
+ ## This skill vs neighbors
30
+
31
+ | Skill | Owns |
32
+ |---|---|
33
+ | **plan-dead-code** (this) | *Nothing reaches this* — unreachable files/exports/deps/assets/schema (plan only) |
34
+ | `housekeep-dead-code` | Execute this plan — delete by category, install the ratchet |
35
+ | `plan-stub-checker` | *This reaches nothing* — dead buttons, unwired handlers |
36
+ | `plan-antislop` | *Looks machine-authored* — a taste judgment, not reachability |
37
+ | `plan-dependency-provenance` | Package **existence**, integrity, licensing, slopsquatting |
38
+ | `audit-code-quality` | Repo-wide smells and consistency drift |
39
+ | `workflow-refactor` | Restructuring live code that stays |
40
+ | `enhance-arch-boundaries` | Circular deps and layer direction (dependency-cruiser) |
41
+ | `audit-db-schema` | Schema design, constraints, naming |
42
+ | `housekeep-backlog` | The TODO/skipped-test register |
43
+ | `workflow-housekeep` | README, build artifacts, dependency bumps |
44
+
45
+ Boundary with `plan-dependency-provenance`: it owns *manifest facts* (does
46
+ this package exist, is it licensed). This owns the *graph fact* (nothing
47
+ imports it). A package that is real, licensed, and unimported is this
48
+ skill's finding.
49
+
50
+ ## How to reason (every candidate)
51
+
52
+ 1. **Observe** — which tool reported it, at what path, in which mode.
53
+ Unsure? `npx knip --trace-export <name>` / `--trace-file <path>` shows
54
+ exactly where Knip looked
55
+ 2. **Interpret** — is it unreferenced, or referenced in a way the tool
56
+ cannot see? (dynamic import, string route, generated types, Deno)
57
+ 3. **Classify** — `kill` / `keep-config` / `keep-tagged` / `chain` /
58
+ `needs-owner`, per
59
+ [`references/preservation-contract.md`](references/preservation-contract.md)
60
+ 4. **Severity × effort** — an unused dependency with an open advisory
61
+ outranks an unused type; a barrel explaining forty findings is one
62
+ M-effort fix, not forty S-effort ones
63
+
64
+ Skipping **Interpret** is what turns a cleanup into an outage. A tool
65
+ finding is evidence, not a verdict.
66
+
67
+ **Report chain heads, not chain members.** One dead file explains its own
68
+ exports *and* the packages only it imported. Those are children of that
69
+ row, not rows of their own — otherwise a three-item plan reads as
70
+ twenty-seven and the phasing is wrong.
71
+
72
+ ## Worked example
73
+
74
+ > **Observe:** first `npx knip` on a Vite + React + Supabase app: 312
75
+ > findings — 47 unused files, 180 unused exports, 61 unused types, 24 deps.
76
+ > **Interpret:** `src/routes/**` is loaded via `import.meta.glob`, so no
77
+ > file imports it; `src/types/supabase.ts` is generated; every `ui/*.tsx`
78
+ > re-exports through a barrel; `supabase/functions/**` is Deno, never in
79
+ > the Vite graph.
80
+ > **Classify:** config-gap, not dead code. Add `entry` for the route glob,
81
+ > `ignoreExportsUsedInFile` for interfaces/types, a separate workspace for
82
+ > `supabase/functions`, and tag the design-system barrel `@public`.
83
+ > **Re-run:** 41 findings — 9 unused files, 22 exports, 6 types, 4 deps.
84
+ > **Baseline:** 41 default / 12 `--production`. That 12 is the highest-
85
+ > confidence set: dead in shipped code.
86
+ > **Plan:** kill the 9 files (7 are unused shadcn components — re-addable
87
+ > with `npx shadcn add`), 4 deps; `@public` the barrel; 2 exports
88
+ > `needs-owner` (look like a half-built public API).
89
+
90
+ ---
91
+
92
+ ## Phase 0 — Detect the stack before running anything [LOW freedom — run exactly]
93
+
94
+ Config quality decides whether every later number means anything. Read,
95
+ don't guess:
96
+
97
+ - **Bundler / framework** — `vite.config.*`, `next.config.*`, `astro.config.*`,
98
+ `remix.config.*`, `expo`/`metro.config.*`, `nest-cli.json`
99
+ - **Workspaces** — `pnpm-workspace.yaml`, `package.json#workspaces`, `nx.json`,
100
+ `turbo.json`. A monorepo configured as one root project reports the whole
101
+ repo as dead.
102
+ - **Non-Node graphs** — `supabase/functions/**` (Deno), Cloudflare Workers,
103
+ `*.sql`, native shells. These are never in the app's module graph and must
104
+ be separate workspaces or they report 100% unused.
105
+ - **Generated code** — `types/supabase.ts`, `*.gen.ts`, GraphQL codegen,
106
+ Prisma client, route trees
107
+ - **Dynamic reference** — `rg "import\.meta\.glob|require\.context|await import\(|lazy\(" `
108
+ - **Existing config** — `knip.json`, `knip.jsonc`, `package.json#knip`,
109
+ `.jscpd.json`, `tsconfig` `noUnusedLocals`/`noUnusedParameters`
110
+ - **Test/coverage state** — is behavior locked by tests yet? Record it.
111
+ Deleting before coverage exists means deletion has no safety net.
112
+
113
+ Record: package manager, framework, workspace layout, non-Node arms,
114
+ generated paths, dynamic-import mechanisms, whether tests pass today.
115
+
116
+ > **Sequencing note.** In the plan loop, `plan-test-coverage` (step 3)
117
+ > locks behavior in tests. Running this audit is safe any time; **executing
118
+ > it before behavior is locked is the risky order.** Say so in the plan.
119
+
120
+ ---
121
+
122
+ ## Phase 1 — Author the config, then trust the output [LOW freedom — config before findings]
123
+
124
+ Install as a devDependency (never a global): `npm i -D knip`. Requires the
125
+ project's own TypeScript.
126
+
127
+ **1a. First run, read hints only.**
128
+
129
+ ```
130
+ npx knip
131
+ ```
132
+
133
+ Configuration hints print at the top. **Resolve those before reading a
134
+ single finding.** Hints are Knip telling you your config is wrong.
135
+
136
+ **1b. Fix hints in `knip.json` — not with `ignore`.**
137
+
138
+ | Symptom | Correct fix | Not this |
139
+ |---|---|---|
140
+ | Whole directory unused | Add `entry` pattern for its real entry | `ignore` the directory |
141
+ | `vite.config.ts` reported unused | Enable/disable that plugin explicitly | `ignore` the file |
142
+ | Flood of unused `interface`/`type` | `ignoreExportsUsedInFile: { interface: true, type: true }` | `--exclude types` |
143
+ | Unresolved path-alias imports | Add `paths` (tsconfig semantics) | `ignore` the importer |
144
+ | Node builtins as unused deps | `ignoreDependencies` | blanket `ignore` |
145
+ | Test files reported | `--production` | negated `project` patterns |
146
+ | Generated file's exports unused | `ignore` that one file *(legitimate)* | — |
147
+
148
+ Knip already respects `.gitignore` — do not re-list `node_modules`,
149
+ `dist`, `build`. Do not duplicate entry points that auto-detected plugins
150
+ already add.
151
+
152
+ **1c. Repeat 1a–1b until hints are clean.** This loop is the skill. Config
153
+ recipes for Vite+React+Supabase, Next.js App Router, and monorepos are in
154
+ [`references/knip-config.md`](references/knip-config.md).
155
+
156
+ **Gate before Phase 2.** Hints clean, *and* unresolved imports plus unlisted
157
+ dependencies both explained. If either is still in the dozens, the config is
158
+ not done — the resolver is failing, not the code. Triaging findings from a
159
+ misconfigured run is how false positives become deletions.
160
+
161
+ ---
162
+
163
+ ## Phase 2 — Baseline the module graph [LOW freedom — run exactly]
164
+
165
+ Run **both** modes; Knip's CI guide suggests considering a default run
166
+ alongside a production run.
167
+
168
+ ```
169
+ npx knip --production # shipped code only: no tests, config, stories, devDeps
170
+ npx knip # everything
171
+ ```
172
+
173
+ Read findings in Knip's documented order, because it cascades — "getting
174
+ the list of unused files right trickles down into the other issue types":
175
+
176
+ 1. **Unused files** — one dead file manufactures phantom unused exports
177
+ *and* phantom unused deps downstream
178
+ 2. **Unresolved imports** — usually a `paths` gap, not dead code
179
+ 3. **Unused exports / types**
180
+ 4. **Unused dependencies**
181
+
182
+ Scope with `--files`, `--exports`, `--dependencies` to read one class at a
183
+ time, and `--max-show-issues <n>` to keep a first pass readable.
184
+ `--production` excludes test files, config files, stories and
185
+ devDependencies; `--strict` additionally isolates workspaces to direct
186
+ dependencies. `--reporter json` is what the baseline numbers come from —
187
+ never a hand count.
188
+
189
+ Delegate a baseline or residue pass to a subagent only when it is sizeable, independent of the others, and its raw output (Knip JSON, grep dumps) has no place in the plan; brief it with the exact commands and the columns to return. It deletes nothing, like this pass. A handful of greps stays in the main context. Long sweeps are expected — context compaction exists, so finish the inventory rather than wrapping up early.
190
+
191
+ **Build the keep-working list.** For every finding, ask what would break.
192
+ Named suspects, each needing a positive reason to keep:
193
+
194
+ - Glob/dynamic-imported routes and pages
195
+ - String-referenced handlers, feature-flag targets, job names
196
+ - Generated types (regenerate, don't hand-edit)
197
+ - Deliberate public API → tag `@public` (Knip then stops reporting it)
198
+ - Test-only exports that production mode flags → tag `@internal`
199
+ - Duplicate default+named export pairs → tag `@alias`
200
+
201
+ Tags beat config here: they live next to the code and Knip reports a **tag
202
+ hint** when a tag becomes unnecessary, so the exemption cannot rot.
203
+
204
+ ---
205
+
206
+ ## Phase 3 — The seven surfaces Knip cannot see [MIXED — greps run exactly]
207
+
208
+ Knip owns the module graph. These are the classes a vibe-coded repo
209
+ accumulates that it will never report. Count each; fix nothing. Exact
210
+ commands, false positives, and the fix column are in
211
+ [`references/residue-greps.md`](references/residue-greps.md).
212
+
213
+ > **Run the bundle-leak check even if you skip the rest of this phase:**
214
+ > `npm run build && rg -l "service_role|SUPABASE_SERVICE_ROLE" dist`. A hit
215
+ > is a live credential in shipped output — stop the pass and go to
216
+ > `plan-secrets-audit`.
217
+
218
+ **3a. Unused variables and imports inside files.** Knip explicitly does
219
+ not do this. Baseline with `tsc --noEmit` under `noUnusedLocals` +
220
+ `noUnusedParameters`, or your linter's unused rule. Record the count and
221
+ whether the compiler flags are even on.
222
+
223
+ **3b. Copy-paste duplication.** The class AI-assisted repos are worst at,
224
+ and no other skill in this pack detects it. `npx jscpd src --min-tokens 50
225
+ --reporters json` (50 is the default; raising it cuts boilerplate noise).
226
+ Record duplication % and the top clone pairs. **Duplication is a refactor
227
+ finding, not a deletion finding** — route to `workflow-refactor`.
228
+
229
+ **3c. Debug residue.** Mechanical and countable:
230
+
231
+ ```
232
+ rg -n "console\.(log|debug|warn)|debugger" --glob '!*test*' --glob '!*spec*'
233
+ rg -n "\.(only|skip|todo)\(|xit\(|xdescribe\(|fdescribe\("
234
+ ```
235
+
236
+ Plus commented-out code blocks and `utils`/`helpers` dumping grounds.
237
+ `.only` in a committed test is worse than dead code — it silently disables
238
+ the rest of the file. Flag those **high**.
239
+
240
+ **3d. Suppression debt.** The count that must only ever shrink. Use
241
+ `rg -o … | wc -l` for a repo total — `rg -c` prints per-file counts of
242
+ *matching lines*, which is not a number you can ratchet:
243
+
244
+ ```
245
+ rg -o "@ts-ignore|@ts-expect-error|eslint-disable|biome-ignore" | wc -l
246
+ rg -o ":\s*any\b|as any\b" | wc -l
247
+ ```
248
+
249
+ Also catch stale suppressions: a `@ts-expect-error` on a line that no
250
+ longer errors is itself dead code, and TypeScript reports it.
251
+
252
+ **3e. Orphan assets.** Knip reads the module graph, so it cannot see
253
+ binaries. Cross-reference every filename under `public/`, `assets/`,
254
+ `static/` against source, CSS, and HTML. Beware hashed and templated
255
+ references (`` `/img/${name}.png` ``) — those make a name-based scan
256
+ report false orphans, so a folder referenced only by template string is
257
+ `needs-owner`, not dead.
258
+
259
+ **3f. Env var drift, both directions.** Referenced-but-undeclared is a
260
+ production break; declared-but-unreferenced is dead config:
261
+
262
+ ```
263
+ rg -o "import\.meta\.env\.[A-Z0-9_]+|process\.env\.[A-Z0-9_]+" -r '$0' --no-filename | sort -u
264
+ ```
265
+
266
+ Diff that set against `.env.example`. Report names only — **never print
267
+ values.**
268
+
269
+ **3g. Dead database schema.** [read-only this pass]
270
+
271
+ These three commands only read, so they are safe against any target
272
+ including production — and index-scan statistics are *only* meaningful
273
+ against real traffic, so prefer production and record the stats window.
274
+ The non-production gate applies to anything that writes.
275
+
276
+ ```
277
+ supabase db lint # plpgsql_check: dead code after RETURN, unused variables
278
+ supabase inspect db unused-indexes # indexes with low scan counts
279
+ supabase inspect db seq-scans
280
+ ```
281
+
282
+ Then cross-reference client usage to find orphans the database cannot know
283
+ about: `rg -o "\.from\('[^']+'\)|\.rpc\('[^']+'\)|functions\.invoke\('[^']+'\)"`
284
+ against the table/function/Edge-Function inventory. Also: Edge Functions
285
+ deployed but never invoked, migration sprawl, and whether generated types
286
+ still match the schema (`supabase gen types` diff).
287
+
288
+ **Low index scans on a young or read-light database is not evidence of a
289
+ dead index.** Record the stats window. Every schema finding lands in the
290
+ plan as a proposal — **no `DROP` is authored in this pass**, and destructive
291
+ migrations route to `plan-data-integrity` and `db-migrator`.
292
+
293
+ ---
294
+
295
+ ## Phase 4 — Write `plan-dead-code.md` [LOW freedom on format]
296
+
297
+ **4a. Baseline table** — the ratchet's starting line. Numbers only ever go down.
298
+
299
+ | Metric | Command | Today |
300
+ |---|---|---|
301
+ | Knip issues (production) | `knip --production` | |
302
+ | Knip issues (default) | `knip` | |
303
+ | Unused files / exports / types / deps | `knip --files` etc. | |
304
+ | Unused locals | `tsc --noEmit` | |
305
+ | Duplication % | `jscpd` | |
306
+ | `console.*` / `debugger` | `rg -o … \| wc -l` | |
307
+ | `.only` / `.skip` / `.todo` / `x`-prefixed | `rg -o … \| wc -l` | |
308
+ | Suppressions / `any` | `rg -o … \| wc -l` | |
309
+ | Orphan assets | asset scan | |
310
+ | Env drift (missing / unused) | env diff | |
311
+ | Unused indexes / orphan tables / functions | `supabase inspect` | |
312
+
313
+ **4b. Keep/kill list** — one row per **chain head**:
314
+ `path:line | class | evidence | verdict | sev | effort | children | what must keep working`
315
+
316
+ Verdicts: `kill` · `keep-tagged` (`@public`/`@internal`/`@alias`) ·
317
+ `keep-config` (config gap, fix the config) · `chain` (child of another row) ·
318
+ `needs-owner` (a human must decide). Never guess `kill` to shrink the list,
319
+ and never leave a keep row without naming its remedy — a keep with no remedy
320
+ is an `ignore` in disguise, and the next session will delete it.
321
+
322
+ A filled example table, with the severity and effort rubric, is in
323
+ [`references/output-templates.md`](references/output-templates.md).
324
+
325
+ **4c. Phased burndown** — ordered so each phase's verification is
326
+ meaningful, cheapest-to-review first, and the pre-approved file list going
327
+ first so later phases do not churn files that are about to be deleted.
328
+
329
+ **4d. Ratchet proposal** — the `knip` script, the CI job with
330
+ `--max-issues` set to today's count, and which aggregator gate it joins.
331
+
332
+ **4e. Cause-not-count callouts.** If 40 exports come from one barrel
333
+ `index.ts`, the finding is *the barrel*, not 40 exports. Name the root
334
+ cause so execution fixes one thing instead of forty.
335
+
336
+ ---
337
+
338
+ ## Self-critique before delivering [LOW freedom — do not skip]
339
+
340
+ 1. **Config settled** — hints resolved; no `ignore` used where `entry`,
341
+ `paths`, `--production`, or a tag was the real fix
342
+ 2. **Both modes run** — `--production` and default, reported separately
343
+ 3. **Interpreted, not transcribed** — every `kill` names its evidence;
344
+ dynamic/generated/Deno paths were actively checked
345
+ 4. **Nothing deleted** — no file, export, dep, asset, or row changed
346
+ 5. **Non-graph surfaces counted** — all seven of Phase 3, or explicitly
347
+ `not run` with a reason
348
+ 6. **No secret values** — env findings are names only
349
+ 7. **Baseline is real** — every number came from an executed command, not
350
+ an estimate
351
+ 8. **Right owner** — duplication → `workflow-refactor`; unwired UI →
352
+ `plan-stub-checker`; slop taste → `plan-antislop`; package existence →
353
+ `plan-dependency-provenance`; circular deps → `enhance-arch-boundaries`;
354
+ destructive SQL → `plan-data-integrity`
355
+ 9. **Safety net stated** — whether tests currently lock the behavior being
356
+ deleted
357
+
358
+ ## Definition of Done
359
+
360
+ - [ ] Stack, workspaces, non-Node arms, generated and dynamic paths recorded
361
+ - [ ] `knip.json` authored; configuration hints clean
362
+ - [ ] Both `--production` and default baselines captured
363
+ - [ ] Findings read files → unresolved → exports → deps
364
+ - [ ] Keep-working list built; tags proposed instead of config where they fit
365
+ - [ ] Seven non-graph surfaces counted or marked `not run` with a reason
366
+ - [ ] `plan-dead-code.md` written: baseline, keep/kill list, phases, ratchet
367
+ - [ ] Root causes named (barrels, dumping grounds) — not just item counts
368
+ - [ ] Zero deletions this pass; execution handed to `housekeep-dead-code`
369
+
370
+ ## Output format
371
+
372
+ Full template: [`references/output-templates.md`](references/output-templates.md).
373
+
374
+ 1. **Config diff** — what `knip.json` changed and which hint each resolved
375
+ 2. **Before/after finding counts** — first run vs configured run (the honest
376
+ measure of how much was never dead)
377
+ 3. **Baseline table** — 4a, fully populated
378
+ 4. **Keep/kill list** — 4b, chain heads only, grouped by class
379
+ 5. **Root causes** — 4e, the barrels and dumping grounds behind the counts
380
+ 6. **Phased burndown** — 4c with risk and "what must keep working" per phase
381
+ 7. **Ratchet proposal** — 4d
382
+ 8. **Handoffs** — per the self-critique owner list
383
+
384
+ Plan only. End the turn with a standalone recap in chat: the two or three highest-impact chain heads and the first phase to approve; the plan file is the deliverable, write it first. Deletion begins in `housekeep-dead-code`, after approval. The
385
+ non-negotiables for this pass are in
386
+ [`references/preservation-contract.md`](references/preservation-contract.md).
@@ -0,0 +1,214 @@
1
+ # Knip config recipes and the ratchet job
2
+
3
+ Starting points, not drop-ins. Author the config from the detected stack
4
+ (Phase 0), then let configuration hints correct you. Every pattern below
5
+ exists to replace an `ignore` someone would otherwise reach for.
6
+
7
+ Install locally, never globally:
8
+
9
+ ```bash
10
+ npm i -D knip # pnpm add -D knip · yarn add -D knip · bun add -d knip
11
+ ```
12
+
13
+ Knip already respects `.gitignore`. Do not re-list `node_modules`, `dist`,
14
+ `build`, or `.next`. Do not re-declare entry points that an auto-detected
15
+ plugin already adds — a redundant pattern is drift waiting to happen.
16
+
17
+ ---
18
+
19
+ ## Vite + React + Supabase
20
+
21
+ The four things that make this stack look 90% dead on a first run:
22
+ glob-loaded routes, a generated types file, a design-system barrel, and
23
+ `supabase/functions/**` (Deno — never in the Vite module graph).
24
+
25
+ ```json
26
+ {
27
+ "$schema": "https://unpkg.com/knip@6/schema.json",
28
+ "workspaces": {
29
+ ".": {
30
+ "entry": [
31
+ "src/main.tsx!",
32
+ "src/routes/**/*.{ts,tsx}!",
33
+ "vite.config.ts",
34
+ "tailwind.config.ts"
35
+ ],
36
+ "project": ["src/**/*.{ts,tsx}!"],
37
+ "ignoreIssues": { "src/types/supabase.ts": ["exports", "types"] },
38
+ "ignoreDependencies": ["tailwindcss", "autoprefixer"],
39
+ "ignoreExportsUsedInFile": { "interface": true, "type": true }
40
+ },
41
+ "supabase/functions/*": {
42
+ "entry": ["index.ts!"],
43
+ "project": ["**/*.ts!"]
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ Why each line:
50
+
51
+ | Line | Replaces | Reason |
52
+ |---|---|---|
53
+ | `src/routes/**` in `entry` | ignoring `src/routes` | Loaded by `import.meta.glob`; nothing imports them, so they are entry points by definition |
54
+ | `!` suffix | — | Marks the pattern as production, so `--production` keeps it |
55
+ | `vite.config.ts`, `tailwind.config.ts` as entry | ignoring the configs | Config files are entry points; they also pull deps that look unused |
56
+ | `ignoreIssues` on `src/types/supabase.ts` | `ignore` on the file | Generated by `supabase gen types` — regenerate, never hand-edit. Scoped to the two issue types it actually over-reports, so a genuine unresolved import in that file still surfaces; a blanket `ignore` would silence those too |
57
+ | `ignoreExportsUsedInFile` | `--exclude types` | Kills the unused-`interface`/`type` flood without hiding real unused types |
58
+ | `ignoreDependencies` | blanket `ignore` | Referenced only from PostCSS/Tailwind config strings |
59
+ | separate `supabase/functions/*` workspace | ignoring the folder | Deno runtime with its own graph; as part of the app workspace every function reports unused |
60
+
61
+ Add `paths` (tsconfig semantics) if `@/*` aliases come back unresolved:
62
+
63
+ ```json
64
+ { "paths": { "@/*": ["src/*"] } }
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Next.js App Router
70
+
71
+ The Next plugin already knows `app/**/page.tsx`, `layout.tsx`, `route.ts`,
72
+ `middleware.ts`. Do not re-list them.
73
+
74
+ ```json
75
+ {
76
+ "$schema": "https://unpkg.com/knip@6/schema.json",
77
+ "next": { "entry": ["instrumentation.ts!", "app/**/opengraph-image.tsx!"] },
78
+ "ignoreExportsUsedInFile": { "interface": true, "type": true },
79
+ "ignoreDependencies": ["sharp"]
80
+ }
81
+ ```
82
+
83
+ Server Actions exported from `"use server"` modules are reached through the
84
+ framework, not an import. If they surface as unused, tag the deliberate
85
+ ones `@public` rather than ignoring the file — a tag is local and Knip
86
+ reports a **tag hint** when it stops being needed.
87
+
88
+ ---
89
+
90
+ ## Monorepo (pnpm / turbo / nx)
91
+
92
+ A monorepo configured as one root project reports the whole repo as dead.
93
+ Declare workspaces explicitly.
94
+
95
+ ```json
96
+ {
97
+ "$schema": "https://unpkg.com/knip@6/schema.json",
98
+ "workspaces": {
99
+ "apps/*": { "entry": ["src/main.tsx!"], "project": ["src/**!"] },
100
+ "packages/*": { "entry": ["src/index.ts!"], "project": ["src/**!"] },
101
+ "packages/config": { "entry": ["*.js"] }
102
+ }
103
+ }
104
+ ```
105
+
106
+ - `--workspace <name>` scopes a run to one package plus its ancestor,
107
+ dependency, and dependent workspaces. Narrowing it is also a way to hide
108
+ findings — treat a scope change like a baseline change.
109
+ - `--strict` isolates workspaces and considers only direct dependencies —
110
+ it catches a package importing something it never declared.
111
+ - A `packages/*` public API is genuinely exported for consumers: tag it
112
+ `@public` instead of adding entry patterns for every symbol.
113
+
114
+ ---
115
+
116
+ ## Tags beat config
117
+
118
+ Config exemptions rot silently. Tags sit next to the code, and Knip emits
119
+ a tag hint when one is no longer necessary.
120
+
121
+ ```ts
122
+ /** @public */
123
+ export const publicApiFn = () => {}; // deliberate API — not reported
124
+
125
+ /** @internal */
126
+ export const forTestsOnly = () => {}; // not reported in --production
127
+
128
+ export const Component = () => {};
129
+ /** @alias */
130
+ export default Component; // suppresses the duplicate-export finding
131
+ ```
132
+
133
+ Custom tags with CLI/config control:
134
+
135
+ ```bash
136
+ npx knip --tags=-lintignore,-internal # '-' excludes, '+' includes only
137
+ ```
138
+
139
+ `@beta` behaves like `@public`. `@alpha` and `@experimental` are ignored.
140
+
141
+ ---
142
+
143
+ ## Companion tools
144
+
145
+ Knip owns the module graph and nothing else. Officially recommended
146
+ companions:
147
+
148
+ | Class | Tool | Note |
149
+ |---|---|---|
150
+ | Unused vars/imports *inside* files | ESLint, Biome, or oxlint | Knip explicitly does not do this |
151
+ | Bulk removal of unused code in files | `remove-unused-vars` | Consumes linter output; run it, then re-run Knip |
152
+ | Circular dependencies | dpdm, madge, skott | Pack owner is `enhance-arch-boundaries` |
153
+ | Copy-paste duplication | jscpd | `--min-tokens 50` default; raise to cut boilerplate noise |
154
+ | Compiler-level unused locals | `tsc --noEmit` | Needs `noUnusedLocals` + `noUnusedParameters` on |
155
+
156
+ ---
157
+
158
+ ## The ratchet job
159
+
160
+ `--max-issues` defaults to `0`. Set it to the post-cleanup count and only
161
+ ever lower it. Run both modes; production mode is the number that should
162
+ reach zero first.
163
+
164
+ ```json
165
+ {
166
+ "scripts": {
167
+ "knip": "knip --production --max-issues 0",
168
+ "knip:all": "knip --max-issues 3 --treat-config-hints-as-errors"
169
+ }
170
+ }
171
+ ```
172
+
173
+ ```yaml
174
+ dead-code:
175
+ runs-on: ubuntu-latest
176
+ steps:
177
+ - uses: actions/checkout@v7
178
+ - uses: actions/setup-node@v7
179
+ with:
180
+ node-version: 24
181
+ cache: npm
182
+ - run: npm ci --ignore-scripts
183
+ - name: Dead code (production)
184
+ run: npm run knip
185
+ - name: Dead code (all)
186
+ run: npm run knip:all
187
+ ```
188
+
189
+ CI calls the **scripts**, not raw flags, so local and CI cannot drift.
190
+
191
+ Then add `dead-code` to the aggregator's `needs:` list rather than making
192
+ it a second required check — see `housekeep-gates`.
193
+
194
+ Exit codes: `0` clean · `1` issues found · `2` Knip failed to run. Treat
195
+ `2` as a broken gate, never as a pass; a job that only checks for `1` will
196
+ go green on a crashed run.
197
+
198
+ `--treat-config-hints-as-errors` is what stops the config from silently
199
+ decaying after the plan pass — without it, a stale `entry` pattern degrades
200
+ the signal and nobody notices. **It belongs on the default-mode run only:**
201
+ Knip computes `isDisableConfigHints = --no-config-hints || isProduction`,
202
+ so under `--production` hints are never collected and the flag is inert.
203
+
204
+ Two flags deliberately omitted: `--cache` writes to
205
+ `node_modules/.cache/knip`, which `npm ci` wipes on every run (add an
206
+ `actions/cache` step if you want it), and `--no-progress` is redundant
207
+ because Knip already disables progress in CI.
208
+
209
+ **Guard the ratchet, not just the number.** `--max-issues` totals only
210
+ issue types whose rule is `error`, so a `rules: { files: "warn" }` entry
211
+ reports every dead file and still exits `0`. Same class of bypass:
212
+ `--no-exit-code`, `--exclude`, a narrowed `--include`, `--workspace`
213
+ scoping, and the `ignore*` family. Review changes to `knip.json` and the
214
+ job's flags as carefully as the count itself.