🎁 福利专区全网大模型免费应用 + 新用户福利 + 注册活动入口,低成本玩转 AI

能力菜单 PKUfudawei/dsh-capability-menu

DeepSeek Harnessv0.1.7
PKUfudawei1 天前有提交已提供中文文档扫描:含敏感能力ui

统一管理 DeepSeek Harness 工具与技能,高效检索、按需调用,节省上下文

56.8/100
综合分
93
GitHub 星标
996
npm 周下载
—/5
用户评分

数据截至 2026/11/2 · 周下载取自 npm 全网(含 CI / 镜像),非本站安装数;综合分由星标、活跃度与兼容性检查合成。

安装命令 · 需先装 dsh CLI 引擎
dsh plugin --profile web add @daweifu/capability-menu
npm 源 · @daweifu/capability-menu 的发布者账号已校验与本仓库一致

状态速览

判定依据:实装验证 · 静态安装检查 · 自动扫描 · 仓库维护状态
信任档位:已验证
是什么
dsh 原生插件 · tool
装得上吗
本站已在 dsh 0.2.1-rc.2 下真实安装成功
非静态推断
L5 · 运行时冒烟等级说明 →
安全吗
本站尚未对该插件做风险分级
暂未覆盖,不等同于无风险
还在维护吗
活跃:最近一次提交在 1 天前
档位由哪些信号合成

本站实装验证(真实安装 L4 覆盖全站;L5 为运行时冒烟或实机截图,覆盖范围小于 L4) · 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。 下方各区块是它的证据明细。

验证判据与等级说明 →
社区实装还没有人打卡 · 装过的第一个就是你
安装兼容性检查✓ 自动检查通过
展开查看检查明细 ↓

以下结论由程序自动检查 npm 包、engines 声明与入口文件得出,未做人工实机验证——能装不等于用着没问题。

✓npm 包@daweifu/capability-menu @ 0.1.7
✓Node 引擎未声明 engines.node
✓dsh CLI 依赖未声明 dsh 版本约束
✓入口文件main/exports/bin 已声明

验证方式:npm registry 存在性 + package.json 静态校验 · 最后检查 2026/10/29 20:43:56

安全扫描自动 · 静态分析源码
v2.7.0
🔵 扫描:含敏感能力尚无人工评估
展开查看扫描说明与证据 ↓

静态扫描发现插件具备触达本地系统的能力:执行外部命令、读写/删除本地文件、读取剪贴板或密钥类环境变量(至少其一)。这是能力清单,不是危险判定——具体能力项与证据见下方,安装前请自行判断是否需要。

读写/删除本地文件发起外部网络请求
查看扫描证据(共 70 处,展示前 53 条)
  • 读取本地文件
    lib/registry.js:78
    const realRoot = await realpath(root).catch(() => undefined);
  • 读取本地文件
    lib/registry.js:79
    const realTarget = await realpath(target).catch(() => undefined);
  • 读取本地文件
    lib/registry.js:870
    const entries = await readdir(target, { withFileTypes: true });
  • 读取本地文件
    lib/registry.js:890
    const info = await stat(target);
  • 读取本地文件
    lib/registry.js:893
    const text = await readFile(target, 'utf8');
  • 读取本地文件
    lib/policy-state.js:63
    source = await readFile(file, 'utf8');
  • 写入本地文件
    lib/policy-state.js:96
    await mkdir(dirname(file), { recursive: true });
  • 写入本地文件
    lib/policy-state.js:101
    await mkdir(lock);
  • 读取本地文件
    lib/policy-state.js:107
    const age = await stat(lock).then(info => Date.now() - info.mtimeMs, () => 0);
  • 删除本地文件
    lib/policy-state.js:109
    await rmdir(lock).catch(() => undefined);
  • 删除本地文件
    lib/policy-state.js:119
    await rmdir(lock);
  • 写入本地文件
    lib/policy-state.js:134
    await writeFile(temporary, content, { encoding: 'utf8', flag: 'wx', mode: 0o600 });
  • 写入本地文件
    lib/policy-state.js:135
    await rename(temporary, file);
  • 删除本地文件
    lib/policy-state.js:138
    await unlink(temporary).catch(() => undefined);
  • 读取本地文件
    lib/policy-state.js:148
    source = await readFile(legacyFile, 'utf8');
  • 读取本地文件
    lib/policy-state.js:165
    if (await readFile(legacyFile, 'utf8').catch(() => undefined) === source) {
  • 写入本地文件
    lib/policy-state.js:166
    await rename(legacyFile, `${legacyFile}.migrated-${randomUUID()}.bak`).catch(error => {
  • 读取本地文件
    lib/locations.js:168
    names = await readdir(this.config.skillsDir);
  • 读取本地文件
    lib/locations.js:204
    const start = await realpath(asked).catch(() => undefined);
  • 读取本地文件
    lib/locations.js:221
    const target = await realpath(dir).catch(() => undefined);
  • 读取本地文件
    lib/locations.js:224
    const info = await stat(target);
  • 读取本地文件
    lib/locations.js:234
    const existing = await lstat(link).catch(() => undefined);
  • 写入本地文件
    lib/locations.js:240
    await mkdir(skillsDir, { recursive: true });
  • 读取本地文件
    lib/locations.js:251
    if (await lstat(destination).then(() => true, () => false)) {
  • 写入本地文件
    lib/locations.js:255
    await mkdir(checkoutRootParent, { recursive: true });
  • 写入本地文件
    lib/locations.js:281
    await mkdir(skillsDir, { recursive: true });
  • 写入本地文件
    lib/locations.js:296
    await rename(stagedSkill, destination);
  • 删除本地文件递归
    lib/locations.js:311
    await rm(targetStage, { recursive: true, force: true }).catch(() => undefined);
  • 删除本地文件递归
    lib/locations.js:312
    await rm(checkoutRoot, { recursive: true, force: true }).catch(error => {
  • 删除本地文件
    lib/locations.js:331
    await rm(path);
  • 删除本地文件递归
    lib/locations.js:336
    await rm(path, { recursive: true });
  • 读取本地文件
    lib/server/self-update.js:73
    const manifest = JSON.parse(await readFile(join(dir, 'package.json'), 'utf8'));
  • 读取本地文件
    lib/server/self-update.js:85
    for (const entry of await readdir(profiles, { withFileTypes: true }).catch(() => [])) {
  • 读取本地文件
    lib/server/self-update.js:91
    await lstat(installed);
  • 读取本地文件
    lib/server/self-update.js:92
    if (await realpath(installed) !== await realpath(root))
  • 读取本地文件
    lib/server/self-update.js:94
    const manifest = JSON.parse(await readFile(join(dir, 'package.json'), 'utf8'));
  • 请求外部主机registry.npmjs.org
    lib/server/self-update.js:109
    const response = await fetch('https://registry.npmjs.org/@daweifu%2Fcapability-menu/latest', {
  • 发起网络请求
    lib/server/self-update.js:109
    const response = await fetch('https://registry.npmjs.org/@daweifu%2Fcapability-menu/latest', {
  • 读取本地文件
    lib/server/self-update.js:122
    const manifest = JSON.parse(await readFile(join(root, 'package.json'), 'utf8'));
  • 写入本地文件
    lib/server/self-update.js:171
    await writeFile(manifestPath, oldManifest);
  • 删除本地文件
    lib/server/self-update.js:173
    await unlink(lockPath).catch(() => undefined);
  • 写入本地文件
    lib/server/self-update.js:175
    await writeFile(lockPath, oldLock);
  • 读取本地文件
    lib/patch-file.js:68
    const source = await readFile(file, 'utf8');
  • 读取本地文件
    lib/patch-file.js:169
    original = await readFile(file, 'utf8');
  • 写入本地文件
    lib/patch-file.js:181
    await mkdir(dirname(file), { recursive: true });
  • 写入本地文件
    lib/patch-file.js:183
    await writeFile(file, initial, { encoding: 'utf8', flag: 'wx', mode: 0o600 });
  • 读取本地文件
    lib/patch-file.js:189
    original = await readFile(file, 'utf8');
  • 写入本地文件
    lib/patch-file.js:198
    await copyFile(file, backup);
  • 写入本地文件
    lib/patch-file.js:200
    await writeFile(tmp, next, 'utf8');
  • 读取本地文件
    lib/patch-file.js:203
    const check = YAML.parseDocument(await readFile(tmp, 'utf8'));
  • 写入本地文件
    lib/patch-file.js:207
    await rename(tmp, file);
  • 删除本地文件
    lib/patch-file.js:211
    await unlink(tmp).catch(() => { });
  • 写入本地文件
    lib/patch-file.js:212
    await copyFile(backup, file).catch(() => { });
扫描于 2026/11/3(0 天前) · 范围 入口闭包 + 全包扫描 · 来源 npm 发布包
涉及外部主机:registry.npmjs.org

静态扫描只反映源码中出现的调用,不构成安全背书;人工评估与自动扫描相互独立、互不覆盖。

依赖的 DSH / Cordis 模块
@deepseek-ai/schemastery@deepseek-ai/cordis@deepseek-ai/dsh-agent@deepseek-ai/dsh-api-remotes@deepseek-ai/dsh-client-connection@deepseek-ai/dsh-client-locale@deepseek-ai/dsh-client-ui-primitives@deepseek-ai/dsh-client-ui-renderer@deepseek-ai/dsh-client-ui-settings@deepseek-ai/dsh-client-ui-slots@deepseek-ai/dsh-llm@deepseek-ai/dsh-scope
给这个插件打分还没有人投票↓
用户评分
还没有人投票,来当第一个

界面预览

2 张 · 点击查看大图

功能亮点

  • 统一能力管理
  • 三档暴露策略
  • 运行时动态发现执行

一个面向 DeepSeek Harness 的统一能力管理插件,为 Tools/Skills 提供常驻、按需、禁用三档暴露策略,以减少上下文占用并支持运行时动态发现与执行。

v0.1.72026-10-24
· v0.1.7 更新内容 · 按需工具调用: 修复 meta_invoke 嵌套调用时未始终传递当前 Agent 的问题,并阻止已知 ID 绕过会话作用域限制;按最终档位同步处理 web_search、web_fetch 的宿主提示。 · 能力发现: 补齐当前会话中的 Tool 和 Skill 收集,改进技能来源识别与「纳入管理」操作,修正菜单中的相关交互。 · 按需检索: meta_search 只列出当前会话可用的按需能力;零命中时返回空结果。取消分页,默认最多返回 20 项,可用 max_results 调整至 100 项。检索描述上限同时作用于默认描述与自定义描述的匹配范围。 · 策略与目录: 菜单直接展示与 meta_search 共用的内存索引,不再生成 YAML 检索目录;合并档位选择和检索描述状态,简化配置与 README。 · 兼容性: 已按 DSH 0.2.1-rc.3 验证;依赖范围接受 DSH 0.2.x 稳定版及 0.2.1-rc.3 起的同版本预发布版。 感谢 @1010231693 在 Issue #21 中提供按需工具搜索、调用及宿主提示的复现截图,帮助定位并修复这些问题。Windows PPT 工具仍需在原环境验证。 安装:dsh plugin --profile web add @daweifu/capability-menu · What's new in v0.1.7 · On-demand invocation: Fix propagation of the current Agent through nested meta_invoke calls and prevent known IDs from bypassing session scope restrictions. Project host prompts for web_search and web_fetch according to their effective tiers. · Capability discovery: Collect Tools and Skills from the current session, improve Skill source detection and adoption, and refine the related menu interactions. · On-demand search: meta_search lists only on-demand capabilities available to the current session and returns no results for a zero-match query. Pagination is removed; results default to 20 and can be raised to 100 with max_results. The description limit applies to matching for both default and custom descriptions. · Policy and catalog: Show the same in-memory index used by meta_search in the menu instead of generating a YAML catalog. Combine tier choices and search descriptions in one state file, and simplify configuration and documentation. · Compatibility: Verified with DSH 0.2.1-rc.3; the peer dependency accepts stable DSH 0.2.x and prereleases from 0.2.1-rc.3 onward within that version line. Thanks to @1010231693 for the reproduction screenshots in Issue #21, which helped identify the on-demand search, invocation, and host-prompt problems. The Windows PPT tool still needs verification in its original environment. Install: dsh plugin --profile web add
v0.1.62026-10-17
· v0.1.6 更新内容 · 适配 DSH 0.2.0-rc.2: 更新依赖与 preset scope 读取方式,清除旧版 DSH API、旧档位规则名和旧检索状态的兼容代码。 · 能力发现: 修正工具与技能清单;meta_search 增加分页及准确的 total / returned,按会话可见范围过滤结果;改进不可调用技能、同名覆盖和损坏预设的诊断;Skill 可用 force: true 重新加载。 · 桌面版与档位操作: 注册 capabilityPolicy 端点,修复桌面宿主中的 404;档位变更只提交实际移动的能力,启动目录刷新设置超时,并在宿主重载期间重试暂时性错误。档位状态现写入独立文件,避免点选时改写受监视的 patch 并触发插件重载。 · 按需检索目录: 完善自动生成的 YAML 目录;按需能力可编辑检索描述,默认上限 320 字符并可在界面调整。检索描述只影响搜索和目录,不改变能力来源定义。 · 能力菜单: 调整中英文文案、页头和操作按钮;版本号旁可发现 npm 新版本,并区分 npm 安装与本地源码链接的更新方式。 · 文档与发布: 更新中英文 README 和截图,增加基于 annotated tag 的 GitHub Release 工作流。 感谢 @jiuweifanghua 在 Issue #14 中提供详尽的技能数量与发现问题报告,推动分页、计数和诊断改进。感谢 @moyuer233 在 PR #16 中提交桌面版端点、档位写入、启动刷新及重载恢复等修复;维护者在此基础上完成整合与后续调整。 安装:dsh plugin --profile web add @daweifu/capability-menu · What's new in v0.1.6 · DSH 0.2.0-rc.2: Update dependencies and preset scope handling; remove compatibility code for older DSH APIs, tier names, and search metadata. · Capability discovery: Fix tool and skill inventory; add pagination and accurate total / returned values to meta_search; filter results by session visibility; improve diagnostics for non-invocable, shadowed, and broken-preset skills; allow Skill reloads with force: true. · Desktop and tier changes: Register the capabilityPolicy endpoint to fix desktop 404s; persist only actual tier moves, bound startup catalog refresh, and retry transient errors during host reloads. Tier state now lives in a separate file so clicks do not rewrite the watched patch and reload the plugin. · On-demand catalog: Improve the generated YAML catalog and add editable search descriptions. The default limit is 320 characters and can be changed in the UI. Edits affect search and the catalog without changing provider definitions. · Capability Menu: Refine Chinese and English copy, the header, and controls. Detect newer npm versions beside the installed version and distinguish npm packages from linked local source during updates. · Docs and release flow: Refresh both READMEs and screenshots, and add a Git
v0.1.52026-09-29
· 能力菜单 · 支持 DeepSeek Harness 0.2.0-rc.1,同时兼容 0.1.5-rc.2。适配新版 agent preset scope API,并枚举所有可用 preset scope 中的工具与技能。 · 完善 MCP 注册与编辑:新建和编辑复用同一套表单;注册时自动创建缺失的 Cordis patch 文件及父目录,完成后立即刷新能力列表。 · 增强 GitHub Skill 导入:支持仓库默认分支根目录、指定分支根目录和指定分支下的技能子目录;也可导入本机目录。导入时校验 SKILL.md,并只复制所选技能目录。 · 改进 Skill 信息与预览:保留编辑前置元数据时的 YAML 格式;将 Skill 元数据按表格呈现,文件内容按 Markdown 渲染。 · 打磨能力菜单界面:改进设置导航图标、页面标题与版本显示、空状态和表单说明,并加入项目反馈链接。 · 其他修复 · agent preset 服务晚于能力菜单加载或被替换时,自动补齐工具目录;避免对同一 preset 服务重复扫描。 · 更新中英文 README 和界面截图,说明 DSH 版本兼容范围及 GitHub Skill 导入方式。 · 将 tsdown 弃用的 external 配置迁移至 deps.neverBundle,保持客户端依赖外置行为。 · Capability menu · Support DeepSeek Harness 0.2.0-rc.1, while retaining compatibility with 0.1.5-rc.2. Adapt to the newer agent-preset scope API and enumerate tools and skills across all available preset scopes. · Improve MCP registration and editing: share the same form for creation and editing; create missing Cordis patch files and parent directories during registration, then refresh the capability list immediately. · Expand GitHub Skill imports: accept a repository's default-branch root, a specific branch root, or a Skill subdirectory on a specific branch. Local directories are also supported. Imports validate SKILL.md and copy only the selected Skill directory. · Improve Skill details and previews: preserve YAML formatting when editing frontmatter, display Skill metadata in a table, and render file contents as Markdown. · Polish the capability menu UI: refine the settings icon, page header and version display, empty states, and form guidance; add a project feedback link. · Other fixes · Complete the tool catalog when the agent-preset service loads after the capability menu or is replaced, without rescanning the same preset service unnecessarily. · Refresh the English and Chinese READMEs and screenshots with the DSH compatibility range and GitHub Skill import guidance. · Replace tsdown's deprecated external setting with deps.neverBundle, preserving the client dependency externalization
数据来自仓库的 GitHub Release,可能与插件实际版本不一致。

README

由 DeepSeek 最新模型翻译生成
dsh-capability-menu 统一管理 DeepSeek Harness 工具与技能,高效检索、按需调用,节省上下文 简体中文 · English 目录 - 能力总览 - 能力模型 - 能力菜单 - 安装与卸载 - 从 npm 安装(推荐) - 从源码安装 - 验证安装 - 卸载 - 策略与目录 - 能力暴露规则 - 按需检索目录 能力总览 - 为 DeepSeek Harness 的 tools(包括 MCP 工具和内置工具)与 skills 建立统一能力目录:ctx.capability。 - 提供常驻 / 按需 / 禁用三档策略,管理能力的暴露与调用。 - 按需能力只在需要时提供给 Agent,减少单次请求携带的工具定义,节省 token 和上下文。 能力模型 Capability 是本插件引入的上位概念:Tool / Skill 是不同类型的 capability。
展开完整文档(README 剩余 1 节)
dsh-capability-menu

统一管理 DeepSeek Harness 工具与技能,高效检索、按需调用,节省上下文

简体中文 · English

目录

- 能力总览
- 能力模型
- 能力菜单
- 安装与卸载
- 从 npm 安装(推荐)
- 从源码安装
- 验证安装
- 卸载
- 策略与目录
- 能力暴露规则
- 按需检索目录

能力总览

- 为 DeepSeek Harness 的 tools(包括 MCP 工具和内置工具)与 skills 建立统一能力目录:ctx.capability。
- 提供常驻 / 按需 / 禁用三档策略,管理能力的暴露与调用。
- 按需能力只在需要时提供给 Agent,减少单次请求携带的工具定义,节省 token 和上下文。

能力模型

Capability 是本插件引入的上位概念:Tool / Skill 是不同类型的 capability。

| kind | 对 Agent 提供 | action | 备注 |
| tool | 执行一个动作(MCP 工具或内置原生工具) | execute | 由 ctx.tools 索引 |
| skill | 某类任务的方法/流程/知识 | load | 由 ctx.skills 索引 |

模型获得两个元工具:

| 工具 | 作用 | 对应 entry |
| meta_search | 搜索当前会话可用的按需能力;列表返回匹配总数、已返回数及是否截断,详情返回说明和工具参数 schema | @daweifu/capability-menu/search |
| meta_invoke | 统一执行面:Tool 真执行(走完整 ctx.tools 管线)+ Skill 加载;force: true 可重载已更新的 Skill | @daweifu/capability-menu/invoke |

能力菜单

安装后,在「设置」导航中选择「能力菜单」,即可管理 Tools 和 Skills。

| 操作 | 用法 |
| 更改档位 | 点击能力旁的圆点;也可以点击顶部档位计数,批量切换该组能力 |
| 查找能力 | 使用页签下方的过滤框搜索名称或分组;支持正则表达式,不区分大小写 |
| 查看能力详情 | 点击 Tool 查看定义;点击 Skill 展开文件列表并预览文件,内容按 Markdown 渲染 |
| 注册能力 | 点击右上角「注册能力」,添加 MCP 服务器或 Skill 目录;Skill 支持本机目录或公开 GitHub 链接 |
| 编辑或移除 | 在 Tools 的服务器分组或 Skills 的技能项中点击「编辑」 |
| 查看规则和按需目录 | 点击页头右侧的「策略与目录」,查看生效规则及按需能力摘要;可在按需检索目录中调整描述上限 |
| 编辑检索描述 | 将 Tool 或 Skill 设为「按需」后,点击旁边的「检索描述」,在来源描述的简短版本上修改 |

备注:

- MCP 名称:分组内省略 mcp__服务器名__ 前缀;悬停可看全名,检索和调用仍用完整 ID。
- 注册位置:MCP 写入 patch 配置(自动创建缺失的文件和目录);请求头等凭据也保存在其中,请妥善保管。Skill 在所选技能根目录创建链接或导入目录。
- GitHub Skill:支持公开仓库的默认分支根目录(含 SKILL.md)、指定分支根目录 .../tree/{branch} 或其下的技能目录 .../tree/{branch}/{skill-directory};也支持本机目录。导入需在运行 dsh 的机器上安装 Git;插件会校验 SKILL.md,只复制所选目录。

安装与卸载

前置:Node.js 与 dsh CLI。从 npm 安装无需单独安装 pnpm;从源码安装需要 pnpm。

依赖范围接受 DSH 0.2.x 稳定版及 0.2.1-rc.3 起的同版本预发布版;当前验证版本为 0.2.1-rc.3。npm 暂无 DSH 0.2.0 稳定版可供实测。

从 npm 安装(推荐)

dsh plugin --profile web add @daweifu/capability-menu

从源码安装

git clone https://github.com/PKUfudawei/dsh-capability-menu.git
cd dsh-capability-menu
pnpm install

dsh plugin --profile web add .

验证安装

cd "${DSH_HOME:-$HOME/.dsh}/profiles/web" && pnpm list @daweifu/capability-menu && dsh --profile web --dump-config | grep -m1 '== @daweifu/capability-menu'

卸载

dsh plugin --profile web remove @daweifu/capability-menu

策略与目录

这一章对应能力菜单中的「策略与目录」弹窗。

能力暴露规则

所有能力(Tool 与 Skill)按 暴露程度(模型在上下文中看到什么)与 执行方式 分为三档:

| 档位 | 能力 | 模型能看到什么 | 如何找到 | 如何使用 |
| 常驻 | tool | 工具定义始终随请求提供 | 无需查找 | 直接调用;运行时经过完整 ctx.tools 管线 |
| | skill | 名称和简介显示在 <available_skills> 中 | 无需查找 | skill 工具按需加载正文 |
| 按需 | tool | 不随请求提供工具定义 | 用 meta_search 搜索候选项 | 按精确 ID 查看参数后,用 meta_invoke 调用 |
| | skill | 不显示在 <available_skills> 中 | 用 meta_search 搜索 | 用 meta_invoke 加载 SKILL.md |
| 禁用 | tool | 不随请求提供工具定义 | meta_search 中不可见 | 调用会被拒绝 |
| | skill | 不显示在 <available_skills> 中 | meta_search 中不可见 | 加载会被拒绝 |

适用范围与例外:

- MCP 工具和可编目的 DSH 原生工具都支持三档;原生工具归入 built-in 分组。请勿将 MCP 服务器命名为 built-in,以免与该分组冲突。
- meta_search 和 meta_invoke 默认常驻,不能在菜单中禁用。DSH Code Mode 的入口 run_code 不进入本插件的目录或菜单;手写通配规则仍可能匹配它,请勿将其设为按需或禁用。
- 高频工具建议保持常驻;按需工具可通过 meta_search 找 ID、查看参数 schema,再调用。

规则配置与保存

弹窗显示的是当前生效规则,由手写规则和菜单选择合成,并非另一份 YAML 文件。手写规则位于 capability-menu-policy entry 的 config 下。以下是配置片段;完整安装补丁见 cordis.patch.yml。

- 默认 patch 是 ${DSH_HOME:-~/.dsh}/cordis.patch.yml;Profile 也可在自己的 patch 中覆盖该 entry。
- 菜单中的档位调整立即生效,停手约 1.5 秒后写入 stateFile;检索描述和描述上限也保存在这里。这些写入不会触发 DSH 配置重载。手写规则仍是基础;界面选择覆盖同一能力的精确规则,禁用通配规则仍优先。
- stateFile 默认在 ${DSH_HOME:-~/.dsh}/capability-menu-policy.json(默认 patch 的同目录),各 Profile 共用;需要隔离时,在 policy 和 registry 两个 entry 中指定同一个 stateFile。要清除界面选择,停止 DSH 后删除状态文件;原有 patch 规则仍会生效。

config:
tools:
on-demand: # 按需
- 'mcp__example__' # 某个 MCP 服务器下的工具 disabled: # 禁用
- 'mcp__secret__'
skills:
on-demand: # 按需
- example_skill # 未列出的能力默认常驻

通常只需设置 tools 和 skills。文件路径与防抖等可选项用默认值即可;完整参数见 policy 配置 和 registry 配置。

规则优先级: 按序匹配;禁用优先。在常驻与按需之间,精确规则优先于通配;同为精确或同为通配时,常驻优先。未命中任何规则则常驻。

| 优先级 | 规则 | 示例 |
| 1 | disabled 精确或通配 | disabled: [forbidden_skill, 'mcp__secret__'] |
| 2 | resident 精确 | resident: [bash] |
| 3 | on-demand 精确 | on-demand: [example_skill] |
| 4 | resident 通配 | resident: ['mcp__gongfeng__'] |
| 5 | on-demand 通配 | on-demand: ['mcp__*'] |
| 默认 | 未命中任何规则 | — |

在能力菜单点击档位会写入精确规则。若更高优先级规则覆盖了所选档位,界面会提示「分类未生效」。

按需检索目录

meta_search 是智能体检索按需工具和技能的唯一入口。「策略与目录 → 按需检索目录」直接显示同一内存索引中的按需能力摘要,不生成单独的 YAML 文件。智能体的检索结果还会按当前会话的可用范围过滤。

- 检索描述: 按需能力旁可打开编辑框。默认取工具或技能的来源描述,最多 summaryMaxChars 个字符(默认 320,截断时优先保留完整词句);技能描述无有效内容时使用 whenToUse。meta_search 列表与关键词匹配均使用这段摘要。自定义后改用保存的文字,不改变来源定义或精确详情。「还原」仅重置输入框,仍需「保存」。
- 描述上限: 在「策略与目录 → 按需检索目录」修改,最小 20 字符。设置保存在 stateFile,优先于 patch 中的 summaryMaxChars;降低上限前需先缩短超限的自定义描述。
- 检索与调用: 使用 meta_search({query}) 查找匹配的候选项,再用 meta_search({id, kind}) 查看完整参数 schema,最后用 meta_invoke({id, kind, args}) 调用或加载。不知道关键词时可用 meta_search({}) 查看前几项概览。单次默认最多返回 20 项,可用 max_results 调整至 100 项;若结果被截断,请缩小查询范围。技能须先注册到 ctx.skills;若要重新加载会话中已读取的技能,传 force: true。

License

本项目遵循 Apache License 2.0。
预览分享卡片长什么样 ↓PKUfudawei/dsh-capability-menu
分享 · DeepSeek Harness Hub
PKUfudawei/dsh-capability-menu

统一管理 DeepSeek Harness 工具与技能,高效检索、按需调用,节省上下文

回到顶部