dsh-SkillSelect — Pick skills from the sidebar.

# dsh-SkillSelect [English](README.md) · 中文 DSH Web 插件:在侧边栏勾选已安装的 skill,并注入当前会话。 ## 功能 - 列出全部已配置 skill。标注 **Global**,能推断时显示所属 **repo**。 - **Skills**:本会话勾选。单项写入 `/skill-name`;整 repo 勾满写入 `/repo`,发送时展开。重新打开侧边栏会清空本页。 - **Auto-start**:常驻默认启动名单,每个会话首条消息注入一次。勾选方式与 Skills 相同。 - 排序:**Repo**(默认)/ **Name** / **Most used** / **Source**。Repo 与 Source 按组折叠。 - **Guard**(默认关):打开后,模型经 `skill` 工具调用不在「默认启动 ∪ 本会话勾选」内的技能会被拒绝。手动 `/skill` 不受限。 - 有 frontmatter `description` 则直接用;否则生成一句英文简介并缓存。不改任何 skill 文件。 - 同时列出 Codex / Grok / Hermes 用户技能(跳过内置)。重名分列。勾选写入 `/name@agent`,由插件注入对应来源的 `SKILL.md`。不注册进模型的 `available_skills`。 - **Update**:对 git 仓库执行 `git pull`,对技能目录内来源标记重拉;根级标记与无来源为 skipped。变更摘要显示在面板内。 ## 安装 仅 web profile。 ```bash dsh plugin --profile web add "github:wyzh0117/dsh-skill-select#main" # 本地开发请用 link:,改代码重启即生效 # dsh plugin --profile web add "link:/path/to/skill-select" ``` 重启 `dsh web`,然后硬刷新浏览器(`Cmd/Ctrl+Shift+R`)。 ## DSH 版本兼容 | 插件版本 | 支持的 DSH | 说明 | |---|---|---| | **0.1.1**(当前) | `^0.1.0-rc.6 \|\| ^0.1.5-rc.1` | 旧版与 0.1.5 两条线都能跑。 | | 0.1.0 | `^0.1.0-rc.6` | **在 0.1.5+ 上不可用**,见下。 | DSH 0.1.5 改了 client 模块表:`@deepseek-ai/dsh-client-runtime` 不再是种子包, `require("@deepseek-ai/dsh-client-runtime")` 会抛 `missed the module table`, 页面报 **Failed to load plugins**(宿主本身能起来)。0.1.1 改用 `ctx.sessions.scope(sessionId)`,并在 `dsh.plugin.json` / `peerDependencies` 里声明支持 0.1.5。 **升级 DSH 后必做**:`dsh` 只升了 CLI,profile 里已安装的插件仍停在旧 API, 需要重新解析一次: ```bash dsh plugin --profile web update # 重新解析 github:/registry 安装的插件 # link:/ 本地目录是就地使用,重启 dsh web 即可 ``` 再在本仓库跑 `npm test`:`tests/dsh-compat.test.js` 会在 DSH 删掉某个 named export 或砍掉某个 client 种子包时直接失败,不必等宿主/页面炸掉才发现。 ## 侧边栏兼容 本仓库不附带其他侧边栏。 已安装 [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) 时,注册为其 **Skills** 页签(`ctx.betterSidebar.registerTab`)。打开 Side Card,在 `+` 菜单选择 **Skills**。 ![Skills tab inside dsh-better-sidebar](assets/better-sidebar.png) 未安装或已禁用 [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) 时,自绘右侧栏并顶替同一位置:开关在 **Session log** 右侧,布局用 `#root { margin-right }`,点击面板外关闭。 强制使用自绘侧边栏: ```yaml # ~/.dsh/profiles/web/cordis.patch.yml - { id: better-sidebar, disabled: true } ``` ## 开发 ```bash node --test node --check lib/index.js && node --check lib/client.js ``` 设计文档:[`docs/design.md`](docs/design.md)。