dsh-skills-tools 1.0.0 → 1.1.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/README.en.md +100 -53
- package/README.md +102 -122
- package/client/client.js +342 -17
- package/lib/index.js +3 -0
- package/lib/manager.js +209 -2
- package/lib/routes.js +16 -0
- package/lib/state.js +2 -1
- package/package.json +2 -2
package/README.en.md
CHANGED
|
@@ -1,80 +1,127 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/logo.png" width="72" height="72" alt="dsh-skills-tools" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">dsh-skills-tools</h1>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>Skills manager for DeepSeek Harness.</b><br />
|
|
9
|
+
Import Agent Skills from Git repositories or local folders, manage them by repository, and enable, disable, complete or inspect them at any time.
|
|
10
|
+
</p>
|
|
7
11
|
|
|
8
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/dsh-skills-tools"><img src="https://img.shields.io/npm/v/dsh-skills-tools?color=black" alt="npm version" /></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/dsh-skills-tools"><img src="https://img.shields.io/npm/dm/dsh-skills-tools?color=black" alt="npm downloads" /></a>
|
|
15
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-black.svg" alt="license" /></a>
|
|
16
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22.13-black.svg" alt="node" /></a>
|
|
17
|
+
<a href="https://github.com/hxlog/dsh-skills-tools"><img src="https://img.shields.io/badge/GitHub-hxlog%2Fdsh--skills--tools-black?logo=github" alt="GitHub" /></a>
|
|
18
|
+
</p>
|
|
9
19
|
|
|
10
|
-
|
|
20
|
+
<p align="center">
|
|
21
|
+
<a href="https://github.com/hxlog/dsh-skills-tools">GitHub</a> ·
|
|
22
|
+
<a href="https://www.npmjs.com/package/dsh-skills-tools">npm</a> ·
|
|
23
|
+
<a href="https://github.com/hxlog/dsh-skills-tools/issues">Issues</a> ·
|
|
24
|
+
<a href="README.md">中文</a>
|
|
25
|
+
</p>
|
|
11
26
|
|
|
12
|
-
|
|
27
|
+
<p align="center">
|
|
28
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/screenshots/skills-overview.png" width="49%" alt="Skills grouped by repository" />
|
|
29
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/screenshots/skill-content.png" width="49%" alt="Expanded SKILL.md content" />
|
|
30
|
+
</p>
|
|
13
31
|
|
|
14
|
-
|
|
15
|
-
2. **Enable / disable** instantly; the DSH catalog is invalidated and disabled skills never reach the model context.
|
|
16
|
-
3. **Read-only snapshots**: each repository is copied by commit into the data folder; the source is never modified.
|
|
17
|
-
4. **Content-addressed updates**: check the remote head, then switch snapshots only after a successful clone.
|
|
18
|
-
5. **Resources keep working**: skills register with resourceBase = { kind: "directory", path: snapshot/skill }, so ../../assets and ../check/... references resolve.
|
|
32
|
+
> Disabled skills are not registered with the model: no context cost, no accidental calls.
|
|
19
33
|
|
|
20
|
-
##
|
|
34
|
+
## ✨ Features
|
|
21
35
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
36
|
+
| Capability | Details |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| **Grouped by repository** | Skills are grouped into collapsible repository cards. Repositories with enabled skills come first; inside a repository, enabled skills come first. |
|
|
39
|
+
| **Import the rest later** | A partially imported repository shows "N available". Click **Import more** to pick the remaining skills from the existing snapshot — no re-clone. |
|
|
40
|
+
| **Repository switch** | Enable or disable every skill in a repository at once; the switch shows a mixed state when only some skills are enabled. |
|
|
41
|
+
| **Inline content** | The chevron on each row expands the SKILL.md text, source repository, commit, path and update time, with update and remove actions. |
|
|
42
|
+
| **Git import and snapshots** | https / ssh / intranet repositories, branches, tags, commits and subdirectories. Imports are read-only snapshots; source repositories are never modified. |
|
|
43
|
+
| **Update checks** | Compare the remote head and switch snapshots only after a successful clone. |
|
|
25
44
|
|
|
26
|
-
|
|
45
|
+
<p align="center">
|
|
46
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/screenshots/import-more.png" width="49%" alt="Import remaining skills from a repository" />
|
|
47
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/screenshots/import-dialog.png" width="49%" alt="Import skills" />
|
|
48
|
+
</p>
|
|
27
49
|
|
|
28
|
-
|
|
29
|
-
- id: skills-tools
|
|
30
|
-
name: dsh-skills-tools
|
|
50
|
+
## 🚀 Install
|
|
31
51
|
|
|
32
|
-
|
|
52
|
+
Requires **DeepSeek Harness 0.2.x** (Web GUI `dsh web` or DSH Desktop) and **Node.js ≥ 22.13**. Published on npm: [dsh-skills-tools](https://www.npmjs.com/package/dsh-skills-tools).
|
|
33
53
|
|
|
34
|
-
|
|
54
|
+
> ⚠️ This is a **DeepSeek Harness plugin**, not a normal npm library: `npm i dsh-skills-tools` only downloads the package, it still has to be installed into a DSH profile.
|
|
35
55
|
|
|
36
|
-
|
|
37
|
-
2. Optionally pin a ref (branch / tag / commit) or a subdirectory.
|
|
38
|
-
3. **Scan**, select skills (duplicate names get an editable suggestion), then **Install selected**.
|
|
39
|
-
4. Toggle rows on/off, search and filter, expand a row to read SKILL.md or update/remove it.
|
|
40
|
-
5. **Check updates** marks skills whose repository has a newer commit; **Update from upstream** clones and switches the snapshot.
|
|
56
|
+
**Install from the plugin page (recommended)**
|
|
41
57
|
|
|
42
|
-
|
|
58
|
+
1. Open DSH Web (or DSH Desktop) → **Plugins** (Desktop: **Settings → Plugins**).
|
|
59
|
+
2. Click install, enter `dsh-skills-tools`, confirm.
|
|
60
|
+
3. Enable the new bundle, refresh, then open **Settings → Skills**.
|
|
43
61
|
|
|
44
|
-
|
|
62
|
+
**Install from the CLI**
|
|
45
63
|
|
|
46
|
-
|
|
64
|
+
```bash
|
|
65
|
+
dsh plugin add dsh-skills-tools # default profile
|
|
66
|
+
dsh plugin --profile web add dsh-skills-tools # Web
|
|
67
|
+
dsh plugin --profile desktop add dsh-skills-tools # Desktop
|
|
68
|
+
```
|
|
47
69
|
|
|
48
|
-
|
|
70
|
+
Current version **1.1.0**: grouped by repository, repository switch, and completing skills from an existing snapshot.
|
|
49
71
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
→ scan SKILL.md (skips .git and symlinks, bounded depth/files)
|
|
54
|
-
→ $DSH_HOME/dsh-skills-tools/state.json repos + skills + enabled
|
|
55
|
-
→ ctx.skills.registerProvider(rank 350)
|
|
56
|
-
→ DSH catalog (enabled skills with an existing SKILL.md only)
|
|
72
|
+
> Restart `dsh web` / DSH Desktop after upgrading.
|
|
73
|
+
>
|
|
74
|
+
> `dsh plugin add` only installs the package; it does not enable the bundle. Enable it once in the plugin page, or make sure `dsh-skills-tools` is in `dsh.profile.bundles`.
|
|
57
75
|
|
|
58
|
-
|
|
76
|
+
## ⚡ Quick start
|
|
59
77
|
|
|
60
|
-
|
|
78
|
+
1. **Settings → Skills → Import skills**: paste a Git URL (`https://`, `git@`, `file://` or a local absolute path). Intranet repositories use your local git credentials.
|
|
79
|
+
2. Optionally set a **branch / tag / commit** and **subdirectory**, click **Scan**, select skills (duplicate names get an editable suggestion) and click **Install selected**. Installed skills are enabled.
|
|
80
|
+
3. Manage by repository: the repository switch toggles all its skills, row switches toggle one, **Import more** completes partially imported repositories, and the chevron shows the content.
|
|
61
81
|
|
|
62
|
-
##
|
|
82
|
+
## 🧩 How it works
|
|
63
83
|
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
-
|
|
84
|
+
```
|
|
85
|
+
~/.dsh/dsh-skills-tools/
|
|
86
|
+
├── state.json repositories, skills, enabled state
|
|
87
|
+
└── repos/<repo>-<commit>/ read-only snapshot
|
|
88
|
+
```
|
|
68
89
|
|
|
69
|
-
|
|
90
|
+
- **Snapshot isolation**: every import or update copies the repository into the data folder. Removing a skill only changes state.
|
|
91
|
+
- **Registration-time toggles**: enabled state decides whether a skill is registered with the DSH skill catalog; disabled skills never reach the model.
|
|
92
|
+
- **REST API**: `GET /skills-tools/api/state`, `POST /import/scan|commit`, `POST /repos/inspect|import|toggle|check-updates`, `POST /skills/toggle|bulk|remove|update`, `POST /refresh`, `GET /logs`. See [docs/API.md](docs/API.md).
|
|
70
93
|
|
|
71
|
-
|
|
72
|
-
npm run test:manager
|
|
73
|
-
npm run ci-check
|
|
74
|
-
node scripts/build-client.mjs
|
|
94
|
+
## 🔒 Security
|
|
75
95
|
|
|
76
|
-
|
|
96
|
+
- **No tokens stored**: git authentication stays with your credential helper or SSH key.
|
|
97
|
+
- **Read-only snapshots**: imports and updates never modify your repositories.
|
|
98
|
+
- **No telemetry**: no network requests besides the Git repositories you configure.
|
|
77
99
|
|
|
78
|
-
##
|
|
100
|
+
## 📋 Requirements and limits
|
|
79
101
|
|
|
80
|
-
|
|
102
|
+
- **Runtime**: DeepSeek Harness 0.2.x (Web or Desktop), **Node.js ≥ 22.13**
|
|
103
|
+
- **Platforms**: DSH Web (`--profile web`) and DSH Desktop (`--profile desktop`)
|
|
104
|
+
- **Files**: reads and writes `~/.dsh/dsh-skills-tools/`; reads the local folder only when you import one
|
|
105
|
+
- **Network**: only the Git repositories you configure, during import and update checks
|
|
106
|
+
- **Processes**: invokes local `git` for import and update checks
|
|
107
|
+
|
|
108
|
+
**Known limits**
|
|
109
|
+
|
|
110
|
+
- Manages the skills of the current DSH profile only
|
|
111
|
+
- Git sources require local `git`; intranet repositories need working credentials
|
|
112
|
+
- Content preview is capped at 64 KiB
|
|
113
|
+
|
|
114
|
+
## ❓ FAQ
|
|
115
|
+
|
|
116
|
+
| Question | Answer |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| No Skills section in Settings | The bundle is probably not enabled. Enable it in the plugin page, refresh, then restart `dsh web` if needed. |
|
|
119
|
+
| Import fails | Complete git authentication first; verify the branch / subdirectory and that the repository contains SKILL.md files. |
|
|
120
|
+
| Can the model still call a disabled skill? | No. Disabled skills are not registered. |
|
|
121
|
+
| Where is the data? | `~/.dsh/dsh-skills-tools/state.json`; delete it to reset. |
|
|
122
|
+
|
|
123
|
+
## 📄 License
|
|
124
|
+
|
|
125
|
+
[MIT](LICENSE) · Powered by [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
126
|
+
|
|
127
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
package/README.md
CHANGED
|
@@ -1,158 +1,138 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/logo.png" width="72" height="72" alt="dsh-skills-tools" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">dsh-skills-tools</h1>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>DeepSeek Harness 的 Skills 管理器。</b><br />
|
|
9
|
+
从 Git 仓库或本机目录导入 Agent Skills,按仓库分组管理,随时启用、停用、补齐和查看内容。
|
|
10
|
+
</p>
|
|
7
11
|
|
|
8
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/dsh-skills-tools"><img src="https://img.shields.io/npm/v/dsh-skills-tools?color=black" alt="npm version" /></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/dsh-skills-tools"><img src="https://img.shields.io/npm/dm/dsh-skills-tools?color=black" alt="npm downloads" /></a>
|
|
15
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-black.svg" alt="license" /></a>
|
|
16
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22.13-black.svg" alt="node" /></a>
|
|
17
|
+
<a href="https://github.com/hxlog/dsh-skills-tools"><img src="https://img.shields.io/badge/GitHub-hxlog%2Fdsh--skills--tools-black?logo=github" alt="GitHub" /></a>
|
|
18
|
+
</p>
|
|
9
19
|
|
|
10
|
-
|
|
20
|
+
<p align="center">
|
|
21
|
+
<a href="https://github.com/hxlog/dsh-skills-tools">GitHub 仓库</a> ·
|
|
22
|
+
<a href="https://www.npmjs.com/package/dsh-skills-tools">npm</a> ·
|
|
23
|
+
<a href="https://github.com/hxlog/dsh-skills-tools/issues">问题反馈</a> ·
|
|
24
|
+
<a href="README.en.md">English</a>
|
|
25
|
+
</p>
|
|
11
26
|
|
|
12
|
-
|
|
27
|
+
<p align="center">
|
|
28
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/screenshots/skills-overview.png" width="49%" alt="按仓库分组的技能列表" />
|
|
29
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/screenshots/skill-content.png" width="49%" alt="展开查看 SKILL.md 内容" />
|
|
30
|
+
</p>
|
|
13
31
|
|
|
14
|
-
|
|
15
|
-
2. **启用 / 停用**:开关即时生效并让 DSH 技能目录失效重载;停用的技能不会进入模型上下文。
|
|
16
|
-
3. **只读快照**:仓库按提交复制到数据目录,原目录与远端永远不被修改;删除技能不会影响仓库。
|
|
17
|
-
4. **按内容寻址的更新**:检查上游最新提交,确认后再切换快照。
|
|
18
|
-
5. **资源完整**:技能以「目录 + resourceBase」注册,因此 ../../assets、../check/xxx 这类相对引用仍然可用。
|
|
32
|
+
> 停用的技能不会注册进模型:不占上下文,也无法被误调用。
|
|
19
33
|
|
|
20
|
-
##
|
|
34
|
+
## ✨ 功能
|
|
21
35
|
|
|
22
|
-
|
|
36
|
+
| 能力 | 说明 |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| **按仓库分组** | 技能按来源仓库聚合为可折叠的仓库卡片;有启用技能的仓库优先,仓库内已启用的技能优先。 |
|
|
39
|
+
| **部分导入补齐** | 只导入了部分技能的仓库显示「可导入 N 个」,点「导入更多」从现有快照里勾选剩余技能,不重新克隆。 |
|
|
40
|
+
| **仓库级开关** | 一键启用或停用整个仓库;部分启用时开关显示半选状态。 |
|
|
41
|
+
| **展开查看内容** | 行右侧箭头展开 SKILL.md 正文、来源仓库、提交、路径与更新时间,也可就地更新或移除。 |
|
|
42
|
+
| **Git 导入与快照** | 支持 https / ssh / 内网仓库、分支 / 标签 / 提交与子目录;导入的是只读快照,原目录和远端不会被修改。 |
|
|
43
|
+
| **检查更新** | 对比上游最新提交,确认后再切换快照;多个仓库可一次检查。 |
|
|
23
44
|
|
|
24
|
-
|
|
25
|
-
|
|
45
|
+
<p align="center">
|
|
46
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/screenshots/import-more.png" width="49%" alt="从仓库补齐剩余技能" />
|
|
47
|
+
<img src="https://cdn.jsdelivr.net/gh/hxlog/dsh-skills-tools@main/docs/screenshots/import-dialog.png" width="49%" alt="导入技能" />
|
|
48
|
+
</p>
|
|
26
49
|
|
|
27
|
-
|
|
28
|
-
dsh plugin add file:D:/PythonProjects/dsh-skills-tools
|
|
50
|
+
## 🚀 安装
|
|
29
51
|
|
|
30
|
-
|
|
52
|
+
需要 **DeepSeek Harness 0.2.x**(Web GUI `dsh web` 或 DSH Desktop)与 **Node.js ≥ 22.13**,包已发布到 npm:[dsh-skills-tools](https://www.npmjs.com/package/dsh-skills-tools)。
|
|
31
53
|
|
|
32
|
-
|
|
33
|
-
- id: skills-tools
|
|
34
|
-
name: dsh-skills-tools
|
|
54
|
+
> ⚠️ 这是一个 **DeepSeek Harness 插件**,不是普通 npm 依赖库:`npm i dsh-skills-tools` 只会下载包,运行时仍需装进 DSH profile。
|
|
35
55
|
|
|
36
|
-
|
|
56
|
+
**通过插件页安装(推荐)**
|
|
37
57
|
|
|
38
|
-
|
|
58
|
+
1. 打开 DSH Web(或 DSH Desktop)→ 侧边栏 **插件**(Desktop 在 **设置 → 插件**)。
|
|
59
|
+
2. 点击安装,填入 `dsh-skills-tools`,确认。
|
|
60
|
+
3. 启用新 bundle,刷新页面,打开 **设置 → 技能**。
|
|
39
61
|
|
|
40
|
-
|
|
62
|
+
**通过命令行安装**
|
|
41
63
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
64
|
+
```bash
|
|
65
|
+
dsh plugin add dsh-skills-tools # 默认 profile
|
|
66
|
+
dsh plugin --profile web add dsh-skills-tools # Web
|
|
67
|
+
dsh plugin --profile desktop add dsh-skills-tools # Desktop
|
|
68
|
+
```
|
|
47
69
|
|
|
48
|
-
|
|
70
|
+
当前版本 **1.1.0**:按仓库分组、仓库级开关、从快照补齐剩余技能。
|
|
49
71
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- file:///path/to/repo
|
|
54
|
-
- 本机绝对路径(会复制快照,不修改原目录)
|
|
72
|
+
> 升级包版本后需要重启 `dsh web` / 重启 DSH Desktop。
|
|
73
|
+
>
|
|
74
|
+
> `dsh plugin add` 只负责把包装进 profile,**不会自动启用 bundle**:装完请在插件页启用一次,或确认 profile 的 `dsh.profile.bundles` 已包含 `dsh-skills-tools`。
|
|
55
75
|
|
|
56
|
-
|
|
76
|
+
## ⚡ 快速开始
|
|
57
77
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- 展开行:查看 SKILL.md 原文、来源、提交、快照路径,执行「从上游更新」「移除」「复制路径」。
|
|
78
|
+
1. **设置 → 技能 → 导入技能**:粘贴 Git 地址(支持 `https://`、`git@`、`file://` 与本机绝对路径),内网仓库直接使用本机 git 凭据。
|
|
79
|
+
2. 可选填**分支 / 标签 / 提交**与**子目录**,点 **扫描**;勾选要安装的技能,重名项会给出可修改的建议名称,点 **安装选中**。安装即启用。
|
|
80
|
+
3. 回到列表按仓库管理:仓库开关批量启停,行开关控制单个技能,「导入更多」补齐同仓库剩余技能,点右侧箭头查看正文。
|
|
62
81
|
|
|
63
|
-
|
|
82
|
+
## 🧩 工作原理
|
|
64
83
|
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
84
|
+
```
|
|
85
|
+
~/.dsh/dsh-skills-tools/
|
|
86
|
+
├── state.json 仓库、技能、启用状态与检查时间
|
|
87
|
+
└── repos/<仓库>-<提交>/ 只读快照
|
|
88
|
+
```
|
|
68
89
|
|
|
69
|
-
|
|
90
|
+
- **快照隔离**:每次导入或更新把仓库复制到数据目录,删除技能只删状态,不影响仓库与快照。
|
|
91
|
+
- **注册即生效**:启用状态决定技能是否注册进 DSH 技能目录;停用即从模型上下文移除。
|
|
92
|
+
- **REST 接口**:`GET /skills-tools/api/state`、`POST /import/scan|commit`、`POST /repos/inspect|import|toggle|check-updates`、`POST /skills/toggle|bulk|remove|update`、`POST /refresh`、`GET /logs`;详见 [docs/API.md](docs/API.md)。
|
|
70
93
|
|
|
71
|
-
|
|
94
|
+
## 🔒 安全说明
|
|
72
95
|
|
|
73
|
-
-
|
|
74
|
-
-
|
|
96
|
+
- **不保存令牌**:Git 认证交给本机 credential helper 或 SSH key,插件只调用 `git`。
|
|
97
|
+
- **只读快照**:导入与更新都写入数据目录,你的仓库目录与远端不会被修改。
|
|
98
|
+
- **无遥测**:除你填写的仓库地址外不发起任何网络请求。
|
|
75
99
|
|
|
76
|
-
|
|
100
|
+
## 📋 前置要求与权限边界
|
|
77
101
|
|
|
78
|
-
|
|
102
|
+
- **运行环境**:DeepSeek Harness 0.2.x(Web `dsh web` 或 DSH Desktop),**Node.js ≥ 22.13**
|
|
103
|
+
- **支持平台**:DSH Web(`--profile web`)、DSH Desktop(`--profile desktop`)
|
|
104
|
+
- **文件访问**:读写插件数据目录 `~/.dsh/dsh-skills-tools/`;导入本机目录时只读取该目录
|
|
105
|
+
- **网络**:仅在导入、检查更新时访问你填写的 Git 仓库
|
|
106
|
+
- **进程**:导入 / 检查更新时调用本机 `git`
|
|
107
|
+
- **UI 注入**:设置页「设置 → 技能」面板,依赖 `@deepseek-ai/dsh-client-ui-settings` 与 `@deepseek-ai/dsh-client-locale`
|
|
79
108
|
|
|
80
|
-
|
|
81
|
-
│ git clone --depth 1 --single-branch (或直接读取)
|
|
82
|
-
▼
|
|
83
|
-
$DSH_HOME/dsh-skills-tools/repos/<slug>-<commit> 只读快照
|
|
84
|
-
│ 扫描 SKILL.md(跳过 .git、符号链接;深度与文件数有上限)
|
|
85
|
-
▼
|
|
86
|
-
$DSH_HOME/dsh-skills-tools/state.json 仓库 + 技能 + enabled
|
|
87
|
-
│ ctx.skills.registerProvider(rank 350)
|
|
88
|
-
▼
|
|
89
|
-
DSH 技能目录(仅 enabled 且文件存在的技能)
|
|
109
|
+
**已知限制**
|
|
90
110
|
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
- 前端只做展示与调用,不直接读写文件。
|
|
111
|
+
- 只管理当前 DSH profile 的技能,切换 profile 需重新导入
|
|
112
|
+
- Git 来源需要本机安装 `git`;内网仓库需要事先配置好凭据
|
|
113
|
+
- 技能内容预览最多 64 KiB,超出部分以省略号截断
|
|
95
114
|
|
|
96
|
-
##
|
|
115
|
+
## ❓ 常见问题
|
|
97
116
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
117
|
+
| 问题 | 处理 |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| 设置里没有「技能」分区 | 多半是 bundle 未启用:插件页确认并刷新,必要时重启 `dsh web`。 |
|
|
120
|
+
| 导入失败 | 内网仓库先在本机完成 git 认证;确认分支 / 子目录填写正确、仓库中存在 SKILL.md。 |
|
|
121
|
+
| 停用后模型还能调用吗 | 不能。停用的技能不会出现在模型工具列表中。 |
|
|
122
|
+
| 数据文件在哪 | `~/.dsh/dsh-skills-tools/state.json`;删除即重置,下次启动自动重建。 |
|
|
104
123
|
|
|
105
|
-
|
|
124
|
+
## 🛠 开发
|
|
106
125
|
|
|
107
|
-
|
|
126
|
+
```bash
|
|
127
|
+
git clone https://github.com/hxlog/dsh-skills-tools.git
|
|
128
|
+
cd dsh-skills-tools
|
|
129
|
+
node scripts/build-client.mjs # 构建 client/client.js
|
|
130
|
+
npm test # 静态检查
|
|
131
|
+
npm run test:manager # 离线 manager 集成测试
|
|
132
|
+
```
|
|
108
133
|
|
|
109
|
-
|
|
110
|
-
- 请求体上限 256 KiB;快照上限 20000 文件 / 300 MiB;单文件 SKILL.md 上限 2 MiB。
|
|
111
|
-
- 快照不跟随符号链接,路径必须落在快照目录内;删除操作校验目标位于 repos 之下。
|
|
112
|
-
- 技能内容按原样呈现,不执行仓库中的脚本;git 命令以参数数组启动,不经过 shell。
|
|
113
|
-
- 不写入仓库,不修改 SKILL.md,不调用远端 API(只有 git 传输本身)。
|
|
134
|
+
## 📄 License
|
|
114
135
|
|
|
115
|
-
|
|
136
|
+
[MIT](LICENSE) · Powered by [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
116
137
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
| 方法 | 路径 | 说明 |
|
|
120
|
-
| --- | --- | --- |
|
|
121
|
-
| GET | /state | 技能、仓库、统计、事件、数据目录 |
|
|
122
|
-
| GET | /logs?limit=100 | 最近操作 |
|
|
123
|
-
| POST | /import/scan | { url, ref?, subdir? } 克隆并扫描 |
|
|
124
|
-
| POST | /import/commit | { scanId, skills: [{ relPath, name }] } 安装 |
|
|
125
|
-
| POST | /skills/toggle | { name, enabled } |
|
|
126
|
-
| POST | /skills/bulk | { action: all / none / invert } |
|
|
127
|
-
| POST | /skills/remove | { name } |
|
|
128
|
-
| POST | /skills/update | { name } 从上游更新所属仓库 |
|
|
129
|
-
| POST | /repos/check-updates | 检查所有仓库最新提交 |
|
|
130
|
-
| POST | /refresh | 重新解析本地 SKILL.md |
|
|
131
|
-
| GET | /skills/content?name= | SKILL.md 原文(上限 64 KiB) |
|
|
132
|
-
|
|
133
|
-
详见 docs/API.md。
|
|
134
|
-
|
|
135
|
-
## 开发
|
|
136
|
-
|
|
137
|
-
npm test # 离线 smoke:frontmatter、manager、provider、客户端 bundle
|
|
138
|
-
npm run test:manager # 管理流程集成测试(临时 DSH_HOME + 本地 fixture 仓库)
|
|
139
|
-
npm run ci-check # manifest / patch / ESM / 客户端 / i18n 契约检查
|
|
140
|
-
node scripts/build-client.mjs # 修改 client/ui.css 后重新内联
|
|
141
|
-
|
|
142
|
-
客户端源码为 client/client.src.js + client/ui.css,构建产物是 client/client.js(内联 CSS、经典脚本、无模块语法)。CI 会校验产物可被 vm.Script 解析。
|
|
143
|
-
|
|
144
|
-
## 与原生技能的关系
|
|
145
|
-
|
|
146
|
-
- 原生发现(dsh-skill-filesystem)继续工作;本项目只是额外的 provider。
|
|
147
|
-
- 同名时按 rank 竞争:项目级技能(100/200)优先于本 provider(350),本 provider 优先于用户目录(400/500)。
|
|
148
|
-
- 停用只影响本 provider 注册的技能,不会移动或修改原生目录中的文件。
|
|
149
|
-
|
|
150
|
-
## 已知限制
|
|
151
|
-
|
|
152
|
-
- 同名技能的最终名称由导入时决定;DSH 注册表以 name 去重,同名冲突需要在导入对话框里改名。
|
|
153
|
-
- 一个仓库只跟踪一个 ref;需要多分支并存时,请分别以不同子目录或不同仓库导入。
|
|
154
|
-
- 快照是完整仓库副本;超大 monorepo 请用子目录扫描并在导入前确认体量。
|
|
155
|
-
|
|
156
|
-
## License
|
|
157
|
-
|
|
158
|
-
MIT © 2026 Xingyu Liu
|
|
138
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|