The DeepSeek Harness (DSH) plugin ecosystem emphasizes “everything is a plugin”. In the current architecture, the skill tool is typically passively triggered: the model must realize on its own that it needs to query the catalog, or rely on the user to explicitly name it. This leads to unreliable routing decisions.
The dsh-plugin-skill-autoroute plugin addresses this issue. On every user instruction, it performs a deterministic routing scan without relying on the LLM to make decisions. It retrieves candidates from the Host’s live skill catalog and injects exactly one routing hint for the model to act on.
Core Capabilities¶
This plugin implements a deterministic routing logic with the following features:
- Zero LLM calls: The routing algorithm is based on local dictionaries and policies, consuming no additional model calls.
- Real-time scanning: Scans the Host’s
skillsservice directory to obtain the currently visible list of skills. - Single injection: Only one routing message is injected per user instruction to avoid context pollution.
- Three modes:
brief(default): Injects a briefing of the Top-N candidate skills.load: Automatically injects the fullSKILL.mdcontent of the champion skill.router: Forces a call to a specified router-skill.
Installation¶
Installation via plugin_manager is recommended:
plugin_manager install_bundle → target: link:<path-to-this-repo>
Configuration & Usage¶
The configuration file is located at <DSH_PROFILE_DIR>/cordis.patch.yml. After modification, you must toggle the plugin state via plugin_manager for changes to take effect.
- id: dsh-plugin-skill-autoroute
config:
mode: brief # off | brief | load | router
routerSkills: ['skill-selector', 'skill-router']
candidates: 3 # Number of candidates displayed in the briefing
minScore: 0.28 # Threshold for candidate selection
loadMinScore: 0.55 # Threshold for loading content in load mode
debug: true # Enable logging
Key Configuration Options¶
| Field | Purpose |
|---|---|
mode |
Determines the form of the injected content. brief outputs a list, load outputs full content, and router outputs a call instruction. |
candidates |
The Top-N quantity in brief mode. |
routerSkills |
A list of skills forced to be called in router mode; the first installed skill is used. |
lexicon |
A Chinese-English bridging dictionary that resolves mismatches between Chinese instructions and English skill names. |
rulesEnabled |
Whether to enable the local policy layer (same-domain priority, meta-skill demotion, etc.). |
How It Works¶
The plugin mounts at the agent/pre-step hook point. When a user instruction is received, the process is as follows:
- Read the message about to enter the model within
agent/pre-step. - Call the Host’s
skillsservice (list()) to retrieve the skill catalog. - Score and rank skills based on the configured dictionary, policies, and scoring algorithms.
- Inject a synthesized message according to the mode:
- brief: Injects a message of type
noticecontaining the candidate list. - load: If the champion’s score meets the threshold, injects a message of type
instructionscontaining the skill’s full content. - router: Injects a message of type
instructionsthat forces a call toskill(name="...").
- brief: Injects a message of type
Known Limitations¶
- Read-only global skill layer: The plugin only reads the Host’s global skill layer and does not include skills registered in the agent preset private layer.
- Maintenance cost: The routing logic is deterministic and relies on manual maintenance of the Chinese-English bridging dictionary and local policy layer. Manual updates are required when adding new skills or new phrasings.
- Explicit priority: When a user explicitly names a skill, it takes the highest priority, overriding intent judgment.