neo-skill 0.1.13 → 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/bin/omni-skill.js +45 -0
- package/bin/skill-creator.js +43 -0
- package/package.json +7 -5
|
@@ -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,10 +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
|
-
"
|
|
6
|
+
"bin": {
|
|
7
|
+
"omni-skill": "bin/omni-skill.js",
|
|
8
|
+
"skill-creator": "bin/skill-creator.js"
|
|
9
|
+
},
|
|
7
10
|
"files": [
|
|
11
|
+
"bin/**",
|
|
8
12
|
"src/**",
|
|
9
13
|
"skills/**",
|
|
10
14
|
".shared/**",
|
|
@@ -15,9 +19,7 @@
|
|
|
15
19
|
"README.md",
|
|
16
20
|
"pyproject.toml"
|
|
17
21
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"postinstall": "pip install -e . 2>/dev/null || python -m pip install -e . 2>/dev/null || echo 'Warning: Python package installation failed. Please run: pip install neo-skill'"
|
|
20
|
-
},
|
|
22
|
+
"scripts": {},
|
|
21
23
|
"engines": {
|
|
22
24
|
"node": ">=16"
|
|
23
25
|
}
|