claude-code-orchestrator-kit 1.4.1 → 1.4.16

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 (240) hide show
  1. package/.claude/agents/business/workers/lead-research-assistant.md +199 -0
  2. package/.claude/agents/database/workers/api-builder.md +8 -0
  3. package/.claude/agents/database/workers/database-architect.md +11 -3
  4. package/.claude/agents/database/workers/supabase-auditor.md +7 -7
  5. package/.claude/agents/database/workers/supabase-fixer.md +825 -0
  6. package/.claude/agents/database/workers/supabase-realtime-optimizer.md +1086 -0
  7. package/.claude/agents/database/workers/supabase-storage-optimizer.md +1187 -0
  8. package/.claude/agents/development/workers/code-reviewer.md +17 -2
  9. package/.claude/agents/development/workers/code-structure-refactorer.md +771 -0
  10. package/.claude/agents/development/workers/judge-specialist.md +3275 -0
  11. package/.claude/agents/development/workers/langgraph-specialist.md +1343 -0
  12. package/.claude/agents/development/workers/stage-pipeline-specialist.md +1173 -0
  13. package/.claude/agents/frontend/workers/fullstack-nextjs-specialist.md +10 -0
  14. package/.claude/agents/frontend/workers/nextjs-ui-designer.md +30 -0
  15. package/.claude/agents/health/workers/bug-fixer.md +31 -3
  16. package/.claude/agents/health/workers/bug-hunter.md +0 -1
  17. package/.claude/agents/health/workers/dead-code-hunter.md +167 -75
  18. package/.claude/agents/health/workers/dead-code-remover.md +217 -66
  19. package/.claude/agents/health/workers/dependency-auditor.md +83 -24
  20. package/.claude/agents/health/workers/dependency-updater.md +0 -1
  21. package/.claude/agents/health/workers/security-scanner.md +0 -1
  22. package/.claude/agents/infrastructure/workers/bullmq-worker-specialist.md +748 -0
  23. package/.claude/agents/infrastructure/workers/deployment-engineer.md +446 -0
  24. package/.claude/agents/infrastructure/workers/infrastructure-specialist.md +2 -2
  25. package/.claude/agents/infrastructure/workers/rag-specialist.md +799 -0
  26. package/.claude/agents/infrastructure/workers/server-hardening-specialist.md +1128 -0
  27. package/.claude/agents/integrations/workers/lms-integration-specialist.md +866 -0
  28. package/.claude/agents/meta/workers/meta-agent-v3.md +22 -0
  29. package/.claude/agents/testing/workers/integration-tester.md +1 -1
  30. package/.claude/agents/testing/workers/test-writer.md +16 -0
  31. package/.claude/commands/health-bugs.md +14 -281
  32. package/.claude/commands/health-cleanup.md +14 -281
  33. package/.claude/commands/health-deps.md +14 -281
  34. package/.claude/commands/health-metrics.md +51 -709
  35. package/.claude/commands/health-reuse.md +14 -311
  36. package/.claude/commands/health-security.md +14 -281
  37. package/.claude/commands/push.md +17 -3
  38. package/.claude/commands/speckit.implement.md +0 -11
  39. package/.claude/commands/supabase-performance-optimizer.md +73 -0
  40. package/.claude/commands/ultra-think.md +158 -0
  41. package/.claude/commands/worktree.md +150 -0
  42. package/.claude/scripts/gates/check-bundle-size.sh +0 -0
  43. package/.claude/scripts/gates/check-coverage.sh +0 -0
  44. package/.claude/scripts/gates/check-security.sh +0 -0
  45. package/.claude/scripts/release.sh +469 -94
  46. package/.claude/skills/algorithmic-art/LICENSE.txt +202 -0
  47. package/.claude/skills/algorithmic-art/SKILL.md +405 -0
  48. package/.claude/skills/algorithmic-art/templates/generator_template.js +223 -0
  49. package/.claude/skills/algorithmic-art/templates/viewer.html +599 -0
  50. package/.claude/skills/artifacts-builder/LICENSE.txt +202 -0
  51. package/.claude/skills/artifacts-builder/SKILL.md +74 -0
  52. package/.claude/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
  53. package/.claude/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
  54. package/.claude/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  55. package/.claude/skills/bug-health-inline/SKILL.md +221 -0
  56. package/.claude/skills/bug-health-inline/references/worker-prompts.md +182 -0
  57. package/.claude/skills/canvas-design/LICENSE.txt +202 -0
  58. package/.claude/skills/canvas-design/SKILL.md +130 -0
  59. package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  60. package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  61. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  62. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  63. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  64. package/.claude/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  65. package/.claude/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  66. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  67. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  68. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  69. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  70. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  71. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  72. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  73. package/.claude/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  74. package/.claude/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  75. package/.claude/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  76. package/.claude/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  77. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  78. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  79. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  80. package/.claude/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  81. package/.claude/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  82. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  83. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  84. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  85. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  86. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  87. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  88. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  89. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  90. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  91. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  92. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  93. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  94. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  95. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  96. package/.claude/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  97. package/.claude/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  98. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  99. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  100. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  101. package/.claude/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  102. package/.claude/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  103. package/.claude/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  104. package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  105. package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  106. package/.claude/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  107. package/.claude/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  108. package/.claude/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  109. package/.claude/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  110. package/.claude/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  111. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  112. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  113. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  114. package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  115. package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  116. package/.claude/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  117. package/.claude/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  118. package/.claude/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  119. package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  120. package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  121. package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  122. package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  123. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  124. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  125. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  126. package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  127. package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  128. package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  129. package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  130. package/.claude/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  131. package/.claude/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  132. package/.claude/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  133. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  134. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  135. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  136. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  137. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  138. package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  139. package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  140. package/.claude/skills/changelog-generator/SKILL.md +104 -0
  141. package/.claude/skills/cleanup-health-inline/SKILL.md +224 -0
  142. package/.claude/skills/code-reviewer/SKILL.md +209 -0
  143. package/.claude/skills/code-reviewer/references/code_review_checklist.md +103 -0
  144. package/.claude/skills/code-reviewer/references/coding_standards.md +103 -0
  145. package/.claude/skills/code-reviewer/references/common_antipatterns.md +103 -0
  146. package/.claude/skills/code-reviewer/scripts/code_quality_checker.py +114 -0
  147. package/.claude/skills/code-reviewer/scripts/pr_analyzer.py +114 -0
  148. package/.claude/skills/code-reviewer/scripts/review_report_generator.py +114 -0
  149. package/.claude/skills/content-research-writer/SKILL.md +538 -0
  150. package/.claude/skills/deps-health-inline/SKILL.md +227 -0
  151. package/.claude/skills/frontend-aesthetics/SKILL.md +51 -396
  152. package/.claude/skills/git-commit-helper/SKILL.md +203 -0
  153. package/.claude/skills/lead-research-assistant/SKILL.md +199 -0
  154. package/.claude/skills/reuse-health-inline/SKILL.md +248 -0
  155. package/.claude/skills/rollback-changes/SKILL.md +50 -524
  156. package/.claude/skills/run-quality-gate/SKILL.md +36 -346
  157. package/.claude/skills/security-health-inline/SKILL.md +224 -0
  158. package/.claude/skills/senior-architect/SKILL.md +209 -0
  159. package/.claude/skills/senior-architect/references/architecture_patterns.md +755 -0
  160. package/.claude/skills/senior-architect/references/system_design_workflows.md +749 -0
  161. package/.claude/skills/senior-architect/references/tech_decision_guide.md +612 -0
  162. package/.claude/skills/senior-architect/scripts/architecture_diagram_generator.py +114 -0
  163. package/.claude/skills/senior-architect/scripts/dependency_analyzer.py +114 -0
  164. package/.claude/skills/senior-architect/scripts/project_architect.py +114 -0
  165. package/.claude/skills/senior-devops/SKILL.md +209 -0
  166. package/.claude/skills/senior-devops/references/cicd_pipeline_guide.md +103 -0
  167. package/.claude/skills/senior-devops/references/deployment_strategies.md +103 -0
  168. package/.claude/skills/senior-devops/references/infrastructure_as_code.md +103 -0
  169. package/.claude/skills/senior-devops/scripts/deployment_manager.py +114 -0
  170. package/.claude/skills/senior-devops/scripts/pipeline_generator.py +114 -0
  171. package/.claude/skills/senior-devops/scripts/terraform_scaffolder.py +114 -0
  172. package/.claude/skills/senior-prompt-engineer/SKILL.md +226 -0
  173. package/.claude/skills/senior-prompt-engineer/references/agentic_system_design.md +80 -0
  174. package/.claude/skills/senior-prompt-engineer/references/llm_evaluation_frameworks.md +80 -0
  175. package/.claude/skills/senior-prompt-engineer/references/prompt_engineering_patterns.md +80 -0
  176. package/.claude/skills/senior-prompt-engineer/scripts/agent_orchestrator.py +100 -0
  177. package/.claude/skills/senior-prompt-engineer/scripts/prompt_optimizer.py +100 -0
  178. package/.claude/skills/senior-prompt-engineer/scripts/rag_evaluator.py +100 -0
  179. package/.claude/skills/setup-knip/SKILL.md +372 -0
  180. package/.claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
  181. package/.claude/skills/systematic-debugging/SKILL.md +296 -0
  182. package/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  183. package/.claude/skills/systematic-debugging/condition-based-waiting.md +115 -0
  184. package/.claude/skills/systematic-debugging/defense-in-depth.md +122 -0
  185. package/.claude/skills/systematic-debugging/find-polluter.sh +63 -0
  186. package/.claude/skills/systematic-debugging/root-cause-tracing.md +169 -0
  187. package/.claude/skills/systematic-debugging/test-academic.md +14 -0
  188. package/.claude/skills/systematic-debugging/test-pressure-1.md +58 -0
  189. package/.claude/skills/systematic-debugging/test-pressure-2.md +68 -0
  190. package/.claude/skills/systematic-debugging/test-pressure-3.md +69 -0
  191. package/.claude/skills/theme-factory/LICENSE.txt +202 -0
  192. package/.claude/skills/theme-factory/SKILL.md +59 -0
  193. package/.claude/skills/theme-factory/theme-showcase.pdf +0 -0
  194. package/.claude/skills/theme-factory/themes/arctic-frost.md +19 -0
  195. package/.claude/skills/theme-factory/themes/botanical-garden.md +19 -0
  196. package/.claude/skills/theme-factory/themes/desert-rose.md +19 -0
  197. package/.claude/skills/theme-factory/themes/forest-canopy.md +19 -0
  198. package/.claude/skills/theme-factory/themes/golden-hour.md +19 -0
  199. package/.claude/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  200. package/.claude/skills/theme-factory/themes/modern-minimalist.md +19 -0
  201. package/.claude/skills/theme-factory/themes/ocean-depths.md +19 -0
  202. package/.claude/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  203. package/.claude/skills/theme-factory/themes/tech-innovation.md +19 -0
  204. package/.claude/skills/ui-design-system/SKILL.md +32 -0
  205. package/.claude/skills/ui-design-system/scripts/design_token_generator.py +529 -0
  206. package/.claude/skills/ux-researcher-designer/SKILL.md +30 -0
  207. package/.claude/skills/ux-researcher-designer/scripts/persona_generator.py +508 -0
  208. package/.claude/skills/webapp-testing/LICENSE.txt +202 -0
  209. package/.claude/skills/webapp-testing/SKILL.md +96 -0
  210. package/.claude/skills/webapp-testing/examples/console_logging.py +35 -0
  211. package/.claude/skills/webapp-testing/examples/element_discovery.py +40 -0
  212. package/.claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
  213. package/.claude/skills/webapp-testing/scripts/with_server.py +106 -0
  214. package/.gitignore +4 -0
  215. package/README.md +492 -1093
  216. package/README.ru.md +719 -0
  217. package/docs/Agents Ecosystem/AGENT-ORCHESTRATION.md +2 -2
  218. package/docs/COMMANDS-GUIDE.md +0 -15
  219. package/docs/reports/skills/new-skills-analysis-2025-12.md +331 -0
  220. package/package.json +11 -3
  221. package/.claude/agents/health/orchestrators/bug-orchestrator.md +0 -1084
  222. package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +0 -1064
  223. package/.claude/agents/health/orchestrators/dependency-orchestrator.md +0 -1064
  224. package/.claude/agents/health/orchestrators/reuse-orchestrator.md +0 -1112
  225. package/.claude/agents/health/orchestrators/security-orchestrator.md +0 -1064
  226. package/.claude/commands/worktree-cleanup.md +0 -382
  227. package/.claude/commands/worktree-create.md +0 -287
  228. package/.claude/commands/worktree-list.md +0 -239
  229. package/.claude/commands/worktree-remove.md +0 -339
  230. package/.claude/project-index.md +0 -75
  231. package/.claude/skills/load-project-context/SKILL.md +0 -89
  232. package/.claude/skills/resume-session/SKILL.md +0 -164
  233. package/.claude/skills/save-session-context/SKILL.md +0 -123
  234. package/.claude/templates/project-index.template.md +0 -67
  235. package/.claude/templates/session/context.template.md +0 -40
  236. package/.claude/templates/session/log.template.md +0 -72
  237. package/.github/BRANCH_PROTECTION.md +0 -137
  238. package/.github/workflows/build.yml +0 -70
  239. package/.github/workflows/deploy-staging.yml +0 -90
  240. package/.github/workflows/test.yml +0 -104
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Rag Evaluator
4
+ Production-grade tool for senior prompt engineer
5
+ """
6
+
7
+ import os
8
+ import sys
9
+ import json
10
+ import logging
11
+ import argparse
12
+ from pathlib import Path
13
+ from typing import Dict, List, Optional
14
+ from datetime import datetime
15
+
16
+ logging.basicConfig(
17
+ level=logging.INFO,
18
+ format='%(asctime)s - %(levelname)s - %(message)s'
19
+ )
20
+ logger = logging.getLogger(__name__)
21
+
22
+ class RagEvaluator:
23
+ """Production-grade rag evaluator"""
24
+
25
+ def __init__(self, config: Dict):
26
+ self.config = config
27
+ self.results = {
28
+ 'status': 'initialized',
29
+ 'start_time': datetime.now().isoformat(),
30
+ 'processed_items': 0
31
+ }
32
+ logger.info(f"Initialized {self.__class__.__name__}")
33
+
34
+ def validate_config(self) -> bool:
35
+ """Validate configuration"""
36
+ logger.info("Validating configuration...")
37
+ # Add validation logic
38
+ logger.info("Configuration validated")
39
+ return True
40
+
41
+ def process(self) -> Dict:
42
+ """Main processing logic"""
43
+ logger.info("Starting processing...")
44
+
45
+ try:
46
+ self.validate_config()
47
+
48
+ # Main processing
49
+ result = self._execute()
50
+
51
+ self.results['status'] = 'completed'
52
+ self.results['end_time'] = datetime.now().isoformat()
53
+
54
+ logger.info("Processing completed successfully")
55
+ return self.results
56
+
57
+ except Exception as e:
58
+ self.results['status'] = 'failed'
59
+ self.results['error'] = str(e)
60
+ logger.error(f"Processing failed: {e}")
61
+ raise
62
+
63
+ def _execute(self) -> Dict:
64
+ """Execute main logic"""
65
+ # Implementation here
66
+ return {'success': True}
67
+
68
+ def main():
69
+ """Main entry point"""
70
+ parser = argparse.ArgumentParser(
71
+ description="Rag Evaluator"
72
+ )
73
+ parser.add_argument('--input', '-i', required=True, help='Input path')
74
+ parser.add_argument('--output', '-o', required=True, help='Output path')
75
+ parser.add_argument('--config', '-c', help='Configuration file')
76
+ parser.add_argument('--verbose', '-v', action='store_true', help='Verbose output')
77
+
78
+ args = parser.parse_args()
79
+
80
+ if args.verbose:
81
+ logging.getLogger().setLevel(logging.DEBUG)
82
+
83
+ try:
84
+ config = {
85
+ 'input': args.input,
86
+ 'output': args.output
87
+ }
88
+
89
+ processor = RagEvaluator(config)
90
+ results = processor.process()
91
+
92
+ print(json.dumps(results, indent=2))
93
+ sys.exit(0)
94
+
95
+ except Exception as e:
96
+ logger.error(f"Fatal error: {e}")
97
+ sys.exit(1)
98
+
99
+ if __name__ == '__main__':
100
+ main()
@@ -0,0 +1,372 @@
1
+ ---
2
+ name: setup-knip
3
+ description: Install and configure Knip for dead code detection. Use before running dead-code-hunter or dependency-auditor to ensure Knip is available. Handles installation, configuration creation, and validation.
4
+ allowed-tools: Bash, Read, Write, Glob
5
+ ---
6
+
7
+ # Setup Knip
8
+
9
+ Install and configure Knip - the tool for finding unused files, dependencies, and exports in JavaScript/TypeScript projects.
10
+
11
+ ## When to Use
12
+
13
+ - Before running dead-code-hunter agent
14
+ - Before running dependency-auditor agent
15
+ - When project doesn't have Knip configured
16
+ - When upgrading Knip configuration
17
+ - In pre-flight validation of health workflows
18
+
19
+ ## Instructions
20
+
21
+ ### Step 1: Check if Knip is Installed
22
+
23
+ Check package.json for knip in devDependencies.
24
+
25
+ **Tools Used**: Read
26
+
27
+ ```bash
28
+ # Read package.json and check for knip
29
+ ```
30
+
31
+ **Check Logic**:
32
+ - If `devDependencies.knip` exists → Knip is installed
33
+ - If not found → Need to install
34
+
35
+ ### Step 2: Install Knip if Missing
36
+
37
+ If Knip is not installed, add it as devDependency.
38
+
39
+ **Tools Used**: Bash
40
+
41
+ ```bash
42
+ # Detect package manager
43
+ if [ -f "pnpm-lock.yaml" ]; then
44
+ pnpm add -D knip
45
+ elif [ -f "yarn.lock" ]; then
46
+ yarn add -D knip
47
+ elif [ -f "bun.lockb" ]; then
48
+ bun add -D knip
49
+ else
50
+ npm install -D knip
51
+ fi
52
+ ```
53
+
54
+ **Expected Output**:
55
+ ```
56
+ + knip@5.x.x
57
+ ```
58
+
59
+ ### Step 3: Check for Knip Configuration
60
+
61
+ Look for existing Knip configuration files.
62
+
63
+ **Tools Used**: Glob
64
+
65
+ **Configuration Files** (in priority order):
66
+ 1. `knip.json`
67
+ 2. `knip.jsonc`
68
+ 3. `knip.ts`
69
+ 4. `knip.config.ts`
70
+ 5. `knip.config.js`
71
+ 6. `package.json` (knip field)
72
+
73
+ ### Step 4: Create Default Configuration if Missing
74
+
75
+ If no configuration found, create `knip.json` with sensible defaults.
76
+
77
+ **Tools Used**: Write
78
+
79
+ **Default Configuration for Standard Project**:
80
+ ```json
81
+ {
82
+ "$schema": "https://unpkg.com/knip@5/schema.json",
83
+ "entry": ["src/index.{ts,tsx,js,jsx}", "src/main.{ts,tsx,js,jsx}"],
84
+ "project": ["src/**/*.{ts,tsx,js,jsx}"],
85
+ "ignore": [
86
+ "**/*.d.ts",
87
+ "**/*.test.{ts,tsx}",
88
+ "**/*.spec.{ts,tsx}",
89
+ "**/test/**",
90
+ "**/tests/**",
91
+ "**/__tests__/**",
92
+ "**/node_modules/**"
93
+ ],
94
+ "ignoreDependencies": [
95
+ "@types/*"
96
+ ]
97
+ }
98
+ ```
99
+
100
+ **Default Configuration for Next.js Project** (detected by next in dependencies):
101
+ ```json
102
+ {
103
+ "$schema": "https://unpkg.com/knip@5/schema.json",
104
+ "entry": [
105
+ "src/app/**/*.{ts,tsx}",
106
+ "src/pages/**/*.{ts,tsx}",
107
+ "app/**/*.{ts,tsx}",
108
+ "pages/**/*.{ts,tsx}"
109
+ ],
110
+ "project": ["src/**/*.{ts,tsx}", "app/**/*.{ts,tsx}", "pages/**/*.{ts,tsx}"],
111
+ "ignore": [
112
+ "**/*.d.ts",
113
+ "**/*.test.{ts,tsx}",
114
+ "**/*.spec.{ts,tsx}",
115
+ "**/node_modules/**"
116
+ ],
117
+ "next": {
118
+ "entry": [
119
+ "next.config.{js,ts,mjs}",
120
+ "middleware.{js,ts}"
121
+ ]
122
+ }
123
+ }
124
+ ```
125
+
126
+ **Default Configuration for Monorepo** (detected by workspaces in package.json):
127
+ ```json
128
+ {
129
+ "$schema": "https://unpkg.com/knip@5/schema.json",
130
+ "workspaces": {
131
+ "packages/*": {
132
+ "entry": ["src/index.{ts,tsx,js,jsx}"],
133
+ "project": ["src/**/*.{ts,tsx,js,jsx}"]
134
+ },
135
+ "apps/*": {
136
+ "entry": ["src/index.{ts,tsx,js,jsx}", "src/main.{ts,tsx,js,jsx}"],
137
+ "project": ["src/**/*.{ts,tsx,js,jsx}"]
138
+ }
139
+ },
140
+ "ignore": [
141
+ "**/*.d.ts",
142
+ "**/*.test.{ts,tsx}",
143
+ "**/*.spec.{ts,tsx}",
144
+ "**/node_modules/**"
145
+ ]
146
+ }
147
+ ```
148
+
149
+ ### Step 5: Add npm Scripts if Missing
150
+
151
+ Check if package.json has knip scripts, add if missing.
152
+
153
+ **Tools Used**: Read, Bash
154
+
155
+ **Scripts to Add**:
156
+ ```json
157
+ {
158
+ "scripts": {
159
+ "knip": "knip",
160
+ "knip:fix": "knip --fix",
161
+ "knip:deps": "knip --dependencies",
162
+ "knip:exports": "knip --exports",
163
+ "knip:files": "knip --files"
164
+ }
165
+ }
166
+ ```
167
+
168
+ **Add via npm pkg**:
169
+ ```bash
170
+ npm pkg set scripts.knip="knip"
171
+ npm pkg set scripts.knip:fix="knip --fix"
172
+ npm pkg set scripts.knip:deps="knip --dependencies"
173
+ npm pkg set scripts.knip:exports="knip --exports"
174
+ npm pkg set scripts.knip:files="knip --files"
175
+ ```
176
+
177
+ ### Step 6: Validate Installation
178
+
179
+ Run Knip to verify installation works.
180
+
181
+ **Tools Used**: Bash
182
+
183
+ ```bash
184
+ npx knip --help
185
+ ```
186
+
187
+ **Expected**: Help output displayed without errors
188
+
189
+ ### Step 7: Return Result
190
+
191
+ Return structured result indicating setup status.
192
+
193
+ **Expected Output**:
194
+ ```json
195
+ {
196
+ "installed": true,
197
+ "version": "5.x.x",
198
+ "config_file": "knip.json",
199
+ "config_created": true,
200
+ "scripts_added": ["knip", "knip:fix", "knip:deps", "knip:exports", "knip:files"],
201
+ "project_type": "nextjs|monorepo|standard",
202
+ "ready": true
203
+ }
204
+ ```
205
+
206
+ ## Error Handling
207
+
208
+ - **Installation fails**: Return error with package manager output
209
+ - **Configuration invalid**: Return error with validation details
210
+ - **Permission denied**: Return error suggesting sudo or permission fix
211
+ - **Network error**: Return error suggesting offline installation
212
+
213
+ ## Examples
214
+
215
+ ### Example 1: Fresh Project (No Knip)
216
+
217
+ **Initial State**:
218
+ - package.json exists
219
+ - No knip in devDependencies
220
+ - No knip.json
221
+
222
+ **Actions**:
223
+ 1. Install knip via detected package manager
224
+ 2. Detect project type (standard)
225
+ 3. Create knip.json with defaults
226
+ 4. Add npm scripts
227
+ 5. Validate installation
228
+
229
+ **Output**:
230
+ ```json
231
+ {
232
+ "installed": true,
233
+ "version": "5.73.3",
234
+ "config_file": "knip.json",
235
+ "config_created": true,
236
+ "scripts_added": ["knip", "knip:fix", "knip:deps", "knip:exports", "knip:files"],
237
+ "project_type": "standard",
238
+ "ready": true
239
+ }
240
+ ```
241
+
242
+ ### Example 2: Next.js Project with Existing Knip
243
+
244
+ **Initial State**:
245
+ - package.json with next dependency
246
+ - knip already in devDependencies
247
+ - knip.json exists
248
+
249
+ **Actions**:
250
+ 1. Detect knip installed (skip installation)
251
+ 2. Detect existing config (skip creation)
252
+ 3. Check scripts (add missing)
253
+ 4. Validate installation
254
+
255
+ **Output**:
256
+ ```json
257
+ {
258
+ "installed": true,
259
+ "version": "5.73.3",
260
+ "config_file": "knip.json",
261
+ "config_created": false,
262
+ "scripts_added": ["knip:deps"],
263
+ "project_type": "nextjs",
264
+ "ready": true
265
+ }
266
+ ```
267
+
268
+ ### Example 3: Monorepo Project
269
+
270
+ **Initial State**:
271
+ - package.json with workspaces field
272
+ - No knip
273
+
274
+ **Actions**:
275
+ 1. Detect monorepo (workspaces in package.json)
276
+ 2. Install knip
277
+ 3. Create monorepo-specific knip.json
278
+ 4. Add npm scripts
279
+ 5. Validate installation
280
+
281
+ **Output**:
282
+ ```json
283
+ {
284
+ "installed": true,
285
+ "version": "5.73.3",
286
+ "config_file": "knip.json",
287
+ "config_created": true,
288
+ "scripts_added": ["knip", "knip:fix", "knip:deps", "knip:exports", "knip:files"],
289
+ "project_type": "monorepo",
290
+ "ready": true
291
+ }
292
+ ```
293
+
294
+ ## Knip Command Reference
295
+
296
+ For agents using Knip after setup:
297
+
298
+ | Command | Purpose | Use Case |
299
+ |---------|---------|----------|
300
+ | `npx knip` | Full analysis | Complete dead code scan |
301
+ | `npx knip --dependencies` | Dependencies only | dependency-auditor |
302
+ | `npx knip --exports` | Exports only | Unused export detection |
303
+ | `npx knip --files` | Files only | Unused file detection |
304
+ | `npx knip --fix --fix-type exports,types` | Auto-fix exports/types | Safe automated cleanup |
305
+ | `npx knip --fix --fix-type dependencies` | Auto-fix deps | Remove from package.json |
306
+ | `npx knip --reporter json` | JSON output | Machine parsing |
307
+ | `npx knip --reporter compact` | Compact output | Quick review |
308
+
309
+ ## CRITICAL SAFETY WARNING
310
+
311
+ ### NEVER Use `--allow-remove-files`
312
+
313
+ **`npx knip --fix --allow-remove-files` is FORBIDDEN!**
314
+
315
+ Knip has a critical limitation: **it cannot detect dynamic imports**.
316
+
317
+ ```typescript
318
+ // Knip CANNOT see these relationships:
319
+ const module = await import(`./plugins/${name}.ts`);
320
+ const Component = lazy(() => import('./components/Dashboard'));
321
+ require(`./locales/${lang}.json`);
322
+ ```
323
+
324
+ Files loaded via dynamic imports will appear "unused" to Knip but are actually critical!
325
+
326
+ ### Safe Knip Usage
327
+
328
+ **ALLOWED**:
329
+ - `npx knip --fix --fix-type exports` - Safe: removes unused exports from files
330
+ - `npx knip --fix --fix-type types` - Safe: removes unused type exports
331
+ - `npx knip --fix --fix-type dependencies` - Safe: removes from package.json only
332
+
333
+ **FORBIDDEN**:
334
+ - `npx knip --fix --allow-remove-files` - DANGEROUS: may delete files with dynamic imports
335
+ - `npx knip --fix` (without --fix-type) - May include file removal
336
+
337
+ ### Manual Verification Required
338
+
339
+ Before removing ANY file flagged by Knip:
340
+ 1. Search for dynamic imports: `import(`, `require(`, `lazy(`, `loadable(`
341
+ 2. Check for string interpolation in imports
342
+ 3. Verify no config files reference the file
343
+ 4. Run build and tests after removal
344
+
345
+ ## Integration with Agents
346
+
347
+ ### dead-code-hunter Pre-Check
348
+
349
+ ```markdown
350
+ ## Phase 0: Pre-Flight
351
+
352
+ 1. Use setup-knip Skill to ensure Knip is available
353
+ 2. If result.ready === false, halt with setup instructions
354
+ 3. If result.ready === true, proceed with detection
355
+ ```
356
+
357
+ ### dependency-auditor Pre-Check
358
+
359
+ ```markdown
360
+ ## Phase 1: Environment Analysis
361
+
362
+ 1. Use setup-knip Skill before dependency analysis
363
+ 2. Knip will detect unused dependencies more accurately than manual grep
364
+ ```
365
+
366
+ ## Notes
367
+
368
+ - Knip version 5.x is required (major improvements over v4)
369
+ - Configuration is auto-detected for 100+ frameworks
370
+ - Monorepo support is first-class
371
+ - Use `--reporter json` for machine-readable output
372
+ - The `--fix` flag can auto-remove unused exports and dependencies
@@ -0,0 +1,119 @@
1
+ # Creation Log: Systematic Debugging Skill
2
+
3
+ Reference example of extracting, structuring, and bulletproofing a critical skill.
4
+
5
+ ## Source Material
6
+
7
+ Extracted debugging framework from `/Users/jesse/.claude/CLAUDE.md`:
8
+ - 4-phase systematic process (Investigation → Pattern Analysis → Hypothesis → Implementation)
9
+ - Core mandate: ALWAYS find root cause, NEVER fix symptoms
10
+ - Rules designed to resist time pressure and rationalization
11
+
12
+ ## Extraction Decisions
13
+
14
+ **What to include:**
15
+ - Complete 4-phase framework with all rules
16
+ - Anti-shortcuts ("NEVER fix symptom", "STOP and re-analyze")
17
+ - Pressure-resistant language ("even if faster", "even if I seem in a hurry")
18
+ - Concrete steps for each phase
19
+
20
+ **What to leave out:**
21
+ - Project-specific context
22
+ - Repetitive variations of same rule
23
+ - Narrative explanations (condensed to principles)
24
+
25
+ ## Structure Following skill-creation/SKILL.md
26
+
27
+ 1. **Rich when_to_use** - Included symptoms and anti-patterns
28
+ 2. **Type: technique** - Concrete process with steps
29
+ 3. **Keywords** - "root cause", "symptom", "workaround", "debugging", "investigation"
30
+ 4. **Flowchart** - Decision point for "fix failed" → re-analyze vs add more fixes
31
+ 5. **Phase-by-phase breakdown** - Scannable checklist format
32
+ 6. **Anti-patterns section** - What NOT to do (critical for this skill)
33
+
34
+ ## Bulletproofing Elements
35
+
36
+ Framework designed to resist rationalization under pressure:
37
+
38
+ ### Language Choices
39
+ - "ALWAYS" / "NEVER" (not "should" / "try to")
40
+ - "even if faster" / "even if I seem in a hurry"
41
+ - "STOP and re-analyze" (explicit pause)
42
+ - "Don't skip past" (catches the actual behavior)
43
+
44
+ ### Structural Defenses
45
+ - **Phase 1 required** - Can't skip to implementation
46
+ - **Single hypothesis rule** - Forces thinking, prevents shotgun fixes
47
+ - **Explicit failure mode** - "IF your first fix doesn't work" with mandatory action
48
+ - **Anti-patterns section** - Shows exactly what shortcuts look like
49
+
50
+ ### Redundancy
51
+ - Root cause mandate in overview + when_to_use + Phase 1 + implementation rules
52
+ - "NEVER fix symptom" appears 4 times in different contexts
53
+ - Each phase has explicit "don't skip" guidance
54
+
55
+ ## Testing Approach
56
+
57
+ Created 4 validation tests following skills/meta/testing-skills-with-subagents:
58
+
59
+ ### Test 1: Academic Context (No Pressure)
60
+ - Simple bug, no time pressure
61
+ - **Result:** Perfect compliance, complete investigation
62
+
63
+ ### Test 2: Time Pressure + Obvious Quick Fix
64
+ - User "in a hurry", symptom fix looks easy
65
+ - **Result:** Resisted shortcut, followed full process, found real root cause
66
+
67
+ ### Test 3: Complex System + Uncertainty
68
+ - Multi-layer failure, unclear if can find root cause
69
+ - **Result:** Systematic investigation, traced through all layers, found source
70
+
71
+ ### Test 4: Failed First Fix
72
+ - Hypothesis doesn't work, temptation to add more fixes
73
+ - **Result:** Stopped, re-analyzed, formed new hypothesis (no shotgun)
74
+
75
+ **All tests passed.** No rationalizations found.
76
+
77
+ ## Iterations
78
+
79
+ ### Initial Version
80
+ - Complete 4-phase framework
81
+ - Anti-patterns section
82
+ - Flowchart for "fix failed" decision
83
+
84
+ ### Enhancement 1: TDD Reference
85
+ - Added link to skills/testing/test-driven-development
86
+ - Note explaining TDD's "simplest code" ≠ debugging's "root cause"
87
+ - Prevents confusion between methodologies
88
+
89
+ ## Final Outcome
90
+
91
+ Bulletproof skill that:
92
+ - ✅ Clearly mandates root cause investigation
93
+ - ✅ Resists time pressure rationalization
94
+ - ✅ Provides concrete steps for each phase
95
+ - ✅ Shows anti-patterns explicitly
96
+ - ✅ Tested under multiple pressure scenarios
97
+ - ✅ Clarifies relationship to TDD
98
+ - ✅ Ready for use
99
+
100
+ ## Key Insight
101
+
102
+ **Most important bulletproofing:** Anti-patterns section showing exact shortcuts that feel justified in the moment. When Claude thinks "I'll just add this one quick fix", seeing that exact pattern listed as wrong creates cognitive friction.
103
+
104
+ ## Usage Example
105
+
106
+ When encountering a bug:
107
+ 1. Load skill: skills/debugging/systematic-debugging
108
+ 2. Read overview (10 sec) - reminded of mandate
109
+ 3. Follow Phase 1 checklist - forced investigation
110
+ 4. If tempted to skip - see anti-pattern, stop
111
+ 5. Complete all phases - root cause found
112
+
113
+ **Time investment:** 5-10 minutes
114
+ **Time saved:** Hours of symptom-whack-a-mole
115
+
116
+ ---
117
+
118
+ *Created: 2025-10-03*
119
+ *Purpose: Reference example for skill extraction and bulletproofing*