ccjk 14.1.11 → 14.2.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 (132) hide show
  1. package/dist/chunks/api-cli.mjs +3 -2
  2. package/dist/chunks/api-config-selector.mjs +8 -6
  3. package/dist/chunks/auto-updater.mjs +1 -1
  4. package/dist/chunks/ccjk-agents.mjs +2 -2
  5. package/dist/chunks/ccjk-all.mjs +6 -6
  6. package/dist/chunks/ccjk-hooks.mjs +2 -2
  7. package/dist/chunks/ccjk-mcp.mjs +5 -5
  8. package/dist/chunks/ccjk-setup.mjs +4 -4
  9. package/dist/chunks/ccjk-skills.mjs +2 -2
  10. package/dist/chunks/ccr.mjs +11 -9
  11. package/dist/chunks/check-updates.mjs +2 -1
  12. package/dist/chunks/claude-code-incremental-manager.mjs +8 -6
  13. package/dist/chunks/claude-config.mjs +594 -62
  14. package/dist/chunks/claude-config2.mjs +62 -0
  15. package/dist/chunks/clavue-config.mjs +1390 -0
  16. package/dist/chunks/code-type-resolver.mjs +1 -1
  17. package/dist/chunks/codex-config-switch.mjs +1 -0
  18. package/dist/chunks/codex-provider-manager.mjs +2 -1
  19. package/dist/chunks/codex.mjs +4 -3
  20. package/dist/chunks/config-switch.mjs +6 -4
  21. package/dist/chunks/config.mjs +23 -1974
  22. package/dist/chunks/config2.mjs +8 -7
  23. package/dist/chunks/config3.mjs +1 -0
  24. package/dist/chunks/doctor.mjs +178 -8
  25. package/dist/chunks/features.mjs +9 -7
  26. package/dist/chunks/index10.mjs +14 -5365
  27. package/dist/chunks/index9.mjs +5379 -14
  28. package/dist/chunks/init.mjs +12 -10
  29. package/dist/chunks/installer.mjs +7 -5
  30. package/dist/chunks/interview.mjs +1 -1
  31. package/dist/chunks/mcp-cli.mjs +23 -22
  32. package/dist/chunks/mcp.mjs +8 -7
  33. package/dist/chunks/package.mjs +1 -1
  34. package/dist/chunks/platform.mjs +1 -1
  35. package/dist/chunks/quick-provider.mjs +7 -5
  36. package/dist/chunks/quick-setup.mjs +7 -5
  37. package/dist/chunks/simple-config.mjs +3 -2
  38. package/dist/chunks/slash-commands.mjs +1 -1
  39. package/dist/chunks/thinking.mjs +1 -1
  40. package/dist/chunks/uninstall.mjs +1 -1
  41. package/dist/chunks/update.mjs +10 -9
  42. package/dist/chunks/version-checker.mjs +1 -1
  43. package/dist/chunks/zero-config.mjs +4 -3
  44. package/dist/cli.mjs +3 -3
  45. package/dist/index.mjs +7 -6
  46. package/dist/shared/{ccjk.DGllfVCZ.mjs → ccjk.BtrioX1Z.mjs} +1 -1
  47. package/dist/shared/{ccjk.DOw7Fawt.mjs → ccjk.C1Be3aJN.mjs} +2 -2
  48. package/dist/shared/{ccjk.BCzOWT1L.mjs → ccjk.C94P8gCY.mjs} +2 -2
  49. package/dist/shared/{ccjk.Cgv_cFVX.mjs → ccjk.CTr4yCZ1.mjs} +2 -2
  50. package/dist/shared/{ccjk.Cv13QsGp.mjs → ccjk.CoCHVXl3.mjs} +1 -1
  51. package/dist/shared/{ccjk.f3TBLJSt.mjs → ccjk.CwGZSTAK.mjs} +7 -7
  52. package/dist/shared/{ccjk.CfKJnpbB.mjs → ccjk.D-magaEx.mjs} +2 -2
  53. package/dist/shared/{ccjk.CbWVbtb9.mjs → ccjk.DhJ1kyDR.mjs} +1 -1
  54. package/dist/shared/{ccjk.zFGcZT7Y.mjs → ccjk.OJKHVSOb.mjs} +1 -1
  55. package/dist/templates/agents/README.md +78 -0
  56. package/dist/templates/common/error-prevention.md +267 -0
  57. package/dist/templates/common/karpathy-baseline.md +83 -0
  58. package/dist/templates/common/output-styles/zh-CN/carmack-mode.md +381 -0
  59. package/dist/templates/common/output-styles/zh-CN/dhh-mode.md +265 -0
  60. package/dist/templates/common/output-styles/zh-CN/evan-you-mode.md +539 -0
  61. package/dist/templates/common/output-styles/zh-CN/jobs-mode.md +369 -0
  62. package/dist/templates/common/output-styles/zh-CN/linus-mode.md +135 -0
  63. package/dist/templates/common/output-styles/zh-CN/uncle-bob-mode.md +221 -0
  64. package/dist/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +628 -0
  65. package/dist/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +628 -0
  66. package/dist/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +187 -0
  67. package/dist/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +191 -0
  68. package/dist/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +249 -0
  69. package/dist/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +277 -0
  70. package/dist/templates/common/workflow/essential/en/agents/get-current-datetime.md +29 -0
  71. package/dist/templates/common/workflow/essential/en/agents/init-architect.md +115 -0
  72. package/dist/templates/common/workflow/essential/en/agents/ui-ux-designer.md +91 -0
  73. package/dist/templates/common/workflow/essential/en/feat.md +92 -0
  74. package/dist/templates/common/workflow/essential/en/goal.md +147 -0
  75. package/dist/templates/common/workflow/essential/en/init-project.md +53 -0
  76. package/dist/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +29 -0
  77. package/dist/templates/common/workflow/essential/zh-CN/agents/init-architect.md +115 -0
  78. package/dist/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +91 -0
  79. package/dist/templates/common/workflow/essential/zh-CN/feat.md +315 -0
  80. package/dist/templates/common/workflow/essential/zh-CN/goal.md +146 -0
  81. package/dist/templates/common/workflow/essential/zh-CN/init-project.md +53 -0
  82. package/dist/templates/common/workflow/git/en/git-cleanBranches.md +102 -0
  83. package/dist/templates/common/workflow/git/en/git-commit.md +205 -0
  84. package/dist/templates/common/workflow/git/en/git-rollback.md +90 -0
  85. package/dist/templates/common/workflow/git/en/git-worktree.md +276 -0
  86. package/dist/templates/common/workflow/git/zh-CN/git-cleanBranches.md +102 -0
  87. package/dist/templates/common/workflow/git/zh-CN/git-commit.md +205 -0
  88. package/dist/templates/common/workflow/git/zh-CN/git-rollback.md +90 -0
  89. package/dist/templates/common/workflow/git/zh-CN/git-worktree.md +276 -0
  90. package/dist/templates/common/workflow/interview/en/interview.md +67 -0
  91. package/dist/templates/common/workflow/interview/zh-CN/interview.md +67 -0
  92. package/dist/templates/common/workflow/linearMethod/en/linear-method.md +651 -0
  93. package/dist/templates/common/workflow/linearMethod/zh-CN/linear-method.md +752 -0
  94. package/dist/templates/common/workflow/refactoringMaster/en/refactoring-master.md +516 -0
  95. package/dist/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +812 -0
  96. package/dist/templates/common/workflow/sixStep/en/workflow.md +83 -0
  97. package/dist/templates/common/workflow/sixStep/zh-CN/workflow.md +359 -0
  98. package/dist/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +364 -0
  99. package/dist/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +366 -0
  100. package/dist/templates/hooks/README.md +212 -0
  101. package/dist/templates/hooks/git-workflow-hooks.md +551 -0
  102. package/dist/templates/hooks/post-test-coverage.md +434 -0
  103. package/dist/templates/hooks/pre-commit-black.md +274 -0
  104. package/dist/templates/hooks/pre-commit-eslint.md +153 -0
  105. package/dist/templates/hooks/pre-commit-gofmt.md +284 -0
  106. package/dist/templates/hooks/pre-commit-prettier.md +212 -0
  107. package/dist/templates/hooks/pre-commit-type-check.md +377 -0
  108. package/dist/templates/skills/ccjk-init.md +154 -0
  109. package/dist/templates/skills/ccjk-mcp-setup.md +205 -0
  110. package/dist/templates/skills/ccjk-troubleshoot.md +228 -0
  111. package/dist/templates/skills/django-patterns.md +1016 -0
  112. package/dist/templates/skills/git-workflow.md +748 -0
  113. package/dist/templates/skills/go-idioms.md +963 -0
  114. package/dist/templates/skills/nextjs-optimization.md +694 -0
  115. package/dist/templates/skills/python-pep8.md +852 -0
  116. package/dist/templates/skills/react-patterns.md +686 -0
  117. package/dist/templates/skills/rust-patterns.md +1057 -0
  118. package/dist/templates/skills/security-best-practices.md +1413 -0
  119. package/dist/templates/skills/testing-best-practices.md +1315 -0
  120. package/dist/templates/skills/ts-best-practices.md +354 -0
  121. package/package.json +1 -1
  122. package/templates/common/karpathy-baseline.md +83 -0
  123. package/templates/common/output-styles/zh-CN/carmack-mode.md +14 -0
  124. package/templates/common/output-styles/zh-CN/dhh-mode.md +14 -0
  125. package/templates/common/output-styles/zh-CN/evan-you-mode.md +14 -0
  126. package/templates/common/output-styles/zh-CN/jobs-mode.md +14 -0
  127. package/templates/common/output-styles/zh-CN/linus-mode.md +14 -0
  128. package/templates/common/output-styles/zh-CN/uncle-bob-mode.md +14 -0
  129. package/templates/common/workflow/linearMethod/zh-CN/linear-method.md +2 -0
  130. package/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +2 -0
  131. package/templates/common/workflow/sixStep/zh-CN/workflow.md +2 -0
  132. package/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +2 -0
@@ -0,0 +1,377 @@
1
+ ---
2
+ id: pre-commit-type-check
3
+ type: PreToolUse
4
+ name: TypeScript Type Check Pre-commit Hook
5
+ description: Run TypeScript type checking before git commits to catch type errors
6
+ priority: 10
7
+ matcher: Bash(git commit *)
8
+ command: npx tsc --noEmit
9
+ timeout: 45000
10
+ enabled: true
11
+ applicableTo: [typescript, react, vue, angular, node]
12
+ ---
13
+
14
+ # TypeScript Type Check Pre-commit Hook
15
+
16
+ ## Description
17
+
18
+ This hook runs TypeScript type checking before every git commit to catch type errors early. It uses `tsc --noEmit` to perform type checking without generating output files, ensuring type safety without affecting the build process.
19
+
20
+ ## 描述
21
+
22
+ 此钩子在每次 git 提交前运行 TypeScript 类型检查以尽早发现类型错误。它使用 `tsc --noEmit` 执行类型检查而不生成输出文件,确保类型安全而不影响构建过程。
23
+
24
+ ## When it runs
25
+
26
+ - **Trigger**: Before any `git commit` command
27
+ - **Condition**: When TypeScript configuration (`tsconfig.json`) is detected
28
+ - **Scope**: Runs type checking on all TypeScript files in the project
29
+
30
+ ## 运行时机
31
+
32
+ - **触发器**: 任何 `git commit` 命令之前
33
+ - **条件**: 检测到 TypeScript 配置(`tsconfig.json`)时
34
+ - **范围**: 对项目中所有 TypeScript 文件运行类型检查
35
+
36
+ ## Configuration
37
+
38
+ ### Prerequisites
39
+ ```bash
40
+ # Install TypeScript if not already installed
41
+ npm install --save-dev typescript
42
+
43
+ # Initialize TypeScript configuration
44
+ npx tsc --init
45
+ ```
46
+
47
+ ### Basic tsconfig.json
48
+ ```json
49
+ {
50
+ "compilerOptions": {
51
+ "target": "ES2020",
52
+ "module": "ESNext",
53
+ "moduleResolution": "node",
54
+ "strict": true,
55
+ "esModuleInterop": true,
56
+ "skipLibCheck": true,
57
+ "forceConsistentCasingInFileNames": true,
58
+ "declaration": true,
59
+ "outDir": "./dist",
60
+ "rootDir": "./src"
61
+ },
62
+ "include": ["src/**/*"],
63
+ "exclude": ["node_modules", "dist", "**/*.test.ts"]
64
+ }
65
+ ```
66
+
67
+ ### Hook Configuration
68
+ ```yaml
69
+ # In your CCJK configuration
70
+ hooks:
71
+ pre-commit-type-check:
72
+ enabled: true
73
+ command: "npx tsc --noEmit"
74
+ timeout: 45000
75
+ failOnError: true
76
+ ```
77
+
78
+ ## 配置
79
+
80
+ ### 前置条件
81
+ ```bash
82
+ # 如果尚未安装 TypeScript,请安装
83
+ npm install --save-dev typescript
84
+
85
+ # 初始化 TypeScript 配置
86
+ npx tsc --init
87
+ ```
88
+
89
+ ### 基本 tsconfig.json
90
+ ```json
91
+ {
92
+ "compilerOptions": {
93
+ "target": "ES2020",
94
+ "module": "ESNext",
95
+ "moduleResolution": "node",
96
+ "strict": true,
97
+ "esModuleInterop": true,
98
+ "skipLibCheck": true,
99
+ "forceConsistentCasingInFileNames": true,
100
+ "declaration": true,
101
+ "outDir": "./dist",
102
+ "rootDir": "./src"
103
+ },
104
+ "include": ["src/**/*"],
105
+ "exclude": ["node_modules", "dist", "**/*.test.ts"]
106
+ }
107
+ ```
108
+
109
+ ## Customization
110
+
111
+ ### Custom TypeScript Configuration
112
+ ```yaml
113
+ hooks:
114
+ pre-commit-type-check:
115
+ command: "npx tsc --noEmit --project tsconfig.build.json"
116
+ description: "Use specific TypeScript configuration for type checking"
117
+ ```
118
+
119
+ ### Check Specific Directories Only
120
+ ```yaml
121
+ hooks:
122
+ pre-commit-type-check:
123
+ command: "npx tsc --noEmit src/**/*.ts"
124
+ include: ["src/**/*.ts", "src/**/*.tsx"]
125
+ ```
126
+
127
+ ### Skip Type Checking for Tests
128
+ ```json
129
+ // tsconfig.build.json
130
+ {
131
+ "extends": "./tsconfig.json",
132
+ "exclude": ["**/*.test.ts", "**/*.spec.ts", "tests/**/*"]
133
+ }
134
+ ```
135
+
136
+ ```yaml
137
+ hooks:
138
+ pre-commit-type-check:
139
+ command: "npx tsc --noEmit --project tsconfig.build.json"
140
+ ```
141
+
142
+ ### Incremental Type Checking
143
+ ```json
144
+ // tsconfig.json
145
+ {
146
+ "compilerOptions": {
147
+ "incremental": true,
148
+ "tsBuildInfoFile": ".tsbuildinfo"
149
+ }
150
+ }
151
+ ```
152
+
153
+ ```yaml
154
+ hooks:
155
+ pre-commit-type-check:
156
+ command: "npx tsc --noEmit --incremental"
157
+ description: "Use incremental type checking for better performance"
158
+ ```
159
+
160
+ ### Integration with Multiple Projects
161
+ ```yaml
162
+ hooks:
163
+ pre-commit-type-check-client:
164
+ command: "npx tsc --noEmit --project client/tsconfig.json"
165
+ priority: 10
166
+ pre-commit-type-check-server:
167
+ command: "npx tsc --noEmit --project server/tsconfig.json"
168
+ priority: 10
169
+ ```
170
+
171
+ ## 自定义
172
+
173
+ ### 自定义 TypeScript 配置
174
+ ```yaml
175
+ hooks:
176
+ pre-commit-type-check:
177
+ command: "npx tsc --noEmit --project tsconfig.build.json"
178
+ description: "使用特定的 TypeScript 配置进行类型检查"
179
+ ```
180
+
181
+ ### 仅检查特定目录
182
+ ```yaml
183
+ hooks:
184
+ pre-commit-type-check:
185
+ command: "npx tsc --noEmit src/**/*.ts"
186
+ include: ["src/**/*.ts", "src/**/*.tsx"]
187
+ ```
188
+
189
+ ### 跳过测试的类型检查
190
+ ```json
191
+ // tsconfig.build.json
192
+ {
193
+ "extends": "./tsconfig.json",
194
+ "exclude": ["**/*.test.ts", "**/*.spec.ts", "tests/**/*"]
195
+ }
196
+ ```
197
+
198
+ ## Error Handling
199
+
200
+ - **Type errors found**: Commit is blocked with detailed type error information
201
+ - **Configuration errors**: Commit is blocked with tsconfig.json error details
202
+ - **Timeout**: Hook fails after 45 seconds (longer timeout for large projects)
203
+ - **Missing TypeScript**: Hook is skipped with installation instructions
204
+ - **Missing tsconfig.json**: Hook is skipped with configuration instructions
205
+
206
+ ## 错误处理
207
+
208
+ - **发现类型错误**: 阻止提交并显示详细的类型错误信息
209
+ - **配置错误**: 阻止提交并显示 tsconfig.json 错误详情
210
+ - **超时**: 45 秒后钩子失败(大型项目的更长超时)
211
+ - **缺少 TypeScript**: 跳过钩子并显示安装说明
212
+ - **缺少 tsconfig.json**: 跳过钩子并显示配置说明
213
+
214
+ ## Advanced Configuration
215
+
216
+ ### Strict Type Checking
217
+ ```json
218
+ // tsconfig.strict.json
219
+ {
220
+ "extends": "./tsconfig.json",
221
+ "compilerOptions": {
222
+ "strict": true,
223
+ "noImplicitAny": true,
224
+ "noImplicitReturns": true,
225
+ "noImplicitThis": true,
226
+ "noUnusedLocals": true,
227
+ "noUnusedParameters": true,
228
+ "exactOptionalPropertyTypes": true
229
+ }
230
+ }
231
+ ```
232
+
233
+ ### Project References for Monorepos
234
+ ```json
235
+ // tsconfig.json (root)
236
+ {
237
+ "files": [],
238
+ "references": [
239
+ { "path": "./packages/core" },
240
+ { "path": "./packages/utils" },
241
+ { "path": "./apps/web" }
242
+ ]
243
+ }
244
+ ```
245
+
246
+ ```yaml
247
+ hooks:
248
+ pre-commit-type-check:
249
+ command: "npx tsc --build --noEmit"
250
+ description: "Type check all project references"
251
+ ```
252
+
253
+ ### Custom Compiler Options
254
+ ```yaml
255
+ hooks:
256
+ pre-commit-type-check:
257
+ command: "npx tsc --noEmit --strict --noUnusedLocals --noUnusedParameters"
258
+ description: "Type check with additional strict options"
259
+ ```
260
+
261
+ ## 高级配置
262
+
263
+ ### 严格类型检查
264
+ ```json
265
+ // tsconfig.strict.json
266
+ {
267
+ "extends": "./tsconfig.json",
268
+ "compilerOptions": {
269
+ "strict": true,
270
+ "noImplicitAny": true,
271
+ "noImplicitReturns": true,
272
+ "noImplicitThis": true,
273
+ "noUnusedLocals": true,
274
+ "noUnusedParameters": true,
275
+ "exactOptionalPropertyTypes": true
276
+ }
277
+ }
278
+ ```
279
+
280
+ ### Monorepo 的项目引用
281
+ ```json
282
+ // tsconfig.json (root)
283
+ {
284
+ "files": [],
285
+ "references": [
286
+ { "path": "./packages/core" },
287
+ { "path": "./packages/utils" },
288
+ { "path": "./apps/web" }
289
+ ]
290
+ }
291
+ ```
292
+
293
+ ## Performance Tips
294
+
295
+ ### Use Project References
296
+ For large monorepos, use TypeScript project references to improve type checking performance.
297
+
298
+ ### Enable Incremental Compilation
299
+ ```json
300
+ {
301
+ "compilerOptions": {
302
+ "incremental": true,
303
+ "tsBuildInfoFile": ".tsbuildinfo"
304
+ }
305
+ }
306
+ ```
307
+
308
+ ### Skip Library Type Checking
309
+ ```json
310
+ {
311
+ "compilerOptions": {
312
+ "skipLibCheck": true
313
+ }
314
+ }
315
+ ```
316
+
317
+ ## 性能提示
318
+
319
+ ### 使用项目引用
320
+ 对于大型 monorepo,使用 TypeScript 项目引用来提高类型检查性能。
321
+
322
+ ### 启用增量编译
323
+ ```json
324
+ {
325
+ "compilerOptions": {
326
+ "incremental": true,
327
+ "tsBuildInfoFile": ".tsbuildinfo"
328
+ }
329
+ }
330
+ ```
331
+
332
+ ### 跳过库类型检查
333
+ ```json
334
+ {
335
+ "compilerOptions": {
336
+ "skipLibCheck": true
337
+ }
338
+ }
339
+ ```
340
+
341
+ ## Integration with Other Tools
342
+
343
+ ### Combine with ESLint
344
+ ```yaml
345
+ hooks:
346
+ pre-commit-type-check:
347
+ command: "npx tsc --noEmit"
348
+ priority: 11
349
+ pre-commit-eslint:
350
+ command: "npx eslint --fix ."
351
+ priority: 10
352
+ ```
353
+
354
+ ### Use with Vue.js
355
+ ```json
356
+ // tsconfig.json for Vue
357
+ {
358
+ "compilerOptions": {
359
+ "jsx": "preserve",
360
+ "moduleResolution": "node"
361
+ },
362
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
363
+ }
364
+ ```
365
+
366
+ ## 与其他工具集成
367
+
368
+ ### 与 ESLint 结合
369
+ ```yaml
370
+ hooks:
371
+ pre-commit-type-check:
372
+ command: "npx tsc --noEmit"
373
+ priority: 11
374
+ pre-commit-eslint:
375
+ command: "npx eslint --fix ."
376
+ priority: 10
377
+ ```
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: ccjk-init
3
+ description: Initialize CCJK environment with guided setup
4
+ version: 1.0.0
5
+ author: CCJK Team
6
+ category: devops
7
+ triggers:
8
+ - /ccjk-init
9
+ - /setup-ccjk
10
+ use_when:
11
+ - User wants to set up CCJK
12
+ - When initializing a new project with CCJK
13
+ - When resetting CCJK configuration
14
+ auto_activate: true
15
+ priority: 9
16
+ user_invocable: true
17
+ context: inherit
18
+ args:
19
+ - name: mode
20
+ description: Setup mode (full, quick, project)
21
+ required: false
22
+ default: "full"
23
+ allowed_tools:
24
+ - Read
25
+ - Write
26
+ - Edit
27
+ - Bash(npx ccjk *)
28
+ - Bash(ccjk *)
29
+ - Bash(ls *)
30
+ - Bash(cat *)
31
+ - Bash(mkdir *)
32
+ hooks:
33
+ - type: SkillActivate
34
+ command: "echo '🚀 Starting CCJK initialization...'"
35
+ - type: SkillComplete
36
+ command: "echo '✅ CCJK initialization complete!'"
37
+ timeout: 600
38
+ ---
39
+
40
+ # CCJK Initialization Skill
41
+
42
+ This skill guides users through CCJK setup with intelligent defaults and best practices.
43
+
44
+ ## Arguments
45
+
46
+ - `$0` - **mode**: Setup mode (default: "full")
47
+ - `full` - Complete setup with all options
48
+ - `quick` - Quick setup with defaults
49
+ - `project` - Project-specific setup only
50
+
51
+ ## Initialization Workflow
52
+
53
+ ### Phase 1: Environment Check
54
+
55
+ 1. **Check Node.js version**
56
+ - Minimum: Node.js 20+
57
+ - Run: `node --version`
58
+
59
+ 2. **Check existing configuration**
60
+ - Look for `~/.claude.json`
61
+ - Look for `~/.claude/` directory
62
+ - Look for `.claude/` in current project
63
+
64
+ 3. **Detect code tool**
65
+ - Check if Claude Code is installed
66
+ - Check for other AI code tools
67
+
68
+ ### Phase 2: Configuration Setup
69
+
70
+ Based on mode `$0`:
71
+
72
+ #### Full Mode
73
+ 1. Configure API settings (provider, key, URL)
74
+ 2. Install MCP services
75
+ 3. Install workflows
76
+ 4. Set up output styles
77
+ 5. Configure cloud sync (optional)
78
+
79
+ #### Quick Mode
80
+ 1. Use default API settings
81
+ 2. Install essential MCP services
82
+ 3. Install essential workflows
83
+
84
+ #### Project Mode
85
+ 1. Create `.claude/` directory
86
+ 2. Set up project-specific settings
87
+ 3. Create project CLAUDE.md
88
+
89
+ ### Phase 3: Verification
90
+
91
+ 1. **Test API connection**
92
+ - Verify API key works
93
+ - Check model availability
94
+
95
+ 2. **Verify MCP services**
96
+ - Run `ccjk mcp doctor`
97
+ - Check service status
98
+
99
+ 3. **Verify workflows**
100
+ - Check command availability
101
+ - Test a simple workflow
102
+
103
+ ## Commands to Execute
104
+
105
+ ```bash
106
+ # Full initialization
107
+ npx ccjk init
108
+
109
+ # Quick setup
110
+ npx ccjk init --quick
111
+
112
+ # Project setup only
113
+ npx ccjk init --project
114
+ ```
115
+
116
+ ## Post-Initialization
117
+
118
+ After setup, users can:
119
+
120
+ 1. **Use workflows**:
121
+ - `/init-project` - Initialize project context
122
+ - `/feat` - Feature development
123
+ - `/git-commit` - Smart commits
124
+
125
+ 2. **Manage MCP**:
126
+ - `ccjk mcp list` - List services
127
+ - `ccjk mcp install` - Add services
128
+
129
+ 3. **Create skills**:
130
+ - `ccjk skill create` - New skill
131
+
132
+ ## Troubleshooting
133
+
134
+ ### Common Issues
135
+
136
+ 1. **Permission denied**
137
+ - Check write permissions to `~/.claude/`
138
+ - Run with appropriate permissions
139
+
140
+ 2. **API key invalid**
141
+ - Verify key format
142
+ - Check provider URL
143
+
144
+ 3. **MCP services failing**
145
+ - Run `ccjk mcp doctor`
146
+ - Check npm/npx availability
147
+
148
+ ## Example Usage
149
+
150
+ ```
151
+ /ccjk-init full
152
+ /ccjk-init quick
153
+ /setup-ccjk project
154
+ ```
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: ccjk-mcp-setup
3
+ description: Interactive MCP service setup and configuration
4
+ version: 1.0.0
5
+ author: CCJK Team
6
+ category: devops
7
+ triggers:
8
+ - /mcp-setup
9
+ - /setup-mcp
10
+ use_when:
11
+ - User wants to set up MCP services
12
+ - When configuring new MCP services
13
+ - When optimizing MCP configuration
14
+ auto_activate: true
15
+ priority: 8
16
+ user_invocable: true
17
+ context: inherit
18
+ args:
19
+ - name: preset
20
+ description: MCP preset (minimal, standard, full, custom)
21
+ required: false
22
+ default: "standard"
23
+ allowed_tools:
24
+ - Read
25
+ - Write
26
+ - Edit
27
+ - Bash(ccjk mcp *)
28
+ - Bash(npx *)
29
+ - Bash(cat *)
30
+ - Bash(ls *)
31
+ - mcp__*
32
+ hooks:
33
+ - type: SkillActivate
34
+ command: "ccjk mcp list 2>/dev/null || echo 'No MCP services installed'"
35
+ timeout: 600
36
+ ---
37
+
38
+ # MCP Setup Skill
39
+
40
+ This skill helps users set up MCP services with intelligent presets and recommendations.
41
+
42
+ ## Arguments
43
+
44
+ - `$0` - **preset**: MCP preset (default: "standard")
45
+ - `minimal` - Essential services only
46
+ - `standard` - Recommended services
47
+ - `full` - All available services
48
+ - `custom` - Interactive selection
49
+
50
+ ## MCP Presets
51
+
52
+ ### Minimal Preset
53
+ Essential services for basic functionality:
54
+
55
+ | Service | Purpose |
56
+ |---------|--------|
57
+ | `context7` | Documentation lookup |
58
+ | `filesystem-mcp` | File operations |
59
+
60
+ ### Standard Preset (Recommended)
61
+ Balanced set for most users:
62
+
63
+ | Service | Purpose |
64
+ |---------|--------|
65
+ | `context7` | Documentation lookup |
66
+ | `open-websearch` | Web search |
67
+ | `filesystem-mcp` | File operations |
68
+ | `github-mcp` | GitHub integration |
69
+
70
+ ### Full Preset
71
+ All available services:
72
+
73
+ | Service | Purpose |
74
+ |---------|--------|
75
+ | `context7` | Documentation lookup |
76
+ | `open-websearch` | Web search |
77
+ | `filesystem-mcp` | File operations |
78
+ | `github-mcp` | GitHub integration |
79
+ | `Playwright` | Browser automation |
80
+ | `sqlite` | Database operations |
81
+ | `mcp-deepwiki` | Wiki search |
82
+
83
+ ## Setup Workflow
84
+
85
+ ### Phase 1: Current State Analysis
86
+
87
+ 1. **Check existing MCP config**:
88
+ ```bash
89
+ cat ~/.claude/claude_desktop_config.json 2>/dev/null || echo 'No config found'
90
+ ```
91
+
92
+ 2. **List installed services**:
93
+ ```bash
94
+ ccjk mcp list
95
+ ```
96
+
97
+ 3. **Run diagnostics**:
98
+ ```bash
99
+ ccjk mcp doctor
100
+ ```
101
+
102
+ ### Phase 2: Preset Installation
103
+
104
+ Based on preset `$0`:
105
+
106
+ #### Minimal
107
+ ```bash
108
+ ccjk mcp install context7
109
+ ccjk mcp install filesystem-mcp
110
+ ```
111
+
112
+ #### Standard
113
+ ```bash
114
+ ccjk mcp install context7
115
+ ccjk mcp install open-websearch
116
+ ccjk mcp install filesystem-mcp
117
+ ccjk mcp install github-mcp
118
+ ```
119
+
120
+ #### Full
121
+ ```bash
122
+ ccjk mcp install context7
123
+ ccjk mcp install open-websearch
124
+ ccjk mcp install filesystem-mcp
125
+ ccjk mcp install github-mcp
126
+ ccjk mcp install playwright
127
+ ccjk mcp install sqlite
128
+ ccjk mcp install mcp-deepwiki
129
+ ```
130
+
131
+ #### Custom
132
+ Interactive selection - ask user which services they want.
133
+
134
+ ### Phase 3: Configuration
135
+
136
+ 1. **Configure API keys** (if needed):
137
+ - GitHub token for `github-mcp`
138
+ - Other service credentials
139
+
140
+ 2. **Set environment variables**:
141
+ ```json
142
+ {
143
+ "mcpServers": {
144
+ "github-mcp": {
145
+ "env": {
146
+ "GITHUB_TOKEN": "your-token"
147
+ }
148
+ }
149
+ }
150
+ }
151
+ ```
152
+
153
+ ### Phase 4: Verification
154
+
155
+ 1. **Test each service**:
156
+ - Verify service starts
157
+ - Test basic functionality
158
+
159
+ 2. **Run final diagnostics**:
160
+ ```bash
161
+ ccjk mcp doctor
162
+ ```
163
+
164
+ ## Service Recommendations
165
+
166
+ ### By Use Case
167
+
168
+ | Use Case | Recommended Services |
169
+ |----------|---------------------|
170
+ | **Web Development** | context7, playwright, github-mcp |
171
+ | **Data Analysis** | sqlite, filesystem-mcp |
172
+ | **Research** | open-websearch, mcp-deepwiki, context7 |
173
+ | **DevOps** | github-mcp, filesystem-mcp |
174
+ | **General** | context7, open-websearch, filesystem-mcp |
175
+
176
+ ### By Resource Usage
177
+
178
+ | Level | Services | Memory |
179
+ |-------|----------|--------|
180
+ | **Low** | context7, filesystem-mcp | ~50MB |
181
+ | **Medium** | + open-websearch, github-mcp | ~100MB |
182
+ | **High** | + playwright, sqlite | ~200MB+ |
183
+
184
+ ## Troubleshooting
185
+
186
+ ### Service Won't Start
187
+
188
+ 1. Check npm/npx availability
189
+ 2. Verify package exists
190
+ 3. Check for port conflicts
191
+
192
+ ### Service Not Responding
193
+
194
+ 1. Restart Claude Code
195
+ 2. Check service logs
196
+ 3. Verify configuration
197
+
198
+ ## Example Usage
199
+
200
+ ```
201
+ /mcp-setup minimal
202
+ /mcp-setup standard
203
+ /setup-mcp full
204
+ /mcp-setup custom
205
+ ```