neo-skill 0.1.12 → 0.1.14
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.
- package/README.md +35 -11
- package/bin/omni-skill.js +45 -0
- package/bin/skill-creator.js +43 -0
- package/package.json +8 -2
- package/pyproject.toml +25 -0
package/README.md
CHANGED
|
@@ -2,13 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
一个确定性的 **skill-creator** 仓库。
|
|
4
4
|
|
|
5
|
-
**GitHub**: https://github.com/liuminxin45/neo-skill
|
|
5
|
+
**GitHub**: https://github.com/liuminxin45/neo-skill
|
|
6
|
+
**npm**: https://www.npmjs.com/package/neo-skill
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
+
## 安装
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
# 通过 npm 安装(推荐)
|
|
12
|
+
npm install -g neo-skill
|
|
13
|
+
|
|
14
|
+
# 或通过 pip 安装
|
|
15
|
+
pip install neo-skill
|
|
16
|
+
```
|
|
8
17
|
|
|
9
18
|
**前置依赖**:需要安装 Python 3.8+
|
|
10
19
|
|
|
11
|
-
|
|
20
|
+
## 使用方式
|
|
21
|
+
|
|
22
|
+
### 命令行工具(安装后)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# 初始化技能
|
|
26
|
+
omni-skill init --ai claude
|
|
27
|
+
|
|
28
|
+
# 生成技能输出
|
|
29
|
+
skill-creator generate skills/skill-name/skillspec.json
|
|
30
|
+
|
|
31
|
+
# 验证技能
|
|
32
|
+
skill-creator validate skills/skill-name/skillspec.json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 直接运行 Python 模块(开发模式)
|
|
12
36
|
|
|
13
37
|
```bash
|
|
14
38
|
# 初始化技能
|
|
@@ -51,30 +75,30 @@ python -m skill_creator.cli validate skills/skill-name/skillspec.json
|
|
|
51
75
|
**初始化技能文件**
|
|
52
76
|
```bash
|
|
53
77
|
# 初始化指定 AI 助手的技能文件
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
78
|
+
omni-skill init --ai claude
|
|
79
|
+
omni-skill init --ai windsurf
|
|
80
|
+
omni-skill init --ai all # 初始化所有支持的 AI 助手
|
|
57
81
|
|
|
58
82
|
# 更新(基于上次 init 的配置)
|
|
59
|
-
|
|
83
|
+
omni-skill update
|
|
60
84
|
```
|
|
61
85
|
|
|
62
86
|
**生成和验证技能**
|
|
63
87
|
```bash
|
|
64
88
|
# 生成技能输出
|
|
65
|
-
|
|
89
|
+
skill-creator generate skills/skill-name/skillspec.json
|
|
66
90
|
|
|
67
91
|
# 验证技能
|
|
68
|
-
|
|
92
|
+
skill-creator validate skills/skill-name/skillspec.json
|
|
69
93
|
|
|
70
94
|
# 打包 Claude 技能
|
|
71
|
-
|
|
95
|
+
skill-creator package --target claude --skill skill-name
|
|
72
96
|
```
|
|
73
97
|
|
|
74
98
|
**在其他项目中使用**
|
|
75
99
|
将 neo-skill 仓库克隆到你的项目中(例如 `vendor/neo-skill/`),然后:
|
|
76
100
|
1. 设置 PYTHONPATH:`export PYTHONPATH=$PWD/vendor/neo-skill/src:$PYTHONPATH`
|
|
77
|
-
2. 运行命令:`
|
|
101
|
+
2. 运行命令:`omni-skill init --ai claude`
|
|
78
102
|
|
|
79
103
|
**支持的 AI 助手:**
|
|
80
104
|
claude, cursor, windsurf, antigravity, copilot, kiro, codex, qoder, roocode, gemini, trae, opencode, continue, all
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
function buildEnv(pkgRoot) {
|
|
7
|
+
const env = { ...process.env };
|
|
8
|
+
const srcPath = path.join(pkgRoot, "src");
|
|
9
|
+
const key = process.platform === "win32" ? "PYTHONPATH" : "PYTHONPATH";
|
|
10
|
+
const sep = process.platform === "win32" ? ";" : ":";
|
|
11
|
+
env[key] = env[key] ? `${srcPath}${sep}${env[key]}` : srcPath;
|
|
12
|
+
return env;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function spawnPython(cmd, args, env) {
|
|
16
|
+
return spawn(cmd, args, { stdio: "inherit", env });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function main() {
|
|
20
|
+
const pkgRoot = path.resolve(__dirname, "..");
|
|
21
|
+
const env = buildEnv(pkgRoot);
|
|
22
|
+
const pyArgs = ["-m", "omni_skill.cli", ...process.argv.slice(2)];
|
|
23
|
+
|
|
24
|
+
// Try python first; if not found on Windows, try py.
|
|
25
|
+
let child = spawnPython("python", pyArgs, env);
|
|
26
|
+
|
|
27
|
+
child.on("error", (err) => {
|
|
28
|
+
if (process.platform === "win32") {
|
|
29
|
+
const child2 = spawnPython("py", pyArgs, env);
|
|
30
|
+
child2.on("error", () => {
|
|
31
|
+
console.error("neo-skill: Python not found. Please install Python 3.8+ and ensure 'python' (or 'py') is on PATH.");
|
|
32
|
+
process.exit(127);
|
|
33
|
+
});
|
|
34
|
+
child2.on("exit", (code) => process.exit(code ?? 1));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
console.error("neo-skill: Python not found. Please install Python 3.8+ and ensure 'python' is on PATH.");
|
|
39
|
+
process.exit(127);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
child.on("exit", (code) => process.exit(code ?? 1));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
main();
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
function buildEnv(pkgRoot) {
|
|
7
|
+
const env = { ...process.env };
|
|
8
|
+
const srcPath = path.join(pkgRoot, "src");
|
|
9
|
+
const sep = process.platform === "win32" ? ";" : ":";
|
|
10
|
+
env.PYTHONPATH = env.PYTHONPATH ? `${srcPath}${sep}${env.PYTHONPATH}` : srcPath;
|
|
11
|
+
return env;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function spawnPython(cmd, args, env) {
|
|
15
|
+
return spawn(cmd, args, { stdio: "inherit", env });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function main() {
|
|
19
|
+
const pkgRoot = path.resolve(__dirname, "..");
|
|
20
|
+
const env = buildEnv(pkgRoot);
|
|
21
|
+
const pyArgs = ["-m", "skill_creator.cli", ...process.argv.slice(2)];
|
|
22
|
+
|
|
23
|
+
let child = spawnPython("python", pyArgs, env);
|
|
24
|
+
|
|
25
|
+
child.on("error", () => {
|
|
26
|
+
if (process.platform === "win32") {
|
|
27
|
+
const child2 = spawnPython("py", pyArgs, env);
|
|
28
|
+
child2.on("error", () => {
|
|
29
|
+
console.error("neo-skill: Python not found. Please install Python 3.8+ and ensure 'python' (or 'py') is on PATH.");
|
|
30
|
+
process.exit(127);
|
|
31
|
+
});
|
|
32
|
+
child2.on("exit", (code) => process.exit(code ?? 1));
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
console.error("neo-skill: Python not found. Please install Python 3.8+ and ensure 'python' is on PATH.");
|
|
37
|
+
process.exit(127);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
child.on("exit", (code) => process.exit(code ?? 1));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
main();
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "A multi-assistant skill generator (Claude/Windsurf/Cursor/GitHub Skills) driven by a canonical SkillSpec.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"bin": {
|
|
7
|
+
"omni-skill": "bin/omni-skill.js",
|
|
8
|
+
"skill-creator": "bin/skill-creator.js"
|
|
9
|
+
},
|
|
6
10
|
"files": [
|
|
11
|
+
"bin/**",
|
|
7
12
|
"src/**",
|
|
8
13
|
"skills/**",
|
|
9
14
|
".shared/**",
|
|
@@ -11,7 +16,8 @@
|
|
|
11
16
|
".windsurf/**",
|
|
12
17
|
".cursor/**",
|
|
13
18
|
".github/skills/**",
|
|
14
|
-
"README.md"
|
|
19
|
+
"README.md",
|
|
20
|
+
"pyproject.toml"
|
|
15
21
|
],
|
|
16
22
|
"scripts": {},
|
|
17
23
|
"engines": {
|
package/pyproject.toml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=56"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "neo-skill"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "A multi-assistant skill generator (Claude/Windsurf/Cursor/GitHub Skills) driven by a canonical SkillSpec."
|
|
9
|
+
requires-python = ">=3.8"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
authors = [{name = "skill-creator"}]
|
|
12
|
+
|
|
13
|
+
[project.scripts]
|
|
14
|
+
omni-skill = "omni_skill.cli:main"
|
|
15
|
+
skill-creator = "skill_creator.cli:main"
|
|
16
|
+
|
|
17
|
+
[tool.setuptools]
|
|
18
|
+
package-dir = {"" = "src"}
|
|
19
|
+
|
|
20
|
+
[tool.setuptools.packages.find]
|
|
21
|
+
where = ["src"]
|
|
22
|
+
|
|
23
|
+
[tool.setuptools.dynamic]
|
|
24
|
+
version = {attr = "skill_creator.__version__"}
|
|
25
|
+
|