@optima-chat/dev-skills 0.1.1 → 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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Viewing Server Logs"
|
|
3
|
-
description: "
|
|
3
|
+
description: "当用户请求查看日志、查看服务日志、排查问题、看看日志、检查日志、商品服务日志、后端日志、API日志时,使用此技能。支持 Stage、Prod 环境的 commerce-backend、user-auth、mcp-host、agentic-chat 服务。"
|
|
4
4
|
allowed-tools: ["Bash", "SlashCommand"]
|
|
5
5
|
---
|
|
6
6
|
|
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -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'
|
|
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
|
-
|
|
56
|
-
|
|
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
|
}
|
|
File without changes
|