@macpaw/cctk 1.0.0-beta.1

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 (415) hide show
  1. package/License +21 -0
  2. package/README.md +142 -0
  3. package/bin/index.js +5 -0
  4. package/dist/index.js +1 -0
  5. package/package.json +65 -0
  6. package/templates/claude/agents/brainstormer.md +113 -0
  7. package/templates/claude/agents/code-reviewer.md +157 -0
  8. package/templates/claude/agents/copywriter.md +110 -0
  9. package/templates/claude/agents/database-admin.md +92 -0
  10. package/templates/claude/agents/debugger.md +137 -0
  11. package/templates/claude/agents/docs-manager.md +208 -0
  12. package/templates/claude/agents/fullstack-developer.md +95 -0
  13. package/templates/claude/agents/git-manager.md +394 -0
  14. package/templates/claude/agents/journal-writer.md +113 -0
  15. package/templates/claude/agents/mcp-manager.md +89 -0
  16. package/templates/claude/agents/planner.md +108 -0
  17. package/templates/claude/agents/project-manager.md +125 -0
  18. package/templates/claude/agents/registry.json +304 -0
  19. package/templates/claude/agents/researcher.md +37 -0
  20. package/templates/claude/agents/scout-external.md +140 -0
  21. package/templates/claude/agents/scout.md +106 -0
  22. package/templates/claude/agents/tester.md +105 -0
  23. package/templates/claude/agents/ui-ux-designer.md +208 -0
  24. package/templates/claude/commands/ask.md +56 -0
  25. package/templates/claude/commands/bootstrap/auto/fast.md +106 -0
  26. package/templates/claude/commands/bootstrap/auto/parallel.md +64 -0
  27. package/templates/claude/commands/bootstrap/auto.md +110 -0
  28. package/templates/claude/commands/bootstrap.md +130 -0
  29. package/templates/claude/commands/brainstorm.md +75 -0
  30. package/templates/claude/commands/code/auto.md +198 -0
  31. package/templates/claude/commands/code/no-test.md +172 -0
  32. package/templates/claude/commands/code/parallel.md +100 -0
  33. package/templates/claude/commands/code.md +197 -0
  34. package/templates/claude/commands/coding-level.md +37 -0
  35. package/templates/claude/commands/content/cro.md +41 -0
  36. package/templates/claude/commands/content/enhance.md +12 -0
  37. package/templates/claude/commands/content/fast.md +11 -0
  38. package/templates/claude/commands/content/good.md +14 -0
  39. package/templates/claude/commands/cook/auto/fast.md +26 -0
  40. package/templates/claude/commands/cook/auto/parallel.md +49 -0
  41. package/templates/claude/commands/cook/auto.md +15 -0
  42. package/templates/claude/commands/cook.md +101 -0
  43. package/templates/claude/commands/debug.md +13 -0
  44. package/templates/claude/commands/docs/init.md +37 -0
  45. package/templates/claude/commands/docs/summarize.md +22 -0
  46. package/templates/claude/commands/docs/update.md +78 -0
  47. package/templates/claude/commands/fix/ci.md +17 -0
  48. package/templates/claude/commands/fix/fast.md +18 -0
  49. package/templates/claude/commands/fix/hard.md +35 -0
  50. package/templates/claude/commands/fix/logs.md +26 -0
  51. package/templates/claude/commands/fix/parallel.md +54 -0
  52. package/templates/claude/commands/fix/test.md +20 -0
  53. package/templates/claude/commands/fix/types.md +9 -0
  54. package/templates/claude/commands/fix/ui.md +33 -0
  55. package/templates/claude/commands/fix.md +43 -0
  56. package/templates/claude/commands/git/cm.md +5 -0
  57. package/templates/claude/commands/git/cp.md +4 -0
  58. package/templates/claude/commands/git/merge.md +40 -0
  59. package/templates/claude/commands/git/pr.md +50 -0
  60. package/templates/claude/commands/journal.md +7 -0
  61. package/templates/claude/commands/kanban.md +99 -0
  62. package/templates/claude/commands/plan/archive.md +57 -0
  63. package/templates/claude/commands/plan/ci.md +33 -0
  64. package/templates/claude/commands/plan/cro.md +67 -0
  65. package/templates/claude/commands/plan/fast.md +66 -0
  66. package/templates/claude/commands/plan/hard.md +92 -0
  67. package/templates/claude/commands/plan/parallel.md +129 -0
  68. package/templates/claude/commands/plan/two.md +45 -0
  69. package/templates/claude/commands/plan/validate.md +117 -0
  70. package/templates/claude/commands/plan.md +30 -0
  71. package/templates/claude/commands/preview.md +87 -0
  72. package/templates/claude/commands/registry.json +313 -0
  73. package/templates/claude/commands/review/codebase/parallel.md +122 -0
  74. package/templates/claude/commands/review/codebase.md +47 -0
  75. package/templates/claude/commands/scout/ext.md +35 -0
  76. package/templates/claude/commands/scout.md +28 -0
  77. package/templates/claude/commands/skill/add.md +36 -0
  78. package/templates/claude/commands/skill/create.md +29 -0
  79. package/templates/claude/commands/skill/fix-logs.md +22 -0
  80. package/templates/claude/commands/skill/optimize/auto.md +25 -0
  81. package/templates/claude/commands/skill/optimize.md +34 -0
  82. package/templates/claude/commands/skill/plan.md +45 -0
  83. package/templates/claude/commands/test/ui.md +91 -0
  84. package/templates/claude/commands/test.md +8 -0
  85. package/templates/claude/commands/use-mcp.md +34 -0
  86. package/templates/claude/commands/watzup.md +8 -0
  87. package/templates/claude/commands/worktree.md +126 -0
  88. package/templates/claude/hooks/dev-rules-reminder.cjs +258 -0
  89. package/templates/claude/hooks/docs/README.md +42 -0
  90. package/templates/claude/hooks/lib/cctk-config-utils.cjs +751 -0
  91. package/templates/claude/hooks/lib/cctk-paths.cjs +106 -0
  92. package/templates/claude/hooks/lib/context-tracker.cjs +346 -0
  93. package/templates/claude/hooks/privacy-block.cjs +289 -0
  94. package/templates/claude/hooks/registry.json +77 -0
  95. package/templates/claude/hooks/scout-block/broad-pattern-detector.cjs +293 -0
  96. package/templates/claude/hooks/scout-block/error-formatter.cjs +156 -0
  97. package/templates/claude/hooks/scout-block/path-extractor.cjs +359 -0
  98. package/templates/claude/hooks/scout-block/pattern-matcher.cjs +184 -0
  99. package/templates/claude/hooks/scout-block/vendor/ignore.js +626 -0
  100. package/templates/claude/hooks/scout-block.cjs +167 -0
  101. package/templates/claude/hooks/session-end.cjs +35 -0
  102. package/templates/claude/hooks/session-init.cjs +214 -0
  103. package/templates/claude/hooks/subagent-init.cjs +161 -0
  104. package/templates/claude/hooks/write-compact-marker.cjs +153 -0
  105. package/templates/claude/output-styles/coding-level-1.md +148 -0
  106. package/templates/claude/output-styles/coding-level-2.md +159 -0
  107. package/templates/claude/output-styles/coding-level-3.md +91 -0
  108. package/templates/claude/scripts/README.md +33 -0
  109. package/templates/claude/scripts/generate-catalogs.cjs +318 -0
  110. package/templates/claude/scripts/registry.json +48 -0
  111. package/templates/claude/scripts/set-active-plan.cjs +45 -0
  112. package/templates/claude/scripts/validate-docs.cjs +447 -0
  113. package/templates/claude/scripts/worktree.cjs +658 -0
  114. package/templates/claude/skills/README.md +112 -0
  115. package/templates/claude/skills/ai-artist/SKILL.md +75 -0
  116. package/templates/claude/skills/ai-artist/references/advanced-techniques.md +184 -0
  117. package/templates/claude/skills/ai-artist/references/domain-code.md +66 -0
  118. package/templates/claude/skills/ai-artist/references/domain-data.md +72 -0
  119. package/templates/claude/skills/ai-artist/references/domain-marketing.md +66 -0
  120. package/templates/claude/skills/ai-artist/references/domain-patterns.md +33 -0
  121. package/templates/claude/skills/ai-artist/references/domain-writing.md +68 -0
  122. package/templates/claude/skills/ai-artist/references/image-prompting.md +141 -0
  123. package/templates/claude/skills/ai-artist/references/llm-prompting.md +165 -0
  124. package/templates/claude/skills/ai-artist/references/nano-banana.md +59 -0
  125. package/templates/claude/skills/ai-artist/references/reasoning-techniques.md +201 -0
  126. package/templates/claude/skills/backend-development/SKILL.md +95 -0
  127. package/templates/claude/skills/backend-development/references/backend-api-design.md +495 -0
  128. package/templates/claude/skills/backend-development/references/backend-architecture.md +454 -0
  129. package/templates/claude/skills/backend-development/references/backend-authentication.md +338 -0
  130. package/templates/claude/skills/backend-development/references/backend-code-quality.md +659 -0
  131. package/templates/claude/skills/backend-development/references/backend-debugging.md +904 -0
  132. package/templates/claude/skills/backend-development/references/backend-devops.md +494 -0
  133. package/templates/claude/skills/backend-development/references/backend-mindset.md +387 -0
  134. package/templates/claude/skills/backend-development/references/backend-performance.md +397 -0
  135. package/templates/claude/skills/backend-development/references/backend-security.md +290 -0
  136. package/templates/claude/skills/backend-development/references/backend-technologies.md +256 -0
  137. package/templates/claude/skills/backend-development/references/backend-testing.md +429 -0
  138. package/templates/claude/skills/better-auth/SKILL.md +204 -0
  139. package/templates/claude/skills/better-auth/references/advanced-features.md +553 -0
  140. package/templates/claude/skills/better-auth/references/database-integration.md +577 -0
  141. package/templates/claude/skills/better-auth/references/email-password-auth.md +416 -0
  142. package/templates/claude/skills/better-auth/references/oauth-providers.md +430 -0
  143. package/templates/claude/skills/better-auth/scripts/better_auth_init.py +521 -0
  144. package/templates/claude/skills/chrome-devtools/SKILL.md +473 -0
  145. package/templates/claude/skills/chrome-devtools/references/cdp-domains.md +694 -0
  146. package/templates/claude/skills/chrome-devtools/references/performance-guide.md +940 -0
  147. package/templates/claude/skills/chrome-devtools/references/puppeteer-reference.md +953 -0
  148. package/templates/claude/skills/chrome-devtools/scripts/README.md +288 -0
  149. package/templates/claude/skills/chrome-devtools/scripts/aria-snapshot.js +368 -0
  150. package/templates/claude/skills/chrome-devtools/scripts/click.js +92 -0
  151. package/templates/claude/skills/chrome-devtools/scripts/console.js +85 -0
  152. package/templates/claude/skills/chrome-devtools/scripts/evaluate.js +59 -0
  153. package/templates/claude/skills/chrome-devtools/scripts/fill.js +84 -0
  154. package/templates/claude/skills/chrome-devtools/scripts/inject-auth.js +247 -0
  155. package/templates/claude/skills/chrome-devtools/scripts/install-deps.sh +11 -0
  156. package/templates/claude/skills/chrome-devtools/scripts/install.sh +36 -0
  157. package/templates/claude/skills/chrome-devtools/scripts/lib/browser.js +335 -0
  158. package/templates/claude/skills/chrome-devtools/scripts/lib/selector.js +183 -0
  159. package/templates/claude/skills/chrome-devtools/scripts/navigate.js +60 -0
  160. package/templates/claude/skills/chrome-devtools/scripts/network.js +113 -0
  161. package/templates/claude/skills/chrome-devtools/scripts/package.json +16 -0
  162. package/templates/claude/skills/chrome-devtools/scripts/performance.js +159 -0
  163. package/templates/claude/skills/chrome-devtools/scripts/screenshot.js +212 -0
  164. package/templates/claude/skills/chrome-devtools/scripts/select-ref.js +151 -0
  165. package/templates/claude/skills/chrome-devtools/scripts/snapshot.js +143 -0
  166. package/templates/claude/skills/chrome-devtools/scripts/ws-debug.js +47 -0
  167. package/templates/claude/skills/chrome-devtools/scripts/ws-full-debug.js +115 -0
  168. package/templates/claude/skills/claude-code/references/advanced-features.md +399 -0
  169. package/templates/claude/skills/claude-code/references/agent-skills.md +399 -0
  170. package/templates/claude/skills/claude-code/references/api-reference.md +498 -0
  171. package/templates/claude/skills/claude-code/references/best-practices.md +447 -0
  172. package/templates/claude/skills/claude-code/references/cicd-integration.md +428 -0
  173. package/templates/claude/skills/claude-code/references/common-workflows.md +107 -0
  174. package/templates/claude/skills/claude-code/references/configuration.md +480 -0
  175. package/templates/claude/skills/claude-code/references/enterprise-features.md +472 -0
  176. package/templates/claude/skills/claude-code/references/getting-started.md +244 -0
  177. package/templates/claude/skills/claude-code/references/hooks-and-plugins.md +444 -0
  178. package/templates/claude/skills/claude-code/references/hooks-comprehensive.md +622 -0
  179. package/templates/claude/skills/claude-code/references/ide-integration.md +316 -0
  180. package/templates/claude/skills/claude-code/references/mcp-integration.md +386 -0
  181. package/templates/claude/skills/claude-code/references/slash-commands.md +460 -0
  182. package/templates/claude/skills/claude-code/references/troubleshooting.md +455 -0
  183. package/templates/claude/skills/claude-code/skill.md +60 -0
  184. package/templates/claude/skills/code-review/SKILL.md +143 -0
  185. package/templates/claude/skills/code-review/references/code-review-reception.md +209 -0
  186. package/templates/claude/skills/code-review/references/requesting-code-review.md +105 -0
  187. package/templates/claude/skills/code-review/references/verification-before-completion.md +139 -0
  188. package/templates/claude/skills/context-engineering/SKILL.md +86 -0
  189. package/templates/claude/skills/context-engineering/references/context-compression.md +84 -0
  190. package/templates/claude/skills/context-engineering/references/context-degradation.md +93 -0
  191. package/templates/claude/skills/context-engineering/references/context-fundamentals.md +75 -0
  192. package/templates/claude/skills/context-engineering/references/context-optimization.md +82 -0
  193. package/templates/claude/skills/context-engineering/references/evaluation.md +89 -0
  194. package/templates/claude/skills/context-engineering/references/memory-systems.md +88 -0
  195. package/templates/claude/skills/context-engineering/references/multi-agent-patterns.md +90 -0
  196. package/templates/claude/skills/context-engineering/references/project-development.md +97 -0
  197. package/templates/claude/skills/context-engineering/references/tool-design.md +86 -0
  198. package/templates/claude/skills/context-engineering/scripts/compression_evaluator.py +329 -0
  199. package/templates/claude/skills/context-engineering/scripts/context_analyzer.py +294 -0
  200. package/templates/claude/skills/databases/SKILL.md +232 -0
  201. package/templates/claude/skills/databases/references/mongodb-aggregation.md +447 -0
  202. package/templates/claude/skills/databases/references/mongodb-atlas.md +465 -0
  203. package/templates/claude/skills/databases/references/mongodb-crud.md +408 -0
  204. package/templates/claude/skills/databases/references/mongodb-indexing.md +442 -0
  205. package/templates/claude/skills/databases/references/postgresql-administration.md +594 -0
  206. package/templates/claude/skills/databases/references/postgresql-performance.md +527 -0
  207. package/templates/claude/skills/databases/references/postgresql-psql-cli.md +467 -0
  208. package/templates/claude/skills/databases/references/postgresql-queries.md +475 -0
  209. package/templates/claude/skills/databases/scripts/db_backup.py +502 -0
  210. package/templates/claude/skills/databases/scripts/db_migrate.py +414 -0
  211. package/templates/claude/skills/databases/scripts/db_performance_check.py +445 -0
  212. package/templates/claude/skills/debugging/SKILL.md +84 -0
  213. package/templates/claude/skills/debugging/references/defense-in-depth.md +124 -0
  214. package/templates/claude/skills/debugging/references/root-cause-tracing.md +122 -0
  215. package/templates/claude/skills/debugging/references/systematic-debugging.md +102 -0
  216. package/templates/claude/skills/debugging/references/verification.md +123 -0
  217. package/templates/claude/skills/debugging/scripts/find-polluter.sh +63 -0
  218. package/templates/claude/skills/debugging/scripts/find-polluter.test.md +102 -0
  219. package/templates/claude/skills/devops/SKILL.md +293 -0
  220. package/templates/claude/skills/devops/references/browser-rendering.md +305 -0
  221. package/templates/claude/skills/devops/references/cloudflare-d1-kv.md +123 -0
  222. package/templates/claude/skills/devops/references/cloudflare-platform.md +271 -0
  223. package/templates/claude/skills/devops/references/cloudflare-r2-storage.md +280 -0
  224. package/templates/claude/skills/devops/references/cloudflare-workers-advanced.md +312 -0
  225. package/templates/claude/skills/devops/references/cloudflare-workers-apis.md +309 -0
  226. package/templates/claude/skills/devops/references/cloudflare-workers-basics.md +418 -0
  227. package/templates/claude/skills/devops/references/docker-basics.md +297 -0
  228. package/templates/claude/skills/devops/references/docker-compose.md +292 -0
  229. package/templates/claude/skills/devops/references/gcloud-platform.md +307 -0
  230. package/templates/claude/skills/devops/references/gcloud-services.md +304 -0
  231. package/templates/claude/skills/devops/scripts/cloudflare_deploy.py +269 -0
  232. package/templates/claude/skills/devops/scripts/docker_optimize.py +320 -0
  233. package/templates/claude/skills/docs-seeker/SKILL.md +95 -0
  234. package/templates/claude/skills/docs-seeker/package.json +24 -0
  235. package/templates/claude/skills/docs-seeker/references/advanced.md +78 -0
  236. package/templates/claude/skills/docs-seeker/references/context7-patterns.md +68 -0
  237. package/templates/claude/skills/docs-seeker/references/errors.md +68 -0
  238. package/templates/claude/skills/docs-seeker/scripts/analyze-llms-txt.js +245 -0
  239. package/templates/claude/skills/docs-seeker/scripts/detect-topic.js +172 -0
  240. package/templates/claude/skills/docs-seeker/scripts/fetch-docs.js +212 -0
  241. package/templates/claude/skills/docs-seeker/workflows/library-search.md +87 -0
  242. package/templates/claude/skills/docs-seeker/workflows/repo-analysis.md +91 -0
  243. package/templates/claude/skills/docs-seeker/workflows/topic-search.md +77 -0
  244. package/templates/claude/skills/frontend-design/SKILL.md +85 -0
  245. package/templates/claude/skills/frontend-design/references/analysis-best-practices.md +80 -0
  246. package/templates/claude/skills/frontend-design/references/analysis-prompts.md +141 -0
  247. package/templates/claude/skills/frontend-design/references/analysis-techniques.md +118 -0
  248. package/templates/claude/skills/frontend-design/references/animejs.md +396 -0
  249. package/templates/claude/skills/frontend-design/references/design-extraction-overview.md +71 -0
  250. package/templates/claude/skills/frontend-design/references/extraction-best-practices.md +141 -0
  251. package/templates/claude/skills/frontend-design/references/extraction-output-templates.md +162 -0
  252. package/templates/claude/skills/frontend-design/references/extraction-prompts.md +127 -0
  253. package/templates/claude/skills/frontend-design/references/technical-accessibility.md +119 -0
  254. package/templates/claude/skills/frontend-design/references/technical-best-practices.md +97 -0
  255. package/templates/claude/skills/frontend-design/references/technical-optimization.md +44 -0
  256. package/templates/claude/skills/frontend-design/references/technical-overview.md +90 -0
  257. package/templates/claude/skills/frontend-design/references/technical-workflows.md +150 -0
  258. package/templates/claude/skills/frontend-design/references/visual-analysis-overview.md +95 -0
  259. package/templates/claude/skills/frontend-development/SKILL.md +399 -0
  260. package/templates/claude/skills/frontend-development/resources/common-patterns.md +331 -0
  261. package/templates/claude/skills/frontend-development/resources/complete-examples.md +872 -0
  262. package/templates/claude/skills/frontend-development/resources/component-patterns.md +502 -0
  263. package/templates/claude/skills/frontend-development/resources/data-fetching.md +767 -0
  264. package/templates/claude/skills/frontend-development/resources/file-organization.md +502 -0
  265. package/templates/claude/skills/frontend-development/resources/loading-and-error-states.md +501 -0
  266. package/templates/claude/skills/frontend-development/resources/performance.md +406 -0
  267. package/templates/claude/skills/frontend-development/resources/routing-guide.md +364 -0
  268. package/templates/claude/skills/frontend-development/resources/styling-guide.md +428 -0
  269. package/templates/claude/skills/frontend-development/resources/typescript-standards.md +418 -0
  270. package/templates/claude/skills/markdown-novel-viewer/SKILL.md +272 -0
  271. package/templates/claude/skills/markdown-novel-viewer/assets/directory-browser.css +215 -0
  272. package/templates/claude/skills/markdown-novel-viewer/assets/favicon.png +0 -0
  273. package/templates/claude/skills/markdown-novel-viewer/assets/novel-theme.css +872 -0
  274. package/templates/claude/skills/markdown-novel-viewer/assets/reader.js +378 -0
  275. package/templates/claude/skills/markdown-novel-viewer/assets/template.html +85 -0
  276. package/templates/claude/skills/markdown-novel-viewer/package.json +15 -0
  277. package/templates/claude/skills/markdown-novel-viewer/scripts/lib/http-server.cjs +434 -0
  278. package/templates/claude/skills/markdown-novel-viewer/scripts/lib/markdown-renderer.cjs +335 -0
  279. package/templates/claude/skills/markdown-novel-viewer/scripts/lib/plan-navigator.cjs +509 -0
  280. package/templates/claude/skills/markdown-novel-viewer/scripts/lib/port-finder.cjs +49 -0
  281. package/templates/claude/skills/markdown-novel-viewer/scripts/lib/process-mgr.cjs +150 -0
  282. package/templates/claude/skills/markdown-novel-viewer/scripts/server.cjs +398 -0
  283. package/templates/claude/skills/mcp-builder/SKILL.md +328 -0
  284. package/templates/claude/skills/mcp-builder/reference/evaluation.md +602 -0
  285. package/templates/claude/skills/mcp-builder/reference/mcp_best_practices.md +915 -0
  286. package/templates/claude/skills/mcp-builder/reference/node_mcp_server.md +916 -0
  287. package/templates/claude/skills/mcp-builder/reference/python_mcp_server.md +752 -0
  288. package/templates/claude/skills/mcp-builder/scripts/connections.py +151 -0
  289. package/templates/claude/skills/mcp-builder/scripts/evaluation.py +381 -0
  290. package/templates/claude/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  291. package/templates/claude/skills/mcp-builder/scripts/requirements.txt +2 -0
  292. package/templates/claude/skills/mcp-management/README.md +219 -0
  293. package/templates/claude/skills/mcp-management/SKILL.md +209 -0
  294. package/templates/claude/skills/mcp-management/assets/tools.json +3146 -0
  295. package/templates/claude/skills/mcp-management/references/configuration.md +114 -0
  296. package/templates/claude/skills/mcp-management/references/gemini-cli-integration.md +209 -0
  297. package/templates/claude/skills/mcp-management/references/mcp-protocol.md +116 -0
  298. package/templates/claude/skills/mcp-management/scripts/.env.example +10 -0
  299. package/templates/claude/skills/mcp-management/scripts/cli.ts +202 -0
  300. package/templates/claude/skills/mcp-management/scripts/mcp-client.ts +247 -0
  301. package/templates/claude/skills/mcp-management/scripts/package.json +20 -0
  302. package/templates/claude/skills/mcp-management/scripts/tsconfig.json +15 -0
  303. package/templates/claude/skills/media-processing/SKILL.md +91 -0
  304. package/templates/claude/skills/media-processing/references/common-workflows.md +132 -0
  305. package/templates/claude/skills/media-processing/references/ffmpeg-encoding.md +358 -0
  306. package/templates/claude/skills/media-processing/references/ffmpeg-filters.md +503 -0
  307. package/templates/claude/skills/media-processing/references/ffmpeg-streaming.md +395 -0
  308. package/templates/claude/skills/media-processing/references/format-compatibility.md +375 -0
  309. package/templates/claude/skills/media-processing/references/imagemagick-batch.md +612 -0
  310. package/templates/claude/skills/media-processing/references/imagemagick-editing.md +623 -0
  311. package/templates/claude/skills/media-processing/references/rmbg-background-removal.md +66 -0
  312. package/templates/claude/skills/media-processing/references/troubleshooting.md +109 -0
  313. package/templates/claude/skills/media-processing/scripts/README.md +102 -0
  314. package/templates/claude/skills/media-processing/scripts/batch-remove-background.sh +124 -0
  315. package/templates/claude/skills/media-processing/scripts/batch_resize.py +342 -0
  316. package/templates/claude/skills/media-processing/scripts/media_convert.py +311 -0
  317. package/templates/claude/skills/media-processing/scripts/remove-background.sh +96 -0
  318. package/templates/claude/skills/media-processing/scripts/remove-bg-node.js +181 -0
  319. package/templates/claude/skills/mermaidjs-v11/SKILL.md +115 -0
  320. package/templates/claude/skills/mermaidjs-v11/references/cli-usage.md +228 -0
  321. package/templates/claude/skills/mermaidjs-v11/references/configuration.md +232 -0
  322. package/templates/claude/skills/mermaidjs-v11/references/diagram-types.md +315 -0
  323. package/templates/claude/skills/mermaidjs-v11/references/examples.md +344 -0
  324. package/templates/claude/skills/mermaidjs-v11/references/integration.md +310 -0
  325. package/templates/claude/skills/planning/SKILL.md +115 -0
  326. package/templates/claude/skills/planning/references/codebase-understanding.md +62 -0
  327. package/templates/claude/skills/planning/references/output-standards.md +127 -0
  328. package/templates/claude/skills/planning/references/plan-organization.md +150 -0
  329. package/templates/claude/skills/planning/references/research-phase.md +49 -0
  330. package/templates/claude/skills/planning/references/solution-design.md +63 -0
  331. package/templates/claude/skills/plans-kanban/SKILL.md +157 -0
  332. package/templates/claude/skills/plans-kanban/assets/dashboard-template.html +119 -0
  333. package/templates/claude/skills/plans-kanban/assets/dashboard.css +1594 -0
  334. package/templates/claude/skills/plans-kanban/assets/dashboard.js +659 -0
  335. package/templates/claude/skills/plans-kanban/assets/favicon.png +0 -0
  336. package/templates/claude/skills/plans-kanban/package.json +13 -0
  337. package/templates/claude/skills/plans-kanban/scripts/lib/dashboard-renderer.cjs +941 -0
  338. package/templates/claude/skills/plans-kanban/scripts/lib/http-server.cjs +310 -0
  339. package/templates/claude/skills/plans-kanban/scripts/lib/plan-metadata-extractor.cjs +489 -0
  340. package/templates/claude/skills/plans-kanban/scripts/lib/plan-parser.cjs +194 -0
  341. package/templates/claude/skills/plans-kanban/scripts/lib/plan-scanner.cjs +277 -0
  342. package/templates/claude/skills/plans-kanban/scripts/lib/port-finder.cjs +49 -0
  343. package/templates/claude/skills/plans-kanban/scripts/lib/process-mgr.cjs +128 -0
  344. package/templates/claude/skills/plans-kanban/scripts/server.cjs +249 -0
  345. package/templates/claude/skills/problem-solving/SKILL.md +96 -0
  346. package/templates/claude/skills/problem-solving/references/attribution.md +69 -0
  347. package/templates/claude/skills/problem-solving/references/collision-zone-thinking.md +79 -0
  348. package/templates/claude/skills/problem-solving/references/inversion-exercise.md +91 -0
  349. package/templates/claude/skills/problem-solving/references/meta-pattern-recognition.md +87 -0
  350. package/templates/claude/skills/problem-solving/references/scale-game.md +95 -0
  351. package/templates/claude/skills/problem-solving/references/simplification-cascades.md +80 -0
  352. package/templates/claude/skills/problem-solving/references/when-stuck.md +72 -0
  353. package/templates/claude/skills/registry.json +258 -0
  354. package/templates/claude/skills/repomix/SKILL.md +247 -0
  355. package/templates/claude/skills/repomix/references/configuration.md +211 -0
  356. package/templates/claude/skills/repomix/references/usage-patterns.md +232 -0
  357. package/templates/claude/skills/repomix/scripts/README.md +179 -0
  358. package/templates/claude/skills/repomix/scripts/repomix_batch.py +455 -0
  359. package/templates/claude/skills/repomix/scripts/repos.example.json +15 -0
  360. package/templates/claude/skills/research/SKILL.md +168 -0
  361. package/templates/claude/skills/sequential-thinking/.env.example +8 -0
  362. package/templates/claude/skills/sequential-thinking/README.md +183 -0
  363. package/templates/claude/skills/sequential-thinking/SKILL.md +94 -0
  364. package/templates/claude/skills/sequential-thinking/package.json +31 -0
  365. package/templates/claude/skills/sequential-thinking/references/advanced-strategies.md +79 -0
  366. package/templates/claude/skills/sequential-thinking/references/advanced-techniques.md +76 -0
  367. package/templates/claude/skills/sequential-thinking/references/core-patterns.md +95 -0
  368. package/templates/claude/skills/sequential-thinking/references/examples-api.md +88 -0
  369. package/templates/claude/skills/sequential-thinking/references/examples-architecture.md +94 -0
  370. package/templates/claude/skills/sequential-thinking/references/examples-debug.md +90 -0
  371. package/templates/claude/skills/sequential-thinking/scripts/format-thought.js +182 -0
  372. package/templates/claude/skills/sequential-thinking/scripts/process-thought.js +252 -0
  373. package/templates/claude/skills/skill-creator/LICENSE.txt +202 -0
  374. package/templates/claude/skills/skill-creator/SKILL.md +266 -0
  375. package/templates/claude/skills/skill-creator/references/agent-skills-spec.md +51 -0
  376. package/templates/claude/skills/skill-creator/scripts/encoding_utils.py +21 -0
  377. package/templates/claude/skills/skill-creator/scripts/init_skill.py +304 -0
  378. package/templates/claude/skills/skill-creator/scripts/package_skill.py +110 -0
  379. package/templates/claude/skills/skill-creator/scripts/quick_validate.py +66 -0
  380. package/templates/claude/skills/template-skill/SKILL.md +6 -0
  381. package/templates/claude/skills/vitest/SKILL.md +595 -0
  382. package/templates/claude/skills/vitest/references/async-patterns.md +82 -0
  383. package/templates/claude/skills/vitest/references/mock-patterns.md +78 -0
  384. package/templates/claude/skills/vitest/references/monorepo-setup.md +185 -0
  385. package/templates/claude/skills/vitest/references/turborepo-setup.md +332 -0
  386. package/templates/claude/skills/web-frameworks/SKILL.md +324 -0
  387. package/templates/claude/skills/web-frameworks/references/nextjs-app-router.md +465 -0
  388. package/templates/claude/skills/web-frameworks/references/nextjs-data-fetching.md +459 -0
  389. package/templates/claude/skills/web-frameworks/references/nextjs-optimization.md +511 -0
  390. package/templates/claude/skills/web-frameworks/references/nextjs-server-components.md +495 -0
  391. package/templates/claude/skills/web-frameworks/references/remix-icon-integration.md +603 -0
  392. package/templates/claude/skills/web-frameworks/references/turborepo-caching.md +551 -0
  393. package/templates/claude/skills/web-frameworks/references/turborepo-pipelines.md +517 -0
  394. package/templates/claude/skills/web-frameworks/references/turborepo-setup.md +542 -0
  395. package/templates/claude/skills/web-frameworks/scripts/nextjs_init.py +547 -0
  396. package/templates/claude/skills/web-frameworks/scripts/turborepo_migrate.py +394 -0
  397. package/templates/claude/workflows/development-rules.md +40 -0
  398. package/templates/claude/workflows/documentation-management.md +121 -0
  399. package/templates/claude/workflows/orchestration-protocol.md +16 -0
  400. package/templates/claude/workflows/primary-workflow.md +45 -0
  401. package/templates/claude/workflows/registry.json +37 -0
  402. package/templates/common/.cct.json +41 -0
  403. package/templates/common/.cctkignore +22 -0
  404. package/templates/common/.env.example +39 -0
  405. package/templates/common/.mcp.json.example +16 -0
  406. package/templates/common/metadata.json +15 -0
  407. package/templates/common/settings.json +79 -0
  408. package/templates/common/statusline.cjs +271 -0
  409. package/templates/config/.repomixignore +22 -0
  410. package/templates/config/AGENTS.md +55 -0
  411. package/templates/config/CLAUDE.md +87 -0
  412. package/templates/plans/bug-fix-template.md +69 -0
  413. package/templates/plans/feature-implementation-template.md +84 -0
  414. package/templates/plans/refactor-template.md +82 -0
  415. package/templates/plans/template-usage-guide.md +58 -0
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Optimize an existing agent skill
3
+ argument-hint: [skill-name] [prompt]
4
+ ---
5
+
6
+ Think harder.
7
+ Use `skill-creator` and `claude-code` skills.
8
+ Use `docs-seeker` skills to search for documentation if needed.
9
+
10
+ ## Arguments
11
+ SKILL: $1 (default: `*`)
12
+ PROMPT: $2 (default: empty)
13
+
14
+ ## Your mission
15
+ Propose a plan to optimize an existing skill in `.claude/skills/${SKILL}` directory.
16
+ When you finish, ask user to review your plan:
17
+ - If the user approve: Write down a plan follow "Output Requirements", then ask user if they want to start implementing.
18
+ - If the user reject: Revise the plan or ask more questions to clarify more about the user's request (ask one question at the time), then repeat the review process.
19
+
20
+ ## Additional instructions
21
+ <additional-instructions>$PROMPT</additional-instructions>
22
+
23
+ ## Output Requirements
24
+ An output implementation plan must also follow the progressive disclosure structure:
25
+ - Always keep in mind that `SKILL.md` and reference files should be token consumption efficient, so that **progressive disclosure** can be leveraged at best.
26
+ - `SKILL.md` is always short and concise, straight to the point, treat it as a quick reference guide.
27
+ - Create a directory using naming pattern from `## Naming` section.
28
+ - Save the overview access point at `plan.md`, keep it generic, under 80 lines, and list each phase with status/progress and links.
29
+ - For each phase, add `phase-XX-phase-name.md` files containing sections (Context links, Overview with date/priority/statuses, Key Insights, Requirements, Architecture, Related code files, Implementation Steps, Todo list, Success Criteria, Risk Assessment, Security Considerations, Next steps).
30
+
31
+ **IMPORTANT:**
32
+ - Skills are not documentation, they are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
33
+ - Each skill teaches Claude how to perform a specific development task, not what a tool does.
34
+ - Claude Code can activate multiple skills automatically to achieve the user's request.
@@ -0,0 +1,45 @@
1
+ ---
2
+ description: Plan to create a new agent skill
3
+ argument-hint: [skill-name] [prompt]
4
+ ---
5
+
6
+ Think harder.
7
+ First: Activate `skill-creator` and `claude-code` skills.
8
+ Use `docs-seeker` skills to search for documentation if needed.
9
+ Employ `sequential-thinking` or `problem-solving` skills for complex problem-solving that requires structured analysis
10
+ Finally, when creating a plan, activate `planning` skill.
11
+
12
+ ## Arguments
13
+ SKILL: $1 (default: `*`)
14
+ PROMPT: $2 (default: empty)
15
+
16
+ ## Your mission
17
+ Propose a plan to create a new skill in `.claude/skills/${SKILL}` directory.
18
+ When you finish, ask user to review your plan:
19
+ - If the user approve: Write down a plan follow "Output Requirements", then ask user if they want to start implementing.
20
+ - If the user reject: Revise the plan or ask more questions to clarify more about the user's request (ask one question at the time), then repeat the review process.
21
+
22
+ ## Additional instructions
23
+ <additional-instructions>$PROMPT</additional-instructions>
24
+
25
+ ## Your Approach
26
+ 1. **Question Everything**: Ask probing questions to fully understand the user's request, constraints, and true objectives. Don't assume - clarify until you're 100% certain.
27
+ 2. **Brutal Honesty**: Provide frank, unfiltered feedback about ideas. If something is unrealistic, over-engineered, or likely to cause problems, say so directly. Your job is to prevent costly mistakes.
28
+ 3. **Explore Alternatives**: Always consider multiple approaches. Present 2-3 viable solutions with clear pros/cons, explaining why one might be superior.
29
+ 4. **Challenge Assumptions**: Question the user's initial approach. Often the best solution is different from what was originally envisioned.
30
+ 5. **Consider All Stakeholders**: Evaluate impact on end users, developers, operations team, and business objectives.
31
+
32
+ ## Output Requirements
33
+ An output implementation plan must also follow the progressive disclosure structure:
34
+ - Always keep in mind that `SKILL.md` and reference files should be token consumption efficient, so that **progressive disclosure** can be leveraged at best.
35
+ - `SKILL.md` is always short and concise, straight to the point, treat it as a quick reference guide.
36
+ - Create a directory using naming pattern from `## Naming` section.
37
+ - Save the overview access point at `plan.md`, keep it generic, under 80 lines, and list each phase with status/progress and links.
38
+ - For each phase, add `phase-XX-phase-name.md` files containing sections (Context links, Overview with date/priority/statuses, Key Insights, Requirements, Architecture, Related code files, Implementation Steps, Todo list, Success Criteria, Risk Assessment, Security Considerations, Next steps).
39
+
40
+ **IMPORTANT:**
41
+ - Analyze the given task and use `AskUserQuestion` tool to ask for more details if needed.
42
+ - Ensure token consumption efficiency while maintaining high quality.
43
+ - Skills are not documentation, they are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
44
+ - Each skill teaches Claude how to perform a specific development task, not what a tool does.
45
+ - Claude Code can activate multiple skills automatically to achieve the user's request.
@@ -0,0 +1,91 @@
1
+ ---
2
+ description: ⚡⚡ Run UI tests on a website & generate a detailed report.
3
+ argument-hint: [url] [options]
4
+ ---
5
+
6
+ Activate the chrome-devtools skill.
7
+
8
+ ## Purpose
9
+ Run comprehensive UI tests on a website and generate a detailed report.
10
+
11
+ ## Arguments
12
+ - $1: URL - The URL of the website to test
13
+ - $2: OPTIONS - Optional test configuration (e.g., --headless, --mobile, --auth)
14
+
15
+ ## Testing Protected Routes (Authentication)
16
+
17
+ For testing protected routes that require authentication, follow this workflow:
18
+
19
+ ### Step 1: User Manual Login
20
+ Instruct the user to:
21
+ 1. Open the target site in their browser
22
+ 2. Log in manually with their credentials
23
+ 3. Open browser DevTools (F12) → Application tab → Cookies/Storage
24
+
25
+ ### Step 2: Extract Auth Credentials
26
+ Ask the user to provide one of:
27
+ - **Cookies**: Copy cookie values (name, value, domain)
28
+ - **Access Token**: Copy JWT/Bearer token from localStorage or cookies
29
+ - **Session Storage**: Copy relevant session keys
30
+
31
+ ### Step 3: Inject Authentication
32
+ Use the `inject-auth.js` script to inject credentials before testing:
33
+
34
+ ```bash
35
+ cd $SKILL_DIR # .claude/skills/chrome-devtools/scripts
36
+
37
+ # Option A: Inject cookies
38
+ node inject-auth.js --url https://example.com --cookies '[{"name":"session","value":"abc123","domain":".example.com"}]'
39
+
40
+ # Option B: Inject Bearer token
41
+ node inject-auth.js --url https://example.com --token "Bearer eyJhbGciOi..." --header Authorization --token-key access_token
42
+
43
+ # Option C: Inject localStorage
44
+ node inject-auth.js --url https://example.com --local-storage '{"auth_token":"xyz","user_id":"123"}'
45
+
46
+ # Combined (cookies + localStorage)
47
+ node inject-auth.js --url https://example.com --cookies '[{"name":"session","value":"abc"}]' --local-storage '{"user":"data"}'
48
+ ```
49
+
50
+ ### Step 4: Run Tests
51
+ After auth injection, the browser session persists. Run tests normally:
52
+
53
+ ```bash
54
+ # Navigate and screenshot protected pages
55
+ node navigate.js --url https://example.com/dashboard
56
+ node screenshot.js --url https://example.com/profile --output profile.png
57
+
58
+ # The auth session persists until --close true is used
59
+ node screenshot.js --url https://example.com/settings --output settings.png --close true
60
+ ```
61
+
62
+ ### Auth Script Options
63
+ - `--cookies '<json>'` - Inject cookies (JSON array)
64
+ - `--token '<token>'` - Inject Bearer token
65
+ - `--token-key '<key>'` - localStorage key for token (default: access_token)
66
+ - `--header '<name>'` - Set HTTP header with token (e.g., Authorization)
67
+ - `--local-storage '<json>'` - Inject localStorage items
68
+ - `--session-storage '<json>'` - Inject sessionStorage items
69
+ - `--reload true` - Reload page after injection
70
+ - `--clear true` - Clear saved auth session
71
+
72
+ ## Workflow
73
+ - Use `planning` skill to organize the test plan & report in the current project directory.
74
+ - All the screenshots should be saved in the same report directory.
75
+ - Browse $URL with the specified $OPTIONS, discover all pages, components, and endpoints.
76
+ - Create a test plan based on the discovered structure
77
+ - Use multiple `tester` subagents or tool calls in parallel to test all pages, forms, navigation, user flows, accessibility, functionalities, usability, responsive layouts, cross-browser compatibility, performance, security, seo, etc.
78
+ - Generate a comprehensive report in Markdown format, embedding all screenshots directly in the report.
79
+ - Finally respond to the user with a concise summary of findings and recommendations.
80
+ - Use `AskUserQuestion` tool to ask if user wants to preview the report with `/preview` slash command.
81
+
82
+ ## Output Requirements
83
+ How to write reports:
84
+ - Format: Use clear, structured Markdown with headers, lists, and code blocks where appropriate
85
+ - Include the test results summary, key findings, and screenshot references
86
+ - **IMPORTANT:** Ensure token efficiency while maintaining high quality.
87
+ - **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
88
+ - **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
89
+
90
+ **IMPORTANT**: **Do not** start implementing the fixes.
91
+ **IMPORTANT:** Analyze the skills catalog and activate the skills that are needed for the task during the process.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: ⚡ Run tests locally and analyze the summary report.
3
+ ---
4
+
5
+ Use the `tester` subagent to run tests locally and analyze the summary report.
6
+
7
+ **IMPORTANT**: **Do not** start implementing.
8
+ **IMPORTANT:** Analyze the skills catalog and activate the skills that are needed for the task during the process.
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Utilize tools of Model Context Protocol (MCP) servers
3
+ argument-hint: [task]
4
+ ---
5
+ Execute MCP operations via **Gemini CLI** to preserve context budget.
6
+
7
+ ## Execution Steps
8
+
9
+ 1. **Execute task via Gemini CLI** (using stdin pipe for MCP support):
10
+ ```bash
11
+ # IMPORTANT: Use stdin piping, NOT -p flag (deprecated, skips MCP init)
12
+ echo "$ARGUMENTS. Return JSON only per GEMINI.md instructions." | gemini -y -m gemini-2.5-flash
13
+ ```
14
+
15
+ 2. **Fallback to mcp-manager subagent** (if Gemini CLI unavailable):
16
+ - Use `mcp-manager` subagent to discover and execute tools
17
+ - If the subagent got issues with the scripts of `mcp-management` skill, use `mcp-builder` skill to fix them
18
+ - **DO NOT** create ANY new scripts
19
+ - The subagent can only use MCP tools if any to achieve this task
20
+ - If the subagent can't find any suitable tools, just report it back to the main agent to move on to the next step
21
+
22
+ ## Important Notes
23
+
24
+ - **MUST use stdin piping** - the deprecated `-p` flag skips MCP initialization
25
+ - Use `-y` flag to auto-approve tool execution
26
+ - **GEMINI.md auto-loaded**: Gemini CLI automatically loads `GEMINI.md` from project root, enforcing JSON-only response format
27
+ - **Parseable output**: Responses are structured JSON: `{"server":"name","tool":"name","success":true,"result":<data>,"error":null}`
28
+
29
+ ## Anti-Pattern (DO NOT USE)
30
+
31
+ ```bash
32
+ # BROKEN - deprecated -p flag skips MCP server connections!
33
+ gemini -y -m gemini-2.5-flash -p "..."
34
+ ```
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: ⚡ Review recent changes and wrap up the work
3
+ ---
4
+ Review my current branch and the most recent commits.
5
+ Provide a detailed summary of all changes, including what was modified, added, or removed.
6
+ Analyze the overall impact and quality of the changes.
7
+
8
+ **IMPORTANT**: **Do not** start implementing.
@@ -0,0 +1,126 @@
1
+ ---
2
+ description: Create isolated git worktree for parallel development
3
+ argument-hint: [feature-description] OR [project] [feature] (monorepo)
4
+ ---
5
+
6
+ Create an isolated git worktree for parallel feature development.
7
+
8
+ ## Workflow
9
+
10
+ ### Step 1: Get Repository Info
11
+
12
+ ```bash
13
+ node .claude/scripts/worktree.cjs info --json
14
+ ```
15
+
16
+ **Response fields:**
17
+ - `repoType`: "monorepo" or "standalone"
18
+ - `baseBranch`: detected base branch
19
+ - `projects`: array of {name, path} for monorepo
20
+ - `envFiles`: array of .env* files found
21
+ - `dirtyState`: boolean
22
+
23
+ ### Step 2: Gather Info via AskUserQuestion
24
+
25
+ **Detect branch prefix from user's description:**
26
+ - Keywords "fix", "bug", "error", "issue" → prefix = `fix`
27
+ - Keywords "refactor", "restructure", "rewrite" → prefix = `refactor`
28
+ - Keywords "docs", "documentation", "readme" → prefix = `docs`
29
+ - Keywords "test", "spec", "coverage" → prefix = `test`
30
+ - Keywords "chore", "cleanup", "deps" → prefix = `chore`
31
+ - Keywords "perf", "performance", "optimize" → prefix = `perf`
32
+ - Everything else → prefix = `feat`
33
+
34
+ **For MONOREPO:** Use AskUserQuestion if project not specified:
35
+ ```javascript
36
+ // If user said "/worktree add auth" but multiple projects exist
37
+ AskUserQuestion({
38
+ questions: [{
39
+ header: "Project",
40
+ question: "Which project should the worktree be created for?",
41
+ options: projects.map(p => ({ label: p.name, description: p.path })),
42
+ multiSelect: false
43
+ }]
44
+ })
45
+ ```
46
+
47
+ **For env files:** Always ask which to copy:
48
+ ```javascript
49
+ AskUserQuestion({
50
+ questions: [{
51
+ header: "Env files",
52
+ question: "Which environment files should be copied to the worktree?",
53
+ options: envFiles.map(f => ({ label: f, description: "Copy to worktree" })),
54
+ multiSelect: true
55
+ }]
56
+ })
57
+ ```
58
+
59
+ ### Step 3: Convert Description to Slug
60
+
61
+ - "add authentication system" → `add-auth`
62
+ - "fix login bug" → `login-bug`
63
+ - Remove filler words, kebab-case, max 50 chars
64
+
65
+ ### Step 4: Execute Command
66
+
67
+ **Monorepo:**
68
+ ```bash
69
+ node .claude/scripts/worktree.cjs create "<PROJECT>" "<SLUG>" --prefix <TYPE> --env "<FILES>"
70
+ ```
71
+
72
+ **Standalone:**
73
+ ```bash
74
+ node .claude/scripts/worktree.cjs create "<SLUG>" --prefix <TYPE> --env "<FILES>"
75
+ ```
76
+
77
+ **Options:**
78
+ - `--prefix` - Branch type: feat|fix|refactor|docs|test|chore|perf
79
+ - `--env` - Comma-separated .env files to copy
80
+ - `--json` - Output JSON for parsing
81
+ - `--dry-run` - Preview without executing
82
+
83
+ ## Commands
84
+
85
+ | Command | Usage | Description |
86
+ |---------|-------|-------------|
87
+ | `create` | `create [project] <feature>` | Create new worktree |
88
+ | `remove` | `remove <name-or-path>` | Remove worktree and branch |
89
+ | `info` | `info` | Get repo info |
90
+ | `list` | `list` | List existing worktrees |
91
+
92
+ ## Error Codes
93
+
94
+ | Code | Meaning | Action |
95
+ |------|---------|--------|
96
+ | `MISSING_ARGS` | Missing project/feature for monorepo | Ask for both |
97
+ | `MISSING_FEATURE` | No feature name (standalone) | Ask for feature |
98
+ | `PROJECT_NOT_FOUND` | Project not in .gitmodules | Show available projects |
99
+ | `MULTIPLE_PROJECTS_MATCH` | Ambiguous project name | Use AskUserQuestion |
100
+ | `MULTIPLE_WORKTREES_MATCH` | Ambiguous worktree for remove | Use AskUserQuestion |
101
+ | `BRANCH_CHECKED_OUT` | Branch in use elsewhere | Suggest different name |
102
+ | `WORKTREE_EXISTS` | Path already exists | Suggest use or remove |
103
+ | `WORKTREE_CREATE_FAILED` | Git command failed | Show git error |
104
+ | `WORKTREE_REMOVE_FAILED` | Cannot remove worktree | Check uncommitted changes |
105
+
106
+ ## Example Session
107
+
108
+ ```
109
+ User: /worktree fix the login validation bug
110
+
111
+ Claude: [Runs: node .claude/scripts/worktree.cjs info --json]
112
+ [Detects: standalone repo, envFiles: [".env.example"]]
113
+ [Detects prefix from "fix" keyword: fix]
114
+ [Converts slug: "login-validation-bug"]
115
+
116
+ Claude: [Uses AskUserQuestion for env files]
117
+ "Which environment files should be copied?"
118
+ Options: .env.example
119
+
120
+ User: .env.example
121
+
122
+ Claude: [Runs: node .claude/scripts/worktree.cjs create "login-validation-bug" --prefix fix --env ".env.example"]
123
+
124
+ Output: Worktree created at ../worktrees/myrepo-login-validation-bug
125
+ Branch: fix/login-validation-bug
126
+ ```
@@ -0,0 +1,258 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Development Rules Reminder - UserPromptSubmit Hook (Optimized)
4
+ *
5
+ * Injects context: session info, rules, modularization reminders, and Plan Context.
6
+ * Static env info (Node, Python, OS) now comes from SessionStart env vars.
7
+ *
8
+ * Exit Codes:
9
+ * 0 - Success (non-blocking, allows continuation)
10
+ */
11
+
12
+ const fs = require('fs');
13
+ const os = require('os');
14
+ const path = require('path');
15
+ const { execSync } = require('child_process');
16
+ const {
17
+ loadConfig,
18
+ resolvePlanPath,
19
+ getReportsPath,
20
+ resolveNamingPattern,
21
+ normalizePath
22
+ } = require('./lib/cctk-config-utils.cjs');
23
+
24
+ // ═══════════════════════════════════════════════════════════════════════════
25
+ // HELPER FUNCTIONS
26
+ // ═══════════════════════════════════════════════════════════════════════════
27
+
28
+ function execSafe(cmd) {
29
+ try {
30
+ return execSync(cmd, { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
31
+ } catch (e) {
32
+ return null;
33
+ }
34
+ }
35
+
36
+ function resolveWorkflowPath(filename) {
37
+ const localPath = path.join(process.cwd(), '.claude', 'workflows', filename);
38
+ const globalPath = path.join(os.homedir(), '.claude', 'workflows', filename);
39
+ if (fs.existsSync(localPath)) return `.claude/workflows/${filename}`;
40
+ if (fs.existsSync(globalPath)) return `~/.claude/workflows/${filename}`;
41
+ return null;
42
+ }
43
+
44
+ function resolveScriptPath(filename) {
45
+ const localPath = path.join(process.cwd(), '.claude', 'scripts', filename);
46
+ const globalPath = path.join(os.homedir(), '.claude', 'scripts', filename);
47
+ if (fs.existsSync(localPath)) return `.claude/scripts/${filename}`;
48
+ if (fs.existsSync(globalPath)) return `~/.claude/scripts/${filename}`;
49
+ return null;
50
+ }
51
+
52
+ function resolveSkillsVenv() {
53
+ const localVenv = path.join(process.cwd(), '.claude', 'skills', '.venv', 'bin', 'python3');
54
+ const globalVenv = path.join(os.homedir(), '.claude', 'skills', '.venv', 'bin', 'python3');
55
+
56
+ if (fs.existsSync(localVenv)) {
57
+ return '.claude/skills/.venv/bin/python3';
58
+ }
59
+ if (fs.existsSync(globalVenv)) {
60
+ return '~/.claude/skills/.venv/bin/python3';
61
+ }
62
+ return null;
63
+ }
64
+
65
+ function buildPlanContext(sessionId, config) {
66
+ const { plan, paths } = config;
67
+ const gitBranch = execSafe('git branch --show-current');
68
+ const resolved = resolvePlanPath(sessionId, config);
69
+ const reportsPath = getReportsPath(resolved.path, resolved.resolvedBy, plan, paths);
70
+
71
+ // Compute naming pattern directly for reliable injection
72
+ const namePattern = resolveNamingPattern(plan, gitBranch);
73
+
74
+ const planLine = resolved.resolvedBy === 'session'
75
+ ? `- Plan: ${resolved.path}`
76
+ : resolved.resolvedBy === 'branch'
77
+ ? `- Plan: none | Suggested: ${resolved.path}`
78
+ : `- Plan: none`;
79
+
80
+ // Validation config (injected so LLM can reference it)
81
+ const validation = plan.validation || {};
82
+ const validationMode = validation.mode || 'prompt';
83
+ const validationMin = validation.minQuestions || 3;
84
+ const validationMax = validation.maxQuestions || 8;
85
+
86
+ return { reportsPath, gitBranch, planLine, namePattern, validationMode, validationMin, validationMax };
87
+ }
88
+
89
+ function wasRecentlyInjected(transcriptPath) {
90
+ try {
91
+ if (!transcriptPath || !fs.existsSync(transcriptPath)) return false;
92
+ const transcript = fs.readFileSync(transcriptPath, 'utf-8');
93
+ // Check last 150 lines (hook output is ~30 lines, so this covers ~5 user prompts)
94
+ return transcript.split('\n').slice(-150).some(line => line.includes('[IMPORTANT] Consider Modularization'));
95
+ } catch (e) {
96
+ return false;
97
+ }
98
+ }
99
+
100
+ // ═══════════════════════════════════════════════════════════════════════════
101
+ // REMINDER TEMPLATE (all output in one place for visibility)
102
+ // ═══════════════════════════════════════════════════════════════════════════
103
+
104
+ function buildReminder({ thinkingLanguage, responseLanguage, devRulesPath, catalogScript, skillsVenv, reportsPath, plansPath, docsPath, docsMaxLoc, planLine, gitBranch, namePattern, validationMode, validationMin, validationMax }) {
105
+ // Build language instructions based on config
106
+ // Auto-default thinkingLanguage to 'en' when only responseLanguage is set
107
+ const effectiveThinking = thinkingLanguage || (responseLanguage ? 'en' : null);
108
+ const hasThinking = effectiveThinking && effectiveThinking !== responseLanguage;
109
+ const hasResponse = responseLanguage;
110
+ const languageLines = [];
111
+
112
+ if (hasThinking || hasResponse) {
113
+ languageLines.push(`## Language`);
114
+ if (hasThinking) {
115
+ languageLines.push(`- Thinking: Use ${effectiveThinking} for reasoning (logic, precision).`);
116
+ }
117
+ if (hasResponse) {
118
+ languageLines.push(`- Response: Respond in ${responseLanguage} (natural, fluent).`);
119
+ }
120
+ languageLines.push(``);
121
+ }
122
+
123
+ const memUsed = Math.round(process.memoryUsage().heapUsed / 1024 / 1024);
124
+ const memTotal = Math.round(os.totalmem() / 1024 / 1024);
125
+ const memPercent = Math.round((memUsed / memTotal) * 100);
126
+
127
+ const cpuUsage = Math.round((process.cpuUsage().user / 1000000) * 100);
128
+ const cpuSystem = Math.round((process.cpuUsage().system / 1000000) * 100);
129
+
130
+ return [
131
+ // ─────────────────────────────────────────────────────────────────────────
132
+ // LANGUAGE (thinking + response, if configured)
133
+ // ─────────────────────────────────────────────────────────────────────────
134
+ ...languageLines,
135
+
136
+ // ─────────────────────────────────────────────────────────────────────────
137
+ // SESSION CONTEXT
138
+ // ─────────────────────────────────────────────────────────────────────────
139
+ `## Session`,
140
+ `- DateTime: ${new Date().toLocaleString()}`,
141
+ `- CWD: ${process.cwd()}`,
142
+ `- Timezone: ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,
143
+ `- Working directory: ${process.cwd()}`,
144
+ `- OS: ${process.platform}`,
145
+ `- User: ${process.env.USERNAME}`,
146
+ `- Locale: ${process.env.LANG}`,
147
+ `- Memory usage: ${memUsed}MB/${memTotal}MB (${memPercent}%)`,
148
+ `- CPU usage: ${cpuUsage}% user / ${cpuSystem}% system`,
149
+ `- Spawning multiple subagents can cause performance issues, spawn and delegate tasks intelligently based on the available system resources.`,
150
+ `- Remember that each subagent only has 200K tokens in context window, spawn and delegate tasks intelligently to make sure their context windows don't get bloated.`,
151
+ `- IMPORTANT: Include these environment information when prompting subagents to perform tasks.`,
152
+ ``,
153
+
154
+ // ─────────────────────────────────────────────────────────────────────────
155
+ // RULES
156
+ // ─────────────────────────────────────────────────────────────────────────
157
+ `## Rules`,
158
+ ...(devRulesPath ? [`- Read and follow development rules: "${devRulesPath}"`] : []),
159
+ `- Markdown files are organized in: Plans → "plans/" directory, Docs → "docs/" directory`,
160
+ `- **IMPORTANT:** DO NOT create markdown files out of "plans/" or "docs/" directories UNLESS the user explicitly requests it.`,
161
+ ...(catalogScript ? [
162
+ `- Activate skills: Run \`node ${catalogScript} --skills\` to generate a skills catalog and analyze it, then activate the relevant skills that are needed for the task during the process.`,
163
+ `- Execute commands: Run \`node ${catalogScript} --commands\` to generate a commands catalog and analyze it, then execute the relevant SlashCommands that are needed for the task during the process.`
164
+ ] : []),
165
+ ...(skillsVenv ? [`- Python scripts in .claude/skills/: Use \`${skillsVenv}\``] : []),
166
+ `- When skills' scripts are failed to execute, always fix them and run again, repeat until success.`,
167
+ `- Follow **YAGNI (You Aren't Gonna Need It) - KISS (Keep It Simple, Stupid) - DRY (Don't Repeat Yourself)** principles`,
168
+ `- Sacrifice grammar for the sake of concision when writing reports.`,
169
+ `- In reports, list any unresolved questions at the end, if any.`,
170
+ `- IMPORTANT: Ensure token consumption efficiency while maintaining high quality.`,
171
+ ``,
172
+
173
+ // ─────────────────────────────────────────────────────────────────────────
174
+ // MODULARIZATION
175
+ // ─────────────────────────────────────────────────────────────────────────
176
+ `## **[IMPORTANT] Consider Modularization:**`,
177
+ `- Check existing modules before creating new`,
178
+ `- Analyze logical separation boundaries (functions, classes, concerns)`,
179
+ `- Use kebab-case naming with descriptive names, it's fine if the file name is long because this ensures file names are self-documenting for LLM tools (Grep, Glob, Search)`,
180
+ `- Write descriptive code comments`,
181
+ `- After modularization, continue with main task`,
182
+ `- When not to modularize: Markdown files, plain text files, bash scripts, configuration files, environment variables files, etc.`,
183
+ ``,
184
+
185
+ // ─────────────────────────────────────────────────────────────────────────
186
+ // PATHS
187
+ // ─────────────────────────────────────────────────────────────────────────
188
+ `## Paths`,
189
+ `Reports: ${reportsPath} | Plans: ${plansPath}/ | Docs: ${docsPath}/ | docs.maxLoc: ${docsMaxLoc}`,
190
+ ``,
191
+
192
+ // ─────────────────────────────────────────────────────────────────────────
193
+ // PLAN CONTEXT
194
+ // ─────────────────────────────────────────────────────────────────────────
195
+ `## Plan Context`,
196
+ planLine,
197
+ `- Reports: ${reportsPath}`,
198
+ ...(gitBranch ? [`- Branch: ${gitBranch}`] : []),
199
+ `- Validation: mode=${validationMode}, questions=${validationMin}-${validationMax}`,
200
+ ``,
201
+
202
+ // ─────────────────────────────────────────────────────────────────────────
203
+ // NAMING (computed pattern for consistent file naming)
204
+ // ─────────────────────────────────────────────────────────────────────────
205
+ `## Naming`,
206
+ `- Report: \`${reportsPath}{type}-${namePattern}.md\``,
207
+ `- Plan dir: \`${plansPath}/${namePattern}/\``,
208
+ `- Replace \`{type}\` with: agent name, report type, or context`,
209
+ `- Replace \`{slug}\` in pattern with: descriptive-kebab-slug`
210
+ ];
211
+ }
212
+
213
+ // ═══════════════════════════════════════════════════════════════════════════
214
+ // MAIN EXECUTION
215
+ // ═══════════════════════════════════════════════════════════════════════════
216
+
217
+ async function main() {
218
+ try {
219
+ const stdin = fs.readFileSync(0, 'utf-8').trim();
220
+ if (!stdin) process.exit(0);
221
+
222
+ const payload = JSON.parse(stdin);
223
+ if (wasRecentlyInjected(payload.transcript_path)) process.exit(0);
224
+
225
+ const sessionId = process.env.CCTK_SESSION_ID || null;
226
+ const config = loadConfig({ includeProject: false, includeAssertions: false });
227
+ const devRulesPath = resolveWorkflowPath('development-rules.md');
228
+ const catalogScript = resolveScriptPath('generate-catalogs.cjs');
229
+ const skillsVenv = resolveSkillsVenv();
230
+ const { reportsPath, gitBranch, planLine, namePattern, validationMode, validationMin, validationMax } = buildPlanContext(sessionId, config);
231
+
232
+ const output = buildReminder({
233
+ thinkingLanguage: config.locale?.thinkingLanguage,
234
+ responseLanguage: config.locale?.responseLanguage,
235
+ devRulesPath,
236
+ catalogScript,
237
+ skillsVenv,
238
+ reportsPath,
239
+ plansPath: normalizePath(config.paths?.plans) || 'plans',
240
+ docsPath: normalizePath(config.paths?.docs) || 'docs',
241
+ docsMaxLoc: Math.max(1, parseInt(config.docs?.maxLoc, 10) || 800),
242
+ planLine,
243
+ gitBranch,
244
+ namePattern,
245
+ validationMode,
246
+ validationMin,
247
+ validationMax
248
+ });
249
+
250
+ console.log(output.join('\n'));
251
+ process.exit(0);
252
+ } catch (error) {
253
+ console.error(`Dev rules hook error: ${error.message}`);
254
+ process.exit(0);
255
+ }
256
+ }
257
+
258
+ main();
@@ -0,0 +1,42 @@
1
+ # Claude Code Hooks
2
+
3
+ This directory contains hooks for Claude Code sessions.
4
+
5
+ ## Hooks Overview
6
+
7
+ | Hook | Location | Description |
8
+ |------|----------|-------------|
9
+ | **Scout Block** | `scout-block.cjs` | Blocks heavy directories (node_modules, .git, etc.) |
10
+ | **Privacy Block** | `privacy-block.cjs` | Prevents access to sensitive files |
11
+ | **Modularization** | `modularization-hook.js` | Suggests code modularization for large files |
12
+ | **Session Init** | `session-init.cjs` | Session startup initialization |
13
+ | **Dev Rules** | `dev-rules-reminder.cjs` | Development rules injection |
14
+
15
+
16
+ ## Scout Block Hook
17
+
18
+ Cross-platform hook blocking heavy directories to improve Claude performance.
19
+
20
+ **Blocked Patterns** (configured in `.claude/.cctkignore`):
21
+ - `node_modules`, `__pycache__`, `.git`, `dist`, `build`
22
+
23
+ **Testing:**
24
+ ```bash
25
+ echo '{"tool_input":{"command":"ls node_modules"}}' | node .claude/hooks/scout-block.cjs
26
+ ```
27
+
28
+ ## Security
29
+
30
+ 1. **Never commit tokens** - Add `.env` to `.gitignore`
31
+ 2. **Use environment variables** - Never hardcode credentials
32
+ 3. **Rotate tokens regularly** - Regenerate periodically
33
+
34
+ ## Troubleshooting
35
+
36
+ **Provider throttled:**
37
+ - Wait 5 minutes or delete `/tmp/cctk-noti-throttle.json`
38
+
39
+ **Hooks not triggering:**
40
+ - Verify hooks are added to `.claude/settings.json`
41
+ - Check Claude Code is using correct settings file
42
+