codymaster 4.5.4 → 4.8.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 (133) hide show
  1. package/CHANGELOG.md +46 -1
  2. package/README.md +86 -31
  3. package/dist/backends/viking-backend.js +235 -0
  4. package/dist/backends/viking-http-client.js +176 -0
  5. package/dist/browse-server.js +251 -0
  6. package/dist/cli/command-registry.js +26 -0
  7. package/dist/cli/commands/agent.js +120 -0
  8. package/dist/cli/commands/dashboard.js +93 -0
  9. package/dist/cli/commands/design-studio.js +111 -0
  10. package/dist/cli/commands/distro.js +25 -0
  11. package/dist/cli/commands/engineering.js +488 -0
  12. package/dist/cli/commands/project.js +324 -0
  13. package/dist/cli/commands/skill-chain.js +269 -0
  14. package/dist/cli/commands/system.js +89 -0
  15. package/dist/cli/commands/task.js +254 -0
  16. package/dist/cli/update-check.js +83 -0
  17. package/dist/cm-config.js +110 -0
  18. package/dist/cm-suggest.js +77 -0
  19. package/dist/continuity.js +8 -0
  20. package/dist/distro-validate.js +54 -0
  21. package/dist/guardian-core.js +74 -0
  22. package/dist/index.js +36 -2759
  23. package/dist/mcp-context-server.js +60 -1
  24. package/dist/mcp-skills-tools.js +81 -0
  25. package/dist/retro-summary.js +70 -0
  26. package/dist/second-opinion-providers.js +79 -0
  27. package/dist/sprint-pipeline.js +228 -0
  28. package/dist/storage-backend.js +63 -0
  29. package/dist/utils/cli-utils.js +76 -0
  30. package/dist/utils/skill-utils.js +32 -0
  31. package/install.sh +286 -58
  32. package/package.json +16 -5
  33. package/scripts/build-skills.mjs +51 -0
  34. package/scripts/gate-0-repo-hygiene.js +75 -0
  35. package/scripts/postinstall.js +56 -1
  36. package/scripts/security-scan.js +1 -1
  37. package/scripts/validate-skills.mjs +42 -0
  38. package/scripts/viking-demo.ts +105 -0
  39. package/skills/CLAUDE.md +2 -2
  40. package/skills/_shared/helpers.md +10 -0
  41. package/skills/cm-ads-tracker/SKILL.md +3 -6
  42. package/skills/cm-browse/SKILL.md +28 -0
  43. package/skills/cm-conductor-worktrees/SKILL.md +24 -0
  44. package/skills/cm-content-factory/SKILL.md +1 -1
  45. package/skills/cm-content-factory/landing/docs/content/changelog.md +36 -0
  46. package/skills/cm-content-factory/landing/docs/content/deployment.md +46 -0
  47. package/skills/cm-content-factory/landing/docs/content/execution-flow.md +67 -0
  48. package/skills/cm-content-factory/landing/docs/content/openspace.md +27 -0
  49. package/skills/cm-content-factory/landing/docs/content/openviking.md +33 -0
  50. package/skills/cm-content-factory/landing/docs/content/use-cases.md +26 -0
  51. package/skills/cm-content-factory/landing/docs/content/v5-intro.md +28 -0
  52. package/skills/cm-content-factory/landing/docs/index.html +240 -0
  53. package/skills/cm-content-factory/landing/index.html +99 -99
  54. package/skills/cm-content-factory/landing/script.js +42 -0
  55. package/skills/cm-content-factory/landing/translations.js +400 -400
  56. package/skills/cm-continuity/SKILL.md +33 -6
  57. package/skills/cm-design-studio/SKILL.md +30 -0
  58. package/skills/cm-ecosystem-roadmap/SKILL.md +11 -0
  59. package/skills/cm-engineering-meta/SKILL.md +69 -0
  60. package/skills/cm-growth-hacking/SKILL.md +1 -12
  61. package/skills/cm-guardian-runtime/SKILL.md +22 -0
  62. package/skills/cm-mcp-engineering/SKILL.md +18 -0
  63. package/skills/cm-notebooklm/SKILL.md +1 -17
  64. package/skills/cm-post-deploy-canary/SKILL.md +18 -0
  65. package/skills/cm-qa-visual-cli/SKILL.md +18 -0
  66. package/skills/cm-retro-cli/SKILL.md +19 -0
  67. package/skills/cm-second-opinion-cli/SKILL.md +19 -0
  68. package/skills/cm-secret-shield/SKILL.md +2 -2
  69. package/skills/cm-sprint-bus/SKILL.md +29 -0
  70. package/skills/cm-start/SKILL.md +11 -2
  71. package/skills/cm-tdd/SKILL.md +61 -74
  72. package/skills/profiles/README.md +21 -0
  73. package/skills/profiles/core.txt +23 -0
  74. package/skills/profiles/design.txt +6 -0
  75. package/skills/profiles/full.txt +58 -0
  76. package/skills/profiles/growth.txt +10 -0
  77. package/skills/profiles/knowledge.txt +7 -0
  78. package/scripts/test-gemini.js +0 -13
  79. package/skills/cm-frappe-agent/SKILL.md +0 -134
  80. package/skills/cm-frappe-agent/agents/doctype-architect.md +0 -596
  81. package/skills/cm-frappe-agent/agents/erpnext-customizer.md +0 -643
  82. package/skills/cm-frappe-agent/agents/frappe-backend.md +0 -814
  83. package/skills/cm-frappe-agent/agents/frappe-custom-frontend.md +0 -557
  84. package/skills/cm-frappe-agent/agents/frappe-debugger.md +0 -625
  85. package/skills/cm-frappe-agent/agents/frappe-fixer.md +0 -275
  86. package/skills/cm-frappe-agent/agents/frappe-frontend.md +0 -660
  87. package/skills/cm-frappe-agent/agents/frappe-installer.md +0 -158
  88. package/skills/cm-frappe-agent/agents/frappe-performance.md +0 -307
  89. package/skills/cm-frappe-agent/agents/frappe-planner.md +0 -419
  90. package/skills/cm-frappe-agent/agents/frappe-remote-ops.md +0 -153
  91. package/skills/cm-frappe-agent/agents/github-workflow.md +0 -286
  92. package/skills/cm-frappe-agent/commands/frappe-app.md +0 -351
  93. package/skills/cm-frappe-agent/commands/frappe-backend.md +0 -162
  94. package/skills/cm-frappe-agent/commands/frappe-bench.md +0 -254
  95. package/skills/cm-frappe-agent/commands/frappe-debug.md +0 -263
  96. package/skills/cm-frappe-agent/commands/frappe-doctype-create.md +0 -272
  97. package/skills/cm-frappe-agent/commands/frappe-doctype-field.md +0 -310
  98. package/skills/cm-frappe-agent/commands/frappe-erpnext.md +0 -210
  99. package/skills/cm-frappe-agent/commands/frappe-fix.md +0 -59
  100. package/skills/cm-frappe-agent/commands/frappe-frontend.md +0 -210
  101. package/skills/cm-frappe-agent/commands/frappe-fullstack.md +0 -243
  102. package/skills/cm-frappe-agent/commands/frappe-github.md +0 -57
  103. package/skills/cm-frappe-agent/commands/frappe-install.md +0 -52
  104. package/skills/cm-frappe-agent/commands/frappe-plan.md +0 -442
  105. package/skills/cm-frappe-agent/commands/frappe-remote.md +0 -58
  106. package/skills/cm-frappe-agent/commands/frappe-test.md +0 -356
  107. package/skills/cm-frappe-agent/docs/README.md +0 -51
  108. package/skills/cm-frappe-agent/docs/agents-catalog.md +0 -113
  109. package/skills/cm-frappe-agent/docs/architecture.md +0 -149
  110. package/skills/cm-frappe-agent/docs/commands-catalog.md +0 -82
  111. package/skills/cm-frappe-agent/docs/resources-catalog.md +0 -66
  112. package/skills/cm-frappe-agent/docs/sitemap-urls.txt +0 -52
  113. package/skills/cm-frappe-agent/docs/sitemap.md +0 -81
  114. package/skills/cm-frappe-agent/docs/sop/user-guide.md +0 -178
  115. package/skills/cm-frappe-agent/docs/sop/vibe-coding-guide.md +0 -122
  116. package/skills/cm-frappe-agent/resources/7-layer-architecture.md +0 -985
  117. package/skills/cm-frappe-agent/resources/bench_commands.md +0 -73
  118. package/skills/cm-frappe-agent/resources/code-patterns-guide.md +0 -948
  119. package/skills/cm-frappe-agent/resources/common_pitfalls.md +0 -266
  120. package/skills/cm-frappe-agent/resources/doctype-registry.md +0 -158
  121. package/skills/cm-frappe-agent/resources/installation-guide.md +0 -289
  122. package/skills/cm-frappe-agent/resources/rest-api-patterns.md +0 -182
  123. package/skills/cm-frappe-agent/resources/scaffold_checklist.md +0 -82
  124. package/skills/cm-frappe-agent/resources/upgrade_patterns.md +0 -113
  125. package/skills/cm-frappe-agent/resources/web-form-patterns.md +0 -252
  126. package/skills/cm-frappe-agent/skills/bench-commands/SKILL.md +0 -621
  127. package/skills/cm-frappe-agent/skills/client-scripts/SKILL.md +0 -642
  128. package/skills/cm-frappe-agent/skills/doctype-patterns/SKILL.md +0 -576
  129. package/skills/cm-frappe-agent/skills/frappe-api/SKILL.md +0 -740
  130. package/skills/cm-frappe-agent/skills/remote-operations/SKILL.md +0 -47
  131. package/skills/cm-frappe-agent/skills/server-scripts/SKILL.md +0 -608
  132. package/skills/cm-frappe-agent/skills/web-forms/SKILL.md +0 -46
  133. package/skills/frappe-app-builder.zip +0 -0
package/install.sh CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # ════════════════════════════════════════════════════════════════
3
- # CodyMaster Skills Kit v4.3.0 — Universal Installer
3
+ # CodyMaster Skills Kit — Universal Installer (see VERSION below)
4
4
  # Inspired by: npx skills add (vercel-labs/skills)
5
5
  #
6
6
  # Usage:
@@ -8,31 +8,48 @@
8
8
  # bash install.sh --claude Claude Code (non-interactive)
9
9
  # bash install.sh --claude --global Claude Code, user scope
10
10
  # bash install.sh --claude --project Claude Code, project scope
11
- # bash install.sh --gemini Gemini CLI
11
+ # bash install.sh --gemini Gemini CLI / Antigravity (all skills)
12
+ # bash install.sh --gemini --profile core Antigravity: core profile only (token budget)
13
+ # bash install.sh --windsurf --profile core Same for project .windsurf/rules
12
14
  # bash install.sh --aider Aider
13
15
  # bash install.sh --continue Continue.dev
14
16
  # bash install.sh --amazon-q Amazon Q CLI (q)
15
17
  # bash install.sh --amp Amp
16
- # bash install.sh --all All detected platforms
18
+ # bash install.sh --all All detected platforms (no interactive menu)
19
+ # bash install.sh --yes Skip onboarding menu (with --gemini, etc.)
20
+ # bash install.sh --cursor --cursor-project Force ./.cursor/rules (run from repo root)
17
21
  # ════════════════════════════════════════════════════════════════
18
22
 
19
23
  set -e
20
24
 
25
+ # Directory containing this script (for skills/profiles when ~/.cody-master is stale)
26
+ CM_SCRIPT_DIR=""
27
+ _cm_src="${BASH_SOURCE[0]:-$0}"
28
+ if [[ "$_cm_src" != /dev/fd/* ]] && [[ "$_cm_src" != /proc/self/fd/* ]]; then
29
+ CM_SCRIPT_DIR="$(cd "$(dirname "$_cm_src")" && pwd)"
30
+ fi
31
+
21
32
  # ── Colors ──────────────────────────────────────────────────────
22
33
  G='\033[0;32m'; B='\033[0;34m'; P='\033[0;35m'; O='\033[0;33m'
23
34
  C='\033[0;36m'; R='\033[0;31m'; W='\033[1;37m'; NC='\033[0m'; BOLD='\033[1m'; DIM='\033[2m'
24
35
 
25
36
  REPO_URL="https://github.com/tody-agent/codymaster"
26
37
  RAW_URL="https://raw.githubusercontent.com/tody-agent/codymaster/main"
27
- VERSION="4.4.0"
38
+ VERSION="4.7.0"
28
39
  SCOPE="user" # default scope for Claude Code
40
+ SKILL_PROFILE="full" # core|growth|design|knowledge|full — see skills/profiles/
41
+ INSTALL_CMD="" # set by parse_install_args
42
+ # Skip hamster onboarding menu (non-interactive / one-liner installs)
43
+ SKIP_INSTALL_ONBOARDING=0
44
+ # Force Cursor rules into ./.cursor/rules (run from repo root)
45
+ CURSOR_RULES_PROJECT=0
29
46
 
30
47
  if [ -d "skills" ]; then
31
- TOTAL_SKILLS=$(ls -1d skills/*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
48
+ TOTAL_SKILLS=$(ls -1d skills/cm-*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
32
49
  elif [ -d "$HOME/.cody-master/skills" ]; then
33
- TOTAL_SKILLS=$(ls -1d "$HOME/.cody-master/skills"/*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
50
+ TOTAL_SKILLS=$(ls -1d "$HOME/.cody-master/skills"/cm-*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
34
51
  else
35
- TOTAL_SKILLS="60+"
52
+ TOTAL_SKILLS="45"
36
53
  fi
37
54
 
38
55
 
@@ -55,7 +72,7 @@ msg() {
55
72
  local key="$1"
56
73
  case "$LANG_CODE:$key" in
57
74
  vi:welcome) echo "Chào mừng bạn đến với CodyMaster v${VERSION}" ;;
58
- vi:tagline) echo "60+ kỹ năng AI cho Claude Code và các AI agents khác" ;;
75
+ vi:tagline) echo "${TOTAL_SKILLS} kỹ năng AI cho Claude Code và các AI agents khác" ;;
59
76
  vi:detecting) echo "🔍 Đang phát hiện các AI agent đã cài..." ;;
60
77
  vi:found) echo "✅ Đã tìm thấy" ;;
61
78
  vi:not_found) echo "❌ Không tìm thấy" ;;
@@ -66,9 +83,10 @@ msg() {
66
83
  vi:done) echo "✅ Hoàn tất!" ;;
67
84
  vi:onboard) echo "🎯 Bắt đầu ngay với AI Agent của bạn:" ;;
68
85
  vi:docs) echo "📚 Tài liệu:" ;;
86
+ vi:press_enter) echo "Nhấn ENTER để tiếp tục" ;;
69
87
 
70
88
  zh:welcome) echo "欢迎使用 CodyMaster v${VERSION}" ;;
71
- zh:tagline) echo "Claude Code 的 60+ AI 技能" ;;
89
+ zh:tagline) echo "Claude Code 的 ${TOTAL_SKILLS} AI 技能" ;;
72
90
  zh:detecting) echo "🔍 检测已安装的 AI Agent..." ;;
73
91
  zh:found) echo "✅ 已找到" ;;
74
92
  zh:not_found) echo "❌ 未找到" ;;
@@ -79,9 +97,10 @@ msg() {
79
97
  zh:done) echo "✅ 完成!" ;;
80
98
  zh:onboard) echo "🎯 立即开始与您的 AI Agent 合作:" ;;
81
99
  zh:docs) echo "📚 文档:" ;;
100
+ zh:press_enter) echo "按 Enter 继续" ;;
82
101
 
83
102
  ko:welcome) echo "CodyMaster v${VERSION}에 오신 것을 환영합니다" ;;
84
- ko:tagline) echo "Claude Code용 60+ AI 스킬" ;;
103
+ ko:tagline) echo "Claude Code용 ${TOTAL_SKILLS} AI 스킬" ;;
85
104
  ko:detecting) echo "🔍 설치된 AI Agent 감지 중..." ;;
86
105
  ko:found) echo "✅ 발견됨" ;;
87
106
  ko:not_found) echo "❌ 없음" ;;
@@ -92,11 +111,12 @@ msg() {
92
111
  ko:done) echo "✅ 완료!" ;;
93
112
  ko:onboard) echo "🎯 AI Agent와 즉시 시작하세요:" ;;
94
113
  ko:docs) echo "📚 문서:" ;;
114
+ ko:press_enter) echo "Enter를 눌러 계속" ;;
95
115
 
96
116
  *)
97
117
  case "$key" in
98
118
  welcome) echo "Welcome to CodyMaster v${VERSION}" ;;
99
- tagline) echo "60+ AI skills for Claude Code and other AI agents" ;;
119
+ tagline) echo "${TOTAL_SKILLS} AI skills for Claude Code and other AI agents" ;;
100
120
  detecting) echo "🔍 Detecting installed AI agents..." ;;
101
121
  found) echo "✅ Found" ;;
102
122
  not_found) echo "❌ Not found" ;;
@@ -107,6 +127,7 @@ msg() {
107
127
  done) echo "✅ Done!" ;;
108
128
  onboard) echo "🎯 Get started immediately with your AI Agent:" ;;
109
129
  docs) echo "📚 Documentation:" ;;
130
+ press_enter) echo "Press ENTER to continue" ;;
110
131
  esac
111
132
  ;;
112
133
  esac
@@ -114,7 +135,7 @@ msg() {
114
135
 
115
136
  # ── Header ───────────────────────────────────────────────────────
116
137
  print_header() {
117
- clear
138
+ clear 2>/dev/null || true
118
139
  hamster_sentiment "start"
119
140
  echo -e " ${O}( . \ --- / . )${NC}"
120
141
  echo -e " ${O}/${NC} ${O}${BOLD}^ ^${NC} ${O}\\\\${NC}"
@@ -491,12 +512,17 @@ install_claude() {
491
512
  # Cleanup old marketplace if exists
492
513
  claude plugin marketplace remove cody-master 2>/dev/null || true
493
514
  echo -e " ${W}Adding marketplace...${NC}"
494
- claude plugin marketplace add tody-agent/codymaster 2>/dev/null || true
515
+ if ! claude plugin marketplace add tody-agent/codymaster; then
516
+ echo -e " ${R}⚠️ Marketplace add failed. Run:${NC} ${C}claude plugin marketplace add tody-agent/codymaster${NC}"
517
+ fi
495
518
  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"
519
+ if ! claude plugin install cm@codymaster --scope "$scope"; then
520
+ echo -e " ${R}⚠️ Plugin install failed. Run:${NC} ${C}claude plugin install cm@codymaster --scope ${scope}${NC}"
521
+ else
522
+ echo ""
523
+ echo -e " ${G}✅ Claude plugin installed — scope: ${scope}${NC}"
524
+ fi
525
+ maybe_print_onboarding
500
526
  else
501
527
  echo -e " ${R}Claude Code CLI not found. Install from: https://claude.ai/code${NC}"
502
528
  echo ""
@@ -516,10 +542,11 @@ install_gemini() {
516
542
  echo ""
517
543
  target="$HOME/.gemini/antigravity/skills"
518
544
  install_skills_to "$target"
545
+ ensure_gemini_md_hint
519
546
  echo ""
520
547
  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}"
548
+ echo -e " ${C}ℹ GEMINI.md should reference: @~/.gemini/antigravity/skills/cm-skill-index/SKILL.md${NC}"
549
+ echo -e " ${C}ℹ Restart Gemini / Antigravity if it was open during install${NC}"
523
550
  }
524
551
 
525
552
  # ── Aider installer ──────────────────────────────────────────────
@@ -567,23 +594,49 @@ install_amp() {
567
594
  echo -e " ${C}ℹ Reference skills in Amp via your AGENTS.md or system prompt${NC}"
568
595
  }
569
596
 
570
- # ── CLI installer ────────────────────────────────────────────────
571
597
  install_cli() {
598
+ local auto="$1"
572
599
  if command -v npm &>/dev/null; then
573
600
  echo ""
574
- echo -e "${G}${BOLD}CLI Dashboard — Installing Cody Master CLI${NC}"
601
+ echo -e "${G}${BOLD}CLI Dashboard — Cody Master CLI${NC}"
575
602
  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."
603
+ echo -e " ${C}Official paths:${NC}"
604
+ echo -e " ${W}Per-project:${NC} ${C}npm install codymaster${NC} → ${C}npx cm${NC}"
605
+ echo -e " ${W}Global:${NC} ${C}npm install -g codymaster${NC} → ${C}cm${NC}"
578
606
  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}"
607
+ if [[ "$auto" == "--auto" ]]; then
608
+ echo -e " ${W}Auto: trying global install (optional — use per-project + npx if you prefer).${NC}"
609
+ npm install -g codymaster || echo -e " ${O}Global install failed (try: npm install codymaster in your repo, then npx cm).${NC}"
610
+ if [ -f "package.json" ]; then
611
+ if grep -q '"name": "codymaster"' package.json; then
612
+ npm link &>/dev/null || true
613
+ fi
614
+ fi
615
+ else
616
+ read -p " Install codymaster globally now? (y/N): " install_npm
617
+ if [[ "$install_npm" =~ ^[Yy]$ ]]; then
618
+ echo -e " ${W}Running: npm install -g codymaster${NC}"
619
+ npm install -g codymaster || echo -e " ${O}Note: sudo may be needed, or use: npm install codymaster && npx cm${NC}"
620
+ fi
583
621
  fi
584
622
  fi
585
623
  }
586
624
 
625
+ install_openviking() {
626
+ echo ""
627
+ echo -e "${G}${BOLD}OpenViking — Installing Core Feature${NC}"
628
+ echo ""
629
+ if command -v pip3 &>/dev/null; then
630
+ echo -e " ${W}Running: pip3 install openviking${NC}"
631
+ pip3 install openviking || echo -e " ${O}⚠️ Could not install OpenViking automatically.${NC}"
632
+ elif command -v pip &>/dev/null; then
633
+ echo -e " ${W}Running: pip install openviking${NC}"
634
+ pip install openviking || echo -e " ${O}⚠️ Could not install OpenViking automatically.${NC}"
635
+ else
636
+ echo -e " ${R}Python pip not found. Please install pip to get OpenViking.${NC}"
637
+ fi
638
+ }
639
+
587
640
  # ── Ensure clone exists ──────────────────────────────────────────
588
641
  CLONE_DIR=""
589
642
  ensure_clone() {
@@ -602,12 +655,17 @@ ensure_clone() {
602
655
  # Clone the repo
603
656
  echo -e " ${W}Cloning CodyMaster to ~/.cody-master...${NC}"
604
657
  git clone --depth 1 "${REPO_URL}.git" "$HOME/.cody-master" 2>/dev/null || {
658
+
605
659
  echo -e " ${R}Error: Failed to clone ${REPO_URL}${NC}"
606
660
  echo -e " ${R}Check your internet connection and try again.${NC}"
607
661
  exit 1
608
662
  }
609
663
  CLONE_DIR="$HOME/.cody-master"
610
664
  echo -e " ${G}✅ Cloned to ~/.cody-master${NC}"
665
+ # Update total skills after pulling down new repo
666
+ if [ -d "$CLONE_DIR/skills" ]; then
667
+ TOTAL_SKILLS=$(ls -1d "$CLONE_DIR/skills"/cm-*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
668
+ fi
611
669
  }
612
670
 
613
671
  # ── Copy skills to target directory ──────────────────────────────
@@ -617,12 +675,50 @@ install_skills_to() {
617
675
  ensure_clone
618
676
  echo ""
619
677
  echo -e "${G}${BOLD}Installing skills to: ${target}${NC}"
678
+ if [[ -n "${SKILL_PROFILE:-}" && "$SKILL_PROFILE" != "full" ]]; then
679
+ echo -e " ${C}Profile: ${SKILL_PROFILE}${NC}"
680
+ fi
620
681
  echo ""
621
682
  mkdir -p "$target"
622
683
  local count=0
623
684
  local installed=()
624
- for skill_dir in "${CLONE_DIR}"/skills/*/; do
685
+ local -a allow=()
686
+ local use_profile=0
687
+ if [[ -n "${SKILL_PROFILE:-}" && "$SKILL_PROFILE" != "full" ]]; then
688
+ local pf="${CLONE_DIR}/skills/profiles/${SKILL_PROFILE}.txt"
689
+ if [[ ! -f "$pf" && -n "${CM_SCRIPT_DIR}" && -f "${CM_SCRIPT_DIR}/skills/profiles/${SKILL_PROFILE}.txt" ]]; then
690
+ pf="${CM_SCRIPT_DIR}/skills/profiles/${SKILL_PROFILE}.txt"
691
+ fi
692
+ if [[ ! -f "$pf" ]]; then
693
+ echo -e " ${R}Unknown profile '${SKILL_PROFILE}'. Valid: core, growth, design, knowledge, full${NC}"
694
+ echo -e " ${R}Expected: \${CLONE_DIR}/skills/profiles/${SKILL_PROFILE}.txt (git pull ~/.cody-master or run install.sh from repo)${NC}"
695
+ exit 1
696
+ fi
697
+ use_profile=1
698
+ while IFS= read -r line || [[ -n "$line" ]]; do
699
+ [[ "$line" =~ ^[[:space:]]*# ]] && continue
700
+ line="${line%%#*}"
701
+ line="${line#"${line%%[![:space:]]*}"}"
702
+ line="${line%"${line##*[![:space:]]}"}"
703
+ [[ -z "$line" ]] && continue
704
+ allow+=("$line")
705
+ done < "$pf"
706
+ fi
707
+ for skill_dir in "${CLONE_DIR}"/skills/cm-*/; do
625
708
  skill_name=$(basename "$skill_dir")
709
+ if [[ "$use_profile" -eq 1 ]]; then
710
+ local found=0
711
+ local a
712
+ for a in "${allow[@]}"; do
713
+ if [[ "$a" == "$skill_name" ]]; then
714
+ found=1
715
+ break
716
+ fi
717
+ done
718
+ if [[ "$found" -eq 0 ]]; then
719
+ continue
720
+ fi
721
+ fi
626
722
  if [ -f "${skill_dir}SKILL.md" ]; then
627
723
  if [[ "$format" == "mdc" ]]; then
628
724
  # Create Cursor glob native format
@@ -679,6 +775,109 @@ select_scope() {
679
775
  esac
680
776
  }
681
777
 
778
+ # ── Cursor rules path: avoid writing to a random cwd (e.g. /tmp) ──
779
+ resolve_cursor_rules_dir() {
780
+ local mode="${1:-cursor}"
781
+ if [[ "$mode" == "all" ]]; then
782
+ printf '%s' "${HOME}/.cursor/rules"
783
+ return
784
+ fi
785
+ if [[ "$CURSOR_RULES_PROJECT" == "1" ]]; then
786
+ printf '%s' ".cursor/rules"
787
+ return
788
+ fi
789
+ if [[ -d .git ]] || [[ -f package.json ]]; then
790
+ printf '%s' ".cursor/rules"
791
+ else
792
+ printf '%s' "${HOME}/.cursor/rules"
793
+ fi
794
+ }
795
+
796
+ # ── Gemini: ensure GEMINI.md points at skill index ───────────────
797
+ ensure_gemini_md_hint() {
798
+ mkdir -p "${HOME}/.gemini" 2>/dev/null || true
799
+ local f="${HOME}/.gemini/GEMINI.md"
800
+ local hint="@~/.gemini/antigravity/skills/cm-skill-index/SKILL.md"
801
+ if [[ ! -f "$f" ]]; then
802
+ {
803
+ echo "# Gemini CLI / Antigravity"
804
+ echo "# CodyMaster: load the progressive skill index first (then pull full skills as needed)"
805
+ echo "$hint"
806
+ } > "$f"
807
+ echo -e " ${G}✅ Created ${f} with skill index line${NC}"
808
+ return
809
+ fi
810
+ if ! grep -q "cm-skill-index" "$f" 2>/dev/null; then
811
+ {
812
+ echo ""
813
+ echo "# CodyMaster — skill index"
814
+ echo "$hint"
815
+ } >> "$f"
816
+ echo -e " ${G}✅ Appended CodyMaster skill index to ${f}${NC}"
817
+ fi
818
+ }
819
+
820
+ maybe_print_onboarding() {
821
+ [[ "$SKIP_INSTALL_ONBOARDING" == "1" ]] && return 0
822
+ print_onboarding
823
+ }
824
+
825
+ print_all_done_summary() {
826
+ echo ""
827
+ echo -e "${W}${BOLD}═══ Next steps — verify each tool you use ═══${NC}"
828
+ echo ""
829
+ echo -e " ${BOLD}Claude Code:${NC} Open Claude Code → ${C}/cm:demo${NC} or ${C}/help${NC}. If the plugin is missing:"
830
+ echo -e " ${C}claude plugin marketplace add tody-agent/codymaster${NC}"
831
+ echo -e " ${C}claude plugin install cm@codymaster --scope user${NC}"
832
+ echo ""
833
+ echo -e " ${BOLD}Gemini / Antigravity:${NC} Skills → ${C}~/.gemini/antigravity/skills/${NC}"
834
+ echo -e " ${C}~/.gemini/GEMINI.md${NC} should include ${C}@~/.gemini/antigravity/skills/cm-skill-index/SKILL.md${NC}"
835
+ echo ""
836
+ echo -e " ${BOLD}Cursor IDE:${NC} Rules → ${C}${HOME}/.cursor/rules${NC} ${DIM}(from one-liner --all)${NC}"
837
+ echo -e " Agent chat: ${C}/add-plugin cody-master${NC}"
838
+ echo -e " Project-only rules: ${C}cd your-repo && bash install.sh --cursor --cursor-project${NC}"
839
+ echo ""
840
+ echo -e " ${BOLD}Terminal CLI:${NC} ${C}npm install -g codymaster${NC} → ${C}cm${NC} | ${C}npm install codymaster${NC} → ${C}npx cm${NC}"
841
+ echo ""
842
+ echo -e " ${BOLD}Skill sources:${NC} ${C}~/.cody-master/skills/${NC}"
843
+ echo ""
844
+ }
845
+
846
+ # ── Parse argv: --profile NAME + first platform flag ────────────
847
+ parse_install_args() {
848
+ INSTALL_CMD=""
849
+ local args=("$@")
850
+ local i=0
851
+ while [[ $i -lt ${#args[@]} ]]; do
852
+ local a="${args[i]}"
853
+ case "$a" in
854
+ --profile)
855
+ SKILL_PROFILE="${args[i+1]:-full}"
856
+ ((i+=2))
857
+ continue
858
+ ;;
859
+ esac
860
+ if [[ -z "$INSTALL_CMD" ]]; then
861
+ case "$a" in
862
+ --claude) INSTALL_CMD="claude" ;;
863
+ --gemini|--antigravity) INSTALL_CMD="gemini" ;;
864
+ --cursor) INSTALL_CMD="cursor" ;;
865
+ --aider) INSTALL_CMD="aider" ;;
866
+ --continue) INSTALL_CMD="continue" ;;
867
+ --amazon-q) INSTALL_CMD="amazon-q" ;;
868
+ --amp) INSTALL_CMD="amp" ;;
869
+ --kiro) INSTALL_CMD="kiro" ;;
870
+ --windsurf) INSTALL_CMD="windsurf" ;;
871
+ --cline) INSTALL_CMD="cline" ;;
872
+ --opencode) INSTALL_CMD="opencode" ;;
873
+ --copilot) INSTALL_CMD="copilot" ;;
874
+ --all) INSTALL_CMD="all" ;;
875
+ esac
876
+ fi
877
+ ((i++)) || true
878
+ done
879
+ }
880
+
682
881
  # ════════════════════════════════════════════════════════════════
683
882
  # MAIN
684
883
  # ════════════════════════════════════════════════════════════════
@@ -690,92 +889,111 @@ for arg in "$@"; do
690
889
  case "$arg" in
691
890
  --global|--user) SCOPE="user" ;;
692
891
  --project|--local) SCOPE="project" ;;
892
+ --yes|-y) SKIP_INSTALL_ONBOARDING=1 ;;
893
+ --cursor-project) CURSOR_RULES_PROJECT=1 ;;
693
894
  esac
694
895
  done
695
896
 
696
- if [[ "$1" == "--claude" ]]; then
897
+ parse_install_args "$@"
898
+
899
+ # One-liner full install should finish without the interactive onboarding menu
900
+ if [[ "$INSTALL_CMD" == "all" ]]; then
901
+ SKIP_INSTALL_ONBOARDING=1
902
+ fi
903
+
904
+ if [[ "$INSTALL_CMD" == "claude" ]]; then
697
905
  install_claude "$SCOPE"
698
906
  exit 0
699
907
  fi
700
908
 
701
- if [[ "$1" == "--gemini" ]] || [[ "$1" == "--antigravity" ]]; then
909
+ if [[ "$INSTALL_CMD" == "gemini" ]]; then
702
910
  install_gemini
703
- print_onboarding
911
+ if [[ -n "${SKILL_PROFILE:-}" && "$SKILL_PROFILE" != "full" ]]; then
912
+ echo -e " ${C}ℹ Add more skills: bash install.sh --gemini --profile growth (same target merges new folders)${NC}"
913
+ echo -e " ${C}ℹ Point GEMINI.md at: @~/.gemini/antigravity/skills/cm-skill-index/SKILL.md${NC}"
914
+ fi
915
+ maybe_print_onboarding
704
916
  exit 0
705
917
  fi
706
918
 
707
- if [[ "$1" == "--cursor" ]]; then
919
+ if [[ "$INSTALL_CMD" == "cursor" ]]; then
708
920
  echo ""
709
921
  echo -e "${B}${BOLD}Cursor — Installing Cody Master${NC}"
710
922
  echo ""
711
- target=".cursor/rules"
923
+ target="$(resolve_cursor_rules_dir cursor)"
712
924
  install_skills_to "$target" "mdc"
713
- echo -e " ${C}ℹ Cursor will automatically load .mdc rules from this project${NC}"
714
- print_onboarding
925
+ echo -e " ${C}ℹ Cursor rules installed to: ${BOLD}${target}${NC}"
926
+ echo -e " ${C}ℹ Reopen Cursor or open a workspace folder. Also try Agent: ${BOLD}/add-plugin cody-master${NC}"
927
+ maybe_print_onboarding
715
928
  exit 0
716
929
  fi
717
930
 
718
- if [[ "$1" == "--aider" ]]; then
931
+ if [[ "$INSTALL_CMD" == "aider" ]]; then
719
932
  install_aider
720
- print_onboarding
933
+ maybe_print_onboarding
721
934
  exit 0
722
935
  fi
723
936
 
724
- if [[ "$1" == "--continue" ]]; then
937
+ if [[ "$INSTALL_CMD" == "continue" ]]; then
725
938
  install_continue
726
- print_onboarding
939
+ maybe_print_onboarding
727
940
  exit 0
728
941
  fi
729
942
 
730
- if [[ "$1" == "--amazon-q" ]]; then
943
+ if [[ "$INSTALL_CMD" == "amazon-q" ]]; then
731
944
  install_amazon_q
732
- print_onboarding
945
+ maybe_print_onboarding
733
946
  exit 0
734
947
  fi
735
948
 
736
- if [[ "$1" == "--amp" ]]; then
949
+ if [[ "$INSTALL_CMD" == "amp" ]]; then
737
950
  install_amp
738
- print_onboarding
951
+ maybe_print_onboarding
739
952
  exit 0
740
953
  fi
741
954
 
742
- if [[ "$1" == "--kiro" ]]; then
955
+ if [[ "$INSTALL_CMD" == "kiro" ]]; then
743
956
  echo ""
744
957
  echo -e "${O}${BOLD}Kiro — Installing Cody Master${NC}"
745
958
  echo ""
746
959
  install_skills_to ".kiro/steering" "raw"
747
- print_onboarding
960
+ maybe_print_onboarding
748
961
  exit 0
749
962
  fi
750
963
 
751
- if [[ "$1" == "--windsurf" ]]; then
964
+ if [[ "$INSTALL_CMD" == "windsurf" ]]; then
752
965
  echo ""
753
966
  echo -e "${O}${BOLD}Windsurf — Installing Cody Master${NC}"
754
967
  echo ""
968
+ echo -e " ${C}ℹ This writes to project ${BOLD}.windsurf/rules${NC}${C} (run from repo root).${NC}"
969
+ echo -e " ${C}ℹ Some Windsurf builds also use global skills under Codeium paths — use the same profile flags if you copy there.${NC}"
755
970
  install_skills_to ".windsurf/rules" "raw"
756
- print_onboarding
971
+ if [[ -n "${SKILL_PROFILE:-}" && "$SKILL_PROFILE" != "full" ]]; then
972
+ echo -e " ${C}ℹ Add more: bash install.sh --windsurf --profile growth${NC}"
973
+ fi
974
+ maybe_print_onboarding
757
975
  exit 0
758
976
  fi
759
977
 
760
- if [[ "$1" == "--cline" ]]; then
978
+ if [[ "$INSTALL_CMD" == "cline" ]]; then
761
979
  echo ""
762
980
  echo -e "${O}${BOLD}Cline/RooCode — Installing Cody Master${NC}"
763
981
  echo ""
764
982
  install_skills_to ".cline/skills" "raw"
765
- print_onboarding
983
+ maybe_print_onboarding
766
984
  exit 0
767
985
  fi
768
986
 
769
- if [[ "$1" == "--opencode" ]]; then
987
+ if [[ "$INSTALL_CMD" == "opencode" ]]; then
770
988
  echo ""
771
989
  echo -e "${G}${BOLD}OpenCode — Installing Cody Master${NC}"
772
990
  echo ""
773
991
  install_skills_to ".opencode/skills" "raw"
774
- print_onboarding
992
+ maybe_print_onboarding
775
993
  exit 0
776
994
  fi
777
995
 
778
- if [[ "$1" == "--copilot" ]]; then
996
+ if [[ "$INSTALL_CMD" == "copilot" ]]; then
779
997
  echo ""
780
998
  echo -e "${G}${BOLD}GitHub Copilot — Installing Cody Master${NC}"
781
999
  echo ""
@@ -784,7 +1002,7 @@ if [[ "$1" == "--copilot" ]]; then
784
1002
  exit 0
785
1003
  fi
786
1004
 
787
- if [[ "$1" == "--all" ]]; then
1005
+ if [[ "$INSTALL_CMD" == "all" ]]; then
788
1006
  echo -e "${W}${BOLD}Installing to all detected platforms...${NC}"
789
1007
  echo ""
790
1008
  command -v claude &>/dev/null && install_claude "$SCOPE"
@@ -794,10 +1012,16 @@ if [[ "$1" == "--all" ]]; then
794
1012
  command -v q &>/dev/null && install_amazon_q
795
1013
  command -v amp &>/dev/null && install_amp
796
1014
  [ -d "$HOME/.cursor" ] || [ -d "/Applications/Cursor.app" ] && {
797
- install_skills_to ".cursor/rules" "mdc"
1015
+ _cm_cursor_rules="$(resolve_cursor_rules_dir all)"
1016
+ echo -e " ${W}Cursor → ${_cm_cursor_rules} ${DIM}(not your current shell cwd)${NC}"
1017
+ install_skills_to "${_cm_cursor_rules}" "mdc"
798
1018
  }
799
- install_cli
800
- print_onboarding
1019
+ install_openviking
1020
+ install_cli "--auto"
1021
+ echo ""
1022
+ echo -e "${G}${BOLD}✅ All installations completed!${NC}"
1023
+ echo -e "${C}$(msg docs) https://cody.todyle.com/docs${NC}"
1024
+ print_all_done_summary
801
1025
  exit 0
802
1026
  fi
803
1027
 
@@ -844,8 +1068,11 @@ for platform in "${platforms[@]}"; do
844
1068
  ;;
845
1069
  cursor)
846
1070
  echo ""
847
- echo -e "${B}${BOLD}Cursor — Plugin Install${NC}"
848
- echo -e " In Cursor Agent chat, run: ${C}/add-plugin cm${NC}"
1071
+ echo -e "${B}${BOLD}Cursor — Rules + plugin${NC}"
1072
+ _cm_cursor_rules="$(resolve_cursor_rules_dir cursor)"
1073
+ install_skills_to "${_cm_cursor_rules}" "mdc"
1074
+ echo -e " ${C}ℹ Rules → ${_cm_cursor_rules}${NC}"
1075
+ echo -e " In Cursor Agent chat: ${C}/add-plugin cody-master${NC}"
849
1076
  ;;
850
1077
  codex)
851
1078
  echo ""
@@ -889,6 +1116,7 @@ for platform in "${platforms[@]}"; do
889
1116
  esac
890
1117
  done
891
1118
 
1119
+ install_openviking
892
1120
  install_cli
893
1121
  print_onboarding
894
1122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codymaster",
3
- "version": "4.5.4",
3
+ "version": "4.8.0",
4
4
  "description": "68+ Skills. Ship 10x faster. AI-powered coding skill kit for Claude, Cursor, Gemini & more.",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -19,15 +19,23 @@
19
19
  "build": "tsc",
20
20
  "start": "ts-node src/index.ts",
21
21
  "test:gate": "vitest run --reporter=verbose",
22
+ "test:gate:kit": "npm run build && npm run validate:skills && npm run check:skills && vitest run --reporter=verbose",
22
23
  "gate:secrets": "node scripts/gate-0-secrets.js",
24
+ "gate:hygiene": "node scripts/gate-0-repo-hygiene.js",
23
25
  "gate:fix": "node scripts/security-fixer.js --fix",
24
26
  "gate:check": "node scripts/security-fixer.js",
25
27
  "gate:syntax": "node scripts/gate-1-syntax.js",
26
28
  "gate:dist": "node scripts/gate-5-dist-verify.js",
27
29
  "gate:smoke": "node scripts/gate-6-smoke-test.js",
28
- "deploy": "npm run gate:secrets && npm run gate:syntax && npm run test:gate && npm run gate:dist && npm run gate:smoke",
29
- "deploy:dry": "npm run gate:secrets && npm run gate:syntax && npm run test:gate && npm run gate:dist && echo '✅ All gates passed. Ready to deploy.'",
30
- "postinstall": "node scripts/postinstall.js"
30
+ "deploy": "npm run gate:secrets && npm run gate:hygiene && npm run gate:syntax && npm run test:gate:kit && npm run gate:dist && npm run gate:smoke",
31
+ "deploy:dry": "npm run gate:secrets && npm run gate:hygiene && npm run gate:syntax && npm run test:gate:kit && npm run gate:dist && echo '✅ All gates passed. Ready to deploy.'",
32
+ "postinstall": "node scripts/postinstall.js",
33
+ "validate:skills": "node scripts/validate-skills.mjs",
34
+ "build:skills": "node scripts/build-skills.mjs",
35
+ "check:skills": "node scripts/build-skills.mjs --check",
36
+ "docs:dev": "vitepress dev docs",
37
+ "docs:build": "vitepress build docs",
38
+ "docs:preview": "vitepress preview docs"
31
39
  },
32
40
  "keywords": [
33
41
  "ai",
@@ -65,7 +73,8 @@
65
73
  "chokidar": "^5.0.0",
66
74
  "commander": "^14.0.3",
67
75
  "express": "^5.2.1",
68
- "prompts": "^2.4.2"
76
+ "prompts": "^2.4.2",
77
+ "yaml": "^2.8.3"
69
78
  },
70
79
  "devDependencies": {
71
80
  "@types/better-sqlite3": "^7.6.13",
@@ -74,8 +83,10 @@
74
83
  "@types/prompts": "^2.4.9",
75
84
  "acorn": "^8.16.0",
76
85
  "jsdom": "^29.0.1",
86
+ "playwright": "^1.50.0",
77
87
  "ts-node": "^10.9.2",
78
88
  "typescript": "^5.9.3",
89
+ "vitepress": "^1.6.4",
79
90
  "vitest": "^4.1.0"
80
91
  },
81
92
  "overrides": {