@optima-chat/dev-skills 0.7.17 → 0.7.18

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.
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,46 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "WebSearch",
5
+ "WebFetch(domain:code.claude.com)",
6
+ "WebFetch(domain:platform.claude.com)",
7
+ "WebFetch(domain:github.com)",
8
+ "Bash(gh repo view:*)",
9
+ "Bash(gh repo clone:*)",
10
+ "Bash(gh repo list:*)",
11
+ "Read(//private/tmp/optima-docs/**)",
12
+ "Read(//tmp/optima-docs/**)",
13
+ "Bash(git init:*)",
14
+ "Bash(gh repo create:*)",
15
+ "Read(//private/tmp/optima-workspace/**)",
16
+ "Read(//tmp/optima-workspace/**)",
17
+ "Read(//tmp/optima-workspace/.claude/commands/**)",
18
+ "Bash(git add:*)",
19
+ "Bash(git push:*)",
20
+ "Bash(find:*)",
21
+ "Bash(git commit:*)",
22
+ "Bash(aws logs get-log-events:*)",
23
+ "Bash(npm install:*)",
24
+ "Bash(optima-dev-skills:*)",
25
+ "Bash(optima-generate-test-token:*)",
26
+ "Bash(optima-query-db:*)",
27
+ "Bash(gh variable set:*)",
28
+ "Bash(npm publish:*)",
29
+ "Bash(python3:*)",
30
+ "Bash(gh api:*)",
31
+ "Bash(curl -s http://auth.optima.chat/openapi.json)",
32
+ "Bash(curl -s https://auth.optima.chat/openapi.json)",
33
+ "Bash(cat:*)",
34
+ "Bash(node /Users/verypro/optima-dev-skills/scripts/install.js:*)",
35
+ "Bash(aws logs tail:*)",
36
+ "Bash(grep:*)",
37
+ "Bash(npm view:*)",
38
+ "Bash(npm version:*)",
39
+ "Bash(git checkout:*)",
40
+ "Bash(git pull:*)",
41
+ "Bash(node scripts/install.js:*)"
42
+ ],
43
+ "deny": [],
44
+ "ask": []
45
+ }
46
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/dev-skills",
3
- "version": "0.7.17",
3
+ "version": "0.7.18",
4
4
  "description": "Claude Code Skills for Optima development team - cross-environment collaboration tools",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -7,11 +7,7 @@ const os = require('os');
7
7
  const CLAUDE_DIR = path.join(os.homedir(), '.claude');
8
8
  const SKILLS_SOURCE = path.join(__dirname, '..', '.claude');
9
9
  const COMMANDS_DEST = path.join(CLAUDE_DIR, 'commands');
10
- const LOGS_SKILL_DEST = path.join(CLAUDE_DIR, 'skills', 'logs');
11
- const QUERY_DB_SKILL_DEST = path.join(CLAUDE_DIR, 'skills', 'query-db');
12
- const GENERATE_TOKEN_SKILL_DEST = path.join(CLAUDE_DIR, 'skills', 'generate-test-token');
13
- const USE_COMMERCE_CLI_SKILL_DEST = path.join(CLAUDE_DIR, 'skills', 'use-commerce-cli');
14
- const READ_CODE_SKILL_DEST = path.join(CLAUDE_DIR, 'skills', 'read-code');
10
+ const SKILLS_DEST = path.join(CLAUDE_DIR, 'skills');
15
11
 
16
12
  // 颜色输出
17
13
  const colors = {
@@ -47,95 +43,48 @@ function copyRecursive(src, dest) {
47
43
  function install() {
48
44
  log('\n🚀 Installing Optima Dev Skills...\n', 'blue');
49
45
 
50
- // 确保 .claude 目录存在
46
+ // 确保目录存在
51
47
  if (!fs.existsSync(CLAUDE_DIR)) {
52
48
  fs.mkdirSync(CLAUDE_DIR, { recursive: true });
53
49
  log(`✓ Created ${CLAUDE_DIR}`, 'green');
54
50
  }
55
-
56
- // 安装命令
57
51
  if (!fs.existsSync(COMMANDS_DEST)) {
58
52
  fs.mkdirSync(COMMANDS_DEST, { recursive: true });
59
53
  }
60
-
61
- // 安装 /logs 命令
62
- const logsCommandSource = path.join(SKILLS_SOURCE, 'commands', 'logs.md');
63
- const logsCommandDest = path.join(COMMANDS_DEST, 'logs.md');
64
- if (fs.existsSync(logsCommandSource)) {
65
- fs.copyFileSync(logsCommandSource, logsCommandDest);
66
- log(`✓ Installed /logs command`, 'green');
54
+ if (!fs.existsSync(SKILLS_DEST)) {
55
+ fs.mkdirSync(SKILLS_DEST, { recursive: true });
67
56
  }
68
57
 
69
- // 安装 /query-db 命令
70
- const queryDbCommandSource = path.join(SKILLS_SOURCE, 'commands', 'query-db.md');
71
- const queryDbCommandDest = path.join(COMMANDS_DEST, 'query-db.md');
72
- if (fs.existsSync(queryDbCommandSource)) {
73
- fs.copyFileSync(queryDbCommandSource, queryDbCommandDest);
74
- log(`✓ Installed /query-db command`, 'green');
75
- }
76
-
77
- // 安装 /generate-test-token 命令
78
- const generateTokenCommandSource = path.join(SKILLS_SOURCE, 'commands', 'generate-test-token.md');
79
- const generateTokenCommandDest = path.join(COMMANDS_DEST, 'generate-test-token.md');
80
- if (fs.existsSync(generateTokenCommandSource)) {
81
- fs.copyFileSync(generateTokenCommandSource, generateTokenCommandDest);
82
- log(`✓ Installed /generate-test-token command`, 'green');
83
- }
84
-
85
- // 安装 /read-code 命令
86
- const readCodeCommandSource = path.join(SKILLS_SOURCE, 'commands', 'read-code.md');
87
- const readCodeCommandDest = path.join(COMMANDS_DEST, 'read-code.md');
88
- if (fs.existsSync(readCodeCommandSource)) {
89
- fs.copyFileSync(readCodeCommandSource, readCodeCommandDest);
90
- log(`✓ Installed /read-code command`, 'green');
91
- }
92
-
93
- // 安装 logs skill
94
- const logsSkillSource = path.join(SKILLS_SOURCE, 'skills', 'logs');
95
- if (fs.existsSync(logsSkillSource)) {
96
- copyRecursive(logsSkillSource, LOGS_SKILL_DEST);
97
- log(`✓ Installed logs skill`, 'green');
98
- }
99
-
100
- // 安装 query-db skill
101
- const queryDbSkillSource = path.join(SKILLS_SOURCE, 'skills', 'query-db');
102
- if (fs.existsSync(queryDbSkillSource)) {
103
- copyRecursive(queryDbSkillSource, QUERY_DB_SKILL_DEST);
104
- log(`✓ Installed query-db skill`, 'green');
105
- }
106
-
107
- // 安装 generate-test-token skill
108
- const generateTokenSkillSource = path.join(SKILLS_SOURCE, 'skills', 'generate-test-token');
109
- if (fs.existsSync(generateTokenSkillSource)) {
110
- copyRecursive(generateTokenSkillSource, GENERATE_TOKEN_SKILL_DEST);
111
- log(`✓ Installed generate-test-token skill`, 'green');
112
- }
113
-
114
- // 安装 use-commerce-cli skill
115
- const useCommerceCliSkillSource = path.join(SKILLS_SOURCE, 'skills', 'use-commerce-cli');
116
- if (fs.existsSync(useCommerceCliSkillSource)) {
117
- copyRecursive(useCommerceCliSkillSource, USE_COMMERCE_CLI_SKILL_DEST);
118
- log(`✓ Installed use-commerce-cli skill`, 'green');
58
+ // 动态安装所有 commands
59
+ const commandsSource = path.join(SKILLS_SOURCE, 'commands');
60
+ if (fs.existsSync(commandsSource)) {
61
+ const commands = fs.readdirSync(commandsSource).filter(f => f.endsWith('.md'));
62
+ commands.forEach(cmd => {
63
+ const src = path.join(commandsSource, cmd);
64
+ const dest = path.join(COMMANDS_DEST, cmd);
65
+ fs.copyFileSync(src, dest);
66
+ const cmdName = cmd.replace('.md', '');
67
+ log(`✓ Installed /${cmdName} command`, 'green');
68
+ });
119
69
  }
120
70
 
121
- // 安装 read-code skill
122
- const readCodeSkillSource = path.join(SKILLS_SOURCE, 'skills', 'read-code');
123
- if (fs.existsSync(readCodeSkillSource)) {
124
- copyRecursive(readCodeSkillSource, READ_CODE_SKILL_DEST);
125
- log(`✓ Installed read-code skill`, 'green');
71
+ // 动态安装所有 skills
72
+ const skillsSource = path.join(SKILLS_SOURCE, 'skills');
73
+ if (fs.existsSync(skillsSource)) {
74
+ const skills = fs.readdirSync(skillsSource).filter(f => {
75
+ return fs.statSync(path.join(skillsSource, f)).isDirectory();
76
+ });
77
+ skills.forEach(skill => {
78
+ const src = path.join(skillsSource, skill);
79
+ const dest = path.join(SKILLS_DEST, skill);
80
+ copyRecursive(src, dest);
81
+ log(`✓ Installed ${skill} skill`, 'green');
82
+ });
126
83
  }
127
84
 
128
85
  log('\n✨ Installation complete!\n', 'green');
129
- log('Available commands:', 'blue');
130
- log(' /logs <service> [lines] [environment]', 'yellow');
131
- log(' /query-db <service> <sql> [environment]', 'yellow');
132
- log(' /generate-test-token [options]', 'yellow');
133
- log(' /read-code <repo> [path]', 'yellow');
134
- log('\nExamples:', 'blue');
135
- log(' /logs commerce-backend # CI logs', 'yellow');
136
- log(' /query-db commerce-backend "SELECT COUNT(*) FROM orders" # CI query', 'yellow');
137
- log(' /read-code commerce-backend app/main.py # Read code', 'yellow');
138
- log('\nDocumentation: https://github.com/Optima-Chat/optima-dev-skills\n', 'blue');
86
+ log('Run /help in Claude Code to see available commands.\n', 'blue');
87
+ log('Documentation: https://github.com/Optima-Chat/optima-dev-skills\n', 'blue');
139
88
  }
140
89
 
141
90
  try {
package/tsconfig.json CHANGED
File without changes