Preface¶
When developing agents in DeepSeek Harness (DSH), it is often desirable to have a set of instructions that “apply to all sessions,” such as project conventions, reply languages, or tool usage habits. Manually editing ~/.dsh/AGENTS.md every time, or relying on an external editor followed by a restart, involves multiple steps and is not intuitive.
The official DSH bundle @deepseek-ai/dsh-agent-instructions reads the user-level AGENTS.md at the start of a session and injects it into the Agent context. The community plugin dsh-global-prompt (maintained by Y-King666) provides a section in the Web settings page with a large input box to edit and save this same file. The injection still relies on the official mechanism; the plugin is only responsible for writing the file.
What is this¶
dsh-global-prompt is a client-side plugin for DSH: it adds a “Global Prompt” section to the settings page (large input box + Save / Cancel buttons) and writes the content to the user-level global instructions file ~/.dsh/AGENTS.md (i.e., $DSH_HOME/AGENTS.md). It is categorized under “Client” in the SkillHub directory. The repository is available on GitHub, and the directory page is on SkillHub.
Why you don’t need to implement injection yourself¶
@deepseek-ai/dsh-agent-instructions is enabled by default in dsh-base (config item maxBytes: 65536). At the start of a session, it reads join(dshHome, "AGENTS.md"), wraps it as a <system-reminder> to inject into the context, and compares the file version via reconcileInstructionContext at every step. Therefore, this plugin only writes the file and does not reinvent the injection logic.
The README’s test notes indicate: after saving in the Web GUI, the very next step of the same session will receive a reminder like Instructions from: ~/.dsh/AGENTS.md; deleting the file will trigger Instructions removed: ~/.dsh/AGENTS.md, without needing to wait for a new session.
Core Features¶
Settings Page Editing¶
The client registers a section via settings.section; the host registers HTTP routes in lib/index.js to read and write the target file.
HTTP API¶
Base Path: /global-prompt/api.
- GET returns JSON with fields including:
ok,exists,content,bytes,mtimeMs,path,displayPath,budgetBytes,limitBytes. - POST takes a request body
{ "content": string }, with a limit of 1 MiB, and returns the snapshot of the written file with the same structure.
Normal routes for webServer do not go through the connection-layer token authentication; the handler uses isTrustedWebRequest similar to dsh-mcp-connector: Host must be a loopback or belong to webRuntime.trustedHosts, requests with sec-fetch-site: cross-site are rejected, and Origin must be same-origin with Host.
Writing uses an atomic replacement strategy involving a temporary file in the same directory followed by a rename, preventing the Agent from reading partial content. On Windows, if rename fails occasionally, it falls back to direct writing.
Integration with Official Injection¶
The saved content serves as the source for user-level instructions that DSH injects into various Agent sessions. Size limits and official constraints like maxBytes: 65536 are subject to runtime configuration; the budgetBytes and limitBytes in the GET response serve as references for the UI display.
Settings Navigation Icon¶
Third-party settings sections display a fallback gear icon by default in the official shell. The plugin’s client uses DOM observation to replace the icon in the settings dialog navigation with an SVG resembling the official IconContextInjectionOutline based on the section label. If the structure changes and the corresponding row cannot be found, it retains the gear icon without throwing errors.
Installation and Activation¶
The activation method described in the documentation assumes the plugin already exists as a link dependency of the profile (Installation path example: %USERPROFILE%\.dsh\plugins\dsh-global-prompt, with the profile linked via junction to %USERPROFILE%\.dsh\profiles\<profile>\node_modules\dsh-global-prompt, allowing source code changes to take effect immediately without restarting).
To re-open the bundle in DSH, execute:
plugin_manager(action: "set_bundle", target: "dsh-global-prompt", enabled: true)
For specific installation steps, please refer to the dsh.profile.bundles in your profile’s package.json and the SkillHub / repository documentation. Do not construct dsh plugin add commands that do not appear in the documentation based solely on the plugin name.
Runtime Environment: package.json requires Node >=22; License is MIT, current version 1.0.0.
Typical Usage¶
- Open Settings in the DSH Web Interface and find “Global Prompt” (or the equivalent section label registered by the plugin).
- Write or modify global instructions in the large input box (Markdown text, corresponding to the full content of
AGENTS.md). - Click Save to write the content to
~/.dsh/AGENTS.md; click Cancel to discard unsaved edits (behavior depends on the UI). - Return to the current or a new Agent conversation and observe the next step to see if a
<system-reminder>originating from~/.dsh/AGENTS.mdappears in the context; clearing and saving is equivalent to the official removal notice after deleting or clearing the file.
If you need to synchronize content via scripts or external tools, you can also directly edit the file at the same path. The plugin’s GET/POST APIs are intended for local trusted Web requests and are generally invoked via the settings page.
Scenarios and Caveats¶
Suitable for: Developers who wish to uniformly manage “user-level, cross-session” Agent instructions within DSH; environments already using or planning to use the official dsh-agent-instructions to inject AGENTS.md.
Note:
- The plugin host side cannot
import @deepseek-ai/*: the scope is usually absent in the profile’snode_modules, and core packages are only visible under theasar’sinstallAnchor. - Do not declare
peerDependenciespointing to@deepseek-ai/dsh*for the plugin, otherwiseevaluatePluginCompatibilitymay refuse installation due to version range validation failures. - The client bundle is delivered as-is by the host without a build step;
lib/client.jsis in the form of a self-registering script. - DSH plugins run under the permissions of the current dsh process. Before installing or enabling, please review the Repository Source Code and the MIT License to ensure compliance with your security and compliance requirements.
Conclusion¶
dsh-global-prompt streamlines the process of “writing user-level AGENTS.md” into a single save action on the settings page, while injection remains handled by the official dsh-agent-instructions, ensuring clear responsibilities. For further details, visit the SkillHub Directory Page and the GitHub Repository. The DSH ecosystem emphasizes “Everything is a plugin”; SkillHub is a community directory site and has no official affiliation with DeepSeek or High-Flyer.