Vai al contenuto principale
B

dsh-skills-manager

bswy-shuchi/dsh-skills-manager

Adds a Skills entry to the DSH sidebar that lists every discovered skill by source and switches model or user invocation on the skill's own SKILL.md.

Installazione

dsh plugin --profile web add github:bswy-shuchi/dsh-skills-manager

README

dsh-skills-manager

Skills page for the DeepSeek Harness sidebar. It lists every skill DSH discovered — grouped by source, with its description and invocation state — and switches model or user invocation on the skill's own SKILL.md.

中文说明见下

What it adds

  • A Skills row in the sidebar, next to Plugins, that opens a management page in the center column.
  • The page groups skills into User (~/.agents/skills, ~/.dsh/skills, custom directories), Project (.agents/skills, .dsh/skills under the working directory), From plugins (registered at runtime) and Built-in (shipped with DSH or a bundle).
  • Each card shows the skill name, a two-line description, its source and a switch reflecting invocation.modelInvocable.
  • Clicking a name opens a detail view: full description, whenToUse, source, provider, file path (copyable), the two invocation switches and a body preview.
  • Search matches name, description, whenToUse and path; each group shows 9 cards first and the rest behind Load more. The list refreshes while the page is visible.

Where the switches write

The switches edit the frontmatter of the skill's own SKILL.md — one line, everything else preserved (CRLF included):

SwitchFrontmatter
Model invocation → offdisable-model-invocation: true
Model invocation → onremove that key (allowed by default)
User invocation → offuser-invocable: false
User invocation → onremove that key (allowed by default)

Writing the file instead of shadowing the runtime registry is deliberate: since DSH 0.2.x skills are layered per agent preset, a global-layer override is shadowed by a same-named skill in the scope layer, while frontmatter is honored by every source. Writes go through a temporary file plus rename; concurrent clicks on the same path return 409.

Project skills and built-in/plugin-provided skills are read-only here: their files belong to a repository or a bundle, so the card explains why the switch is disabled.

Reading order

Same as the official session skill catalog:

  1. with ?sessionId= and a live agent in that session, use the preset's own skills instance with the agent as scope;
  2. otherwise borrow the default preset's standing scope (released when the request ends);
  3. otherwise read the global layer only.

The working directory defaults to workingDirectory.defaultDirectory and can be overridden with ?cwd=, which is what project skills are scanned under.

HTTP routes

All under /skill-panel/api, and each one passes the connection access check (connection.requestRejection):

  • GET /skills?sessionId=&cwd= — the snapshot { scope, cwd };
  • GET /skill?name=&sessionId=&cwd= — details, body truncated to 8000 characters;
  • POST /toggle — the frontmatter write above.

Install

# from npm
dsh plugin add @bswy-shuchi/dsh-skills-manager

# from source
dsh plugin add github:Bswy-shuchi/dsh-skills-manager

Then restart DSH. Uninstall from the Plugins page; the plugin keeps no state of its own and changes nothing in the DSH configuration besides the skill files you toggle.

Limitations

  • Read, search and toggle only — no creating, editing bodies or deleting skills here.
  • The page is global (no session binding); custom skills of different presets are not in the same list (v1).
  • A skill disabled by a runtime override from another manager can still read as disabled after a file write; the card says so.

Development

npm test        # frontmatter and host-route tests, no dependencies

client.js is plain browser JavaScript: React comes from the module table, there is no build step, and every color is a theme token (--dsw-alias-*).

License

MIT


中文

在 DSH 左侧栏「插件」旁边加一行「技能」,点开是一个技能管理页:DSH 发现的所有技能按来源分组,每张卡片显示名称、描述、来源与当前调用状态,右侧开关会直接写回该技能的 SKILL.md。

  • 来源分组:用户自定义(~/.agents/skills、~/.dsh/skills、自定义目录)、项目(.agents/skills、.dsh/skills,按工作目录扫描)、来自插件(运行时注册)、内置(随 DSH 或 bundle 提供)。
  • 状态:开关反映注册表返回的 invocation.modelInvocable。
  • 详情:完整描述、whenToUse、来源、提供方、文件路径(可复制)、两个调用开关和正文预览。
  • 搜索与分页:在名称、描述、whenToUse、路径上匹配;每组首屏 9 张,余下用「加载更多」展开。

开关写到哪里:技能自己的 SKILL.md frontmatter——模型可调用关闭写 disable-model-invocation: true,用户可调用关闭写 user-invocable: false,打开即删除对应键。只改一行、其余内容原样保留(含 CRLF),临时文件 + rename 写入,同一路径并发点击返回 409。

只读来源:项目技能与内置/插件提供的技能不可开关,卡片会说明原因——这些文件属于仓库或 bundle。

安装:dsh plugin add @bswy-shuchi/dsh-skills-manager(或 dsh plugin add github:Bswy-shuchi/dsh-skills-manager),装完重启 DSH。

限制:只读、搜索、开关;不在本页新建、编辑正文或删除技能;面板是全局页,不同 preset 的自定义技能不在同一份列表里(v1)。

Plugin correlati