Preface

When writing code, modifying repositories, and going through code reviews with DeepSeek Harness (dsh), teams often have to repeatedly explain the same things: how to write commit messages, how to run tests, which files should not be modified. When switching conversations, the agent will go back to asking “please explain your team’s standards again”. Memory plugins can store facts, but they may not precipitate “how to do these things” into skills that can be directly called in subsequent conversations.

The community plugin distill takes a different approach: it does not register additional tools in the main conversation, but only dispatches a reflective sub-agent in the background at the end of each turn, to turn reusable workflows into SKILL.md. It does not replace graph memory or long-term memory, but turns “what has been done” into “how to do it later”.

This article is collated after cross-checking the community directory page, the GitHub repository README, package.json and src/index.ts. The community directory site https://deepseek-harness-plugin.com/zh-CN/plugins/ is an independent inclusion page, and has no official affiliation with DeepSeek / Hoohua; the official runtime still follows https://github.com/deepseek-ai/deepseek-harness, whose core concept is “everything is a plugin”.

What is this

distill is a “memory” plugin for DeepSeek Harness, maintained by GitHub user LoserFox, with the repository at LoserFox/distill. The npm package name is @loserfox/distill, current version 0.1.0, main language is TypeScript. It was included in the directory page on 2026-08-03; the GitHub repository showed 19 stars on 2026-08-17 (the directory page showed 16 at that time, please refer to GitHub for star counts).

The positioning of the directory page can be summarized in one sentence: After each turn ends, a background sub-agent reviews the conversation and precipitates experience into skill creation or updates; it only hooks into agent/turn-stopping, and does not register any model-facing tools or skills.

package.json lists the license as BSD-3-Clause, but there is no LICENSE file in the repository root, and GitHub does not recognize the SPDX license. You should check the license declaration in the source code yourself before installing.

Core Features

Main conversation remains unchanged

The plugin’s insertion line ID is distill (see the repository’s cordis.patch.yml). It does not add anything to the main agent’s tool list or skill list, so there will be no extra “distill” button or new tool names in the conversation surface. The README states: The only indirect effect visible to the model is that the background reflective sub-agent comes with a skill viewer, and the skills written in will appear in the dsh-tool-skill directory in subsequent rounds.

The reflective dispatch itself is recorded in the log, invisible to the conversation loop, and will not compete for tool calls with the user’s current task.

Distill after turn ends

The trigger point is agent/turn-stopping. The general workflow of one reflection is as follows:
1. Collect new human user/message since the last distillation checkpoint.
2. When the number reaches minUserMessages (default 3), dispatch a background reflective sub-agent.
3. The sub-agent’s tool whitelist only retains the skill viewer; the result follows a structured output contract instead of free text.
4. Whether skip / create / update, the checkpoint will advance to the last reviewed message, and the next round will only cover new messages.

Only one ongoing reflection is allowed per session at the same time; ended rounds that arrive before the reflection is completed will be skipped, and will be evaluated again in the next settlement.

The target routing of the reflective sub-agent preferentially uses the paired provider / model in the configuration; if neither is configured, it will use the agent.options of the just-ended agent itself. If neither exists, this round will be skipped and a warning will be logged. The default name of the sub-agent provider is spawn (providerName). If the provider is missing, the operation fails, it is canceled, or no result is captured, only a warning will be logged, and the main loop will not crash.

Three proposal types, written to local skill packages

The sub-agent can only give one of the following three structured results:
- {"action": "skip"}: No content worth saving.
- {"action": "create", "skill": {"name", "description", "whenToUse?", "content"}}: Create a new skill, written as a SKILL.md package with frontmatter, which will be discovered by the local skill provider just like handwritten skills. The corresponding discovery plugin in the source code comments is dsh-skill-filesystem.
- {"action": "update", "skill": {...}}: Perform a full file replacement on a previously distilled skill.

Validation will be performed before landing: the skill name must pass isSkillName (kebab-case), and the description and content cannot be empty. If the target file already exists during creation, it will be skipped. Update only acts on files that already have the plugin ownership mark:

distilled-by: dsh-distill

Skills missing this mark, or not distilled by this plugin, will be skipped during update and a warning will be logged. Therefore, handwritten skills, built-in skills, and runtime-registered skills will not be overwritten. Only skills with this mark will appear in the sub-agent’s updatable list.

The default write location is determined by targetRoot:
- project (default): .agents/skills under the repository git root; falls back to the session cwd if no .git ancestor is found.
- user: ~/.agents/skills. The user root directory can be overridden by agentsHome or the environment variable DSH_AGENTS_HOME in the source code.

Prompt source

The reflection prompt is adapted from _SKILL_REVIEW_PROMPT of Nous Research’s hermes-agent (MIT, Copyright (c) 2025 Nous Research), with tool references and output contracts modified for the DSH interface. The full attribution is written in the header of the src/index.ts file. The prompt requires the generation of “class-level” skills (how to do a category of tasks), rather than fragmented entries for one session.

Installation and Enablement

The installation command given on the directory page can be run in the DeepSeek Harness terminal:

dsh plugin add github:LoserFox/distill

When you need to install to a specified profile (such as web), refer to the repository README:

dsh plugin --profile web add github:LoserFox/distill
dsh --profile web --dump-config | grep distill

For reproducible installations, the directory page recommends pinning the commit hash. The latest commit on the current main branch is d2aaa395adeffe88e429be796c12d829752cbad1 from 2026-08-13 (commit message: migrate to official 0.1.0-rc.5 and publish as @loserfox/distill):

dsh plugin add github:LoserFox/distill#d2aaa395adeffe88e429be796c12d829752cbad1

Uninstallation:

dsh plugin --profile web remove distill

You must restart the DSH process of the target profile after installation. The README states that composite layer changes do not participate in HMR hot updates.

Host prerequisites (included by default in the base bundle):
- subagent-spawn-in-process: Registers the spawn provider used by the reflective sub-agent
- tool-skill: The skill viewer callable by the sub-agent

The plugin also requires ctx.subagents (inject: ['subagents']). Deployments without tool-skill will still run the reflection, but the sub-agent will not be able to view existing skills before proposing. The peerDependencies in package.json marks @deepseek-ai/dsh-agent as ^0.1.0-rc.6.

Configuration Items

The configuration fields are based on the repository README and cross-checked against the Config in src/index.ts:

Field Default Value Meaning
enabled true Master switch
minUserMessages 3 Number of new human user messages required to trigger one reflection
provider / model Not set Explicit auxiliary routing, must be provided in pairs; uses the agent’s own routing by default
maxTokens 2048 Token limit for reflective sub-agent output
timeoutMs 30000 End-to-end deadline for reflection (milliseconds)
targetRoot project project writes to project .agents/skills; user writes to the user-level skill directory
providerName spawn Sub-agent provider registration name used by the reflective sub-agent
allowUpdate true Whether to allow updating previously distilled skills; false only allows create

provider and model must appear in pairs; configuring only one will throw an error during the validation phase. There is also an optional field agentsHome in the source code, used to override the root directory of the user target.

Applicable Scenarios and Notes

The usage directions given on the directory page include: extracting working methods (commit conventions, review preferences, project habits) from real conversations, so that new conversations or new agents can start from existing specifications; turning repeatedly verbally explained workflows into skills. The directory page also reminds: occasionally review the distilled results, delete outdated entries, merge overlapping skills, and rephrase them to read like team standards. The distillation quality depends on the quality of the conversation, and it will not automatically make the agent “understand you better” just by installing it.

You need to know the boundaries of the current implementation before using it:
- Only full file updates are supported. The update will rewrite the entire SKILL.md, does not support partial patches, and cannot write support files such as references/, templates/, scripts/.
- Ownership mark is selected by source. Skills distilled before adding the mark do not have distilled-by: dsh-distill, will be treated as user-owned, and will never be automatically updated unless recreated or the mark is manually added.
- Checkpoints are derived from logs. The README states: the checkpoint comes from the most recently recorded session/distill-review-request; for sessions that have never been reflected, it starts from the first user message.
- Project target depends on git root. Falls back to the session cwd if no .git ancestor is found.

It is necessary to separately explain the session event compatibility. The current main branch (0.1.0, commit d2aaa395) writes the diagnostic-only session/distill-review-request into the session log. GitHub Issues #6, #9 and the official repository discussion #1584 all reported: On dsh 0.1.0-rc.6, this custom event type is not in the harness’s known session event list, and cannot be marked as ignorable via the existing session.append API, causing SessionFormatUnsupportedError when restarting or resuming sessions that have triggered distillation, making the entire history unable to load. As of 2026-08-17, there are unmerged fix PRs in the repository (#8, #10). Before the fix is included in the commit you actually install, it is not recommended to connect it to production sessions that need to retain history; please check the issues and current commit before installing.

The plugin runs with the permissions of the current dsh process, and may execute code during installation. Check the source code repository and license before installing; please pin the commit hash for reproducible installations.

Summary

distill turns “end of turn” into a background skill curation: it does not change the surface of the main conversation, only after enough new user messages have been accumulated, uses a sub-agent with a restricted tool set to decide skip, create or update, and writes the result as a local SKILL.md with an ownership mark. It is suitable for people who want to turn team habits from verbal explanations into discoverable skills, but the current 0.1.0 version’s session event compatibility with dsh 0.1.0-rc.6 is still a hard limit, please check the repository status before installing.

Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/distill/

GitHub: https://github.com/LoserFox/distill