dsh-agent-skills 0.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/LICENSE +21 -0
- package/README.md +129 -0
- package/cordis.patch.yml +13 -0
- package/lib/client.js +15235 -0
- package/lib/client.js.map +7 -0
- package/lib/discovery.d.ts +9 -0
- package/lib/discovery.js +48 -0
- package/lib/discovery.js.map +1 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -0
- package/lib/preset.d.ts +9 -0
- package/lib/preset.js +7 -0
- package/lib/preset.js.map +1 -0
- package/lib/provider.d.ts +53 -0
- package/lib/provider.js +295 -0
- package/lib/provider.js.map +1 -0
- package/lib/registry.d.ts +85 -0
- package/lib/registry.js +122 -0
- package/lib/registry.js.map +1 -0
- package/lib/runtime.d.ts +27 -0
- package/lib/runtime.js +162 -0
- package/lib/runtime.js.map +1 -0
- package/lib/scan.d.ts +29 -0
- package/lib/scan.js +156 -0
- package/lib/scan.js.map +1 -0
- package/lib/schemas.d.ts +112 -0
- package/lib/schemas.js +82 -0
- package/lib/schemas.js.map +1 -0
- package/lib/store.d.ts +26 -0
- package/lib/store.js +88 -0
- package/lib/store.js.map +1 -0
- package/lib/typert.d.ts +195 -0
- package/lib/typert.js +153 -0
- package/lib/typert.js.map +1 -0
- package/lib/types/client/AgentSkillsSection.d.ts +9 -0
- package/lib/types/client/index.d.ts +14 -0
- package/lib/types/client/locales.d.ts +86 -0
- package/lib/types/client/styles.d.ts +4 -0
- package/lib/types/client/typert-remote.d.ts +152 -0
- package/lib/types/client/types.d.ts +13 -0
- package/lib/types/schemas.d.ts +112 -0
- package/lib/views.d.ts +27 -0
- package/lib/views.js +218 -0
- package/lib/views.js.map +1 -0
- package/package.json +130 -0
- package/scripts/install-preset.mjs +49 -0
- package/scripts/uninstall-preset.mjs +22 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Wei
|
|
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,129 @@
|
|
|
1
|
+
# dsh-agent-skills
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-agent-skills)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
6
|
+
|
|
7
|
+
把 Claude Code、Codex、Gemini CLI、Cursor 等工具的本地 Agent Skills 接入 DeepSeek Harness,并在「设置 → Agent Skills」里统一查看、启停和管理。
|
|
8
|
+
|
|
9
|
+
## 它解决什么问题
|
|
10
|
+
|
|
11
|
+
很多 AI 编程工具都使用 `<技能名>/SKILL.md`,但技能分散在不同目录。`dsh-agent-skills` 会自动发现这些目录,把有效技能汇总进 DSH,并提供一个可视化设置页:
|
|
12
|
+
|
|
13
|
+
- 自动发现 `~/.agents/skills`、`~/.claude/skills`、`~/.codex/skills`、`~/.gemini/skills` 等常用目录。
|
|
14
|
+
- 支持添加任意自定义技能目录。
|
|
15
|
+
- 显示每个来源是否存在、包含多少有效技能,以及技能名称和描述。
|
|
16
|
+
- 可按目录或单个技能启停;变更会持久化,并在下一次 Agent step 生效。
|
|
17
|
+
- 监听技能文件变化,也可随时手动重新扫描。
|
|
18
|
+
- 不修改原始 `SKILL.md` 文件。
|
|
19
|
+
|
|
20
|
+
## 安装
|
|
21
|
+
|
|
22
|
+
### 方式一:DSH 插件市场(推荐)
|
|
23
|
+
|
|
24
|
+
打开 DSH 的「设置 → 插件市场」,搜索 **Agent Skills**,点击安装。市场会优先使用 npm 包,安装速度快,也不需要在本机重新构建。
|
|
25
|
+
|
|
26
|
+
安装后重启一次 DSH Web,再打开「设置 → Agent Skills」。
|
|
27
|
+
|
|
28
|
+
### 方式二:从 npm 安装
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
dsh plugin --profile web add dsh-agent-skills
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
为了让技能开关覆盖 `standard` 和 `code` Agent preset 中的 filesystem provider,还需安装一次 preset-only 行:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
DSH_INSTALL_ROOT="$(npm root -g)/@deepseek-ai/dsh" \
|
|
38
|
+
node ~/.dsh/profiles/web/node_modules/dsh-agent-skills/scripts/install-preset.mjs
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
然后重启 DSH Web。这个 preset 入口只注册 scoped skill provider,不会在 Agent preset 中创建 `agentSkills` host 服务。
|
|
42
|
+
|
|
43
|
+
### 方式三:从 GitHub 安装
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
dsh plugin --profile web add github:minivv/dsh-agent-skills
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
仓库包含 `prepare: npm run build`,因此 pnpm 会在 Git 安装时自动构建。DSH/pnpm 可能会要求你授权构建脚本;不想授权构建时请使用 npm 或插件市场版本,npm 包已经包含构建好的 `lib/`。
|
|
50
|
+
|
|
51
|
+
## 使用
|
|
52
|
+
|
|
53
|
+
1. 打开 DSH Web。
|
|
54
|
+
2. 进入「设置 → Agent Skills」。
|
|
55
|
+
3. 检查自动发现的来源,或点击「+ 添加目录」。
|
|
56
|
+
4. 使用来源开关或技能开关控制 Agent 可见范围。
|
|
57
|
+
5. 修改磁盘上的技能后,点击「重新扫描」或等待自动刷新。
|
|
58
|
+
|
|
59
|
+
插件状态保存在:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
$DSH_HOME/agent-skills/state.json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
支持的目录结构:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
skills/
|
|
69
|
+
├── my-skill/
|
|
70
|
+
│ └── SKILL.md
|
|
71
|
+
└── another-skill.md
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`SKILL.md` 需要 YAML frontmatter,`name` 必须使用小写 kebab-case:
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
---
|
|
78
|
+
name: my-skill
|
|
79
|
+
description: Explain when this skill should be used.
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
# Instructions
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## 卸载
|
|
86
|
+
|
|
87
|
+
如果安装过 preset-only 行,请先清理它,再卸载 npm 包:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
DSH_INSTALL_ROOT="$(npm root -g)/@deepseek-ai/dsh" \
|
|
91
|
+
node ~/.dsh/profiles/web/node_modules/dsh-agent-skills/scripts/uninstall-preset.mjs
|
|
92
|
+
|
|
93
|
+
dsh plugin --profile web remove dsh-agent-skills
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
最后重启 DSH Web。插件不会自动删除 `$DSH_HOME/agent-skills/state.json`,方便以后重装时保留设置。
|
|
97
|
+
|
|
98
|
+
## 开发
|
|
99
|
+
|
|
100
|
+
要求 Node.js 20+。
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npm install
|
|
104
|
+
npm run typecheck
|
|
105
|
+
npm run build
|
|
106
|
+
npm pack --dry-run
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- `src/index.ts`:host 入口,提供设置页 remote service 和全局 provider。
|
|
110
|
+
- `src/preset.ts`:preset-only 入口,只注册 scoped provider。
|
|
111
|
+
- `src/client/`:设置页 UI。
|
|
112
|
+
- `src/scan.ts`:技能目录扫描和 frontmatter 解析。
|
|
113
|
+
- `lib/`:已提交的构建产物,供 npm 和免构建安装使用。
|
|
114
|
+
|
|
115
|
+
## 已知约束
|
|
116
|
+
|
|
117
|
+
- DSH 技能名必须匹配 `[a-z0-9]+(?:-[a-z0-9]+)*`。
|
|
118
|
+
- 修改插件安装或 preset 组合后需要重启一次;技能启停和重新扫描不需要重启。
|
|
119
|
+
- DSH 升级可能覆盖其内置 preset 文件;如开关不再生效,重新运行 `scripts/install-preset.mjs`。
|
|
120
|
+
|
|
121
|
+
## 相关链接
|
|
122
|
+
|
|
123
|
+
- [GitHub](https://github.com/minivv/dsh-agent-skills)
|
|
124
|
+
- [npm](https://www.npmjs.com/package/dsh-agent-skills)
|
|
125
|
+
- [WeiSpot 项目页](https://weispot.vercel.app/projects/dsh-agent-skills)
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
[MIT](./LICENSE)
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# The dsh-agent-skills bundle patch: mounts the plugin's host half as one
|
|
2
|
+
# Cordis loader row. The same row is also the browser roster row (the plugin
|
|
3
|
+
# declares `dsh.client`), so the client half is discovered from it by the
|
|
4
|
+
# client-modules node half. Apply this bundle after `dsh-base` + `dsh-web-app`,
|
|
5
|
+
# which provide `loader` (base) and the web settings shell; the plugin's own
|
|
6
|
+
# `inject` resolves against those.
|
|
7
|
+
#
|
|
8
|
+
# The per-agent PRESET row (which registers the skill provider into the
|
|
9
|
+
# agent-preset layer of the skill registry) is appended by
|
|
10
|
+
# scripts/install-preset.mjs — see README.
|
|
11
|
+
- insert:
|
|
12
|
+
- id: agent-skills
|
|
13
|
+
name: dsh-agent-skills
|