@optima-chat/dev-skills 0.7.26 → 0.7.28

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.
@@ -6,8 +6,13 @@ const os = require('os');
6
6
 
7
7
  const CLAUDE_DIR = path.join(os.homedir(), '.claude');
8
8
  const SKILLS_SOURCE = path.join(__dirname, '..', '.claude');
9
+ const CODEX_DIR = process.env.CODEX_HOME
10
+ ? path.resolve(process.env.CODEX_HOME)
11
+ : path.join(os.homedir(), '.codex');
12
+ const CODEX_SOURCE = path.join(__dirname, '..', '.codex');
9
13
  const COMMANDS_DEST = path.join(CLAUDE_DIR, 'commands');
10
14
  const SKILLS_DEST = path.join(CLAUDE_DIR, 'skills');
15
+ const CODEX_SKILLS_DEST = path.join(CODEX_DIR, 'skills', 'optima-dev');
11
16
 
12
17
  // 颜色输出
13
18
  const colors = {
@@ -82,8 +87,26 @@ function install() {
82
87
  });
83
88
  }
84
89
 
90
+ // 动态安装所有 Codex skills
91
+ const codexSkillsSource = path.join(CODEX_SOURCE, 'skills');
92
+ if (fs.existsSync(codexSkillsSource)) {
93
+ if (!fs.existsSync(CODEX_SKILLS_DEST)) {
94
+ fs.mkdirSync(CODEX_SKILLS_DEST, { recursive: true });
95
+ }
96
+ const skills = fs.readdirSync(codexSkillsSource).filter(f => {
97
+ return fs.statSync(path.join(codexSkillsSource, f)).isDirectory();
98
+ });
99
+ skills.forEach(skill => {
100
+ const src = path.join(codexSkillsSource, skill);
101
+ const dest = path.join(CODEX_SKILLS_DEST, skill);
102
+ copyRecursive(src, dest);
103
+ log(`✓ Installed Codex ${skill} skill`, 'green');
104
+ });
105
+ }
106
+
85
107
  log('\n✨ Installation complete!\n', 'green');
86
108
  log('Run /help in Claude Code to see available commands.\n', 'blue');
109
+ log(`Codex skills installed to: ${CODEX_SKILLS_DEST}\n`, 'blue');
87
110
  log('Documentation: https://github.com/Optima-Chat/optima-dev-skills\n', 'blue');
88
111
  }
89
112