DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Lean Mode — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
L

@local/dsh-lean-mode

Lean Mode

Present DSH tools to the model in a lean, executable form — installed, it just works.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:q862877400-ux/dsh-lean-mode#15076a54679951b4764389b082af544cb49eb98d
READMECompatibilityVersions

Compatibility and provenance

Lean Mode is published as @local/dsh-lean-mode and currently resolves to version 1.0.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
10/6/2026

Versions

1.0.0stable
10/6/2026
Latest
1.0.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/18/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

README

dsh-lean-mode

English | 中文

A DeepSeek Harness plugin that presents every tool to the model in a lean, executable form — install it and it just works, remove it and the old form is back. No core changes.


The problem

Tool schemas are sent on every request. In a deployment with hundreds of MCP tools they dominate the context:

DeploymentToolsTool schemasShare of the first request
Default standard preset (measured on a real deployment)8489 KB~22,300 of 36,264 tokens — 61.6%
All MCP tools mounted731988 KB~275,000 tokens — 27.5% of a 1M window

Most of that is JSON-Schema punctuation the model rarely needs: nested descriptions, deep objects, defaults. The names and the top-level contract are what make a call possible.

What this plugin does

Two things, per assembly:

  1. Shrinks each tool's parameter schema to its top-level contract — top-level keys, required, each key's type and a short enum when declared. Nested structure, descriptions and defaults are dropped.
  2. Appends a tools:catalog prompt section listing every tool — including the ones the model is unlikely to recall — with the exact argument envelope and a one-line purpose.

Why the envelope must survive

In a real catalogue 64% of tools take a single required wrapper key (commonly params). Collapse the schema to an open {type:'object'} and the model flattens the arguments, so every call is rejected:

Channel shapeCalls that actually execute
Open skeleton additionalProperties: true
1.7%
Top-level contract kept95.0%

Measured effect

Same model, same 199-task set, same catalogue:

ToolsBaseline (full schemas)leanRatio
26~5,340 tok~2,385 tok0.45
84 (a real deployment's default preset)~22,300 tok~9,400 tok0.42
731 (every MCP tool)~275,000 tok~68,000 tok★ 0.247

End-to-end callability (tool name in the catalogue and the emitted arguments satisfy the real schema):

PresentationEnd-to-end
Full JSON Schema95.0%
lean89.9%
Open skeleton only1.7%

Install

From GitHub (verified end to end: installed this way, the mode appears in the UI preset menu and takes effect)

dsh plugin --profile web add github:q862877400-ux/dsh-lean-mode

From a local checkout

dsh plugin --profile web add <path to this directory>

Uninstall

dsh plugin --profile <profile> remove @local/dsh-lean-mode

The bundle carries both the plugin row and a Lean mode preset declaration, so once installed the mode appears in the UI's preset menu; removing the bundle removes both.

How it works

system-prompt/assemble is a waterfall whose contract states the returned value is authoritative, and scoped listeners receive only that scope's assemblies. This plugin therefore:

  • registers a profile-level listener, so it sees every assembly;
  • asks agentPresets.composedPreset(agent.ctx) which preset the assembly's agent runs under;
  • transforms only when that preset is one it was configured for.
export function apply(ctx, config) {
  const wanted = config?.presets            // e.g. ['lean']
  ctx.on('system-prompt/assemble', async (assembly, context, next) => {
    const base = await next()
    if (wanted && !wanted.includes(presetOf(ctx, context?.scope))) return base
    return { ...base, tools: base.tools.map(toShallow), sections: [...base.sections, catalog] }
  })
}

It uses only upstream APIs — no new tools.mode value, no patched package.

Configuration

KeyDefaultMeaning
presetsundefinedPreset ids this applies to. Omit to apply to every session.
shapetrueProject parameters to the top-level contract.
catalogtrueAppend the tools:catalog section.

Limitations

  • ★ All figures were measured on one local deployment (731-tool catalogue unioned from real sessions; 199 tasks; a single model). Ratios will differ elsewhere — re-measure before relying on them.
  • ★ Callability is judged as "the emitted call is valid against the real schema", not "the tool succeeded on a machine".
  • ★ End-to-end accuracy (89.9% vs 95.0%) is a single-run figure on that task set.
  • ★ The catalogue repeats each tool's one-line purpose, so the win grows with the size of the parameters, not merely the count of tools.

License

MIT. See LICENSE and THIRD-PARTY.md — cordis.patch.yml restates a preset composition from DeepSeek Harness (MIT, Copyright (c) 2026 DeepSeek); the plugin source is original.