skill-systems-thinking 0.1.1 → 0.1.2

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/CHANGELOG.md CHANGED
@@ -12,10 +12,12 @@ Versioning follows [Semantic Versioning](https://semver.org/) in `X.Y.Z` format.
12
12
  - Expanded `keywords` from 5 to 14 for better npm search discoverability across AI agents
13
13
  - Added `homepage` field to `package.json`
14
14
  - Added `init.ps1` to `files` array in `package.json` so it's included in the npm package
15
- - Added `postinstall` and `verify` scripts to `package.json`
16
- - README.md Installation section restructured: npm install as primary method, GitHub download as alternative
17
- - Added agent-specific symlink commands for 8 agents in README.md
15
+ - README.md Installation section restructured: npx one-command install as primary method, GitHub download as alternative
16
+ - Added `scripts/install.js` for npx auto-detection of AI agents and automatic symlinking
17
+ - Added `bin` field to `package.json` so `npx skill-systems-thinking install` works
18
+ - Added agent-specific setup info for 8 agents in README.md
18
19
  - Added Compatibility section in both 中文 and English
20
+ - Removed npm install as a separate method; npx is the recommended approach
19
21
 
20
22
  ## [0.1.0] — 2026-07-24
21
23
 
package/README.md CHANGED
@@ -39,22 +39,16 @@
39
39
 
40
40
  本 skill 面向支持自定义 skill 的 AI 编程助手(Kilo、Claude Code、Aider、Cursor 等)。
41
41
 
42
- ### npm install(推荐)
42
+ ### npx 一键安装(推荐)
43
43
 
44
44
  ```bash
45
- npm install skill-systems-thinking
45
+ npx skill-systems-thinking install
46
46
  ```
47
47
 
48
- 安装后,将 skill 链接到你的 agent skill 目录:
48
+ 该命令会自动检测你机器上已安装的 AI agent,并将 skill 链接到对应的 skill 目录。
49
49
 
50
- ```bash
51
- # 查找 npm 全局安装路径
52
- npm root -g
53
- # 或本地项目安装:
54
- node -e "console.log(require.resolve('skill-systems-thinking'))"
55
- ```
56
-
57
- 然后将 skill 符号链接或复制到你的 agent skill 目录(详见下方各 agent 的具体说明)。
50
+ - 全局安装(所有项目可用):`npx skill-systems-thinking install --global`
51
+ - 强制覆盖已存在的链接:`npx skill-systems-thinking install --force`
58
52
 
59
53
  ### GitHub 下载
60
54
 
@@ -71,20 +65,20 @@ ln -s /absolute/path/to/systems-thinking <agent-skills-dir>/
71
65
 
72
66
  ### 各 agent 配置
73
67
 
74
- npm 包将 skill 文件安装到 `node_modules/skill-systems-thinking/`。你需要让各 agent 找到它们。各 agent 的 skill 目录如下。
68
+ npx 安装会自动将 skill 链接到各 agent 的 skill 目录。手动安装时,各 agent 的 skill 目录如下。
75
69
 
76
- | Agent | Skill 目录 | npm 链接命令 |
77
- |---|---|---|
78
- | Kilo | `~/.config/kilo/skills/` 或项目 `.kilo/agent/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.config/kilo/skills/systems-thinking` |
79
- | Claude Code | `~/.claude/plugins/custom-skills/` 或项目 `.claude/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.claude/plugins/custom-skills/systems-thinking` |
80
- | Aider | `--skills-dir` 路径 | `ln -s $(npm root -g)/skill-systems-thinking <aider-skills-dir>/` |
81
- | Cursor | 项目 `.cursor/rules/` 或全局设置 | `ln -s $(npm root -g)/skill-systems-thinking .cursor/rules/systems-thinking` |
82
- | OpenAI Codex | `~/.codex/skills/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.codex/skills/systems-thinking` |
83
- | GitHub Copilot | `~/.copilot/skills/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.copilot/skills/systems-thinking` |
84
- | Windsurf | `~/.windsurf/skills/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.windsurf/skills/systems-thinking` |
85
- | Zed | `~/.zed/skills/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.zed/skills/systems-thinking` |
70
+ | Agent | Skill 目录 |
71
+ |---|---|
72
+ | Kilo | `~/.config/kilo/skills/` 或项目 `.kilo/agent/` |
73
+ | Claude Code | `~/.claude/plugins/custom-skills/` 或项目 `.claude/` |
74
+ | Aider | `--skills-dir` 路径 |
75
+ | Cursor | 项目 `.cursor/rules/` 或全局设置 |
76
+ | OpenAI Codex | `~/.codex/skills/` |
77
+ | GitHub Copilot | `~/.copilot/skills/` |
78
+ | Windsurf | `~/.windsurf/skills/` |
79
+ | Zed | `~/.zed/skills/` |
86
80
 
87
- > **注意:** 如果你的 agent 未出现在上方,请查阅其文档获取自定义 skill/plugin 路径。npm 包安装到标准的 `node_modules` 位置,因此任何能从任意目录加载 skill 的 agent 都可以使用。
81
+ > **注意:** 如果你的 agent 未出现在上方,请查阅其文档获取自定义 skill/plugin 路径。
88
82
 
89
83
  ### 验证安装
90
84
 
@@ -109,7 +103,7 @@ npm 包 `skill-systems-thinking` 兼容以下 agent 智能体:
109
103
  | Windsurf | ✅ | 通过 `~/.windsurf/skills/` 链接 |
110
104
  | Zed | ✅ | 通过 `~/.zed/skills/` 链接 |
111
105
 
112
- npm 安装将 skill 文件部署到 `node_modules/skill-systems-thinking/`,然后通过符号链接暴露给各 agent。由于 npm 包不包含 agent 特有的配置文件(如 `.kilo/`、`.claude/` 等),你需要手动创建符号链接将 skill 指向各 agent 的 skill 目录。这一步在所有支持的 agent 上都是相同的操作。
106
+ npx 安装会自动将 skill 链接到各 agent 的 skill 目录。由于 npm 包不包含 agent 特有的配置文件(如 `.kilo/`、`.claude/` 等),安装脚本会从各 agent 的 skill 目录创建符号链接到包位置。这一步在所有支持的 agent 上都是相同的操作。
113
107
 
114
108
  ## 使用方式
115
109
 
@@ -284,22 +278,16 @@ Every change injects a control signal. You only partially observe the true state
284
278
 
285
279
  This skill is designed for AI coding agents that support custom skills (Kilo, Claude Code, Aider, Cursor, etc.).
286
280
 
287
- ### npm install (recommended)
281
+ ### npx one-command install (recommended)
288
282
 
289
283
  ```bash
290
- npm install skill-systems-thinking
284
+ npx skill-systems-thinking install
291
285
  ```
292
286
 
293
- After installing, link the skill into your agent's skill directory:
287
+ This command automatically detects AI agents installed on your machine and links the skill into their skill directories.
294
288
 
295
- ```bash
296
- # Find where npm installed the package
297
- npm root -g
298
- # or for local project install:
299
- node -e "console.log(require.resolve('skill-systems-thinking'))"
300
- ```
301
-
302
- Then symlink or copy the skill into your agent's skill directory (see agent-specific instructions below).
289
+ - Global install (available across all projects): `npx skill-systems-thinking install --global`
290
+ - Force overwrite existing links: `npx skill-systems-thinking install --force`
303
291
 
304
292
  ### GitHub download
305
293
 
@@ -316,20 +304,20 @@ ln -s /absolute/path/to/systems-thinking <agent-skills-dir>/
316
304
 
317
305
  ### Agent-specific setup
318
306
 
319
- The npm package installs the skill files into `node_modules/skill-systems-thinking/`. You then need to make your agent aware of them. Below are the paths for each supported agent.
307
+ npx install automatically links the skill into each agent's skill directory. For manual installation, below are the paths for each supported agent.
320
308
 
321
- | Agent | Skill directory | npm link command |
322
- |---|---|---|
323
- | Kilo | `~/.config/kilo/skills/` or project `.kilo/agent/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.config/kilo/skills/systems-thinking` |
324
- | Claude Code | `~/.claude/plugins/custom-skills/` or project `.claude/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.claude/plugins/custom-skills/systems-thinking` |
325
- | Aider | `--skills-dir` path | `ln -s $(npm root -g)/skill-systems-thinking <aider-skills-dir>/` |
326
- | Cursor | Project `.cursor/rules/` or global settings | `ln -s $(npm root -g)/skill-systems-thinking .cursor/rules/systems-thinking` |
327
- | OpenAI Codex | `~/.codex/skills/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.codex/skills/systems-thinking` |
328
- | GitHub Copilot | `~/.copilot/skills/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.copilot/skills/systems-thinking` |
329
- | Windsurf | `~/.windsurf/skills/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.windsurf/skills/systems-thinking` |
330
- | Zed | `~/.zed/skills/` | `ln -s $(npm root -g)/skill-systems-thinking ~/.zed/skills/systems-thinking` |
309
+ | Agent | Skill directory |
310
+ |---|---|
311
+ | Kilo | `~/.config/kilo/skills/` or project `.kilo/agent/` |
312
+ | Claude Code | `~/.claude/plugins/custom-skills/` or project `.claude/` |
313
+ | Aider | `--skills-dir` path |
314
+ | Cursor | Project `.cursor/rules/` or global settings |
315
+ | OpenAI Codex | `~/.codex/skills/` |
316
+ | GitHub Copilot | `~/.copilot/skills/` |
317
+ | Windsurf | `~/.windsurf/skills/` |
318
+ | Zed | `~/.zed/skills/` |
331
319
 
332
- > **Note:** If your agent does not appear above, check its documentation for custom skill/plugin paths. The npm package installs to a standard `node_modules` location, so any agent that can load skills from an arbitrary directory will work.
320
+ > **Note:** If your agent does not appear above, check its documentation for custom skill/plugin paths.
333
321
 
334
322
  ### Verify installation
335
323
 
@@ -354,7 +342,7 @@ The npm package `skill-systems-thinking` is compatible with the following AI age
354
342
  | Windsurf | ✅ | Link via `~/.windsurf/skills/` |
355
343
  | Zed | ✅ | Link via `~/.zed/skills/` |
356
344
 
357
- The npm install deploys skill files to `node_modules/skill-systems-thinking/`, then you symlink them into each agent's skill directory. Since the npm package does not include agent-specific config files (like `.kilo/`, `.claude/`, etc.), you need to manually create symlinks pointing from each agent's skill directory to the npm-installed location. This is the same operation across all supported agents.
345
+ The npx install automatically links the skill into each agent's skill directory. Since the package does not include agent-specific config files (like `.kilo/`, `.claude/`, etc.), the install script creates symlinks from each agent's skill directory to the package location. This is the same operation across all supported agents.
358
346
 
359
347
  ## Usage
360
348
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-systems-thinking",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Control-theoretic thinking scaffold for AI coding agents — identify state, measure, stabilize, close the loop.",
5
5
  "license": "MIT",
6
6
  "main": "SKILL.md",
@@ -13,20 +13,43 @@
13
13
  "templates/",
14
14
  "assets/",
15
15
  "evals/",
16
- "init.ps1"
16
+ "init.ps1",
17
+ "scripts/"
17
18
  ],
18
19
  "scripts": {
19
- "postinstall": "node -e \"console.log('skill-systems-thinking installed. Link it to your agent skill directory. Run pwsh init.ps1 to verify.')\"",
20
- "verify": "pwsh init.ps1"
20
+ "verify": "pwsh init.ps1",
21
+ "install-skill": "node scripts/install.js"
21
22
  },
22
- "keywords": ["skill", "agentskill", "kilocode", "claude-code", "aider", "cursor", "copilot", "codex", "windsurf", "zed", "control-theory", "systems-thinking", "ai-agent", "coding-agent"],
23
+ "bin": {
24
+ "skill-systems-thinking": "scripts/install.js"
25
+ },
26
+ "keywords": [
27
+ "skill",
28
+ "agentskill",
29
+ "kilocode",
30
+ "claude-code",
31
+ "aider",
32
+ "cursor",
33
+ "copilot",
34
+ "codex",
35
+ "windsurf",
36
+ "zed",
37
+ "control-theory",
38
+ "systems-thinking",
39
+ "ai-agent",
40
+ "coding-agent"
41
+ ],
23
42
  "repository": {
24
43
  "type": "git",
25
44
  "url": "git+https://github.com/ShrimpLeon/systems-thinking.git"
26
45
  },
27
46
  "homepage": "https://github.com/ShrimpLeon/systems-thinking#readme",
28
- "os": ["darwin", "linux", "win32"],
47
+ "os": [
48
+ "darwin",
49
+ "linux",
50
+ "win32"
51
+ ],
29
52
  "engines": {
30
53
  "node": ">=14"
31
54
  }
32
- }
55
+ }
@@ -0,0 +1,146 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const os = require('os');
6
+
7
+ const pkg = require(path.join(__dirname, '..', 'package.json'));
8
+ const skillName = pkg.name;
9
+ const skillDir = path.join(__dirname, '..');
10
+
11
+ const agents = [
12
+ {
13
+ name: 'Kilo',
14
+ paths: [
15
+ path.join(os.homedir(), '.config', 'kilo', 'skills'),
16
+ path.join(process.cwd(), '.kilo', 'agent')
17
+ ]
18
+ },
19
+ {
20
+ name: 'Claude Code',
21
+ paths: [
22
+ path.join(os.homedir(), '.claude', 'plugins', 'custom-skills'),
23
+ path.join(process.cwd(), '.claude')
24
+ ]
25
+ },
26
+ {
27
+ name: 'Aider',
28
+ paths: [
29
+ path.join(os.homedir(), '.aider', 'skills'),
30
+ path.join(process.cwd(), '.aider', 'skills')
31
+ ]
32
+ },
33
+ {
34
+ name: 'Cursor',
35
+ paths: [
36
+ path.join(process.cwd(), '.cursor', 'rules')
37
+ ]
38
+ },
39
+ {
40
+ name: 'OpenAI Codex',
41
+ paths: [
42
+ path.join(os.homedir(), '.codex', 'skills')
43
+ ]
44
+ },
45
+ {
46
+ name: 'GitHub Copilot',
47
+ paths: [
48
+ path.join(os.homedir(), '.copilot', 'skills')
49
+ ]
50
+ },
51
+ {
52
+ name: 'Windsurf',
53
+ paths: [
54
+ path.join(os.homedir(), '.windsurf', 'skills')
55
+ ]
56
+ },
57
+ {
58
+ name: 'Zed',
59
+ paths: [
60
+ path.join(os.homedir(), '.zed', 'skills')
61
+ ]
62
+ }
63
+ ];
64
+
65
+ function dirExists(dir) {
66
+ try {
67
+ return fs.statSync(dir).isDirectory();
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ function linkSkill(targetDir, agentName) {
74
+ const dest = path.join(targetDir, skillName);
75
+ if (fs.existsSync(dest)) {
76
+ console.log(`[SKIP] ${agentName}: ${dest} already exists`);
77
+ return;
78
+ }
79
+ try {
80
+ fs.mkdirSync(targetDir, { recursive: true });
81
+ fs.symlinkSync(skillDir, dest, 'junction');
82
+ console.log(`[OK] ${agentName}: linked to ${dest}`);
83
+ } catch (err) {
84
+ console.log(`[FAIL] ${agentName}: could not link to ${dest} (${err.message})`);
85
+ console.log(` Try copying manually: cp -r ${skillDir} ${dest}`);
86
+ }
87
+ }
88
+
89
+ function main() {
90
+ const isGlobal = process.argv.includes('--global') || process.argv.includes('-g');
91
+ const force = process.argv.includes('--force');
92
+
93
+ console.log(`Installing ${skillName}...`);
94
+ console.log(`Skill directory: ${skillDir}`);
95
+ console.log(`Mode: ${isGlobal ? 'global' : 'project-local'}`);
96
+ console.log('');
97
+
98
+ let installed = 0;
99
+ let skipped = 0;
100
+ let failed = 0;
101
+
102
+ for (const agent of agents) {
103
+ const targetDirs = isGlobal
104
+ ? agent.paths.filter(p => p.includes(os.homedir()))
105
+ : agent.paths;
106
+
107
+ for (const targetDir of targetDirs) {
108
+ if (!dirExists(targetDir) && !isGlobal) {
109
+ continue;
110
+ }
111
+ if (!dirExists(targetDir) && isGlobal) {
112
+ try {
113
+ fs.mkdirSync(targetDir, { recursive: true });
114
+ } catch {
115
+ console.log(`[SKIP] ${agent.name}: cannot create ${targetDir}`);
116
+ skipped++;
117
+ continue;
118
+ }
119
+ }
120
+
121
+ if (force && fs.existsSync(path.join(targetDir, skillName))) {
122
+ try {
123
+ fs.rmSync(path.join(targetDir, skillName), { recursive: true });
124
+ } catch {
125
+ console.log(`[FAIL] ${agent.name}: could not remove existing ${targetDir}/${skillName}`);
126
+ failed++;
127
+ continue;
128
+ }
129
+ }
130
+
131
+ linkSkill(targetDir, agent.name);
132
+ installed++;
133
+ }
134
+ }
135
+
136
+ console.log('');
137
+ console.log(`Done. Installed: ${installed}, Skipped: ${skipped}, Failed: ${failed}`);
138
+
139
+ if (installed > 0) {
140
+ console.log('');
141
+ console.log('Verify the installation by running:');
142
+ console.log(' pwsh init.ps1');
143
+ }
144
+ }
145
+
146
+ main();