psmgr 1.0.0 → 1.0.1
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 +104 -53
- package/package.json +50 -50
package/README.md
CHANGED
|
@@ -1,46 +1,94 @@
|
|
|
1
|
-
# PSMgr
|
|
1
|
+
# PSMgr — Project Skills Manager
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/psmgr)
|
|
4
4
|
[](https://www.npmjs.com/package/psmgr)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
>
|
|
8
|
-
一行命令安装到任何项目,自动匹配技术栈、生成规则文件。
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## 快速安装
|
|
7
|
+
> **一行命令**为任意项目注入 AI Agent 技能、规则和工具管理。
|
|
13
8
|
|
|
14
9
|
```bash
|
|
15
10
|
npx psmgr install
|
|
16
11
|
```
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
安装后,AI Agent(Cursor / Windsurf / Trae / Claude Code 等)自动具备:
|
|
14
|
+
- **技能树调度** — L0→L1→L2 分层路由,按意图自动匹配技能
|
|
15
|
+
- **按需加载规则** — 仅加载当前任务需要的规则文件,节省 token
|
|
16
|
+
- **技术栈自适应** — 根据 Node/Python/Rust/Go 生成项目专属规范
|
|
17
|
+
- **工具依赖管理** — codegraph、gitnexus 等 CLI/MCP 一键安装和验证
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
npx psmgr install ../my-project
|
|
22
|
-
```
|
|
19
|
+
---
|
|
23
20
|
|
|
24
|
-
## CLI
|
|
21
|
+
## CLI 命令
|
|
25
22
|
|
|
26
23
|
| 命令 | 作用 |
|
|
27
24
|
|------|------|
|
|
28
25
|
| `npx psmgr install [-y] [target]` | 安装技能和规则到目标项目 |
|
|
29
|
-
| `npx psmgr check [target]` |
|
|
26
|
+
| `npx psmgr check [target]` | 检测安装状态 |
|
|
30
27
|
| `npx psmgr info [target]` | 显示版本、环境、安装详情 |
|
|
31
|
-
| `npx psmgr list` |
|
|
28
|
+
| `npx psmgr list` | 列出本包携带的技能和规则 |
|
|
29
|
+
| `npx psmgr registry` | 查看技能注册中心(可用来源) |
|
|
30
|
+
| `npx psmgr discover [target]` | 根据项目技术栈推荐匹配技能 |
|
|
31
|
+
| `npx psmgr tool list [target]` | 查看工具安装状态和可用命令 |
|
|
32
|
+
| `npx psmgr tool install <name> [target]` | 安装工具(CLI 或 MCP,交互式选择) |
|
|
33
|
+
| `npx psmgr tool verify [target]` | 验证已安装工具的所有子命令可用性 |
|
|
34
|
+
| `npx psmgr tool setup [target]` | 扫描技能依赖,批量安装缺失工具 |
|
|
32
35
|
| `npx psmgr outdated` | 检查 npm 是否有新版本 |
|
|
33
36
|
| `npx psmgr update` | 自更新到最新版本 |
|
|
34
|
-
| `npx psmgr version` | 显示版本号 |
|
|
35
|
-
| `npx psmgr help` | 显示帮助 |
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
> 静默模式:`npx psmgr install -y`,跳过确认,适用于 CI。
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 安装后获得什么
|
|
43
|
+
|
|
44
|
+
### 🌳 技能树(L0 → L1 → L2 分层调度)
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
L0: managing-project-skills(入口)
|
|
48
|
+
├── L1: 🔧 生命周期管理 → L2: installing-project-skills
|
|
49
|
+
├── L1: 📋 任务调度 → L2: scheduling-project-skills
|
|
50
|
+
└── L1: 📦 版本发布 → L2: generating-changelogs
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Agent 读取 `INDEX.md` → 匹配用户意图 → 自动加载对应 SKILL.md 执行。
|
|
54
|
+
|
|
55
|
+
### ⚡ 按需加载规则
|
|
56
|
+
|
|
57
|
+
| 规则文件 | 加载方式 | 触发场景 |
|
|
58
|
+
|---------|---------|---------|
|
|
59
|
+
| `project-rules.md` | **全量加载** | 每次对话自动注入(含技术栈专属规范) |
|
|
60
|
+
| `skill-lifecycle-rules.md` | 按需 | 用户说安装/升级/卸载技能 |
|
|
61
|
+
| `skill-scheduling-rules.md` | 按需 | 技能执行任务时编排调度 |
|
|
62
|
+
| `changelog-rules.md` | 按需 | 更新更新日志 |
|
|
63
|
+
| `code-standards-rules.md` | 按需 | 修改代码时 |
|
|
64
|
+
| `version-management-rules.md` | 按需 | 版本发布时 |
|
|
65
|
+
|
|
66
|
+
### 🔧 工具管理
|
|
67
|
+
|
|
68
|
+
| 工具 | 用途 | 安装方式 |
|
|
69
|
+
|------|------|---------|
|
|
70
|
+
| **codegraph** | 符号搜索、调用图、影响分析 | `psm tool install codegraph`(CLI/MCP 可选) |
|
|
71
|
+
| **gitnexus** | Git blame、日志分析、变更影响 | `psm tool install gitnexus`(CLI/MCP 可选) |
|
|
72
|
+
|
|
73
|
+
安装后自动记录路径、验证子命令、写入 `tools.json`,技能可直接调用。
|
|
74
|
+
|
|
75
|
+
---
|
|
42
76
|
|
|
43
|
-
##
|
|
77
|
+
## 技术栈自适应
|
|
78
|
+
|
|
79
|
+
安装时自动检测项目类型,生成对应的 `project-rules.md`:
|
|
80
|
+
|
|
81
|
+
| 检测文件 | 项目类型 | 注入规范 |
|
|
82
|
+
|---------|---------|---------|
|
|
83
|
+
| `package.json` | Node.js / Frontend | ES6+、TypeScript strict、ESLint、Jest/Vitest |
|
|
84
|
+
| `pyproject.toml` / `requirements.txt` | Python | PEP 8、类型注解、Black + Ruff、pytest |
|
|
85
|
+
| `Cargo.toml` | Rust | rustfmt、clippy、Result 处理、cargo test |
|
|
86
|
+
| `go.mod` | Go | gofmt、go vet、显式错误处理、slog |
|
|
87
|
+
| 无匹配 | unknown | 通用规范 |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 安装方式
|
|
44
92
|
|
|
45
93
|
### 方式一:npx(推荐)
|
|
46
94
|
|
|
@@ -50,23 +98,22 @@ npx psmgr install
|
|
|
50
98
|
|
|
51
99
|
无需全局安装,零依赖,自动下载并运行。
|
|
52
100
|
|
|
101
|
+
安装到其他目录:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npx psmgr install ../my-project
|
|
105
|
+
```
|
|
106
|
+
|
|
53
107
|
### 方式二:Git 子目录复制
|
|
54
108
|
|
|
55
109
|
```bash
|
|
56
|
-
git clone --depth 1 https://github.com/
|
|
110
|
+
git clone --depth 1 https://github.com/JiuNian090/PSM.git .psm-tmp
|
|
57
111
|
cp -r .psm-tmp/.agents ./your-project/
|
|
58
112
|
cp -r .psm-tmp/scripts ./your-project/
|
|
59
113
|
rm -rf .psm-tmp
|
|
60
114
|
```
|
|
61
115
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
git subtree add --prefix=.psm \
|
|
66
|
-
https://github.com/JiunianTV/Le-Skills.git main --squash
|
|
67
|
-
ln -sf .psm/.agents .agents
|
|
68
|
-
ln -sf .psm/scripts scripts
|
|
69
|
-
```
|
|
116
|
+
---
|
|
70
117
|
|
|
71
118
|
## 安装后的下一步
|
|
72
119
|
|
|
@@ -79,55 +126,59 @@ bash scripts/bootstrap.sh
|
|
|
79
126
|
# 「更新技能和规则」 — 升级已有技能
|
|
80
127
|
# 「卸载技能 xxx」 — 移除指定技能
|
|
81
128
|
# 「查看技能」 — 查看技能状态
|
|
129
|
+
# 「有什么技能适合我」— 技能发现
|
|
82
130
|
# 「更新更新日志为 v1.0.0」 — 生成 CHANGELOG
|
|
83
131
|
```
|
|
84
132
|
|
|
133
|
+
---
|
|
134
|
+
|
|
85
135
|
## 目录结构
|
|
86
136
|
|
|
87
137
|
```
|
|
88
|
-
|
|
138
|
+
PSMgr/
|
|
89
139
|
├── bin/
|
|
90
|
-
│ └── psm.js
|
|
140
|
+
│ └── psm.js # CLI 入口
|
|
91
141
|
├── .agents/
|
|
92
|
-
│ ├── skills/ #
|
|
93
|
-
│ │ ├── INDEX.md #
|
|
142
|
+
│ ├── skills/ # 技能(每个目录一个 SKILL.md)
|
|
143
|
+
│ │ ├── INDEX.md # 技能树 + 导航
|
|
94
144
|
│ │ ├── managing-project-skills/
|
|
95
145
|
│ │ ├── installing-project-skills/
|
|
96
146
|
│ │ ├── scheduling-project-skills/
|
|
97
147
|
│ │ └── generating-changelogs/
|
|
98
|
-
│
|
|
99
|
-
│
|
|
100
|
-
│
|
|
101
|
-
│
|
|
102
|
-
│
|
|
148
|
+
│ ├── rules/ # 规则(按需加载)
|
|
149
|
+
│ │ ├── project-rules.md
|
|
150
|
+
│ │ ├── skill-lifecycle-rules.md
|
|
151
|
+
│ │ ├── skill-scheduling-rules.md
|
|
152
|
+
│ │ ├── changelog-rules.md
|
|
153
|
+
│ │ ├── code-standards-rules.md
|
|
154
|
+
│ │ ├── version-management-rules.md
|
|
155
|
+
│ │ └── templates/ # 技术栈规范模板
|
|
156
|
+
│ ├── skills-registry.json # 技能注册中心
|
|
157
|
+
│ ├── skills-config.template.json
|
|
158
|
+
│ └── tools.json # 已安装工具索引
|
|
103
159
|
├── scripts/
|
|
104
|
-
│
|
|
105
|
-
|
|
106
|
-
|
|
160
|
+
│ ├── bootstrap.js
|
|
161
|
+
│ └── bootstrap.sh
|
|
162
|
+
├── prompt/
|
|
107
163
|
│ └── Project-Skills-Manager.md
|
|
108
164
|
└── package.json
|
|
109
165
|
```
|
|
110
166
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
| 规则文件 | 加载方式 | 触发场景 |
|
|
114
|
-
|---------|---------|---------|
|
|
115
|
-
| `project-rules.md` | 全量加载 | 每次对话自动注入 |
|
|
116
|
-
| `skill-lifecycle-rules.md` | 按需 | 用户说安装/升级/卸载技能时 |
|
|
117
|
-
| `skill-scheduling-rules.md` | 按需 | 技能执行任务时 |
|
|
118
|
-
| `changelog-rules.md` | 按需 | 用户说更新更新日志时 |
|
|
167
|
+
---
|
|
119
168
|
|
|
120
169
|
## CI 集成
|
|
121
170
|
|
|
122
171
|
```yaml
|
|
123
172
|
# .github/workflows/check-skills.yml
|
|
124
173
|
steps:
|
|
125
|
-
- run: npx psmgr check
|
|
126
|
-
- run: bash scripts/bootstrap.sh --check
|
|
174
|
+
- run: npx psmgr check
|
|
175
|
+
- run: bash scripts/bootstrap.sh --check
|
|
127
176
|
```
|
|
128
177
|
|
|
129
178
|
技能未安装时 exit 1,已就绪 exit 0。
|
|
130
179
|
|
|
131
|
-
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 协议
|
|
132
183
|
|
|
133
184
|
MIT
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "psmgr",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "PSMgr (Project Skills Manager) — one command to install AI agent skills & rules into any project",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"psmgr",
|
|
8
|
-
"psm",
|
|
9
|
-
"project-skills-manager",
|
|
10
|
-
"ai-skills",
|
|
11
|
-
"project-skills",
|
|
12
|
-
"agent-skills",
|
|
13
|
-
"claude-skills",
|
|
14
|
-
"cursor-skills",
|
|
15
|
-
"windsurf-skills",
|
|
16
|
-
"skills-manager",
|
|
17
|
-
"bootstrap",
|
|
18
|
-
"agent-rules"
|
|
19
|
-
],
|
|
20
|
-
"homepage": "https://github.com/
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/
|
|
23
|
-
},
|
|
24
|
-
"license": "MIT",
|
|
25
|
-
"author": "JiunianTV",
|
|
26
|
-
"bin": {
|
|
27
|
-
"psm": "bin/psm.js"
|
|
28
|
-
},
|
|
29
|
-
"files": [
|
|
30
|
-
"bin/",
|
|
31
|
-
".agents/",
|
|
32
|
-
"scripts/",
|
|
33
|
-
"LICENSE",
|
|
34
|
-
"README.md"
|
|
35
|
-
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"bootstrap": "node scripts/bootstrap.js",
|
|
38
|
-
"bootstrap:check": "node scripts/bootstrap.js --check"
|
|
39
|
-
},
|
|
40
|
-
"engines": {
|
|
41
|
-
"node": ">=18"
|
|
42
|
-
},
|
|
43
|
-
"repository": {
|
|
44
|
-
"type": "git",
|
|
45
|
-
"url": "git+https://github.com/
|
|
46
|
-
},
|
|
47
|
-
"publishConfig": {
|
|
48
|
-
"access": "public"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "psmgr",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "PSMgr (Project Skills Manager) — one command to install AI agent skills & rules into any project",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"psmgr",
|
|
8
|
+
"psm",
|
|
9
|
+
"project-skills-manager",
|
|
10
|
+
"ai-skills",
|
|
11
|
+
"project-skills",
|
|
12
|
+
"agent-skills",
|
|
13
|
+
"claude-skills",
|
|
14
|
+
"cursor-skills",
|
|
15
|
+
"windsurf-skills",
|
|
16
|
+
"skills-manager",
|
|
17
|
+
"bootstrap",
|
|
18
|
+
"agent-rules"
|
|
19
|
+
],
|
|
20
|
+
"homepage": "https://github.com/JiuNian090/PSM",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/JiuNian090/PSM/issues"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "JiunianTV",
|
|
26
|
+
"bin": {
|
|
27
|
+
"psm": "bin/psm.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"bin/",
|
|
31
|
+
".agents/",
|
|
32
|
+
"scripts/",
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"bootstrap": "node scripts/bootstrap.js",
|
|
38
|
+
"bootstrap:check": "node scripts/bootstrap.js --check"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18"
|
|
42
|
+
},
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "git+https://github.com/JiuNian090/PSM.git"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
}
|
|
50
|
+
}
|