cn-skill-sync 0.7.0__tar.gz
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.
- cn_skill_sync-0.7.0/LICENSE +21 -0
- cn_skill_sync-0.7.0/PKG-INFO +267 -0
- cn_skill_sync-0.7.0/README.md +237 -0
- cn_skill_sync-0.7.0/cn_skill_sync.egg-info/PKG-INFO +267 -0
- cn_skill_sync-0.7.0/cn_skill_sync.egg-info/SOURCES.txt +29 -0
- cn_skill_sync-0.7.0/cn_skill_sync.egg-info/dependency_links.txt +1 -0
- cn_skill_sync-0.7.0/cn_skill_sync.egg-info/entry_points.txt +2 -0
- cn_skill_sync-0.7.0/cn_skill_sync.egg-info/top_level.txt +1 -0
- cn_skill_sync-0.7.0/pyproject.toml +53 -0
- cn_skill_sync-0.7.0/setup.cfg +4 -0
- cn_skill_sync-0.7.0/setup.py +26 -0
- cn_skill_sync-0.7.0/src/__init__.py +12 -0
- cn_skill_sync-0.7.0/src/__main__.py +5 -0
- cn_skill_sync-0.7.0/src/config/__init__.py +4 -0
- cn_skill_sync-0.7.0/src/config/products.py +161 -0
- cn_skill_sync-0.7.0/src/controllers/__init__.py +4 -0
- cn_skill_sync-0.7.0/src/controllers/cli.py +258 -0
- cn_skill_sync-0.7.0/src/models/__init__.py +11 -0
- cn_skill_sync-0.7.0/src/models/product.py +25 -0
- cn_skill_sync-0.7.0/src/models/report.py +34 -0
- cn_skill_sync-0.7.0/src/services/__init__.py +4 -0
- cn_skill_sync-0.7.0/src/services/audit.py +361 -0
- cn_skill_sync-0.7.0/src/services/sync.py +722 -0
- cn_skill_sync-0.7.0/src/utils/__init__.py +4 -0
- cn_skill_sync-0.7.0/src/utils/filesystem.py +161 -0
- cn_skill_sync-0.7.0/tests/test_adopt.py +208 -0
- cn_skill_sync-0.7.0/tests/test_cli.py +77 -0
- cn_skill_sync-0.7.0/tests/test_core.py +289 -0
- cn_skill_sync-0.7.0/tests/test_products.py +105 -0
- cn_skill_sync-0.7.0/tests/test_security.py +176 -0
- cn_skill_sync-0.7.0/tests/test_utils.py +112 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Albert
|
|
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.
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cn-skill-sync
|
|
3
|
+
Version: 0.7.0
|
|
4
|
+
Summary: Cross-platform skill management for domestic AI agent products
|
|
5
|
+
Author-email: Albert <yxdwind@126.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/yxdwind/agent-skill-manager
|
|
8
|
+
Project-URL: Repository, https://github.com/yxdwind/agent-skill-manager
|
|
9
|
+
Project-URL: Documentation, https://github.com/yxdwind/agent-skill-manager#readme
|
|
10
|
+
Keywords: agent,agent-skills,skill,sync,autoclaw,kimi,minimax,workbuddy,trae,dumate,codebuddy,comate,qoder,qwenwork,doubaowork,cli,security-audit
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
15
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Classifier: Topic :: Utilities
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
Dynamic: requires-python
|
|
30
|
+
|
|
31
|
+
<div align="center">
|
|
32
|
+
|
|
33
|
+
<img src="docs/logo.png" alt="Agent Skill Manager logo" width="140"/>
|
|
34
|
+
|
|
35
|
+
# Agent Skill Manager
|
|
36
|
+
|
|
37
|
+
[English](README.en.md) | [简体中文](README.md)
|
|
38
|
+
|
|
39
|
+
[](https://www.python.org/)
|
|
40
|
+
[](https://github.com/yxdwind/agent-skill-manager)
|
|
41
|
+
[](LICENSE)
|
|
42
|
+
[](https://github.com/yxdwind/agent-skill-manager/actions/workflows/ci.yml)
|
|
43
|
+
[](#支持的产品)
|
|
44
|
+
|
|
45
|
+
**一次开发,十一端同步** — 跨平台统一管理国内 AI Agent 产品的 Skill 安装与同步
|
|
46
|
+
|
|
47
|
+
[安装](#安装) · [使用](#使用) · [二次开发](#二次开发) · [架构原理](#架构原理)
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 痛点
|
|
54
|
+
|
|
55
|
+
每个国产 AI Agent 产品都有自己独立的 skill 目录,开发一个 skill 要手动复制到每个产品:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
~/.openclaw/skills/my-skill/ ← AutoClaw
|
|
59
|
+
~/.config/agents/skills/my-skill/ ← Kimi
|
|
60
|
+
~/.workbuddy/skills/my-skill/ ← WorkBuddy
|
|
61
|
+
~/.trae/skills/my-skill/ ← Trae
|
|
62
|
+
~/.codebuddy/skills/my-skill/ ← CodeBuddy
|
|
63
|
+
~/.comate/skills/my-skill/ ← Comate
|
|
64
|
+
~/.qoderwork/skills/my-skill/ ← Qoder
|
|
65
|
+
... 每改一次都要重复一遍
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**agent-skill-manager** 用「中央仓库 + 一键分发」解决这个问题:改一处,全同步。
|
|
69
|
+
|
|
70
|
+
## 支持的产品(11 个)
|
|
71
|
+
|
|
72
|
+
| 产品 | 公司 | macOS 目录 | Windows 目录 | 同步方式 |
|
|
73
|
+
|------|------|-----------|-------------|----------|
|
|
74
|
+
| AutoClaw | 智谱 | `~/.openclaw/skills/` | `%USERPROFILE%\.openclaw\skills\` | symlink/junction |
|
|
75
|
+
| Kimi | 月之暗面 | `~/.config/agents/skills/` | `%USERPROFILE%\.config\agents\skills\` | symlink/junction |
|
|
76
|
+
| MiniMax Code | MiniMax | `~/.agents/skills/` | `%USERPROFILE%\.agents\skills\` | 原生支持 |
|
|
77
|
+
| WorkBuddy | 腾讯 | `~/.workbuddy/skills/` | `%USERPROFILE%\.workbuddy\skills\` | symlink + settings.json |
|
|
78
|
+
| Trae | 字节跳动 | `~/.trae/skills/` | `%USERPROFILE%\.trae\skills\` | symlink/junction |
|
|
79
|
+
| DuMate | 百度 | App 内管理 | App 内管理 | 打包 .zip 上传 |
|
|
80
|
+
| CodeBuddy | 腾讯 | `~/.codebuddy/skills/` | `%USERPROFILE%\.codebuddy\skills\` | symlink + settings.json |
|
|
81
|
+
| Comate / 文心快码 | 百度 | `~/.comate/skills/` | `%USERPROFILE%\.comate\skills\` | symlink/junction |
|
|
82
|
+
| Qoder / 通义灵码 | 阿里 | `~/.qoderwork/skills/` | `%USERPROFILE%\.qoderwork\skills\` | symlink/junction |
|
|
83
|
+
| QwenWork / 千问办公 | 阿里 | `~/.qwenworkcn/skills/` | `%USERPROFILE%\.qwenworkcn\skills\` | symlink/junction |
|
|
84
|
+
| DoubaoWork / 豆包工作 | 字节跳动 | `~/.super_doubao/super-doubao-runtime/workspace/.user_skills/` | `%LOCALAPPDATA%\DoubaoWork\User Data\Default\.doubaowork\agent_mode\workspace\.user_skills\` | symlink/junction |
|
|
85
|
+
|
|
86
|
+
## 架构原理
|
|
87
|
+
|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
**核心设计**:中央仓库 `~/.agents/skills/` 作为唯一权威源,通过 symlink(macOS)或 junction(Windows)自动分发到各产品。对不支持文件系统的 DuMate,打包为 .zip 手动上传;QwenWork/豆包工作 同样支持 junction 同步。
|
|
91
|
+
|
|
92
|
+
- **Windows**:使用 `mklink /J` 创建 junction,无需管理员权限
|
|
93
|
+
- **macOS**:使用 `ln -s` 创建 symlink
|
|
94
|
+
- **自动降级**:链接创建失败时自动降级为复制模式
|
|
95
|
+
- **零依赖**:仅使用 Python 标准库
|
|
96
|
+
|
|
97
|
+

|
|
98
|
+
|
|
99
|
+
## 安装
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# 开发模式安装(推荐)
|
|
103
|
+
# 从 PyPI 安装(推荐)
|
|
104
|
+
pip install askill
|
|
105
|
+
|
|
106
|
+
# 开发模式安装
|
|
107
|
+
cd agent-skill-manager
|
|
108
|
+
pip install -e .
|
|
109
|
+
|
|
110
|
+
# 如果 pip 遇到 TLS 证书问题
|
|
111
|
+
python -m pip install -e . --no-build-isolation
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
安装后 `askill` 命令全局可用。
|
|
115
|
+
|
|
116
|
+
也可以通过 `npx skills` 生态安装:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# 安装 skill 定义到所有支持的 agent 产品
|
|
120
|
+
npx skills add yxdwind/agent-skill-manager
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## 使用
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# 查看所有产品的 skill 安装状态(含安全评测评分列)
|
|
127
|
+
askill status
|
|
128
|
+
|
|
129
|
+
# 一键同步所有 skill 到所有产品
|
|
130
|
+
askill sync
|
|
131
|
+
|
|
132
|
+
# 同步指定 skill
|
|
133
|
+
askill sync my-skill
|
|
134
|
+
|
|
135
|
+
# 列出中央仓库中的所有 skill(含安全评测评分)
|
|
136
|
+
askill list
|
|
137
|
+
|
|
138
|
+
# 安装 skill(本地路径或 GitHub URL)
|
|
139
|
+
askill install /path/to/skill-folder
|
|
140
|
+
askill install --sync /path/to/skill-folder # 安装后自动同步到所有产品
|
|
141
|
+
askill install --audit /path/to/skill-folder # 安装后自动运行安全评测
|
|
142
|
+
askill install --sync --audit <github-url> # 同步 + 安全评测一起
|
|
143
|
+
|
|
144
|
+
# 支持多种 GitHub URL 格式(默认分支自动识别,无需手动指定 main/master)
|
|
145
|
+
askill install --sync https://github.com/user/repo # 仓库根目录的 SKILL.md
|
|
146
|
+
askill install --sync https://github.com/user/repo/tree/main/my-skill # 指定分支的子目录
|
|
147
|
+
askill install --sync https://github.com/user/repo/blob/main/my-skill/SKILL.md # 直达 SKILL.md 文件
|
|
148
|
+
|
|
149
|
+
# 从一个平台拉取 skill 到中央仓库,并同步到其他所有平台(adopt)
|
|
150
|
+
askill adopt autoclaw my-skill # 从 AutoClaw 采纳指定 skill
|
|
151
|
+
askill adopt kimi # 从 Kimi 采纳全部 skill
|
|
152
|
+
# 安全评测(静态分析:提示注入 / 危险代码 / 敏感信息 / 二进制文件)
|
|
153
|
+
askill audit # 评测中央仓库全部 skill
|
|
154
|
+
askill audit my-skill # 评测指定 skill
|
|
155
|
+
|
|
156
|
+
# 从所有产品移除 skill
|
|
157
|
+
askill remove my-skill
|
|
158
|
+
|
|
159
|
+
# 为 DuMate 打包 skill 为 .zip
|
|
160
|
+
askill pack my-skill
|
|
161
|
+
|
|
162
|
+
# 列出所有支持的产品
|
|
163
|
+
askill products
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### 典型工作流
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
1. askill status ← 检查各产品安装情况
|
|
170
|
+
2. 编辑 ~/.agents/skills/my-skill/SKILL.md
|
|
171
|
+
3. askill sync my-skill ← 一键分发到 10 个产品
|
|
172
|
+
4. askill pack my-skill ← 为 DuMate 生成 .zip
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## 项目结构
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
agent-skill-manager/
|
|
179
|
+
├── pyproject.toml # PEP 621 项目配置
|
|
180
|
+
├── setup.py # setuptools 兼容入口
|
|
181
|
+
├── docs/
|
|
182
|
+
│ ├── architecture.svg # 架构图
|
|
183
|
+
│ ├── demo.svg # 终端演示图
|
|
184
|
+
│ └── product-paths.md # 各产品详细路径参考
|
|
185
|
+
├── src/ # 包根(映射为 agent_skill_manager 包)
|
|
186
|
+
│ ├── __init__.py / __main__.py
|
|
187
|
+
│ ├── config/products.py # 11 个产品定义
|
|
188
|
+
│ ├── controllers/cli.py # CLI 命令(10 commands)
|
|
189
|
+
│ ├── models/ # TypedDict 数据模型
|
|
190
|
+
│ ├── services/ # 业务逻辑(sync / audit)
|
|
191
|
+
│ └── utils/filesystem.py # 跨平台文件操作
|
|
192
|
+
└── tests/ # 76 个测试
|
|
193
|
+
├── test_products.py
|
|
194
|
+
├── test_utils.py
|
|
195
|
+
├── test_core.py
|
|
196
|
+
├── test_adopt.py
|
|
197
|
+
├── test_security.py
|
|
198
|
+
└── test_cli.py
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## 安全评测(audit)
|
|
202
|
+
|
|
203
|
+
`askill audit` 对 skill 做**零依赖静态分析**,从 100 分起扣,按严重级别加权(每类封顶 40 分):
|
|
204
|
+
|
|
205
|
+
| 检测维度 | 严重级别 | 示例 |
|
|
206
|
+
|---------|---------|------|
|
|
207
|
+
| 提示注入 | critical | "ignore all previous instructions"、绕过安全护栏指令 |
|
|
208
|
+
| 危险代码 | critical/high | `curl \| sh`、`rm -rf /`、`exec()`、`shell=True` |
|
|
209
|
+
| 敏感信息 | high/medium | 读取 `~/.ssh`、硬编码 API key、webhook 外发 |
|
|
210
|
+
| 二进制文件 | high | .exe/.dll 等可执行文件混入 skill |
|
|
211
|
+
| 文件完整性 | high/medium | 缺少 SKILL.md、超大文件、符号链接 |
|
|
212
|
+
|
|
213
|
+
**评分与结论**:A ≥ 90(safe)· B ≥ 80(safe)· C ≥ 70(caution)· D ≥ 60(risky)· F < 60(dangerous)
|
|
214
|
+
|
|
215
|
+
`askill list` 和 `askill status` 的输出中也会直接带上每个 skill 的评分(score/grade/结论)。安装时可直接附加 `--audit` 一步完成「安装 + 安全评测」:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
askill install --sync --audit https://github.com/user/repo/tree/main/my-skill
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## 二次开发
|
|
222
|
+
|
|
223
|
+
### 添加新产品
|
|
224
|
+
|
|
225
|
+
编辑 `src/agent_skill_manager/products.py`,在 `PRODUCTS` 列表中添加:
|
|
226
|
+
|
|
227
|
+
```python
|
|
228
|
+
{
|
|
229
|
+
"name": "新产品名称",
|
|
230
|
+
"short": "short-name",
|
|
231
|
+
"macos_path": HOME / ".newproduct" / "skills",
|
|
232
|
+
"windows_path": HOME / ".newproduct" / "skills",
|
|
233
|
+
"sync_method": "symlink", # symlink | native | pack
|
|
234
|
+
"note": "说明信息",
|
|
235
|
+
"extra_dirs_macos": [],
|
|
236
|
+
"extra_dirs_windows": [],
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### 运行测试
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
pip install pytest
|
|
244
|
+
pytest tests/ -v
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## 相关项目
|
|
248
|
+
|
|
249
|
+
- [manage-my-skills](https://github.com/hchcx/manage-my-skills) — 跨平台 Skills 管理工具,支持 20+ 国际产品
|
|
250
|
+
- [awesome-agent-skills](https://github.com/libukai/awesome-agent-skills) — Agent Skills 终极指南
|
|
251
|
+
- [skills CLI](https://www.npmjs.com/package/skills) — npm 上的 agent skills 包管理器
|
|
252
|
+
- [skill-creator](https://github.com/yxdwind/agent-skill-manager) — Skill 编写规范参考
|
|
253
|
+
|
|
254
|
+
## 贡献者
|
|
255
|
+
|
|
256
|
+
感谢以下贡献者参与本项目开发:
|
|
257
|
+
|
|
258
|
+
- [**@GLM-5.2**](https://github.com/zai-org) — AI 协作开发(智谱 GLM-5.2)
|
|
259
|
+
|
|
260
|
+
## 安全与隐私
|
|
261
|
+
|
|
262
|
+
- [安全政策(SECURITY.md)](SECURITY.md) — 漏洞报告指引与安全建议
|
|
263
|
+
- [隐私政策(PRIVACY.md)](PRIVACY.md) — 数据本地处理说明
|
|
264
|
+
|
|
265
|
+
## 许可证
|
|
266
|
+
|
|
267
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="docs/logo.png" alt="Agent Skill Manager logo" width="140"/>
|
|
4
|
+
|
|
5
|
+
# Agent Skill Manager
|
|
6
|
+
|
|
7
|
+
[English](README.en.md) | [简体中文](README.md)
|
|
8
|
+
|
|
9
|
+
[](https://www.python.org/)
|
|
10
|
+
[](https://github.com/yxdwind/agent-skill-manager)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
[](https://github.com/yxdwind/agent-skill-manager/actions/workflows/ci.yml)
|
|
13
|
+
[](#支持的产品)
|
|
14
|
+
|
|
15
|
+
**一次开发,十一端同步** — 跨平台统一管理国内 AI Agent 产品的 Skill 安装与同步
|
|
16
|
+
|
|
17
|
+
[安装](#安装) · [使用](#使用) · [二次开发](#二次开发) · [架构原理](#架构原理)
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 痛点
|
|
24
|
+
|
|
25
|
+
每个国产 AI Agent 产品都有自己独立的 skill 目录,开发一个 skill 要手动复制到每个产品:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
~/.openclaw/skills/my-skill/ ← AutoClaw
|
|
29
|
+
~/.config/agents/skills/my-skill/ ← Kimi
|
|
30
|
+
~/.workbuddy/skills/my-skill/ ← WorkBuddy
|
|
31
|
+
~/.trae/skills/my-skill/ ← Trae
|
|
32
|
+
~/.codebuddy/skills/my-skill/ ← CodeBuddy
|
|
33
|
+
~/.comate/skills/my-skill/ ← Comate
|
|
34
|
+
~/.qoderwork/skills/my-skill/ ← Qoder
|
|
35
|
+
... 每改一次都要重复一遍
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**agent-skill-manager** 用「中央仓库 + 一键分发」解决这个问题:改一处,全同步。
|
|
39
|
+
|
|
40
|
+
## 支持的产品(11 个)
|
|
41
|
+
|
|
42
|
+
| 产品 | 公司 | macOS 目录 | Windows 目录 | 同步方式 |
|
|
43
|
+
|------|------|-----------|-------------|----------|
|
|
44
|
+
| AutoClaw | 智谱 | `~/.openclaw/skills/` | `%USERPROFILE%\.openclaw\skills\` | symlink/junction |
|
|
45
|
+
| Kimi | 月之暗面 | `~/.config/agents/skills/` | `%USERPROFILE%\.config\agents\skills\` | symlink/junction |
|
|
46
|
+
| MiniMax Code | MiniMax | `~/.agents/skills/` | `%USERPROFILE%\.agents\skills\` | 原生支持 |
|
|
47
|
+
| WorkBuddy | 腾讯 | `~/.workbuddy/skills/` | `%USERPROFILE%\.workbuddy\skills\` | symlink + settings.json |
|
|
48
|
+
| Trae | 字节跳动 | `~/.trae/skills/` | `%USERPROFILE%\.trae\skills\` | symlink/junction |
|
|
49
|
+
| DuMate | 百度 | App 内管理 | App 内管理 | 打包 .zip 上传 |
|
|
50
|
+
| CodeBuddy | 腾讯 | `~/.codebuddy/skills/` | `%USERPROFILE%\.codebuddy\skills\` | symlink + settings.json |
|
|
51
|
+
| Comate / 文心快码 | 百度 | `~/.comate/skills/` | `%USERPROFILE%\.comate\skills\` | symlink/junction |
|
|
52
|
+
| Qoder / 通义灵码 | 阿里 | `~/.qoderwork/skills/` | `%USERPROFILE%\.qoderwork\skills\` | symlink/junction |
|
|
53
|
+
| QwenWork / 千问办公 | 阿里 | `~/.qwenworkcn/skills/` | `%USERPROFILE%\.qwenworkcn\skills\` | symlink/junction |
|
|
54
|
+
| DoubaoWork / 豆包工作 | 字节跳动 | `~/.super_doubao/super-doubao-runtime/workspace/.user_skills/` | `%LOCALAPPDATA%\DoubaoWork\User Data\Default\.doubaowork\agent_mode\workspace\.user_skills\` | symlink/junction |
|
|
55
|
+
|
|
56
|
+
## 架构原理
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
**核心设计**:中央仓库 `~/.agents/skills/` 作为唯一权威源,通过 symlink(macOS)或 junction(Windows)自动分发到各产品。对不支持文件系统的 DuMate,打包为 .zip 手动上传;QwenWork/豆包工作 同样支持 junction 同步。
|
|
61
|
+
|
|
62
|
+
- **Windows**:使用 `mklink /J` 创建 junction,无需管理员权限
|
|
63
|
+
- **macOS**:使用 `ln -s` 创建 symlink
|
|
64
|
+
- **自动降级**:链接创建失败时自动降级为复制模式
|
|
65
|
+
- **零依赖**:仅使用 Python 标准库
|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
## 安装
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# 开发模式安装(推荐)
|
|
73
|
+
# 从 PyPI 安装(推荐)
|
|
74
|
+
pip install askill
|
|
75
|
+
|
|
76
|
+
# 开发模式安装
|
|
77
|
+
cd agent-skill-manager
|
|
78
|
+
pip install -e .
|
|
79
|
+
|
|
80
|
+
# 如果 pip 遇到 TLS 证书问题
|
|
81
|
+
python -m pip install -e . --no-build-isolation
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
安装后 `askill` 命令全局可用。
|
|
85
|
+
|
|
86
|
+
也可以通过 `npx skills` 生态安装:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# 安装 skill 定义到所有支持的 agent 产品
|
|
90
|
+
npx skills add yxdwind/agent-skill-manager
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 使用
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# 查看所有产品的 skill 安装状态(含安全评测评分列)
|
|
97
|
+
askill status
|
|
98
|
+
|
|
99
|
+
# 一键同步所有 skill 到所有产品
|
|
100
|
+
askill sync
|
|
101
|
+
|
|
102
|
+
# 同步指定 skill
|
|
103
|
+
askill sync my-skill
|
|
104
|
+
|
|
105
|
+
# 列出中央仓库中的所有 skill(含安全评测评分)
|
|
106
|
+
askill list
|
|
107
|
+
|
|
108
|
+
# 安装 skill(本地路径或 GitHub URL)
|
|
109
|
+
askill install /path/to/skill-folder
|
|
110
|
+
askill install --sync /path/to/skill-folder # 安装后自动同步到所有产品
|
|
111
|
+
askill install --audit /path/to/skill-folder # 安装后自动运行安全评测
|
|
112
|
+
askill install --sync --audit <github-url> # 同步 + 安全评测一起
|
|
113
|
+
|
|
114
|
+
# 支持多种 GitHub URL 格式(默认分支自动识别,无需手动指定 main/master)
|
|
115
|
+
askill install --sync https://github.com/user/repo # 仓库根目录的 SKILL.md
|
|
116
|
+
askill install --sync https://github.com/user/repo/tree/main/my-skill # 指定分支的子目录
|
|
117
|
+
askill install --sync https://github.com/user/repo/blob/main/my-skill/SKILL.md # 直达 SKILL.md 文件
|
|
118
|
+
|
|
119
|
+
# 从一个平台拉取 skill 到中央仓库,并同步到其他所有平台(adopt)
|
|
120
|
+
askill adopt autoclaw my-skill # 从 AutoClaw 采纳指定 skill
|
|
121
|
+
askill adopt kimi # 从 Kimi 采纳全部 skill
|
|
122
|
+
# 安全评测(静态分析:提示注入 / 危险代码 / 敏感信息 / 二进制文件)
|
|
123
|
+
askill audit # 评测中央仓库全部 skill
|
|
124
|
+
askill audit my-skill # 评测指定 skill
|
|
125
|
+
|
|
126
|
+
# 从所有产品移除 skill
|
|
127
|
+
askill remove my-skill
|
|
128
|
+
|
|
129
|
+
# 为 DuMate 打包 skill 为 .zip
|
|
130
|
+
askill pack my-skill
|
|
131
|
+
|
|
132
|
+
# 列出所有支持的产品
|
|
133
|
+
askill products
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 典型工作流
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
1. askill status ← 检查各产品安装情况
|
|
140
|
+
2. 编辑 ~/.agents/skills/my-skill/SKILL.md
|
|
141
|
+
3. askill sync my-skill ← 一键分发到 10 个产品
|
|
142
|
+
4. askill pack my-skill ← 为 DuMate 生成 .zip
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## 项目结构
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
agent-skill-manager/
|
|
149
|
+
├── pyproject.toml # PEP 621 项目配置
|
|
150
|
+
├── setup.py # setuptools 兼容入口
|
|
151
|
+
├── docs/
|
|
152
|
+
│ ├── architecture.svg # 架构图
|
|
153
|
+
│ ├── demo.svg # 终端演示图
|
|
154
|
+
│ └── product-paths.md # 各产品详细路径参考
|
|
155
|
+
├── src/ # 包根(映射为 agent_skill_manager 包)
|
|
156
|
+
│ ├── __init__.py / __main__.py
|
|
157
|
+
│ ├── config/products.py # 11 个产品定义
|
|
158
|
+
│ ├── controllers/cli.py # CLI 命令(10 commands)
|
|
159
|
+
│ ├── models/ # TypedDict 数据模型
|
|
160
|
+
│ ├── services/ # 业务逻辑(sync / audit)
|
|
161
|
+
│ └── utils/filesystem.py # 跨平台文件操作
|
|
162
|
+
└── tests/ # 76 个测试
|
|
163
|
+
├── test_products.py
|
|
164
|
+
├── test_utils.py
|
|
165
|
+
├── test_core.py
|
|
166
|
+
├── test_adopt.py
|
|
167
|
+
├── test_security.py
|
|
168
|
+
└── test_cli.py
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## 安全评测(audit)
|
|
172
|
+
|
|
173
|
+
`askill audit` 对 skill 做**零依赖静态分析**,从 100 分起扣,按严重级别加权(每类封顶 40 分):
|
|
174
|
+
|
|
175
|
+
| 检测维度 | 严重级别 | 示例 |
|
|
176
|
+
|---------|---------|------|
|
|
177
|
+
| 提示注入 | critical | "ignore all previous instructions"、绕过安全护栏指令 |
|
|
178
|
+
| 危险代码 | critical/high | `curl \| sh`、`rm -rf /`、`exec()`、`shell=True` |
|
|
179
|
+
| 敏感信息 | high/medium | 读取 `~/.ssh`、硬编码 API key、webhook 外发 |
|
|
180
|
+
| 二进制文件 | high | .exe/.dll 等可执行文件混入 skill |
|
|
181
|
+
| 文件完整性 | high/medium | 缺少 SKILL.md、超大文件、符号链接 |
|
|
182
|
+
|
|
183
|
+
**评分与结论**:A ≥ 90(safe)· B ≥ 80(safe)· C ≥ 70(caution)· D ≥ 60(risky)· F < 60(dangerous)
|
|
184
|
+
|
|
185
|
+
`askill list` 和 `askill status` 的输出中也会直接带上每个 skill 的评分(score/grade/结论)。安装时可直接附加 `--audit` 一步完成「安装 + 安全评测」:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
askill install --sync --audit https://github.com/user/repo/tree/main/my-skill
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## 二次开发
|
|
192
|
+
|
|
193
|
+
### 添加新产品
|
|
194
|
+
|
|
195
|
+
编辑 `src/agent_skill_manager/products.py`,在 `PRODUCTS` 列表中添加:
|
|
196
|
+
|
|
197
|
+
```python
|
|
198
|
+
{
|
|
199
|
+
"name": "新产品名称",
|
|
200
|
+
"short": "short-name",
|
|
201
|
+
"macos_path": HOME / ".newproduct" / "skills",
|
|
202
|
+
"windows_path": HOME / ".newproduct" / "skills",
|
|
203
|
+
"sync_method": "symlink", # symlink | native | pack
|
|
204
|
+
"note": "说明信息",
|
|
205
|
+
"extra_dirs_macos": [],
|
|
206
|
+
"extra_dirs_windows": [],
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 运行测试
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
pip install pytest
|
|
214
|
+
pytest tests/ -v
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## 相关项目
|
|
218
|
+
|
|
219
|
+
- [manage-my-skills](https://github.com/hchcx/manage-my-skills) — 跨平台 Skills 管理工具,支持 20+ 国际产品
|
|
220
|
+
- [awesome-agent-skills](https://github.com/libukai/awesome-agent-skills) — Agent Skills 终极指南
|
|
221
|
+
- [skills CLI](https://www.npmjs.com/package/skills) — npm 上的 agent skills 包管理器
|
|
222
|
+
- [skill-creator](https://github.com/yxdwind/agent-skill-manager) — Skill 编写规范参考
|
|
223
|
+
|
|
224
|
+
## 贡献者
|
|
225
|
+
|
|
226
|
+
感谢以下贡献者参与本项目开发:
|
|
227
|
+
|
|
228
|
+
- [**@GLM-5.2**](https://github.com/zai-org) — AI 协作开发(智谱 GLM-5.2)
|
|
229
|
+
|
|
230
|
+
## 安全与隐私
|
|
231
|
+
|
|
232
|
+
- [安全政策(SECURITY.md)](SECURITY.md) — 漏洞报告指引与安全建议
|
|
233
|
+
- [隐私政策(PRIVACY.md)](PRIVACY.md) — 数据本地处理说明
|
|
234
|
+
|
|
235
|
+
## 许可证
|
|
236
|
+
|
|
237
|
+
[MIT](LICENSE)
|