dsh-workspace-prompt: Mount Custom Prompts per Workspace

Introduction

When working with multiple repositories simultaneously in DeepSeek Harness (DSH), a common conflict arises: frontend projects may require pnpm and Chinese commit descriptions, backend projects need Gradle, while documentation libraries prefer concise answers. Hardcoding these rules into every conversation is repetitive and prone to omission; placing them in a global prompt risks polluting other projects.

The plugin introduced below binds prompts to the workspace (the session’s absolute working directory cwd): write once and toggle the switch as needed. New sessions in that workspace can inherit this context, appearing as a collapsible “Context Injection” similar to AGENTS.md, rather than as a user message bubble.

What is this

dsh-workspace-prompt (npm package name @linbin-mk/dsh-workspace-prompt) is a third-party DeepSeek Harness plugin maintained by linbin-mk. It does not modify the Harness source code; configuration and toggle interfaces are provided exclusively in the Web Client.

Community Directory Page: linbin-mk/dsh-workspace-prompt
Source Code & Documentation: GitHub

Core Features

The explicitly defined behaviors are as follows:

Workspace-based Isolation
Both prompts and switches are keyed by the absolute path of the session’s cwd; different workspaces do not interfere with each other. The session cwd must exactly match the workspace path defined in the settings page.

Default: No Injection
Saving only writes to the plugin Config. The prompt enters the model context via the agent/pre-step hook only after the “Workspace Prompt” toggle is turned on in the input box tool row. Workspaces without configured prompts will not display this toggle.

Ask Once Per Session
Once the toggle is enabled, when a session first actually requires injection, a confirmation card will pop up via the official ctx.userQuestions: selecting “Include” merges it into the current session context (the configured prompt text will be displayed in the option description); selecting “Exclude” means the session will neither ask again nor inject, but the toggle state remains unchanged (it will ask again in the next new session). For sessions that have selected “Include”, if the prompt text changes or the context is compacted, the latest text will be directly re-injected without asking again.

Persistence
Data is stored in the prompts and enabled fields of the plugin Config (both are real-time editable). These are written to the profile user layer via Harness’s user-settings provider and persist across restarts.

Coexistence with AGENTS.md
Reuses the injection format of the official agent-instructions, appearing as a collapsible “Context Injection” row in the transcript.

Centralized Management
In addition to slash commands and the input box toggle, Settings → Workspace Prompts provides a workspace list: configured workspaces are listed first (with preview and toggle), while unconfigured ones are displayed read-only. Inline editing, saving, or clearing is supported.

In environments without userQuestions, in headless mode, for sub-agents, or when delegated (DELEGATED_CALLER), it falls back to “toggle semantics” for direct injection; if the user turns off the toggle or ignores the question, it is treated as “Exclude” for the current turn.

Installation and Activation

Environment Requirements (from README): Node.js ^22.19 or >=24; DeepSeek Harness 0.2.1-rc.2 or a compatible 0.2.1 pre-release version, along with a Web profile providing ctx.settings / ctx.configForms / ctx.agent. First-time session confirmation also requires ctx.userQuestions (the Web profile includes @deepseek-ai/dsh-user-questions by default).

To install the published package into a custom Web profile, follow the official README:

dsh --profile web-prompt --from-default-profile web --dump-config
dsh plugin --profile web-prompt add @linbin-mk/dsh-workspace-prompt
dsh --profile web-prompt

The dsh.bundle patch automatically adds Host and Client plugin rows; the package declares a dsh.client entry, so the web shell loads lib/client.js, while the Host-side lib/index.js handles Config and agent/pre-step injection.

To install locally from a tarball, build and pack within the plugin repository first:

pnpm install
pnpm build
pnpm pack
dsh plugin --profile web-prompt add ./linbin-mk-dsh-workspace-prompt-<version>.tgz

The plugin runs with the permissions of the current DSH process; you should review the source code and MIT License before installation.

Typical Usage

The five-step workflow provided in the README is directly reproducible:

  1. Open any session in the workspace you wish to configure;
  2. Enter /workspace-prompt, select Configure Workspace Prompt, edit the content, and click Save (the command only appears if the current session is bound to a cwd);
  3. Click “Workspace Prompt” in the input box tool row; the label changes from -Off to -On;
  4. Send messages normally; when injection is required for the first time in this session, select Include or Exclude on the confirmation card;
  5. Turn off the toggle when no longer needed, or click Clear in the popup/settings page (clearing deletes the toggle state along with the prompt for that workspace).

Changes take effect from the next step: enabling the toggle mid-session will include the prompt in the next request; changing the text mid-session will append the new text to the next request, while earlier values in the history remain unchanged.

Use Cases and Notes

Suitable For
DSH Web users working with parallel multi-repositories where project standards differ (package managers, languages, answer styles, etc.) and wish to avoid global prompt pollution in other workspaces.

Interface Entry
The configuration entry is the slash command /workspace-prompt, not the workspace sidebar “More” menu: the official ui-workspace action menu does not provide a plugin extension point. This plugin extends via commandUi and shell.overlay without modifying Harness source code.

Context Budget
Prompts consume context in the workspace only when the toggle is on; the longer the content, the less space remains for conversation. The toggle state is remembered per workspace: if enabled in one session, it takes effect in other sessions within the same workspace until turned off again.

Platform
This package provides an interface only in the Web Client and does not offer terminal or desktop entries.

Ecosystem Notes
DSH adopts an “everything is a plugin” architecture; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek or High-Flyer.

Conclusion

dsh-workspace-prompt separates “project-specific rules” from global prompts and repetitive pasting. It isolates by cwd, defaults to off, injects only after session first-time confirmation, and aligns with the official context injection format. For trials or contributions, see the Directory Page and GitHub Repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye