@weibaohui/skills-management 0.1.0 → 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/README.md +17 -66
- package/client/bundle.js +2 -2
- package/client/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @weibaohui/skills-management
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/topics/dsh-plugin)
|
|
4
|
+
[](https://www.npmjs.com/package/@weibaohui/skills-management)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
- **模型目录治理**(2026-08-29,2026-08-30 扩展):市场库存(6600+ 条)只作可浏览/可安装的货架,**不再注入对话的技能目录**(装进 DSH 用户库才对模型可见);已装技能可在详情页用"模型可调用"开关切换原生 frontmatter 键 `disable-model-invocation`(其余键保留),卡片带"已隐藏"标记与隐藏/恢复按钮;**开关同时覆盖 user-agents 根**(`~/.agents/skills`——dsh 内置把它全量扫进模型目录;同名冲突时优先改用户库,与 registry rank 一致),市场与只读源不受影响;市场 settings(含 access token)经宿主 settings 服务持久化到 `settings.yaml`,重启不再丢失。
|
|
7
|
-
:插件自己管理 ntd-resource 检出(ntd `git_sync` 同构):首次 `git clone --depth 1`,更新 `fetch + reset --hard`(远程永远赢,本地误删误改自愈);启动时后台静默同步 + 每日自动同步(可关);gitcode 私有仓库支持 access token(只写不回读,状态文件 0600 权限,凭证不落 .git/config)。
|
|
8
|
-
- **市场浏览**:读取 ntd 技能合集目录(默认 `~/.ntd/bundled/skills`,GitHub 开源技能仓库归档树),来源卡片/浏览全部/来源钻入三视图,安装进用户库;⚙ 设置面板查看同步状态、立即同步、编辑 url/分支/token/自动同步。
|
|
9
|
-
- 已安装库注册到 dsh 的 SkillRegistry —— 模型直接通过 `skill` 工具按名调用。
|
|
6
|
+
**技能市场插件**:一个页面管理本机所有 coding agent 的技能,还能浏览安装 6600+ 的 ntd 技能市场。
|
|
10
7
|
|
|
8
|
+
## 核心功能
|
|
9
|
+
|
|
10
|
+
- **全来源扫描**:自动扫描本机各 coding agent 的技能目录(Claude、ZCode、Codex 等十余个执行器),统一在一个页面查看、查看详情、单文件预览
|
|
11
|
+
- **一键收编**:任意执行器的技能可一键复制进 DSH 用户库,供模型的 `skill` 工具直接调用
|
|
12
|
+
- **技能市场**:内置 ntd 技能合集(6600+ 条),按来源分组浏览、搜索筛选、详情预览、一键安装
|
|
13
|
+
- **模型可见性治理**:每个已装技能都有「模型可调用」开关,不想暴露给模型的技能一键隐藏/恢复
|
|
14
|
+
- **市场自动同步**:市场仓库自动克隆与每日更新(可关),支持 GitCode 私有仓库 access token
|
|
15
|
+
- **软链布局兼容**:各执行器目录间软链共享的技能不会重复展示
|
|
11
16
|
|
|
12
17
|
## 安装
|
|
13
18
|
|
|
@@ -17,63 +22,9 @@ dsh plugin --profile web add @weibaohui/skills-management -w
|
|
|
17
22
|
|
|
18
23
|
装完重启 `dsh web` 即生效。
|
|
19
24
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm version patch # bump + commit + tag
|
|
24
|
-
git push --follow-tags
|
|
25
|
-
gh release create vX.Y.Z --generate-notes # 创建 Release 触发自动发布到 npm
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
发布由 GitHub Actions 完成(Release published 触发;打 tag 不发布),走 npm Trusted Publishing 免 token。
|
|
29
|
-
|
|
30
|
-
## 安装
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
dsh plugin --profile web add 'github:weibaohui/dsh-plugins#path:skills' -w
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## 功能
|
|
37
|
-
|
|
38
|
-
- **Provider 注册**:向 `ctx.skills` 注册 `ntd-skills` provider。已安装库(rank 100)遮蔽市场同名技能(rank 500);frontmatter 的 `disable-model-invocation` / `user-invocable` 控制双面调用策略;解析失败的 SKILL.md warn + skip。执行器目录仅做管理展示,不自动进 provider。
|
|
39
|
-
- **执行器扫描**:`GET /executors` 按 ntd 的来源表逐源递归扫描(跳过 `.git`/`node_modules`,跟随 symlink 且有环路防护)。三种用法配合分层加载:全量(含 skills 数组)、`?mode=summary`(只要计数,首屏)、`?executor=<key>`(单来源完整列表,钻入时懒加载);技能条目含 fileCount/totalSize;嵌套目录以相对路径为显示名。detail / file / DELETE / install 均支持 `executor=` 参数按源定位。
|
|
40
|
-
- **市场浏览**:递归扫描市场目录,按来源(GitHub 仓库)分组,搜索/筛选;详情看 SKILL.md 全文与文件清单。
|
|
41
|
-
- **安装**:市场技能整目录复制进用户库 `$DSH_HOME/skills/<短名>/`;执行器技能经 `POST /install {name, from:<executor>}` 复制进同一位置;同名覆盖 = 更新(`overwrite`)。装完 `invalidate()`,`skill` 工具目录立即可见。
|
|
42
|
-
- **删除**:`DELETE {name, executor}` 按源删除;缺省 executor 即 DSH 用户库;只读来源(`agents`)拒删,市场目录只读。
|
|
43
|
-
- **HTTP API**:`/skills-management/api` 下 `GET /`(市场+已安装)、`GET /executors`、`GET /detail?name=&executor=`、`GET /file?name=&path=&executor=`、`POST /install`、`DELETE /`、`GET /market/status`、`POST /market/sync`、`PUT /market/settings`。
|
|
44
|
-
|
|
45
|
-
## 与 ntd 的差异
|
|
46
|
-
|
|
47
|
-
执行器的发现/展示/删除/跨源复制已迁移(ntd `handlers/skills.rs` 同构);跨执行器批量 sync 矩阵、version-update 对比、zip 导入导出、调用追踪、市场 git 同步不迁移:dsh 单执行器,「同步」被「从执行器/市场安装进用户库」取代;调用可从 dsh 会话日志投影。
|
|
48
|
-
|
|
49
|
-
## Config(cordis.yml)
|
|
50
|
-
|
|
51
|
-
| key | 默认 | 说明 |
|
|
52
|
-
|---|---|---|
|
|
53
|
-
| `marketDirs` | `['~/.ntd/bundled/skills']` | 市场库目录列表(可指向任意技能合集 git 检出) |
|
|
54
|
-
| `installedDir` | `$DSH_HOME/skills` | 用户库目录(即执行器表中的 `dsh` 源) |
|
|
55
|
-
| `providerName` | `ntd-skills` | `ctx.skills` 注册名 |
|
|
56
|
-
| `executorDirs` | `{}` | 覆盖某执行器来源的根目录,如 `{claudecode: '/path'}`;也便于测试 |
|
|
57
|
-
| `disabledExecutors` | `[]` | 关闭的执行器来源 key 列表 |
|
|
58
|
-
| `extraExecutors` | `[]` | 追加自定义来源:`[{key, label, dir, readOnly}]` |
|
|
59
|
-
| `marketRepoDir` | `~/.ntd/bundled` | 市场资源 git 检出根目录(同步目标);运行期可在设置面板改(`PUT /market/settings {repoDir}`),市场扫描自动跟随,状态持久化于 `$DSH_HOME/skills-market-sync.json` |
|
|
60
|
-
| `marketSync` | 见下 | `{url, branch, gitBinary, autoSync, syncOnStartup, token}`;url 默认 `https://gitcode.com/weibaohui/ntd-resource.git`,运行期可经 `PUT /market/settings` 覆盖(持久化于 `<repoDir>/../.dsh-skills-market-sync.json`) |
|
|
61
|
-
|
|
62
|
-
## 开发
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
npm install
|
|
66
|
-
npm run check # 语法检查两个半端
|
|
67
|
-
npm test # 离线测试套件
|
|
68
|
-
npm run build:client # 从 client/index.js 构建 client/bundle.js
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## 依赖
|
|
72
|
-
|
|
73
|
-
运行时依赖 `yaml`(frontmatter 解析)与 `zod`(用户设置 schema)。零 `@deepseek-ai/dsh-*` 硬依赖——宿主半端经 `ctx.skills` / `ctx.webServer` / `ctx.inject(['settings'])` 运行时服务访问 harness 能力。
|
|
74
|
-
|
|
75
|
-
**设置存储**:市场同步的用户设置(url/分支/本地目录/token/自动同步)注册为宿主 `ctx.settings` 命名空间 `skills-management.market`(zod schema;cordis.yml 的 `marketSync`/`marketRepoDir` 作为 composition base 层,UI 修改写入用户层,本地 provider 持久化于 `$DSH_HOME/settings.yaml`)。settings 服务缺席的组合(如测试)自动回退到进程内覆盖表;同步记账(lastSyncAt/结果)仍在 `$DSH_HOME/skills-market-sync.json`,旧版设置一次性迁移。侧栏收起时入口仅显示图标(槽位 `wide` 属性),展开显示完整文字。
|
|
76
|
-
|
|
77
|
-
## License
|
|
25
|
+
## 使用
|
|
78
26
|
|
|
79
|
-
|
|
27
|
+
1. 打开 Web UI → 侧栏进入 **技能市场** 页面
|
|
28
|
+
2. 「已安装」视图管理本机技能;「市场」视图浏览/搜索/安装 ntd 合集技能;「执行器」视图按来源钻入查看各 coding agent 的技能
|
|
29
|
+
3. 详情页可预览 SKILL.md 全文、安装到用户库、切换模型可调用开关
|
|
30
|
+
4. ⚙ 设置面板里可配置市场仓库地址、分支、access token 与自动同步
|
package/client/bundle.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Regenerate with: npm run build:client
|
|
3
3
|
*/
|
|
4
4
|
window.__ModuleLoader__.load({
|
|
5
|
-
id: "
|
|
5
|
+
id: "@weibaohui/skills-management",
|
|
6
6
|
factory: (require) => {
|
|
7
7
|
var module = { exports: {} }
|
|
8
8
|
var exports = module.exports
|
|
@@ -1288,7 +1288,7 @@ window.__ModuleLoader__.load({
|
|
|
1288
1288
|
|
|
1289
1289
|
// ── Plugin plane contract ────────────────────────────────────────────────
|
|
1290
1290
|
|
|
1291
|
-
const CLIENT_NAME = '
|
|
1291
|
+
const CLIENT_NAME = '@weibaohui/skills-management'
|
|
1292
1292
|
|
|
1293
1293
|
module.exports = {
|
|
1294
1294
|
name: CLIENT_NAME,
|
package/client/index.js
CHANGED
|
@@ -1278,7 +1278,7 @@ function SettingsSlotComponent(props) {
|
|
|
1278
1278
|
|
|
1279
1279
|
// ── Plugin plane contract ────────────────────────────────────────────────
|
|
1280
1280
|
|
|
1281
|
-
const CLIENT_NAME = '
|
|
1281
|
+
const CLIENT_NAME = '@weibaohui/skills-management'
|
|
1282
1282
|
|
|
1283
1283
|
module.exports = {
|
|
1284
1284
|
name: CLIENT_NAME,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weibaohui/skills-management",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "DeepSeek Harness plugin: ntd skill marketplace — reads the ntd bundled skill collection, registers every skill on the dsh SkillRegistry (callable through the skill tool), and serves install/delete/detail APIs plus a management page (market browse + installed library).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|