Introduction¶
DeepSeek Harness (dsh) is an “everything is a plugin” agent framework. For developers, relying only on manual prompt tuning to improve agent performance is inefficient. To achieve agent self-evolution, a mechanism is needed that can leverage an agent’s own historical conversation data to optimize behavior without consuming additional API budget.
The dsh-skillopt plugin solves this problem. It integrates Microsoft’s SkillOpt-Sleep engine into dsh’s plugin system, giving your DeepSeek Harness agent a “nightly sleep cycle”: it reviews past conversations offline, replays recurring tasks within your own API budget, and locks learned knowledge into skills through a held-out gate (holdout validation). The underlying engine is the same one used in the Claude Code / Codex / Cursor integrations.
Core Features¶
The plugin provides a complete skill optimization loop by registering native tools:
- Data collection and preview:
skillopt_harvestonly reads and exports extracted tasks (read-only operation);skillopt_dry_runsimulates the whole process without making any actual changes;skillopt_statuschecks the current engine state and latest proposals. - Execution and application:
skillopt_runruns the full cycle and generates proposals for adoption;skillopt_adoptapplies the latest proposal (an automatic backup is created before execution). - Scheduling management:
skillopt_scheduleandskillopt_unscheduleinstall or remove the nightly scheduled task.
Installation and Enablement¶
Prerequisites:
* DeepSeek Harness (dsh) is installed.
* Python 3.10+ is installed, and the SkillOpt-Sleep engine is installed:
pip install skillopt
Installation command:
Run the following command in the DeepSeek Harness source checkout directory to inject the plugin into the current profile as a patch:
pnpm dsh web --patch ./plugins/dsh/cordis.patch.yml
After installation, you can use the feature through agent interaction, for example by asking: Use skillopt_status to check the sleep cycle state.
Typical Usage¶
- Status check: Use
skillopt_statusto check the status of the sleep cycle. - Offline validation: Run a Python script for experimental validation without consuming API budget:
python -m skillopt_sleep.experiments.run_experiment --persona researcher --assert-improves
Notes¶
- Data boundaries: The Harvest phase is read-only; the
runphase only generates proposals and does not modify anything in real time; only theadoptphase applies changes (and makes a backup first). - Limits: The plugin includes limit settings such as
MaxTasksandMaxSessionsto constrain the amount of mining and sampling. - License: This plugin uses the MIT License.
Summary¶
dsh-skillopt standardizes agent self-reflection and skill consolidation. Through offline review and controllable proposals, it helps developers improve agent capabilities using existing data without relying on external API budget.
More information and source code:
* Catalog Page
* GitHub Repository