neo-skill 0.1.13 → 0.1.15
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
- package/skills/review-gate/skillspec.json +3 -3
|
@@ -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.15",
|
|
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
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"name": "review-gate",
|
|
4
|
-
"description": "为 TypeScript/JavaScript(React/Vue/Node)项目建立架构与工程化 Review 规范:明确分层职责边界、模块 API 设计、副作用隔离、复杂度与可读性、错误处理策略等,提供可执行的 PR Review Checklist
|
|
5
|
-
|
|
4
|
+
"description": "为 TypeScript/JavaScript(React/Vue/Node)项目建立架构与工程化 Review 规范:明确分层职责边界、模块 API 设计、副作用隔离、复杂度与可读性、错误处理策略等,提供可执行的 PR Review Checklist,防止架构在长期演进中慢慢写歪。",
|
|
5
|
+
"questions": [
|
|
6
6
|
"你的仓库采用什么分层模型(type-first / feature-first / 其他),现有层级命名是什么?",
|
|
7
7
|
"是否已有明确的架构/工程规范文档,或仅依靠口头约定?",
|
|
8
8
|
"PR Review 流程是什么(必须至少 1 人 approve / 需要架构师 review / 其他)?",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"title": "审查注释与文档质量",
|
|
91
91
|
"kind": "action",
|
|
92
92
|
"commands": [],
|
|
93
|
-
"notes": "检查复杂业务逻辑是否有注释说明
|
|
93
|
+
"notes": "检查复杂业务逻辑是否有注释说明'为什么'、public API 文档是否完整、是否存在需要删除的过时注释。详见 references/review-gate.md。"
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"id": "tests",
|