dsh-skill-router

by akqwpeter-prog

0 模型与账号接入github 检测到 manifest package.json#dsh收录于 08-16

DeepSeek Harness规则优先预步骤技能路由器:在高置信度命中上投放匹配技能,否则保持沉默。技能酒保的伴侣执行器。

⚙️ Rule-first pre-step skill router for DeepSeek Harness: pours matched skills on high-confidence hits, stays silent otherwise. Companion executor to skill-bartender.

安装

dsh plugin --profile web add github:akqwpeter-prog/dsh-skill-router

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

🍸→⚙️ dsh-skill-router

Rule-first pre-step skill routing for DeepSeek Harness: pours matched skills, stays silent when unsure.

License: MIT Test CI DeepSeek Harness Deterministic Once per session Companion Docs

Companion executor to skill-bartender: the skill carries the policy judgment, this plugin carries the execution. Deterministic, zero LLM calls, zero token cost until a rule actually pours:

  • ⚡ Pre-step hook — reads the latest user message before every step.
  • 🧭 Rule-first matching — user-editable YAML policy (~/.dsh/skill-router.yaml, bundled defaults in default-policy.yaml), first match wins.
  • 🔇 Silent miss — no hit → zero intervention; the model keeps its normal catalog flow.
  • ♻️ Once per session — each skill pours at most once.
  • 🛡️ Broken YAML never breaks the session — falls back to bundled defaults.

Why · How it works · What you get · Quick start · See it in action · Policy · Tested · Scope & non-goals · FAQ · Layout · License

English · 简体中文


🤔 Why

Most skill loading is left to the model's judgment: it sees the catalog every step, re-decides every time, and often loads late, wrong, or not at all. A router that runs before the model answers fixes that:

dsh-skill-router LLM-judge router Manual loading
Decision maker rules (deterministic) LLM / embeddings the model, per step
Token cost zero until a rule pours every step every step
Latency added ~0 ms model round-trip n/a
Reproducible ✅ same message → same pour ❌ varies ❌ varies
User control edit YAML, done prompt it hope it remembers

Why rules and not an LLM judge? Speed, cost, and predictability. A URL-path rule routes feishu.cn/x/docx/ to lark-doc in microseconds, for free, every time — and skill-bartender's routing table is where the policy judgment lives. This plugin is the muscle, not the brain.

⚙️ How it works

  • Hooks agent/pre-step, reads the latest user message.
  • Matches it against user-editable rules (~/.dsh/skill-router.yaml, bundled defaults in default-policy.yaml). First match wins.
  • On a hit: pours the matched skill bodies into the step as skill-invocation messages — the catalog's "already loaded, don't re-load" rule applies automatically.
  • No hit: zero intervention. The model keeps its normal catalog flow.
  • Each skill pours at most once per session.

✨ What you get

Capability What it does
⚡ Pre-step hook agent/pre-step — the pour happens before the model starts thinking
🧭 YAML policy User-editable ~/.dsh/skill-router.yaml; broken YAML falls back to bundled defaults
🔎 whenToUse triggers Installed skills' whenToUse frontmatter acts as a secondary trigger (literal phrase match, appended after YAML rules)
🚀 Zero cost No LLM judge, no embeddings — rules only (fast, free, deterministic)
♻️ Once per session Dedupes pours per session; no skill body floods the context
🔗 Companion Works with skill-bartender's routing table and taste test

⚡ Quick start

dsh plugin --profile web add github:akqwpeter-prog/dsh-skill-router

Then restart the running instance (profile bundles load at boot).

Verify: say "生成一张海报" — media-tools pours automatically; say "这个截图帮我检查一下" — vision-review pours. No rules matched? The model just works as usual.

📸 See it in action

One picture: a rule hits → the skill pours before the model answers; no hit → total silence.

🧭 Policy

# ~/.dsh/skill-router.yaml
rules:
  - match: "(生成|画).{0,12}(图|海报|banner)"
    pour: [media-tools]
  • Ordered by precision: URL-path routing first, media, delegation, workflow skills before atomics.
  • First matching rule wins; pour lists the skill names to load.
  • Broken YAML falls back to bundled defaults and never breaks the session.
  • Write it as data: improve matching by editing YAML, not code.
  • Full reference: docs/POLICY.md · bundled defaults: default-policy.yaml · walkthrough: docs/EXAMPLES.md.

🧪 Tested

Integration suite (10 cases) run against a live profile: pour, dedupe, zero-touch, reject passthrough, URL routing, mail-vs-IM disambiguation, false-positive guards. See test/ in the repo, plus the design notes in DESIGN.md and the gold-task list in GOLD-TASKS.md.

🎯 Scope & non-goals

  • No LLM judge, no embeddings: rules only (fast, free, deterministic).
  • No auto-install of missing skills: that stays in skill-bartender's quarantine → SkillSpector → human-approval flow.
  • Rule table is data: improve matching by editing YAML, not code.
  • whenToUse frontmatter on installed skills acts as a secondary trigger (literal phrase match, appended after YAML rules). Write it as a short trigger phrase; long prose never matches. Today's skill data mostly lacks the field — skill-bartender's taste test can backfill it.

❓ FAQ

Does it consume tokens when nothing matches? No. No hit → zero intervention, zero LLM calls. The router only reads text already in the step and runs regex rules — microseconds, free.

How is it different from skill-bartender? skill-bartender is the judgment (which skill fits, when to stay silent, how to install safely). This plugin is the execution (a deterministic pre-step hook that pours). They complement each other; the router works standalone too.

Can I use my own rules? Yes — copy default-policy.yaml to ~/.dsh/skill-router.yaml and edit. First match wins; broken YAML falls back to defaults.

Does it pour the same skill twice in one session? No — each skill pours at most once per session, so context never floods.

🗺️ Layout

dsh-skill-router/
├── index.js               # Cordis plugin: pre-step hook + pour logic
├── policy.js              # rule loading / matching (unit-tested)
├── default-policy.yaml    # bundled defaults (copy to ~/.dsh/skill-router.yaml)
├── test/                  # policy unit tests + integration suite
├── DESIGN.md / GOLD-TASKS.md    # design notes + gold tasks
├── docs/
│   ├── screenshots/how-it-works.png
│   ├── POLICY.md / EXAMPLES.md
│   ├── social-preview.png  # banner (regenerate via scripts/)
│   └── lang/README_ZH.md   # 简体中文
├── scripts/
│   ├── make-banner.py      # composes docs/social-preview.png
│   ├── make-diagram.py     # composes the how-it-works diagram
│   └── check-policy.mjs    # policy validation
├── cordis.patch.yml / package.json   # DSH bundle manifest
└── LICENSE (MIT)

🤝 Join the DSH plugin ecosystem

DeepSeek Harness developer preview is still in its testing phase for Harness developers; core plugins and base APIs will keep iterating. We look forward to exploring the upper limits of intelligence together with developers worldwide, on top of open-source, open, reusable, and composable infrastructure.

This repo is tagged dsh-plugin and listed in the curated list. PRs, issues and translations are welcome.

📄 License

MIT

原始 README: https://github.com/MJorgin/dsh-skill-router/blob/main/README.md ↗

同类插件

查看全部 →
模型与账号接入Anionex

agent-vision-toolkit

为纯文本模型"看图“设计更好的视觉工具箱和技能,支持多图理解,图片问答,前端UI还原、GUI 自动化等,并可选无缝接入多个主流agent,直接识别粘贴图片| A vision toolkit and skill designed for text-only llms — image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, with optional seamless integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode

查看详情
928github+08-16
模型与账号接入toby-bridges

api-relay-audit

从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。

查看详情
791github+08-21
模型与账号接入ZJU-LLMs

OpenStory

✨ OpenStory 现已支持 DeepSeek Harness 插件! 现在可以通过 dsh-openstory 将 OpenStory 多智能体推演接入 DeepSeek Harness,让 agent 直接启动模拟、查看角色、下达指令并逐回合推进故事。查看 DSH 插件配置与使用指南。

查看详情
377github+08-17
模型与账号接入pulseaiclub

phi

pi的编码代理 ∞ 提供者、子代理、hashline编辑和权限门

查看详情
89github+08-16
模型与账号接入anysearch-team

anysearch-dsh

DeepSeek Harness(DSH)的 AnySearch 网络搜索提供方与高级搜索工具。

查看详情
79github+08-17
模型与账号接入kuangre123

codex-switch

Codex Switch 是一个 macOS 工具,一键配置 Codex 的自定义 API,同时保留官方 OpenAI 登录。保存后 Codex 的模型选择器里只会出现你选的那个 provider 的模型。也支持 Claude Code 的官方 / 自定义 API 切换。Codex Switch is a lightweight helper for configuring multiple coding-agent API routes. For Codex, it keeps Official OpenAI and a custom API provider configured in parallel, registers the custom model in Codex's mod

查看详情
67github+08-16