DeepSeek Harness (DSH) injects a full skill catalog into every new session by default, consisting of each skill’s name plus a description of up to 500 characters. As the number of installed skills grows, this consumes roughly 3K tokens of persistent context, even though the model rarely reaches all of these skills during real runs. dsh-skill-lazy mitigates this context waste by replacing it with a compact catalog and an on-demand retrieval mechanism.
Core Features¶
Compact Catalog Injection
Before each agent execution, the plugin rewrites the official skill-catalog message into a <system-reminder> block. The block contains only the skill name and a one-line summary (default length ≤ 40 characters). Catalog entries are sorted by usage frequency (falling back to alphabetical order when there is no usage data). The underlying source.entries remains unchanged, so it does not affect Harness’s own deduplication logic.
On-Demand Retrieval (skill_search)
The plugin registers the skill_search tool to retrieve full descriptions when needed. Retrieval is based on keywords, description substring matching, and Chinese 2-gram overlap scoring. Results are grouped by MECE (mutually exclusive, collectively exhaustive) domains and include a domain coverage report.
MECE Check (skill_mece_check)
Before creating or evaluating a skill, you can invoke the skill_mece_check tool. It checks keyword exclusivity between the new skill and existing skills (including overlap ratios) and the exhaustiveness of domain coverage, and provides recommendations for either creating a new skill or extending an existing skill.
Cost Audit (cost_audit)
The plugin includes a built-in cost_audit token monitoring tool (added on 2026-08-21). It measures the character/token cost of each plugin tool description and skill catalog description, and compares them against budgets. The default budget is 1500 tokens for tool descriptions and 800 tokens for the skill catalog. A single tool description exceeding 700 characters is also flagged as a recommendation candidate for trimming.
Usage Tracking and Proactive Prompts
Via the tools/post-execute hook, the plugin records each invocation of the skill tool into usage.json (runtime data, excluded by .gitignore). The recorded call counts drive the catalog sorting. In addition, the plugin can inject proactive match prompts (Top-3 relevant skills) after user messages.
Installation and Configuration¶
Installation
Run the following command in your terminal to install the plugin:
dsh plugin --profile web add github:boomzikazita/dsh-skill-lazy
Prerequisites
DeepSeek Harness requires @deepseek-ai/dsh-tools >= 0.1.0-rc.6 (not a built-in dependency).
Configuration
The plugin is mounted via cordis.patch.yml. To customize parameters, add the following fields to the configuration:
| Config Item | Default | Description |
|---|---|---|
catalogDescriptionMaxLength |
40 |
Maximum number of characters for each skill summary in the compact catalog. |
topK |
6 |
Maximum number of hits returned per domain group by skill_search (limited to 1–20). |
sortByUsage |
true |
Whether to sort catalog entries by usage frequency. |
matchThreshold |
6 |
Minimum relevance score for proactive match prompts. |
Example configuration snippet:
- insert:
- id: skill-lazy
name: 'dsh-skill-lazy'
config:
catalogDescriptionMaxLength: 40
topK: 6
Typical Usage¶
-
Retrieving Skills
When detailed information is needed, invoke theskill_searchtool with keywords. The tool returns the full description, usage count, and search results grouped by domain. -
Checking Domain Coverage
Before creating a new skill, runskill_mece_checkto ensure that the new skill does not overlap with existing skills and covers the required domains. -
Auditing Token Costs
Periodically review the output ofcost_auditto identify tool or skill descriptions that exceed the token budget of 1500 (tools) or 800 (skills), and trim them.
Notes¶
- The plugin depends on the DeepSeek Harness runtime environment. Make sure the required version of
@deepseek-ai/dsh-toolsis installed. usage.jsonis generated at runtime and is not tracked by Git.- If a tool description is too long, an audit warning is triggered. It is recommended to move detailed documentation to the skill’s own documentation directory instead of injecting it into the description.
dsh-skill-lazy trades a small amount of initial retrieval latency for significant context token savings, making it suitable for scenarios with large skill libraries. For more details, refer to the GitHub repository or the skill catalog page.