QWE13-ART/dsh-skill-folder ↗★ 0
dsh-skill-folder
Fold the DSH skill catalog prompt surface: static KV-cache-stable catalog + BM25/bge-m3 hybrid skill_search + autoRoute hints. Rendering-only fold: source.entries stay untouched, the skill tool and /name injection stay host-owned. v0.3.0 adds a semantic retrieval leg (local Ollama bge-m3, RRF hybrid) and auto-route skill hints appended to the user message tail (KV-safe). 适合需要精简系统提示词、节省 Token 并保持技能检索精度的用户。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:QWE13-ART/dsh-skill-folderREADME
Read the full README ↗配置(schemastery,profile 可按 id: skill-folder 覆盖)
| 键 | 默认 | 说明 |
|---|---|---|
enabled | true | 总开关:关闭则完全不注册监听器 |
core | ["dsh-injection-guard", "dsh-verification"] | P0 常驻:每轮全量描述可见(安全底线,不截断;deny 不能删除 core) |
deny | [] | P3 剔除:精确名或 prefix*;core 技能豁免 |
aliases | 8 技能中文映射 | 意图词→技能:skill_search 检索索引(BM25 加分),中文意图可命中英文技能 |
maxDescLength | 100 | 非 core 技能描述最大长度(core 不受限) |
maxFoldMs | 5 | 裁剪耗时上限(ms),超时仅告警,结果仍应用 |
toolSearchEnabled | true | 注册 skill_search 检索工具(静态前缀,结果追加尾部,不破坏缓存) |
maxDescLength | 100 | 动态条目描述最大长度;core 不受限 |
maxFoldMs | 5 | 裁剪耗时上限(ms),超时仅告警,结果仍放行 |
默认 aliases(键名均为真实存在的技能名——v0.3.3 修掉了 9 个从不匹配的死引用):
{
"dsh-memory": ["记忆", "回忆", "记住", "memory", "remember"],
"dsh-grilling": ["访谈", "对齐", "先问我", "grilling", "问清楚", "开工前"],
"dsh-subagent-orchestration": ["委派", "子智能体", "subagent", "delegate", "openhands"],
"dsh-injection-guard": ["注入", "安全", "不可信", "injection", "外部内容"],
"dsh-verification": ["验证", "检查完成", "防假完成", "verify", "审查", "评审", "code review"],
"dsh-debugging": ["排查", "诊断", "bug", "崩溃", "报错", "异常", "debug", "变慢"],
"cordis-plugin-development": ["插件", "cordis", "plugin", "动态插件", "开发插件", "扩展插件"],
"editing-cordis-compositions": ["编排", "composition", "compose", "cordis.yml", "插件配置", "组合"],
}
core / deny / aliases 的键(技能名)均支持精确名或 prefix* 前缀匹配。
v0.3.3 — 死配置清理 + wrapper 内联(2026-08-31)
- 默认配置里 9 个技能名不存在(真 bug,不只是冗余):
core想常驻「防假完成」 技能作为安全底线,但写的是dsh-verifier,真名是dsh-verification——这条 安全底线一直是空的。同样修正:dsh-bug-diagnosis→dsh-debugging、viking-memory-guide→dsh-memory、dsh-delegation-checklist→dsh-subagent-orchestration;删除dsh-context-language、dsh-two-axis-review两个死 alias 键与deny的两个死条目(deny默认改为[])。 lib/tool-skill-search.js删除:enrichPoolWithFrontmatter归入skill-search.js(纯逻辑),buildSkillSearchTool归入index.js(宿主契约)。skill-search.js头部注释原本就写着 wrapper 在 index.js——代码终于和注释一致。test/清理 45 个一次性调研脚本:npm test只跑test/*.test.js,这些analyze-*/check-*/scan-*/baseline-*从未被任何测试引用。有长期价值的validate-metadata.js、type-aware-scorer.js移到scripts/。
净减 4609 行(157 增 / 4766 删)。77/77 测试全绿,真 cordis Context 预检通过。