codymaster 4.6.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/CHANGELOG.md +74 -8
  2. package/README.md +192 -95
  3. package/dist/advisory-handoff.js +89 -0
  4. package/dist/advisory-report.js +105 -0
  5. package/dist/browse-server.js +251 -0
  6. package/dist/cli/command-registry.js +34 -0
  7. package/dist/cli/commands/agent.js +120 -0
  8. package/dist/cli/commands/bench.js +69 -0
  9. package/dist/cli/commands/brain.js +108 -0
  10. package/dist/cli/commands/dashboard.js +93 -0
  11. package/dist/cli/commands/design-studio.js +111 -0
  12. package/dist/cli/commands/distro.js +25 -0
  13. package/dist/cli/commands/engineering.js +596 -0
  14. package/dist/cli/commands/evolve.js +123 -0
  15. package/dist/cli/commands/mcp-serve.js +104 -0
  16. package/dist/cli/commands/project.js +324 -0
  17. package/dist/cli/commands/skill-chain.js +269 -0
  18. package/dist/cli/commands/system.js +89 -0
  19. package/dist/cli/commands/task.js +254 -0
  20. package/dist/cli/update-check.js +83 -0
  21. package/dist/cm-config.js +92 -0
  22. package/dist/cm-suggest.js +77 -0
  23. package/dist/codybench/judges/automated.js +31 -0
  24. package/dist/codybench/runners/claude-code.js +32 -0
  25. package/dist/codybench/suites/memory-retention.js +85 -0
  26. package/dist/codybench/suites/tdd-regression.js +35 -0
  27. package/dist/codybench/suites/token-efficiency.js +55 -0
  28. package/dist/codybench/types.js +2 -0
  29. package/dist/context-db.js +157 -0
  30. package/dist/continuity.js +2 -6
  31. package/dist/distro-validate.js +54 -0
  32. package/dist/execution-analyzer.js +138 -0
  33. package/dist/guardian-core.js +74 -0
  34. package/dist/index.js +36 -2759
  35. package/dist/indexer/skills-lib.js +533 -0
  36. package/dist/indexer/skills-map.js +1374 -0
  37. package/dist/indexer/skills.js +16 -0
  38. package/dist/learning-promoter.js +246 -0
  39. package/dist/mcp-context-server.js +289 -1
  40. package/dist/mcp-skills-tools.js +81 -0
  41. package/dist/retro-summary.js +70 -0
  42. package/dist/second-opinion-providers.js +79 -0
  43. package/dist/skill-chain.js +63 -1
  44. package/dist/skill-evolver.js +456 -0
  45. package/dist/skill-execution-cache.js +254 -0
  46. package/dist/smart-brain-router.js +184 -0
  47. package/dist/sprint-pipeline.js +228 -0
  48. package/dist/storage-backend.js +14 -67
  49. package/dist/token-budget.js +88 -0
  50. package/dist/utils/cli-utils.js +76 -0
  51. package/dist/utils/skill-utils.js +32 -0
  52. package/package.json +17 -7
  53. package/scripts/build-skills.mjs +51 -0
  54. package/scripts/gate-0-repo-hygiene.js +75 -0
  55. package/scripts/postinstall.js +34 -28
  56. package/scripts/security-scan.js +1 -1
  57. package/scripts/validate-skills.mjs +42 -0
  58. package/skills/CLAUDE.md +2 -7
  59. package/skills/_shared/helpers.md +2 -8
  60. package/skills/cm-ads-tracker/SKILL.md +3 -6
  61. package/skills/cm-browse/SKILL.md +34 -0
  62. package/skills/cm-conductor-worktrees/SKILL.md +28 -0
  63. package/skills/cm-content-factory/SKILL.md +1 -1
  64. package/skills/cm-content-factory/landing/docs/content/changelog.md +36 -0
  65. package/skills/cm-content-factory/landing/docs/content/deployment.md +46 -0
  66. package/skills/cm-content-factory/landing/docs/content/execution-flow.md +67 -0
  67. package/skills/cm-content-factory/landing/docs/content/memory-system.md +38 -0
  68. package/skills/cm-content-factory/landing/docs/content/openspace.md +27 -0
  69. package/skills/cm-content-factory/landing/docs/content/use-cases.md +26 -0
  70. package/skills/cm-content-factory/landing/docs/content/v5-intro.md +28 -0
  71. package/skills/cm-content-factory/landing/docs/index.html +240 -0
  72. package/skills/cm-content-factory/landing/index.html +100 -100
  73. package/skills/cm-content-factory/landing/script.js +42 -0
  74. package/skills/cm-content-factory/landing/translations.js +400 -400
  75. package/skills/cm-continuity/SKILL.md +32 -33
  76. package/skills/cm-design-studio/SKILL.md +34 -0
  77. package/skills/cm-ecosystem-roadmap/SKILL.md +15 -0
  78. package/skills/cm-engineering-meta/SKILL.md +73 -0
  79. package/skills/cm-growth-hacking/SKILL.md +1 -12
  80. package/skills/cm-guardian-runtime/SKILL.md +26 -0
  81. package/skills/cm-mcp-engineering/SKILL.md +22 -0
  82. package/skills/cm-notebooklm/SKILL.md +1 -17
  83. package/skills/cm-post-deploy-canary/SKILL.md +22 -0
  84. package/skills/cm-project-bootstrap/SKILL.md +11 -0
  85. package/skills/cm-qa-visual-cli/SKILL.md +22 -0
  86. package/skills/cm-retro-cli/SKILL.md +23 -0
  87. package/skills/cm-second-opinion-cli/SKILL.md +23 -0
  88. package/skills/cm-secret-shield/SKILL.md +2 -2
  89. package/skills/cm-security-gate/SKILL.md +1 -0
  90. package/skills/cm-skill-chain/SKILL.md +25 -4
  91. package/skills/cm-skill-evolution/SKILL.md +83 -0
  92. package/skills/cm-skill-health/SKILL.md +83 -0
  93. package/skills/cm-skill-index/SKILL.md +11 -3
  94. package/skills/cm-skill-search/SKILL.md +49 -0
  95. package/skills/cm-skill-share/SKILL.md +58 -0
  96. package/skills/cm-sprint-bus/SKILL.md +33 -0
  97. package/skills/cm-start/SKILL.md +0 -10
  98. package/skills/cm-tdd/SKILL.md +59 -72
  99. package/skills/profiles/README.md +21 -0
  100. package/skills/profiles/core.txt +23 -0
  101. package/skills/profiles/design.txt +6 -0
  102. package/skills/profiles/full.txt +62 -0
  103. package/skills/profiles/growth.txt +10 -0
  104. package/skills/profiles/knowledge.txt +7 -0
  105. package/install.sh +0 -901
  106. package/scripts/test-gemini.js +0 -13
  107. package/skills/cm-frappe-agent/SKILL.md +0 -134
  108. package/skills/cm-frappe-agent/agents/doctype-architect.md +0 -596
  109. package/skills/cm-frappe-agent/agents/erpnext-customizer.md +0 -643
  110. package/skills/cm-frappe-agent/agents/frappe-backend.md +0 -814
  111. package/skills/cm-frappe-agent/agents/frappe-custom-frontend.md +0 -557
  112. package/skills/cm-frappe-agent/agents/frappe-debugger.md +0 -625
  113. package/skills/cm-frappe-agent/agents/frappe-fixer.md +0 -275
  114. package/skills/cm-frappe-agent/agents/frappe-frontend.md +0 -660
  115. package/skills/cm-frappe-agent/agents/frappe-installer.md +0 -158
  116. package/skills/cm-frappe-agent/agents/frappe-performance.md +0 -307
  117. package/skills/cm-frappe-agent/agents/frappe-planner.md +0 -419
  118. package/skills/cm-frappe-agent/agents/frappe-remote-ops.md +0 -153
  119. package/skills/cm-frappe-agent/agents/github-workflow.md +0 -286
  120. package/skills/cm-frappe-agent/commands/frappe-app.md +0 -351
  121. package/skills/cm-frappe-agent/commands/frappe-backend.md +0 -162
  122. package/skills/cm-frappe-agent/commands/frappe-bench.md +0 -254
  123. package/skills/cm-frappe-agent/commands/frappe-debug.md +0 -263
  124. package/skills/cm-frappe-agent/commands/frappe-doctype-create.md +0 -272
  125. package/skills/cm-frappe-agent/commands/frappe-doctype-field.md +0 -310
  126. package/skills/cm-frappe-agent/commands/frappe-erpnext.md +0 -210
  127. package/skills/cm-frappe-agent/commands/frappe-fix.md +0 -59
  128. package/skills/cm-frappe-agent/commands/frappe-frontend.md +0 -210
  129. package/skills/cm-frappe-agent/commands/frappe-fullstack.md +0 -243
  130. package/skills/cm-frappe-agent/commands/frappe-github.md +0 -57
  131. package/skills/cm-frappe-agent/commands/frappe-install.md +0 -52
  132. package/skills/cm-frappe-agent/commands/frappe-plan.md +0 -442
  133. package/skills/cm-frappe-agent/commands/frappe-remote.md +0 -58
  134. package/skills/cm-frappe-agent/commands/frappe-test.md +0 -356
  135. package/skills/cm-frappe-agent/docs/README.md +0 -51
  136. package/skills/cm-frappe-agent/docs/agents-catalog.md +0 -113
  137. package/skills/cm-frappe-agent/docs/architecture.md +0 -149
  138. package/skills/cm-frappe-agent/docs/commands-catalog.md +0 -82
  139. package/skills/cm-frappe-agent/docs/resources-catalog.md +0 -66
  140. package/skills/cm-frappe-agent/docs/sitemap-urls.txt +0 -52
  141. package/skills/cm-frappe-agent/docs/sitemap.md +0 -81
  142. package/skills/cm-frappe-agent/docs/sop/user-guide.md +0 -178
  143. package/skills/cm-frappe-agent/docs/sop/vibe-coding-guide.md +0 -122
  144. package/skills/cm-frappe-agent/resources/7-layer-architecture.md +0 -985
  145. package/skills/cm-frappe-agent/resources/bench_commands.md +0 -73
  146. package/skills/cm-frappe-agent/resources/code-patterns-guide.md +0 -948
  147. package/skills/cm-frappe-agent/resources/common_pitfalls.md +0 -266
  148. package/skills/cm-frappe-agent/resources/doctype-registry.md +0 -158
  149. package/skills/cm-frappe-agent/resources/installation-guide.md +0 -289
  150. package/skills/cm-frappe-agent/resources/rest-api-patterns.md +0 -182
  151. package/skills/cm-frappe-agent/resources/scaffold_checklist.md +0 -82
  152. package/skills/cm-frappe-agent/resources/upgrade_patterns.md +0 -113
  153. package/skills/cm-frappe-agent/resources/web-form-patterns.md +0 -252
  154. package/skills/cm-frappe-agent/skills/bench-commands/SKILL.md +0 -621
  155. package/skills/cm-frappe-agent/skills/client-scripts/SKILL.md +0 -642
  156. package/skills/cm-frappe-agent/skills/doctype-patterns/SKILL.md +0 -576
  157. package/skills/cm-frappe-agent/skills/frappe-api/SKILL.md +0 -740
  158. package/skills/cm-frappe-agent/skills/remote-operations/SKILL.md +0 -47
  159. package/skills/cm-frappe-agent/skills/server-scripts/SKILL.md +0 -608
  160. package/skills/cm-frappe-agent/skills/web-forms/SKILL.md +0 -46
  161. package/skills/frappe-app-builder.zip +0 -0
package/install.sh DELETED
@@ -1,901 +0,0 @@
1
- #!/usr/bin/env bash
2
- # ════════════════════════════════════════════════════════════════
3
- # CodyMaster Skills Kit v4.3.0 — Universal Installer
4
- # Inspired by: npx skills add (vercel-labs/skills)
5
- #
6
- # Usage:
7
- # bash install.sh Interactive menu
8
- # bash install.sh --claude Claude Code (non-interactive)
9
- # bash install.sh --claude --global Claude Code, user scope
10
- # bash install.sh --claude --project Claude Code, project scope
11
- # bash install.sh --gemini Gemini CLI
12
- # bash install.sh --aider Aider
13
- # bash install.sh --continue Continue.dev
14
- # bash install.sh --amazon-q Amazon Q CLI (q)
15
- # bash install.sh --amp Amp
16
- # bash install.sh --all All detected platforms
17
- # ════════════════════════════════════════════════════════════════
18
-
19
- set -e
20
-
21
- # ── Colors ──────────────────────────────────────────────────────
22
- G='\033[0;32m'; B='\033[0;34m'; P='\033[0;35m'; O='\033[0;33m'
23
- C='\033[0;36m'; R='\033[0;31m'; W='\033[1;37m'; NC='\033[0m'; BOLD='\033[1m'; DIM='\033[2m'
24
-
25
- REPO_URL="https://github.com/tody-agent/codymaster"
26
- RAW_URL="https://raw.githubusercontent.com/tody-agent/codymaster/main"
27
- VERSION="4.4.0"
28
- SCOPE="user" # default scope for Claude Code
29
-
30
- if [ -d "skills" ]; then
31
- TOTAL_SKILLS=$(ls -1d skills/cm-*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
32
- elif [ -d "$HOME/.cody-master/skills" ]; then
33
- TOTAL_SKILLS=$(ls -1d "$HOME/.cody-master/skills"/cm-*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
34
- else
35
- TOTAL_SKILLS="45"
36
- fi
37
-
38
-
39
- # ── i18n ────────────────────────────────────────────────────────
40
- detect_lang() {
41
- local lang="${LANG:-en}"
42
- case "$lang" in
43
- vi*|VI*) echo "vi" ;;
44
- zh*|ZH*) echo "zh" ;;
45
- ko*|KO*) echo "ko" ;;
46
- ru*|RU*) echo "ru" ;;
47
- hi*|HI*) echo "hi" ;;
48
- *) echo "en" ;;
49
- esac
50
- }
51
-
52
- LANG_CODE=$(detect_lang)
53
-
54
- msg() {
55
- local key="$1"
56
- case "$LANG_CODE:$key" in
57
- vi:welcome) echo "Chào mừng bạn đến với CodyMaster v${VERSION}" ;;
58
- vi:tagline) echo "${TOTAL_SKILLS} kỹ năng AI cho Claude Code và các AI agents khác" ;;
59
- vi:detecting) echo "🔍 Đang phát hiện các AI agent đã cài..." ;;
60
- vi:found) echo "✅ Đã tìm thấy" ;;
61
- vi:not_found) echo "❌ Không tìm thấy" ;;
62
- vi:select) echo "Chọn platform để cài (nhập số, cách nhau dấu phẩy):" ;;
63
- vi:scope) echo "Phạm vi cài đặt cho Claude Code:" ;;
64
- vi:scope_user) echo "User (tất cả projects)" ;;
65
- vi:scope_project) echo "Project (chỉ project này)" ;;
66
- vi:done) echo "✅ Hoàn tất!" ;;
67
- vi:onboard) echo "🎯 Bắt đầu ngay với AI Agent của bạn:" ;;
68
- vi:docs) echo "📚 Tài liệu:" ;;
69
-
70
- zh:welcome) echo "欢迎使用 CodyMaster v${VERSION}" ;;
71
- zh:tagline) echo "Claude Code 的 ${TOTAL_SKILLS} AI 技能" ;;
72
- zh:detecting) echo "🔍 检测已安装的 AI Agent..." ;;
73
- zh:found) echo "✅ 已找到" ;;
74
- zh:not_found) echo "❌ 未找到" ;;
75
- zh:select) echo "选择要安装的平台(输入数字,逗号分隔):" ;;
76
- zh:scope) echo "Claude Code 安装范围:" ;;
77
- zh:scope_user) echo "用户级(所有项目)" ;;
78
- zh:scope_project) echo "项目级(仅此项目)" ;;
79
- zh:done) echo "✅ 完成!" ;;
80
- zh:onboard) echo "🎯 立即开始与您的 AI Agent 合作:" ;;
81
- zh:docs) echo "📚 文档:" ;;
82
-
83
- ko:welcome) echo "CodyMaster v${VERSION}에 오신 것을 환영합니다" ;;
84
- ko:tagline) echo "Claude Code용 ${TOTAL_SKILLS} AI 스킬" ;;
85
- ko:detecting) echo "🔍 설치된 AI Agent 감지 중..." ;;
86
- ko:found) echo "✅ 발견됨" ;;
87
- ko:not_found) echo "❌ 없음" ;;
88
- ko:select) echo "설치할 플랫폼 선택 (숫자, 쉼표로 구분):" ;;
89
- ko:scope) echo "Claude Code 설치 범위:" ;;
90
- ko:scope_user) echo "사용자 (모든 프로젝트)" ;;
91
- ko:scope_project) echo "프로젝트 (이 프로젝트만)" ;;
92
- ko:done) echo "✅ 완료!" ;;
93
- ko:onboard) echo "🎯 AI Agent와 즉시 시작하세요:" ;;
94
- ko:docs) echo "📚 문서:" ;;
95
-
96
- *)
97
- case "$key" in
98
- welcome) echo "Welcome to CodyMaster v${VERSION}" ;;
99
- tagline) echo "${TOTAL_SKILLS} AI skills for Claude Code and other AI agents" ;;
100
- detecting) echo "🔍 Detecting installed AI agents..." ;;
101
- found) echo "✅ Found" ;;
102
- not_found) echo "❌ Not found" ;;
103
- select) echo "Select platforms to install (numbers, comma-separated):" ;;
104
- scope) echo "Installation scope for Claude Code:" ;;
105
- scope_user) echo "User — available across all projects (recommended)" ;;
106
- scope_project) echo "Project — this project only (committed to .claude/)" ;;
107
- done) echo "✅ Done!" ;;
108
- onboard) echo "🎯 Get started immediately with your AI Agent:" ;;
109
- docs) echo "📚 Documentation:" ;;
110
- esac
111
- ;;
112
- esac
113
- }
114
-
115
- # ── Header ───────────────────────────────────────────────────────
116
- print_header() {
117
- clear
118
- hamster_sentiment "start"
119
- echo -e " ${O}( . \ --- / . )${NC}"
120
- echo -e " ${O}/${NC} ${O}${BOLD}^ ^${NC} ${O}\\\\${NC}"
121
- echo -e " ${O}(${NC} ${O}${BOLD}u${NC} ${O})${NC}"
122
- echo -e " ${O}| \\ ___ / |${NC}"
123
- echo -e " ${O}'--w---w--'${NC}"
124
- echo ""
125
- echo -e " ${O}${BOLD}$(msg welcome)${NC} 🐹"
126
- echo ""
127
- echo -e " ${DIM}CodyMaster${NC} ${O}v${VERSION}${NC} ${DIM}• ${TOTAL_SKILLS} Skills • ~${NC}"
128
- echo -e "${DIM} ──────────────────────────────────────────────────${NC}"
129
- echo ""
130
- }
131
-
132
- # ── Agent Detection ──────────────────────────────────────────────
133
- detect_agents() {
134
- hamster_sentiment "progress"
135
- echo ""
136
- echo -e "${W}$(msg detecting)${NC}"
137
- echo ""
138
-
139
- DETECTED=()
140
-
141
- if command -v claude &>/dev/null; then
142
- echo -e " ${P}${BOLD}1) 🟣 Claude Code${NC} $(msg found)"
143
- DETECTED+=("claude")
144
- else
145
- echo -e " ${P}1) 🟣 Claude Code${NC} $(msg not_found)"
146
- fi
147
-
148
- if command -v gemini &>/dev/null; then
149
- echo -e " ${C}${BOLD}2) 💎 Gemini CLI${NC} $(msg found)"
150
- DETECTED+=("gemini")
151
- else
152
- echo -e " ${C}2) 💎 Gemini CLI${NC} $(msg not_found)"
153
- fi
154
-
155
- # Check for Cursor
156
- if [ -d "$HOME/.cursor" ] || [ -d "/Applications/Cursor.app" ]; then
157
- echo -e " ${B}${BOLD}3) 🔵 Cursor${NC} $(msg found)"
158
- DETECTED+=("cursor")
159
- else
160
- echo -e " ${B}3) 🔵 Cursor${NC} $(msg not_found)"
161
- fi
162
-
163
- if command -v codex &>/dev/null; then
164
- echo -e " ${O}${BOLD}4) 🟠 Codex${NC} $(msg found)"
165
- DETECTED+=("codex")
166
- else
167
- echo -e " ${O}4) 🟠 Codex${NC} $(msg not_found)"
168
- fi
169
-
170
- if command -v opencode &>/dev/null; then
171
- echo -e " ${G}${BOLD}5) 📦 OpenCode${NC} $(msg found)"
172
- DETECTED+=("opencode")
173
- else
174
- echo -e " ${G}5) 📦 OpenCode${NC} $(msg not_found)"
175
- fi
176
-
177
- if command -v aider &>/dev/null; then
178
- echo -e " ${O}${BOLD}6) 🤖 Aider${NC} $(msg found)"
179
- DETECTED+=("aider")
180
- else
181
- echo -e " ${O}6) 🤖 Aider${NC} $(msg not_found)"
182
- fi
183
-
184
- if [ -d "$HOME/.continue" ]; then
185
- echo -e " ${B}${BOLD}7) 🔗 Continue.dev${NC} $(msg found)"
186
- DETECTED+=("continue")
187
- else
188
- echo -e " ${B}7) 🔗 Continue.dev${NC} $(msg not_found)"
189
- fi
190
-
191
- if command -v q &>/dev/null; then
192
- echo -e " ${W}${BOLD}8) ☁️ Amazon Q CLI${NC} $(msg found)"
193
- DETECTED+=("amazon-q")
194
- else
195
- echo -e " ${W}8) ☁️ Amazon Q CLI${NC} $(msg not_found)"
196
- fi
197
-
198
- if command -v amp &>/dev/null; then
199
- echo -e " ${G}${BOLD}9) ⚡ Amp${NC} $(msg found)"
200
- DETECTED+=("amp")
201
- else
202
- echo -e " ${G}9) ⚡ Amp${NC} $(msg not_found)"
203
- fi
204
-
205
- echo -e " ${W}10) 📋 Manual copy${NC} (any platform)"
206
- echo ""
207
- }
208
-
209
- # ── Hamster Sentiment ─────────────────────────────────────────────
210
- hamster_sentiment() {
211
- local state="${1:-finish}"
212
- local idx=$(( RANDOM % 3 ))
213
-
214
- case $state in
215
- "start")
216
- case $idx in
217
- 0) echo -e " ${C}🐹: Whiskers twitching... CodyMaster incoming!${NC}" ;;
218
- 1) echo -e " ${C}🐹: Let's fill these cheeks with ${TOTAL_SKILLS} skills! ✨${NC}" ;;
219
- 2) echo -e " ${C}🐹: Waking up from a power nap! Let's build! 🐭${NC}" ;;
220
- esac
221
- ;;
222
- "progress")
223
- case $idx in
224
- 0) echo -e " ${C}🐹: Sniffing out your AI agents...${NC}" ;;
225
- 1) echo -e " ${C}🐹: Running on the wheel to speed this up! 🏃‍♂️💨${NC}" ;;
226
- 2) echo -e " ${C}🐹: Found a skill! Stashing it in my pocket... 💎${NC}" ;;
227
- esac
228
- ;;
229
- "finish")
230
- case $idx in
231
- 0) echo -e " ${C}🐹: Mission accomplished! Can I have a walnut now? 🥜${NC}" ;;
232
- 1) echo -e " ${C}🐹: My cheeks are stuffed with ${TOTAL_SKILLS} skills for you! ✨${NC}" ;;
233
- 2) echo -e " ${C}🐹: Terminal is Hamster-approved! Better than a wheel! 🎡${NC}" ;;
234
- esac
235
- ;;
236
- esac
237
- }
238
-
239
- # ── Onboarding block ─────────────────────────────────────────────
240
- # ── Skill Guides Hub ─────────────────────────────────────────────
241
- show_skill_guide() {
242
- local choice="$1"
243
- clear
244
- hamster_sentiment "finish"
245
- echo ""
246
-
247
- if [ "$LANG_CODE" = "vi" ]; then
248
- case "$choice" in
249
- 1)
250
- echo -e "${Y}${BOLD}1. Hướng dẫn toàn tập${NC} (${C}cm-how-it-work${NC})"
251
- echo -e "${W}🎯 Tình huống:${NC} Bạn mới cài CodyMaster và chưa biết bắt đầu từ đâu."
252
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm @/cm-how-it-work\`"
253
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Giải thích quy trình từ ý tưởng đến lúc deploy một ứng dụng web bằng bộ skill này.\""
254
- ;;
255
- 2)
256
- echo -e "${Y}${BOLD}2. Vibe Coding (Zero Code)${NC} (${C}cm-start${NC})"
257
- echo -e "${W}🎯 Tình huống:${NC} Bạn có ý tưởng nhưng lười gõ từng dòng code."
258
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm @/cm-start\`"
259
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Tôi muốn làm một trang web bán cà phê có giỏ hàng, dùng Tailwind CSS.\""
260
- ;;
261
- 3)
262
- echo -e "${Y}${BOLD}3. Tham gia dự án có sẵn${NC} (${C}cm-brainstorm-idea${NC})"
263
- echo -e "${W}🎯 Tình huống:${NC} Bạn nhảy vào một dự án có sẵn và thấy code quá rắc rối."
264
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm @/cm-brainstorm-idea\`"
265
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Đọc toàn bộ project này và chỉ cho tôi 3 điểm yếu lớn nhất cần cải thiện ngay.\""
266
- ;;
267
- 4)
268
- echo -e "${Y}${BOLD}4. Thiết kế giao diện (UX/UI)${NC} (${C}cm-ux-master / cm-ui-preview${NC})"
269
- echo -e "${W}🎯 Tình huống:${NC} Bạn muốn web của mình đẹp như Apple hay Linear."
270
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm @/cm-ux-master\`"
271
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Lấy style từ trang stripe.com và thiết kế cho tôi một trang thanh toán cực sang.\""
272
- ;;
273
- 5)
274
- echo -e "${Y}${BOLD}5. Lập trình TDD & Pair code${NC} (${C}cm-tdd${NC})"
275
- echo -e "${W}🎯 Tình huống:${NC} Bạn muốn code chắc chắn, không có lỗi khi chạy production."
276
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm @/cm-tdd\`"
277
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Viết test case trước, sau đó code chức năng đăng ký người dùng cho tôi.\""
278
- ;;
279
- 6)
280
- echo -e "${Y}${BOLD}6. Dọn dẹp & Tái cấu trúc${NC} (${C}cm-clean-code${NC})"
281
- echo -e "${W}🎯 Tình huống:${NC} Code chạy được nhưng nhìn như \"bãi rác\"."
282
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm @/cm-clean-code\`"
283
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Tối ưu lại file này: xóa code thừa, đặt lại tên biến cho chuẩn và dễ hiểu hơn.\""
284
- ;;
285
- 7)
286
- echo -e "${Y}${BOLD}7. Quét & Sửa lỗi bảo mật${NC} (${C}cm-security-gate${NC})"
287
- echo -e "${W}🎯 Tình huống:${NC} Sợ lộ API key hoặc web bị hack XSS."
288
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm @/cm-security-gate\`"
289
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Kiểm tra xem project có lỗ hổng bảo mật nào không trước khi tôi push lên GitHub.\""
290
- ;;
291
- 8)
292
- echo -e "${Y}${BOLD}8. Viết tài liệu Docs & API${NC} (${C}cm-dockit${NC})"
293
- echo -e "${W}🎯 Tình huống:${NC} Lười viết tài liệu hướng dẫn cho đồng nghiệp hoặc khách hàng."
294
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm @/cm-dockit\`"
295
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Tự động tạo file hướng dẫn sử dụng (README) cho toàn bộ project này.\""
296
- ;;
297
- 9)
298
- echo -e "${Y}${BOLD}9. Tạo WOW Landing Page${NC} (${C}cm-cro-methodology${NC})"
299
- echo -e "${W}🎯 Tình huống:${NC} Web có người vào nhưng không ai mua hàng/đăng ký."
300
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm @/cm-cro-methodology\`"
301
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Phân tích trang web này và chỉ cách tăng gấp đôi tỷ lệ khách hàng đăng ký.\""
302
- ;;
303
- 10)
304
- echo -e "${Y}${BOLD}10. Bảng theo dõi tiến độ${NC} (${C}cm dashboard${NC})"
305
- echo -e "${W}🎯 Tình huống:${NC} Muốn biết mình đã làm được bao nhiêu % công việc rồi."
306
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm dashboard\`"
307
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Hiện bảng dashboard để tôi xem tiến độ các task hiện tại.\""
308
- ;;
309
- 11)
310
- echo -e "${Y}${BOLD}11. Xem Demo (Claude Code)${NC} (${C}/cm:demo${NC})"
311
- echo -e "${W}🎯 Tình huống:${NC} Muốn xem CodyMaster tự \"múa\" code như thế nào."
312
- echo -e "${W}🚀 Câu lệnh:${NC} \`/cm:demo\`"
313
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Bắt đầu demo: tự tạo một ứng dụng TodoList từ A-Z trong 1 phút.\""
314
- ;;
315
- 12)
316
- echo -e "${Y}${BOLD}12. Trợ giúp & Cú pháp lệnh${NC} (${C}cm help${NC})"
317
- echo -e "${W}🎯 Tình huống:${NC} Quên lệnh hoặc muốn tìm thêm skill xịn khác."
318
- echo -e "${W}🚀 Câu lệnh:${NC} \`cm help\`"
319
- echo -e "${W}💡 Thử copy prompt này:${NC} \"Liệt kê các skill liên quan đến Growth Hacking và Marketing.\""
320
- ;;
321
- esac
322
- else
323
- case "$choice" in
324
- 1)
325
- echo -e "${Y}${BOLD}1. The Ultimate Guide${NC} (${C}cm-how-it-work${NC})"
326
- echo -e "${W}🎯 Situation:${NC} You just installed CodyMaster and don't know where to start."
327
- echo -e "${W}🚀 Command:${NC} \`cm @/cm-how-it-work\`"
328
- echo -e "${W}💡 Try this prompt:${NC} \"Explain the process from idea to deployment using this skill kit.\""
329
- ;;
330
- 2)
331
- echo -e "${Y}${BOLD}2. Vibe Coding (Zero Code)${NC} (${C}cm-start${NC})"
332
- echo -e "${W}🎯 Situation:${NC} You have an idea but are too lazy to write code manually."
333
- echo -e "${W}🚀 Command:${NC} \`cm @/cm-start\`"
334
- echo -e "${W}💡 Try this prompt:${NC} \"Build a coffee shop website with a cart using Tailwind CSS.\""
335
- ;;
336
- 3)
337
- echo -e "${Y}${BOLD}3. Code an Existing Project${NC} (${C}cm-brainstorm-idea${NC})"
338
- echo -e "${W}🎯 Situation:${NC} You're joining an existing project and the code is a mess."
339
- echo -e "${W}🚀 Command:${NC} \`cm @/cm-brainstorm-idea\`"
340
- echo -e "${W}💡 Try this prompt:${NC} \"Read this entire project and tell me the 3 biggest weaknesses.\""
341
- ;;
342
- 4)
343
- echo -e "${Y}${BOLD}4. Generate UX/UI Designs${NC} (${C}cm-ux-master / cm-ui-preview${NC})"
344
- echo -e "${W}🎯 Situation:${NC} You want your web app to look as premium as Apple or Linear."
345
- echo -e "${W}🚀 Command:${NC} \`cm @/cm-ux-master\`"
346
- echo -e "${W}💡 Try this prompt:${NC} \"Copy the style from stripe.com and design a high-end checkout page.\""
347
- ;;
348
- 5)
349
- echo -e "${Y}${BOLD}5. Code TDD & Pair Coding${NC} (${C}cm-tdd${NC})"
350
- echo -e "${W}🎯 Situation:${NC} You want reliable code that doesn't break in production."
351
- echo -e "${W}🚀 Command:${NC} \`cm @/cm-tdd\`"
352
- echo -e "${W}💡 Try this prompt:${NC} \"Write test cases first, then implement user registration for me.\""
353
- ;;
354
- 6)
355
- echo -e "${Y}${BOLD}6. Clean & Refactor Codebase${NC} (${C}cm-clean-code${NC})"
356
- echo -e "${W}🎯 Situation:${NC} The code works but it looks like a \"garbage dump\"."
357
- echo -e "${W}🚀 Command:${NC} \`cm @/cm-clean-code\`"
358
- echo -e "${W}💡 Try this prompt:${NC} \"Optimize this file: remove dead code and rename variables for clarity.\""
359
- ;;
360
- 7)
361
- echo -e "${Y}${BOLD}7. Scan for Vulnerabilities${NC} (${C}cm-security-gate${NC})"
362
- echo -e "${W}🎯 Situation:${NC} Worried about leaking API keys or XSS hacks."
363
- echo -e "${W}🚀 Command:${NC} \`cm @/cm-security-gate\`"
364
- echo -e "${W}💡 Try this prompt:${NC} \"Check if there are any security vulnerabilities before I push to GitHub.\""
365
- ;;
366
- 8)
367
- echo -e "${Y}${BOLD}8. Write Docs & Generate APIs${NC} (${C}cm-dockit${NC})"
368
- echo -e "${W}🎯 Situation:${NC} Lazy to write documentation for teammates or clients."
369
- echo -e "${W}🚀 Command:${NC} \`cm @/cm-dockit\`"
370
- echo -e "${W}💡 Try this prompt:${NC} \"Automatically generate a README guide for this entire project.\""
371
- ;;
372
- 9)
373
- echo -e "${Y}${BOLD}9. Release WOW Landing Page${NC} (${C}cm-cro-methodology${NC})"
374
- echo -e "${W}🎯 Situation:${NC} Visitors come to your site but don't buy or sign up."
375
- echo -e "${W}🚀 Command:${NC} \`cm @/cm-cro-methodology\`"
376
- echo -e "${W}💡 Try this prompt:${NC} \"Analyze this website and show me how to double my sign-up rate.\""
377
- ;;
378
- 10)
379
- echo -e "${Y}${BOLD}10. Open Progress Dashboard${NC} (${C}cm dashboard${NC})"
380
- echo -e "${W}🎯 Situation:${NC} Want to know how much work is actually completed."
381
- echo -e "${W}🚀 Command:${NC} \`cm dashboard\`"
382
- echo -e "${W}💡 Try this prompt:${NC} \"Show the dashboard so I can see the progress of current tasks.\""
383
- ;;
384
- 11)
385
- echo -e "${Y}${BOLD}11. See an Interactive Demo${NC} (${C}/cm:demo${NC})"
386
- echo -e "${W}🎯 Situation:${NC} Want to see CodyMaster perform its magic automatically."
387
- echo -e "${W}🚀 Command:${NC} \`/cm:demo\`"
388
- echo -e "${W}💡 Try this prompt:${NC} \"Start demo: build a TodoList app from scratch in 1 minute.\""
389
- ;;
390
- 12)
391
- echo -e "${Y}${BOLD}12. Help & Command List${NC} (${C}cm help${NC})"
392
- echo -e "${W}🎯 Situation:${NC} Forgot a command or looking for more cool skills."
393
- echo -e "${W}🚀 Command:${NC} \`cm help\`"
394
- echo -e "${W}💡 Try this prompt:${NC} \"List all skills related to Growth Hacking and Marketing.\""
395
- ;;
396
- esac
397
- fi
398
-
399
- echo ""
400
- echo -e "${DIM}──────────────────────────────────────────────────${NC}"
401
- echo -e "${W}$(msg press_enter) ${DIM}or 'q' to exit${NC}"
402
- read -r next_step
403
- if [ "$next_step" = "q" ]; then
404
- exit 0
405
- fi
406
- }
407
-
408
- # ── Onboarding block ─────────────────────────────────────────────
409
- print_onboarding() {
410
- while true; do
411
- clear
412
- print_header
413
-
414
- if [ "$LANG_CODE" = "vi" ]; then
415
- echo -e " ${W}${BOLD}🎉 Thành công! Bạn đã mở khóa ${TOTAL_SKILLS} kỹ năng AI toàn năng:${NC}"
416
- echo ""
417
- hamster_sentiment "finish"
418
- echo ""
419
- echo -e " ${C}🎯 Orchestration${NC} : Lên kế hoạch & Điều phối Agent"
420
- echo -e " ${C}🎨 Product${NC} : Thiết kế UX/UI & Tâm lý hành vi"
421
- echo -e " ${C}🔧 Engineering${NC} : Code Full-stack & Tái cấu trúc"
422
- echo -e " ${C}🔒 Security${NC} : Bảo mật tự động & Chống rò rỉ"
423
- echo -e " ${C}⚙️ Operations${NC} : Triển khai an toàn & Quản lý CI/CD"
424
- echo -e " ${C}📈 Growth${NC} : Tối ưu chuyển đổi (CRO) & Tracking"
425
- echo ""
426
- echo -e " ${W}${BOLD}💡 Nhập số (1-12) để xem hướng dẫn & ví dụ:${NC}"
427
- echo ""
428
- echo -e " 1. ${Y}Cách CodyMaster vận hành ${NC} → cm-how-it-work"
429
- echo -e " 2. ${Y}Vibe coding (Zero code) ${NC} → cm-start"
430
- echo -e " 3. ${Y}Tham gia dự án có sẵn ${NC} → cm-brainstorm-idea"
431
- echo -e " 4. ${Y}Code giao diện từ URL/Ảnh ${NC} → cm-ux-master"
432
- echo -e " 5. ${Y}Lập trình TDD & Pair code ${NC} → cm-tdd"
433
- echo -e " 6. ${Y}Dọn dẹp & Tái cấu trúc ${NC} → cm-clean-code"
434
- echo -e " 7. ${Y}Quét & Sửa lỗi bảo mật ${NC} → cm-security-gate"
435
- echo -e " 8. ${Y}Viết tài liệu Docs & API ${NC} → cm-dockit"
436
- echo -e " 9. ${Y}Tạo Landing Page \"WOW\" ${NC} → cm-cro-methodology"
437
- echo -e " 10. ${Y}Bảng theo dõi tiến độ ${NC} → cm dashboard"
438
- echo -e " 11. ${Y}Xem Demo tự động ${NC} → /cm:demo"
439
- echo -e " 12. ${Y}Trợ giúp & Cú pháp lệnh ${NC} → cm help"
440
- else
441
- echo -e " ${W}${BOLD}🎉 Success! You just unlocked ${TOTAL_SKILLS} omnipotent AI skills:${NC}"
442
- echo ""
443
- hamster_sentiment "finish"
444
- echo ""
445
- echo -e " ${C}🎯 Orchestration${NC} : Task Planning & Agent Synergy"
446
- echo -e " ${C}🎨 Product${NC} : UX/UI Mastery & User Psychology"
447
- echo -e " ${C}🔧 Engineering${NC} : Full-stack TDD & Refactoring"
448
- echo -e " ${C}🔒 Security${NC} : Automated Gates & Secret Shields"
449
- echo -e " ${C}⚙️ Operations${NC} : Safe Deployments & CI/CD Excellence"
450
- echo -e " ${C}📈 Growth${NC} : Conversion Tracking & Hacks"
451
- echo ""
452
- echo -e " ${W}${BOLD}💡 Type a number (1-12) for guide & examples:${NC}"
453
- echo ""
454
- echo -e " 1. ${Y}The ultimate guide ${NC} → cm-how-it-work"
455
- echo -e " 2. ${Y}Vibe coding (Zero code) ${NC} → cm-start"
456
- echo -e " 3. ${Y}Code an existing project ${NC} → cm-brainstorm-idea"
457
- echo -e " 4. ${Y}Generate UX/UI designs ${NC} → cm-ux-master"
458
- echo -e " 5. ${Y}Code TDD & Pair coding ${NC} → cm-tdd"
459
- echo -e " 6. ${Y}Clean & Refactor codebase ${NC} → cm-clean-code"
460
- echo -e " 7. ${Y}Scan for vulnerabilities ${NC} → cm-security-gate"
461
- echo -e " 8. ${Y}Write docs & generate APIs ${NC} → cm-dockit"
462
- echo -e " 9. ${Y}Release WOW landing page ${NC} → cm-cro-methodology"
463
- echo -e " 10. ${Y}Open progress dashboard ${NC} → cm dashboard"
464
- echo -e " 11. ${Y}See an interactive demo ${NC} → /cm:demo"
465
- echo -e " 12. ${Y}Help & Command list ${NC} → cm help"
466
- fi
467
-
468
- echo ""
469
- echo -e " ${W}${BOLD}$(msg docs)${NC} ${C}https://cody.todyle.com/docs${NC}"
470
- echo ""
471
- echo -e " ${DIM}Press 'q' to exit.${NC}"
472
- echo -n " > "
473
- read -r user_choice
474
-
475
- if [[ "$user_choice" =~ ^[0-9]+$ ]] && [ "$user_choice" -gt 0 ] && [ "$user_choice" -le 12 ]; then
476
- show_skill_guide "$user_choice"
477
- elif [ "$user_choice" = "q" ]; then
478
- break
479
- fi
480
- done
481
- }
482
-
483
- # ── Claude Code installer ────────────────────────────────────────
484
- install_claude() {
485
- local scope="${1:-user}"
486
- echo ""
487
- echo -e "${P}${BOLD}Claude Code — Installing Cody Master${NC}"
488
- echo ""
489
-
490
- if command -v claude &>/dev/null; then
491
- # Cleanup old marketplace if exists
492
- claude plugin marketplace remove cody-master 2>/dev/null || true
493
- echo -e " ${W}Adding marketplace...${NC}"
494
- claude plugin marketplace add tody-agent/codymaster 2>/dev/null || true
495
- echo -e " ${W}Installing plugin (scope: ${scope})...${NC}"
496
- claude plugin install cm@codymaster --scope "$scope"
497
- echo ""
498
- echo -e " ${G}✅ cm installed — scope: ${scope}${NC}"
499
- print_onboarding "$scope"
500
- else
501
- echo -e " ${R}Claude Code CLI not found. Install from: https://claude.ai/code${NC}"
502
- echo ""
503
- echo " Then run these commands in Claude Code:"
504
- echo ""
505
- echo -e " ${BOLD}1.${NC} ${C}claude plugin marketplace add tody-agent/codymaster${NC}"
506
- echo -e " ${BOLD}2.${NC} ${C}claude plugin install cm@codymaster --scope ${scope}${NC}"
507
- echo ""
508
- echo -e " First thing after install: ${C}/cm:demo${NC}"
509
- fi
510
- }
511
-
512
- # ── Gemini CLI / Antigravity installer ────────────────────────────
513
- install_gemini() {
514
- echo ""
515
- echo -e "${C}${BOLD}Gemini CLI / Antigravity — Installing Cody Master${NC}"
516
- echo ""
517
- target="$HOME/.gemini/antigravity/skills"
518
- install_skills_to "$target"
519
- echo ""
520
- echo -e " ${G}✅ Skills installed to ${target}${NC}"
521
- echo -e " ${C}ℹ Add to your GEMINI.md: @~/.gemini/antigravity/skills/cm-skill-index/SKILL.md${NC}"
522
- echo -e " ${C}ℹ Skills will auto-activate in Antigravity and Gemini CLI${NC}"
523
- }
524
-
525
- # ── Aider installer ──────────────────────────────────────────────
526
- install_aider() {
527
- echo ""
528
- echo -e "${O}${BOLD}Aider — Installing Cody Master${NC}"
529
- echo ""
530
- target="$HOME/.aider/skills"
531
- install_skills_to "$target"
532
- echo -e " ${W}Tip: add skills context to .aider.conf.yml:${NC}"
533
- echo -e " ${C}read: - ~/.aider/skills/cm-planning/SKILL.md${NC}"
534
- echo -e " ${G}✅ Skills installed to ${target}${NC}"
535
- }
536
-
537
- # ── Continue.dev installer ───────────────────────────────────────
538
- install_continue() {
539
- echo ""
540
- echo -e "${B}${BOLD}Continue.dev — Installing Cody Master${NC}"
541
- echo ""
542
- target="$HOME/.continue/rules"
543
- install_skills_to "$target" "md"
544
- echo -e " ${C}ℹ Rules are auto-loaded by Continue.dev from ~/.continue/rules/${NC}"
545
- }
546
-
547
- # ── Amazon Q CLI installer ───────────────────────────────────────
548
- install_amazon_q() {
549
- echo ""
550
- echo -e "${W}${BOLD}Amazon Q CLI — Installing Cody Master${NC}"
551
- echo ""
552
- target="$HOME/.aws/amazonq/skills"
553
- install_skills_to "$target"
554
- echo -e " ${G}✅ Skills installed to ${target}${NC}"
555
- echo -e " ${W}To use in Q chat, reference skills:${NC}"
556
- echo -e " ${C}q chat --context ~/.aws/amazonq/skills/cm-planning/SKILL.md${NC}"
557
- }
558
-
559
- # ── Amp installer ────────────────────────────────────────────────
560
- install_amp() {
561
- echo ""
562
- echo -e "${G}${BOLD}Amp — Installing Cody Master${NC}"
563
- echo ""
564
- target="$HOME/.amp/skills"
565
- install_skills_to "$target"
566
- echo -e " ${G}✅ Skills installed to ${target}${NC}"
567
- echo -e " ${C}ℹ Reference skills in Amp via your AGENTS.md or system prompt${NC}"
568
- }
569
-
570
- # ── CLI installer ────────────────────────────────────────────────
571
- install_cli() {
572
- if command -v npm &>/dev/null; then
573
- echo ""
574
- echo -e "${G}${BOLD}CLI Dashboard — Installing Cody Master CLI${NC}"
575
- echo ""
576
- echo -e " To get the full experience with the ${C}cm${NC} command and visual dashboard,"
577
- echo -e " it is recommended to install the global npm package."
578
- echo ""
579
- read -p " Install codymaster globally? (y/N): " install_npm
580
- if [[ "$install_npm" =~ ^[Yy]$ ]]; then
581
- echo -e " ${W}Running: npm install -g codymaster${NC}"
582
- npm install -g codymaster || echo -e " ${O}Note: You might need sudo for global install: sudo npm install -g codymaster${NC}"
583
- fi
584
- fi
585
- }
586
-
587
- # ── Ensure clone exists ──────────────────────────────────────────
588
- CLONE_DIR=""
589
- ensure_clone() {
590
- # If we're in the repo root with skills/ dir, use it directly
591
- if [ -d "skills" ]; then
592
- CLONE_DIR="."
593
- return
594
- fi
595
-
596
- # If ~/.cody-master already exists and has skills, use it
597
- if [ -d "$HOME/.cody-master/skills" ]; then
598
- CLONE_DIR="$HOME/.cody-master"
599
- return
600
- fi
601
-
602
- # Clone the repo
603
- echo -e " ${W}Cloning CodyMaster to ~/.cody-master...${NC}"
604
- git clone --depth 1 "${REPO_URL}.git" "$HOME/.cody-master" 2>/dev/null || {
605
- echo -e " ${R}Error: Failed to clone ${REPO_URL}${NC}"
606
- echo -e " ${R}Check your internet connection and try again.${NC}"
607
- exit 1
608
- }
609
- CLONE_DIR="$HOME/.cody-master"
610
- echo -e " ${G}✅ Cloned to ~/.cody-master${NC}"
611
- # Update total skills after pulling down new repo
612
- if [ -d "$CLONE_DIR/skills" ]; then
613
- TOTAL_SKILLS=$(ls -1d "$CLONE_DIR/skills"/cm-*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
614
- fi
615
- }
616
-
617
- # ── Copy skills to target directory ──────────────────────────────
618
- install_skills_to() {
619
- local target="$1"
620
- local format="${2:-raw}"
621
- ensure_clone
622
- echo ""
623
- echo -e "${G}${BOLD}Installing skills to: ${target}${NC}"
624
- echo ""
625
- mkdir -p "$target"
626
- local count=0
627
- local installed=()
628
- for skill_dir in "${CLONE_DIR}"/skills/cm-*/; do
629
- skill_name=$(basename "$skill_dir")
630
- if [ -f "${skill_dir}SKILL.md" ]; then
631
- if [[ "$format" == "mdc" ]]; then
632
- # Create Cursor glob native format
633
- echo "---" > "${target}/${skill_name}.mdc"
634
- echo "description: ${skill_name}" >> "${target}/${skill_name}.mdc"
635
- echo "globs: *" >> "${target}/${skill_name}.mdc"
636
- echo "---" >> "${target}/${skill_name}.mdc"
637
- cat "${skill_dir}SKILL.md" >> "${target}/${skill_name}.mdc"
638
- installed+=("${skill_name}.mdc")
639
- elif [[ "$format" == "md" ]]; then
640
- cp "${skill_dir}SKILL.md" "${target}/${skill_name}.md"
641
- installed+=("${skill_name}.md")
642
- else
643
- cp -r "$skill_dir" "${target}/${skill_name}"
644
- installed+=("$skill_name")
645
- fi
646
- count=$((count + 1))
647
- fi
648
- done
649
-
650
- local line=" ${DIM}"
651
- for s in "${installed[@]}"; do
652
- if [ ${#line} -gt 70 ]; then
653
- echo -e "${line}${NC}"
654
- line=" ${DIM}"
655
- fi
656
- line="${line}${s}, "
657
- done
658
- if [ "${line}" != " ${DIM}" ]; then
659
- echo -e "${line%, }${NC}"
660
- fi
661
-
662
- echo ""
663
- echo -e "${G}✅ ${count} skills installed to ${target}${NC}"
664
- }
665
-
666
- # ── Legacy alias ─────────────────────────────────────────────────
667
- install_antigravity() {
668
- install_skills_to "$1"
669
- }
670
-
671
- # ── Scope selector for Claude ────────────────────────────────────
672
- select_scope() {
673
- echo ""
674
- echo -e "${W}${BOLD}$(msg scope)${NC}"
675
- echo ""
676
- echo -e " ${BOLD}1)${NC} 🌐 $(msg scope_user)"
677
- echo -e " ${BOLD}2)${NC} 📁 $(msg scope_project)"
678
- echo ""
679
- read -p " Choose (1-2, default=1): " scope_choice
680
- case "${scope_choice:-1}" in
681
- 2) SCOPE="project" ;;
682
- *) SCOPE="user" ;;
683
- esac
684
- }
685
-
686
- # ════════════════════════════════════════════════════════════════
687
- # MAIN
688
- # ════════════════════════════════════════════════════════════════
689
-
690
- print_header
691
-
692
- # ── Non-interactive flags ────────────────────────────────────────
693
- for arg in "$@"; do
694
- case "$arg" in
695
- --global|--user) SCOPE="user" ;;
696
- --project|--local) SCOPE="project" ;;
697
- esac
698
- done
699
-
700
- if [[ "$1" == "--claude" ]]; then
701
- install_claude "$SCOPE"
702
- exit 0
703
- fi
704
-
705
- if [[ "$1" == "--gemini" ]] || [[ "$1" == "--antigravity" ]]; then
706
- install_gemini
707
- print_onboarding
708
- exit 0
709
- fi
710
-
711
- if [[ "$1" == "--cursor" ]]; then
712
- echo ""
713
- echo -e "${B}${BOLD}Cursor — Installing Cody Master${NC}"
714
- echo ""
715
- target=".cursor/rules"
716
- install_skills_to "$target" "mdc"
717
- echo -e " ${C}ℹ Cursor will automatically load .mdc rules from this project${NC}"
718
- print_onboarding
719
- exit 0
720
- fi
721
-
722
- if [[ "$1" == "--aider" ]]; then
723
- install_aider
724
- print_onboarding
725
- exit 0
726
- fi
727
-
728
- if [[ "$1" == "--continue" ]]; then
729
- install_continue
730
- print_onboarding
731
- exit 0
732
- fi
733
-
734
- if [[ "$1" == "--amazon-q" ]]; then
735
- install_amazon_q
736
- print_onboarding
737
- exit 0
738
- fi
739
-
740
- if [[ "$1" == "--amp" ]]; then
741
- install_amp
742
- print_onboarding
743
- exit 0
744
- fi
745
-
746
- if [[ "$1" == "--kiro" ]]; then
747
- echo ""
748
- echo -e "${O}${BOLD}Kiro — Installing Cody Master${NC}"
749
- echo ""
750
- install_skills_to ".kiro/steering" "raw"
751
- print_onboarding
752
- exit 0
753
- fi
754
-
755
- if [[ "$1" == "--windsurf" ]]; then
756
- echo ""
757
- echo -e "${O}${BOLD}Windsurf — Installing Cody Master${NC}"
758
- echo ""
759
- install_skills_to ".windsurf/rules" "raw"
760
- print_onboarding
761
- exit 0
762
- fi
763
-
764
- if [[ "$1" == "--cline" ]]; then
765
- echo ""
766
- echo -e "${O}${BOLD}Cline/RooCode — Installing Cody Master${NC}"
767
- echo ""
768
- install_skills_to ".cline/skills" "raw"
769
- print_onboarding
770
- exit 0
771
- fi
772
-
773
- if [[ "$1" == "--opencode" ]]; then
774
- echo ""
775
- echo -e "${G}${BOLD}OpenCode — Installing Cody Master${NC}"
776
- echo ""
777
- install_skills_to ".opencode/skills" "raw"
778
- print_onboarding
779
- exit 0
780
- fi
781
-
782
- if [[ "$1" == "--copilot" ]]; then
783
- echo ""
784
- echo -e "${G}${BOLD}GitHub Copilot — Installing Cody Master${NC}"
785
- echo ""
786
- echo -e " Please manually add skills context to copilot-instructions.md:"
787
- echo -e " ${C}cat ~/.cody-master/skills/cm-planning/SKILL.md >> .github/copilot-instructions.md${NC}"
788
- exit 0
789
- fi
790
-
791
- if [[ "$1" == "--all" ]]; then
792
- echo -e "${W}${BOLD}Installing to all detected platforms...${NC}"
793
- echo ""
794
- command -v claude &>/dev/null && install_claude "$SCOPE"
795
- install_gemini
796
- command -v aider &>/dev/null && install_aider
797
- [ -d "$HOME/.continue" ] && install_continue
798
- command -v q &>/dev/null && install_amazon_q
799
- command -v amp &>/dev/null && install_amp
800
- [ -d "$HOME/.cursor" ] || [ -d "/Applications/Cursor.app" ] && {
801
- install_skills_to ".cursor/rules" "mdc"
802
- }
803
- install_cli
804
- print_onboarding
805
- exit 0
806
- fi
807
-
808
- # ── Interactive mode ─────────────────────────────────────────────
809
- detect_agents
810
-
811
- echo -e "${W}${BOLD}$(msg select)${NC}"
812
- echo -e " ${W}(or press Enter to install for all detected: ${#DETECTED[@]} found)${NC}"
813
- echo ""
814
- read -p " > " platform_input
815
-
816
- # Default: all detected
817
- if [ -z "$platform_input" ] && [ ${#DETECTED[@]} -gt 0 ]; then
818
- platforms=("${DETECTED[@]}")
819
- else
820
- IFS=',' read -ra nums <<< "$platform_input"
821
- platforms=()
822
- for n in "${nums[@]}"; do
823
- n=$(echo "$n" | tr -d ' ')
824
- case "$n" in
825
- 1) platforms+=("claude") ;;
826
- 2) platforms+=("gemini") ;;
827
- 3) platforms+=("cursor") ;;
828
- 4) platforms+=("codex") ;;
829
- 5) platforms+=("opencode") ;;
830
- 6) platforms+=("aider") ;;
831
- 7) platforms+=("continue") ;;
832
- 8) platforms+=("amazon-q") ;;
833
- 9) platforms+=("amp") ;;
834
- 10) platforms+=("manual") ;;
835
- esac
836
- done
837
- fi
838
-
839
- # Install for each selected platform
840
- for platform in "${platforms[@]}"; do
841
- case "$platform" in
842
- claude)
843
- select_scope
844
- install_claude "$SCOPE"
845
- ;;
846
- gemini)
847
- install_gemini
848
- ;;
849
- cursor)
850
- echo ""
851
- echo -e "${B}${BOLD}Cursor — Plugin Install${NC}"
852
- echo -e " In Cursor Agent chat, run: ${C}/add-plugin cm${NC}"
853
- ;;
854
- codex)
855
- echo ""
856
- echo -e "${O}${BOLD}Codex — Install${NC}"
857
- echo -e " Tell Codex: ${C}Fetch and follow ${RAW_URL}/.codex/INSTALL.md${NC}"
858
- ;;
859
- opencode)
860
- echo ""
861
- echo -e "${G}${BOLD}OpenCode — Install${NC}"
862
- echo -e " Tell OpenCode: ${C}Fetch and follow ${RAW_URL}/.opencode/INSTALL.md${NC}"
863
- ;;
864
- aider)
865
- install_aider
866
- ;;
867
- continue)
868
- install_continue
869
- ;;
870
- amazon-q)
871
- install_amazon_q
872
- ;;
873
- amp)
874
- install_amp
875
- ;;
876
- manual)
877
- echo ""
878
- echo -e "${W}${BOLD}Manual Copy — Any Platform${NC}"
879
- echo ""
880
- echo -e " ${C}# Gemini CLI / Antigravity${NC}"
881
- echo -e " git clone --depth 1 ${REPO_URL}.git ~/.cody-master"
882
- echo -e " cp -r ~/.cody-master/skills/* ~/.gemini/antigravity/skills/"
883
- echo ""
884
- echo -e " ${C}# Aider${NC}"
885
- echo -e " bash install.sh --aider"
886
- echo ""
887
- echo -e " ${C}# Continue.dev${NC}"
888
- echo -e " bash install.sh --continue"
889
- echo ""
890
- echo -e " ${C}# Any platform (copy)${NC}"
891
- echo -e " cp -r ~/.cody-master/skills/* <your-platform-skills-dir>/"
892
- ;;
893
- esac
894
- done
895
-
896
- install_cli
897
- print_onboarding
898
-
899
- echo ""
900
- echo -e "${C}$(msg docs) https://cody.todyle.com/docs${NC}"
901
- echo ""