psmgr 1.0.0
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/.agents/rules/changelog-rules.md +38 -0
- package/.agents/rules/code-standards-rules.md +74 -0
- package/.agents/rules/project-rules.md +126 -0
- package/.agents/rules/skill-lifecycle-rules.md +34 -0
- package/.agents/rules/skill-scheduling-rules.md +119 -0
- package/.agents/rules/templates/code-standards-go.md +14 -0
- package/.agents/rules/templates/code-standards-node.md +14 -0
- package/.agents/rules/templates/code-standards-python.md +15 -0
- package/.agents/rules/templates/code-standards-rust.md +14 -0
- package/.agents/rules/templates/project-rules-base.md +119 -0
- package/.agents/rules/version-management-rules.md +85 -0
- package/.agents/skills/INDEX.md +160 -0
- package/.agents/skills/generating-changelogs/SKILL.md +87 -0
- package/.agents/skills/installing-project-skills/SKILL.md +274 -0
- package/.agents/skills/managing-project-skills/SKILL.md +97 -0
- package/.agents/skills/scheduling-project-skills/SKILL.md +70 -0
- package/.agents/skills-config.template.json +21 -0
- package/.agents/skills-registry.json +172 -0
- package/.agents/tools.json +70 -0
- package/LICENSE +21 -0
- package/README.md +133 -0
- package/bin/psm.js +2004 -0
- package/package.json +50 -0
- package/scripts/bootstrap.js +145 -0
- package/scripts/bootstrap.sh +157 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JiunianTV/Le-Skills/main/.agents/skills-registry.schema.json",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "项目自定义技能配置 — 覆盖/扩展 skills-registry.json 的全局设置",
|
|
5
|
+
"customSources": [
|
|
6
|
+
{
|
|
7
|
+
"name": "my-team-skills",
|
|
8
|
+
"url": "https://github.com/myorg/team-skills",
|
|
9
|
+
"ref": "main",
|
|
10
|
+
"description": "团队私有技能集",
|
|
11
|
+
"filter": "always",
|
|
12
|
+
"skills": [
|
|
13
|
+
"my-standards",
|
|
14
|
+
"my-deployment"
|
|
15
|
+
],
|
|
16
|
+
"tags": ["team", "private"]
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"ignore": [],
|
|
20
|
+
"alwaysInstall": []
|
|
21
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JiunianTV/Le-Skills/main/.agents/skills-registry.schema.json",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "PSM 技能注册中心 — 定义可安装的技能来源和过滤规则",
|
|
5
|
+
"sources": [
|
|
6
|
+
{
|
|
7
|
+
"name": "superpowers",
|
|
8
|
+
"url": "https://github.com/obra/superpowers",
|
|
9
|
+
"ref": "main",
|
|
10
|
+
"description": "通用工程技能集:TDD、系统调试、验证循环等",
|
|
11
|
+
"filter": "always",
|
|
12
|
+
"skills": [
|
|
13
|
+
"test-driven-development",
|
|
14
|
+
"systematic-debugging",
|
|
15
|
+
"verification-loop",
|
|
16
|
+
"flatten-with-flags",
|
|
17
|
+
"condition-based-waiting"
|
|
18
|
+
],
|
|
19
|
+
"tags": ["engineering", "general", "debugging", "testing"]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "karpathy",
|
|
23
|
+
"url": "https://github.com/multica-ai/andrej-karpathy-skills",
|
|
24
|
+
"ref": "main",
|
|
25
|
+
"description": "Karpathy 工程方法论:工程规范、调试、架构",
|
|
26
|
+
"filter": "always",
|
|
27
|
+
"skills": [
|
|
28
|
+
"karpathy-engineering",
|
|
29
|
+
"karpathy-debugging",
|
|
30
|
+
"karpathy-architecture"
|
|
31
|
+
],
|
|
32
|
+
"tags": ["engineering", "discipline", "architecture"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "ecc",
|
|
36
|
+
"url": "https://github.com/affaan-m/ECC",
|
|
37
|
+
"ref": "main",
|
|
38
|
+
"description": "框架级前端/后端技能:React、Vue、Jest、Cypress 等",
|
|
39
|
+
"filter": "tech-stack",
|
|
40
|
+
"match": {
|
|
41
|
+
"files": ["package.json"],
|
|
42
|
+
"dependencies": ["react", "vue", "next", "nuxt"]
|
|
43
|
+
},
|
|
44
|
+
"skills": [
|
|
45
|
+
"frontend-react",
|
|
46
|
+
"frontend-vue",
|
|
47
|
+
"testing-cypress",
|
|
48
|
+
"testing-jest",
|
|
49
|
+
"api-client",
|
|
50
|
+
"state-management"
|
|
51
|
+
],
|
|
52
|
+
"tags": ["frontend", "react", "vue", "testing"]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "impeccable",
|
|
56
|
+
"url": "https://github.com/pbakaus/impeccable",
|
|
57
|
+
"ref": "main",
|
|
58
|
+
"description": "高质量代码审查与 UI 设计技能",
|
|
59
|
+
"filter": "tech-stack",
|
|
60
|
+
"match": {
|
|
61
|
+
"files": ["package.json"],
|
|
62
|
+
"dependencies": ["react", "vue", "angular", "svelte"]
|
|
63
|
+
},
|
|
64
|
+
"skills": [
|
|
65
|
+
"impeccable-code-review",
|
|
66
|
+
"impeccable-ui"
|
|
67
|
+
],
|
|
68
|
+
"tags": ["code-review", "ui", "frontend"]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "taste-skill",
|
|
72
|
+
"url": "https://github.com/Leonxlnx/taste-skill",
|
|
73
|
+
"ref": "main",
|
|
74
|
+
"description": "设计品味与前端美学技能",
|
|
75
|
+
"filter": "tech-stack",
|
|
76
|
+
"match": {
|
|
77
|
+
"files": ["package.json"],
|
|
78
|
+
"dependencies": ["react", "vue", "angular", "svelte"]
|
|
79
|
+
},
|
|
80
|
+
"skills": [
|
|
81
|
+
"taste-frontend",
|
|
82
|
+
"taste-design"
|
|
83
|
+
],
|
|
84
|
+
"tags": ["design", "ui", "frontend", "ux"]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "gitnexus",
|
|
88
|
+
"url": "https://github.com/abhigyanpatwari/GitNexus",
|
|
89
|
+
"ref": "main",
|
|
90
|
+
"description": "Git 代码智能:blame、日志分析、变更影响",
|
|
91
|
+
"filter": "always",
|
|
92
|
+
"selfManaged": true,
|
|
93
|
+
"skills": [],
|
|
94
|
+
"tags": ["git", "intelligence", "analysis"]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "codegraph",
|
|
98
|
+
"url": "https://github.com/colbymchenry/codegraph",
|
|
99
|
+
"ref": "main",
|
|
100
|
+
"description": "符号搜索、调用图、影响分析",
|
|
101
|
+
"filter": "always",
|
|
102
|
+
"selfManaged": true,
|
|
103
|
+
"skills": [],
|
|
104
|
+
"tags": ["code-analysis", "graph", "dependency"]
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"customSources": {
|
|
108
|
+
"description": "用户可在此添加自定义技能源。安装时此文件不会被覆盖。",
|
|
109
|
+
"hint": "在项目根目录创建 .agents/skills-config.json 覆盖此列表"
|
|
110
|
+
},
|
|
111
|
+
"tools": {
|
|
112
|
+
"description": "技能依赖的工具定义 — CLI 和 MCP 两种安装方式",
|
|
113
|
+
"items": [
|
|
114
|
+
{
|
|
115
|
+
"name": "codegraph",
|
|
116
|
+
"description": "代码图谱:符号搜索、调用图、影响分析",
|
|
117
|
+
"homepage": "https://github.com/colbymchenry/codegraph",
|
|
118
|
+
"checkCommand": "codegraph --version 2>/dev/null || echo 'not-found'",
|
|
119
|
+
"commands": [
|
|
120
|
+
{ "cmd": "codegraph query", "description": "查询代码符号和关系" },
|
|
121
|
+
{ "cmd": "codegraph explore", "description": "交互式浏览代码图谱" },
|
|
122
|
+
{ "cmd": "codegraph index", "description": "索引当前项目的代码图谱" },
|
|
123
|
+
{ "cmd": "codegraph sync", "description": "同步代码变更到图谱" },
|
|
124
|
+
{ "cmd": "codegraph install", "description": "安装/配置 MCP 服务器" }
|
|
125
|
+
],
|
|
126
|
+
"cli": {
|
|
127
|
+
"description": "安装脚本(推荐,无需 Node.js)或 npm 全局安装",
|
|
128
|
+
"commands": [
|
|
129
|
+
"curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh",
|
|
130
|
+
"npm i -g @colbymchenry/codegraph"
|
|
131
|
+
],
|
|
132
|
+
"postInstall": "codegraph install"
|
|
133
|
+
},
|
|
134
|
+
"mcp": {
|
|
135
|
+
"description": "运行 codegraph install 自动配置当前 IDE 的 MCP",
|
|
136
|
+
"autoSetup": true,
|
|
137
|
+
"note": "支持 Claude Code / Cursor / Windsurf / Codex CLI 等"
|
|
138
|
+
},
|
|
139
|
+
"tags": ["code-analysis", "graph", "search"]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "gitnexus",
|
|
143
|
+
"description": "Git 代码智能:blame、日志分析、变更影响",
|
|
144
|
+
"homepage": "https://github.com/abhigyanpatwari/GitNexus",
|
|
145
|
+
"checkCommand": "gitnexus --version 2>/dev/null || echo 'not-found'",
|
|
146
|
+
"commands": [
|
|
147
|
+
{ "cmd": "gitnexus analyze", "description": "分析仓库并生成代码知识图谱" },
|
|
148
|
+
{ "cmd": "gitnexus blame", "description": "追查代码行变更历史" },
|
|
149
|
+
{ "cmd": "gitnexus log", "description": "查看 Git 提交日志" },
|
|
150
|
+
{ "cmd": "gitnexus diff", "description": "显示变更差异" },
|
|
151
|
+
{ "cmd": "gitnexus setup", "description": "配置 IDE MCP 集成" }
|
|
152
|
+
],
|
|
153
|
+
"cli": {
|
|
154
|
+
"description": "npm 全局安装",
|
|
155
|
+
"commands": [
|
|
156
|
+
"npm install -g gitnexus@latest"
|
|
157
|
+
],
|
|
158
|
+
"postInstall": "gitnexus setup"
|
|
159
|
+
},
|
|
160
|
+
"mcp": {
|
|
161
|
+
"description": "通过 npx 启动 MCP 服务器,自动配置到 IDE",
|
|
162
|
+
"config": {
|
|
163
|
+
"command": "npx",
|
|
164
|
+
"args": ["-y", "gitnexus@latest", "mcp"]
|
|
165
|
+
},
|
|
166
|
+
"note": "支持 Claude Code / Cursor / Windsurf 等"
|
|
167
|
+
},
|
|
168
|
+
"tags": ["git", "intelligence", "analysis"]
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"codegraph": {
|
|
3
|
+
"installed": true,
|
|
4
|
+
"mode": "cli",
|
|
5
|
+
"version": "1.0.1",
|
|
6
|
+
"path": "D:\\nodejs\\node_global\\codegraph\r",
|
|
7
|
+
"commands": [
|
|
8
|
+
{
|
|
9
|
+
"cmd": "codegraph query",
|
|
10
|
+
"description": "查询代码符号和关系",
|
|
11
|
+
"verified": true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"cmd": "codegraph explore",
|
|
15
|
+
"description": "交互式浏览代码图谱",
|
|
16
|
+
"verified": true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"cmd": "codegraph index",
|
|
20
|
+
"description": "索引当前项目的代码图谱",
|
|
21
|
+
"verified": true
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"cmd": "codegraph sync",
|
|
25
|
+
"description": "同步代码变更到图谱",
|
|
26
|
+
"verified": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"cmd": "codegraph install",
|
|
30
|
+
"description": "安装/配置 MCP 服务器",
|
|
31
|
+
"verified": true
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"verifiedAt": "2026-06-17T19:36:14.315Z"
|
|
35
|
+
},
|
|
36
|
+
"gitnexus": {
|
|
37
|
+
"installed": true,
|
|
38
|
+
"mode": "cli",
|
|
39
|
+
"version": "1.6.5",
|
|
40
|
+
"path": "D:\\nodejs\\node_global\\gitnexus\r",
|
|
41
|
+
"commands": [
|
|
42
|
+
{
|
|
43
|
+
"cmd": "gitnexus analyze",
|
|
44
|
+
"description": "分析仓库并生成代码知识图谱",
|
|
45
|
+
"verified": true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"cmd": "gitnexus blame",
|
|
49
|
+
"description": "追查代码行变更历史",
|
|
50
|
+
"verified": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"cmd": "gitnexus log",
|
|
54
|
+
"description": "查看 Git 提交日志",
|
|
55
|
+
"verified": true
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"cmd": "gitnexus diff",
|
|
59
|
+
"description": "显示变更差异",
|
|
60
|
+
"verified": true
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"cmd": "gitnexus setup",
|
|
64
|
+
"description": "配置 IDE MCP 集成",
|
|
65
|
+
"verified": true
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"verifiedAt": "2026-06-17T19:36:15.974Z"
|
|
69
|
+
}
|
|
70
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 JiunianTV
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# PSMgr (Project Skills Manager)
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/psmgr)
|
|
4
|
+
[](https://www.npmjs.com/package/psmgr)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
> **PSMgr** = **P**roject **S**kills **M**anager — AI Agent 技能与规则管理工具。
|
|
8
|
+
一行命令安装到任何项目,自动匹配技术栈、生成规则文件。
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 快速安装
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx psmgr install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
安装到其他目录:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx psmgr install ../my-project
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## CLI 命令参考
|
|
25
|
+
|
|
26
|
+
| 命令 | 作用 |
|
|
27
|
+
|------|------|
|
|
28
|
+
| `npx psmgr install [-y] [target]` | 安装技能和规则到目标项目 |
|
|
29
|
+
| `npx psmgr check [target]` | 检测安装状态并展示报告 |
|
|
30
|
+
| `npx psmgr info [target]` | 显示版本、环境、安装详情 |
|
|
31
|
+
| `npx psmgr list` | 显示当前包中包含的技能清单 |
|
|
32
|
+
| `npx psmgr outdated` | 检查 npm 是否有新版本 |
|
|
33
|
+
| `npx psmgr update` | 自更新到最新版本 |
|
|
34
|
+
| `npx psmgr version` | 显示版本号 |
|
|
35
|
+
| `npx psmgr help` | 显示帮助 |
|
|
36
|
+
|
|
37
|
+
### 选项
|
|
38
|
+
|
|
39
|
+
| 选项 | 说明 |
|
|
40
|
+
|------|------|
|
|
41
|
+
| `-y, --yes` | 静默模式,覆盖已安装的内容(用于 CI/脚本) |
|
|
42
|
+
|
|
43
|
+
## 安装到项目(其他方式)
|
|
44
|
+
|
|
45
|
+
### 方式一:npx(推荐)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx psmgr install
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
无需全局安装,零依赖,自动下载并运行。
|
|
52
|
+
|
|
53
|
+
### 方式二:Git 子目录复制
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git clone --depth 1 https://github.com/JiunianTV/Le-Skills.git .psm-tmp
|
|
57
|
+
cp -r .psm-tmp/.agents ./your-project/
|
|
58
|
+
cp -r .psm-tmp/scripts ./your-project/
|
|
59
|
+
rm -rf .psm-tmp
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 方式三:Git subtree(跟踪上游更新)
|
|
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
|
+
```
|
|
70
|
+
|
|
71
|
+
## 安装后的下一步
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# 1. 运行检测脚本
|
|
75
|
+
bash scripts/bootstrap.sh
|
|
76
|
+
|
|
77
|
+
# 2. 在 IDE 中输入以下指令:
|
|
78
|
+
# 「安装技能和规则」 — 首次安装/配置
|
|
79
|
+
# 「更新技能和规则」 — 升级已有技能
|
|
80
|
+
# 「卸载技能 xxx」 — 移除指定技能
|
|
81
|
+
# 「查看技能」 — 查看技能状态
|
|
82
|
+
# 「更新更新日志为 v1.0.0」 — 生成 CHANGELOG
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## 目录结构
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
PSM/
|
|
89
|
+
├── bin/
|
|
90
|
+
│ └── psm.js # CLI 入口(npm 发布)
|
|
91
|
+
├── .agents/
|
|
92
|
+
│ ├── skills/ # 规范化技能(每个 SKILL.md 含 YAML frontmatter)
|
|
93
|
+
│ │ ├── INDEX.md # 技能清单
|
|
94
|
+
│ │ ├── managing-project-skills/
|
|
95
|
+
│ │ ├── installing-project-skills/
|
|
96
|
+
│ │ ├── scheduling-project-skills/
|
|
97
|
+
│ │ └── generating-changelogs/
|
|
98
|
+
│ └── rules/ # 按需加载的规则
|
|
99
|
+
│ ├── project-rules.md # 全量加载 — 通用规范
|
|
100
|
+
│ ├── skill-lifecycle-rules.md
|
|
101
|
+
│ ├── skill-scheduling-rules.md
|
|
102
|
+
│ └── changelog-rules.md
|
|
103
|
+
├── scripts/
|
|
104
|
+
│ └── bootstrap.sh # 自举检测脚本
|
|
105
|
+
├── prompt/ # 完整版提示词(源文档)
|
|
106
|
+
│ ├── Flight-Translator.md
|
|
107
|
+
│ └── Project-Skills-Manager.md
|
|
108
|
+
└── package.json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## 规则加载机制
|
|
112
|
+
|
|
113
|
+
| 规则文件 | 加载方式 | 触发场景 |
|
|
114
|
+
|---------|---------|---------|
|
|
115
|
+
| `project-rules.md` | 全量加载 | 每次对话自动注入 |
|
|
116
|
+
| `skill-lifecycle-rules.md` | 按需 | 用户说安装/升级/卸载技能时 |
|
|
117
|
+
| `skill-scheduling-rules.md` | 按需 | 技能执行任务时 |
|
|
118
|
+
| `changelog-rules.md` | 按需 | 用户说更新更新日志时 |
|
|
119
|
+
|
|
120
|
+
## CI 集成
|
|
121
|
+
|
|
122
|
+
```yaml
|
|
123
|
+
# .github/workflows/check-skills.yml
|
|
124
|
+
steps:
|
|
125
|
+
- run: npx psmgr check # 使用 npx
|
|
126
|
+
- run: bash scripts/bootstrap.sh --check # 或直接使用脚本
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
技能未安装时 exit 1,已就绪 exit 0。
|
|
130
|
+
|
|
131
|
+
## 开源协议
|
|
132
|
+
|
|
133
|
+
MIT
|