@optima-chat/dev-skills 0.1.0 → 0.1.3

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.
@@ -2,6 +2,8 @@
2
2
 
3
3
  快速查看服务日志,支持 Stage/Prod 两个环境。
4
4
 
5
+ **版本**: v0.1.1
6
+
5
7
  ## 使用场景
6
8
 
7
9
  **前端开发者**: 当 API 调用返回 500 错误时,查看后端日志排查问题
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "Viewing Server Logs"
3
- description: "查看服务器日志 - Stage、Prod 环境的日志查看,快速定位问题"
3
+ description: "当用户请求查看日志、查看服务日志、排查问题、看看日志、检查日志、商品服务日志、后端日志、API日志时,使用此技能。支持 Stage、Prod 环境的 commerce-backend、user-auth、mcp-host、agentic-chat 服务。"
4
4
  allowed-tools: ["Bash", "SlashCommand"]
5
5
  ---
6
6
 
package/README.md CHANGED
@@ -4,13 +4,38 @@
4
4
 
5
5
  ## 📦 快速安装
6
6
 
7
+ ### 方式 1:通过 npm(推荐)
8
+
7
9
  ```bash
8
10
  npm install -g @optima-chat/dev-skills@latest
9
11
  ```
10
12
 
11
- 安装后,Claude Code 会自动获得以下能力:
12
- - `/logs` 命令 - 查看 Stage/Prod 环境日志
13
- - `viewing-logs` 场景 - 完整的日志查看指导
13
+ 安装后会自动将 skills 复制到 `~/.claude/` 目录。
14
+
15
+ ### 方式 2:验证安装
16
+
17
+ ```bash
18
+ # 查看版本
19
+ optima-dev-skills --version
20
+
21
+ # 查看帮助
22
+ optima-dev-skills --help
23
+
24
+ # 检查文件
25
+ ls ~/.claude/commands/logs/
26
+ ls ~/.claude/skills/scenarios/viewing-logs/
27
+ ```
28
+
29
+ ### 已安装的能力
30
+
31
+ - ✅ `/logs` 命令 - 查看 Stage/Prod 环境日志
32
+ - ✅ `viewing-logs` 场景 - 完整的日志查看指导
33
+
34
+ ### 更新
35
+
36
+ ```bash
37
+ npm update -g @optima-chat/dev-skills@latest
38
+ ```
14
39
 
15
40
  ## 🎯 核心理念
16
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/dev-skills",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "Claude Code Skills for Optima development team - cross-environment collaboration tools",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -6,7 +6,7 @@ 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 COMMANDS_DEST = path.join(CLAUDE_DIR, 'commands', 'logs');
9
+ const COMMANDS_DEST = path.join(CLAUDE_DIR, 'commands');
10
10
  const SKILLS_DEST = path.join(CLAUDE_DIR, 'skills', 'scenarios', 'viewing-logs');
11
11
 
12
12
  // 颜色输出
@@ -50,10 +50,14 @@ function install() {
50
50
  }
51
51
 
52
52
  // 安装命令
53
- const commandsSource = path.join(SKILLS_SOURCE, 'commands', 'logs');
53
+ const commandsSource = path.join(SKILLS_SOURCE, 'commands', 'logs.md');
54
+ const commandsDest = path.join(COMMANDS_DEST, 'logs.md');
54
55
  if (fs.existsSync(commandsSource)) {
55
- copyRecursive(commandsSource, COMMANDS_DEST);
56
- log(`✓ Installed /logs command to ${COMMANDS_DEST}`, 'green');
56
+ if (!fs.existsSync(COMMANDS_DEST)) {
57
+ fs.mkdirSync(COMMANDS_DEST, { recursive: true });
58
+ }
59
+ fs.copyFileSync(commandsSource, commandsDest);
60
+ log(`✓ Installed /logs command to ${commandsDest}`, 'green');
57
61
  } else {
58
62
  log(`✗ Commands not found at ${commandsSource}`, 'red');
59
63
  }