Introduction¶
In DeepSeek Harness (DSH), if you want the model to consistently follow certain preferences, constraints, or habits, a common approach is the user-global instruction document: $DSH_HOME/AGENTS.md. Without auxiliary tools, this file usually has to be edited manually; after editing, you also need to rely on DSH’s instruction loading mechanism to bring it into the session.
dsh-habits puts this into the General section of Web settings: edit a text in the browser, save it to write to $DSH_HOME/AGENTS.md, and then let the built-in DSH instructions loader inject it into subsequent sessions.
Plugin Positioning¶
dsh-habits is a DSH plugin maintained by DimitriLIAN, licensed under MIT.
Its core value is one sentence:
Maintain “My Habits” text in Web settings and write it to the user-global
AGENTS.mdfor use by every DSH session.
It does not replace DSH’s instruction mechanism but adds a browser-based editing entry point for $DSH_HOME/AGENTS.md.
Core Mechanism¶
Editor Location¶
The plugin adds the My Habits editor to the General section of Web settings.
Users open:
Settings → General → My habits
Then write the content and save it.
Save Target¶
The saved text is written to:
$DSH_HOME/AGENTS.md
If the file is missing, it is treated as a blank document when read, and no error is reported.
Session Injection¶
The written document is injected into the session by DSH’s built-in dsh-agent-instructions loader.
The key here is: the plugin is responsible for the editing entry point and file saving, while the actual session injection relies on DSH’s existing instruction loader.
REST Surface¶
The plugin registers two REST endpoints on ctx.webServer:
/api2/habits/describe
/api2/habits/update
The browser side calls these interfaces via fetch to complete reading and updating.
Settings Registration¶
The plugin registers a browser settings row in the settings.general.item slot, with the slot id being:
habits
This way, the My Habits editor will appear in the General area of Web settings.
Write Constraints¶
The write operation uses:
65536-byte budget
Concurrent editing is arbitrated via SHA-1 expectedRevision conflict refusal; no merge is performed.
In other words, if one editor holds the document state and another editor writes while the state is inconsistent, the write is rejected rather than automatically merged.
Installation and Enablement¶
First, install the plugin. The installation command verified by the source material is as follows:
dsh plugin add --profile web github:<owner>/dsh-habits
The command format is kept as in the source material. The plugin repository address is found at the GitHub link at the end of the article.
After installation, you need to restart the web profile so the bundle layer can load:
dsh --profile web
Then go to Web settings:
Settings → General → My habits
Write the content and save it.
Typical Usage¶
The following is a reproducible usage workflow.
- Install the plugin:
dsh plugin add --profile web github:<owner>/dsh-habits
- Restart the web profile:
dsh --profile web
- Open settings:
Settings → General → My habits
- Write your habits or instructions text, then save.
After saving:
- New sessions will immediately use this content;
- Running sessions will not be immediately rewritten;
- Running sessions will refresh on the next file touch or resume.
If you need to build the plugin locally, you can execute:
pnpm install
pnpm run build
Here, build is used to generate build artifacts for host and client.
Applicable Scenarios and Notes¶
Suitable for the following scenarios:
- Want to centrally maintain common preferences, constraints, and work habits in
$DSH_HOME/AGENTS.md; - Want to edit directly from DSH Web settings instead of frequently opening a terminal to modify files;
- Want to leverage DSH’s existing
dsh-agent-instructionsloader to bring user-global instructions into the session.
Notes to be aware of:
-
This plugin will read and write
$DSH_HOME/AGENTS.mdand runs under the permissions of the current DSH process. You should check the source code, behavior, and license before installing. -
Running sessions will not be immediately rewritten. After saving midway, running sessions usually need to wait for the next file touch or resume to refresh.
-
Concurrent editing does not merge. When multiple editors have inconsistent states, it relies on
expectedRevisionconflict refusal to reject conflicting writes. -
The document has a 65536-byte budget. Content exceeding the budget should not be written directly.
-
The peer dependency declared by the plugin is:
@deepseek-ai/cordis ^4.0.1
Conclusion¶
The value of dsh-habits is quite specific: it moves the editing entry point of the user-global AGENTS.md into DSH Web settings, allowing habits and preferences to be maintained via the browser and continue to be injected into the session by the built-in DSH loader.
The verified source material does not provide a directory page URL. The GitHub repository address is: