DeepSeek Harness Workspace Capability Scope Plugin

Preface

Skills and MCP Servers in DeepSeek Harness (DSH) are typically visible across the entire environment. If you need to isolate capabilities between different workspaces, additional management mechanisms are required. The dsh-workspace-capability plugin provides fine-grained control over Skill and MCP Server visibility through a per-workspace configuration file, making it suitable for scenarios that require environment-specific permission differentiation.

Plugin Overview

dsh-workspace-capability is a DSH plugin developed by maintainer versot, categorized under admin-security. It provides a .dsh/capability-scope.yml configuration file for each workspace, defining the scope of visible Skills and MCP Servers within that workspace. Regardless of which preset a session uses, the workspace’s capability scope is enforced; existing sessions will also apply the new policy after the plugin is installed.

Installation & Enablement

Install using the official command:

dsh plugin --profile <profile> add github:versot/dsh-workspace-capability

After installation, the plugin is automatically added to the specified profile’s dsh.profile.bundles. A DSH restart is required for it to take effect. You can also install from a local tarball:

dsh plugin --profile <profile> add ./dsh-workspace-capability-<version>.tgz

DSH runtime version >= 0.2.2-rc.3 is required (engines.dsh); earlier versions will reject the installation.

Configuring Capability Scope

Create (or edit) a .dsh/capability-scope.yml file in any workspace directory. When this file is empty or does not exist, the behavior is equivalent to the default Standard preset, and all Skills are visible. The file content is in YAML format and contains the following fields:

  • projectSkills: true — Whether to display <workspace>/.dsh/skills and <workspace>/.agents/skills
  • userSkills: false — Whether to display ~/.dsh/skills and ~/.agents/skills
  • bundled: true — Whether to display DSH built-in skills
  • allow: [] — When non-empty, acts as an allowlist, permitting only the <skill-name> entries listed
  • deny: [] — A blocklist that hides the listed <skill-name> entries
  • include: [] — Retains these <skill-name> entries even when the corresponding group switch is off
  • mcpServers: [<server-name>] — An allowlist for entire MCP servers; [] means no MCP tools are exposed; if omitted, all current and future servers are allowed

Visibility priority is: deny → include → allow (when non-empty) → group switches. For example, to disable user-level Skills but retain a specific Skill, set userSkills: false and list that Skill’s name in include.

mcpServers controls the entire server namespace, i.e., <server-name> corresponds to all mcp__<server-name>__* tools. Standalone Skill files and standalone MCP files will relax the restrictions on the other category.

After modifying the configuration file, the plugin polls every 1.5 seconds, and panel save operations take effect immediately. MCP-related changes take effect on the next model request and do not interrupt in-progress sessions.

Sub-Agent Capability Scope

The plugin adds a subagent_with_skills tool for specifying visible Skills and MCP Servers when creating sub-Agents. Pass optional skills and mcpServers parameters when invoking:

  • Omit skills: Inherit all Skills currently visible to the parent Agent
  • skills: []: The created sub-Agent has no Skills
  • Pass a non-empty array: Only show the intersection of Skills visible to the parent Agent and the explicit list
  • mcpServers follows the same semantics as the top-level configuration

The effective Skill directory of a sub-Agent depends on the scope currently visible to the parent Agent, not all Skills installed on the machine. If the list contains Skill names invisible to the parent Agent, or contains unknown names, the request will be rejected rather than silently ignored.

Sub-Agent capability restrictions are stored in .dsh/agent-scopes.json. Version 1 Skill-only records maintain compatibility and will inherit the MCP Servers visible to the parent Agent.

Capability Presets

The .dsh/agents/<name>.md file in each workspace can define a capability preset, providing recommended use cases for the parent Agent. The file header is YAML frontmatter:

---
description: Suitable for GitHub Issue investigation and PR change analysis.
skills: [<skill-name>]
mcpServers: [<server-name>]
---
  • description is required, helping the parent Agent select a preset; it is not automatically passed to the sub-Agent
  • skills and mcpServers provide default values: omit to inherit the parent Agent’s visible scope, [] means none, listing names selects specific items
  • File body content is ignored
  • The plugin does not inject system prompts; the parent Agent writes the full task in the prompt

Use the list_subagent_roles tool to list all presets and their recommended scenarios, then pass the selected role name along with the task when calling subagent_with_skills. These presets do not restrict native tools like Bash, nor do they constitute a sandbox.

Configuration Panel

Select “Workspace Capability Scope…” from the Session menu to open the configuration panel. The panel contains two tabs: “Workspace Scope” and “Capability Presets”:

  • The Workspace Scope tab displays the current workspace’s YAML configuration, supports checkbox operations, and refreshes the provider and closes the panel after saving
  • The Capability Presets tab lists all presets, supporting create, edit, delete, and rename (displayName supports 1–100 characters, no control characters, both Chinese and English are allowed), and displays recommended scenarios

Newly created presets automatically generate a stable identifier; renaming does not change the identifier or file name. Old files without a displayName will display the file name. Preset saving is independent of workspace policy saving, and the editor remains open after saving. Disabled save operations will display the reason. Each Skill and MCP entry provides an “Inherit from parent / None / Custom” mode. Configured servers that are currently disconnected will still be displayed as offline.

How It Works

The plugin implements capability filtering through two main modules:

  • index.js (Host row) provides the /dsh-workspace-capability/catalog and /dsh-workspace-capability/policy endpoints for panel use, while also installing filter.js
  • filter.js wraps the shared skills service, applying the policy before list / snapshot / get calls, ensuring all presets and created sessions are restricted
  • provider.js and catalog.js handle scanning and serving actual Skills; the provider is not mounted by default
  • agent-scopes.js manages .dsh/agent-scopes.json and registers the subagent_with_skills tool
  • roles.js reads the workspace role directory and registers the list_subagent_roles tool

Permissions & External Services

This plugin requires filesystem access and same-origin network access permissions, classifying it as an elevated-capability plugin in the DSH marketplace. It is recommended to review the source code and license (MIT) before installation.

Use Cases

  • Isolating Skill and MCP Server access across multiple workspaces
  • Providing preset capability combinations for different roles or task scenarios
  • Requiring “deny” or “include” level precision control rather than all-or-nothing

Caveats

  • This plugin runs with the permissions of the current DSH process; any entity that can modify or delete workspace configuration files can bypass capability restrictions
  • A Fork may retain Skill content from conversation history and is not an isolation mechanism
  • MCP changes take effect on the next request and do not affect the currently in-progress session
  • Panel configuration is written to a temporary file and then replaced using rename; currently only macOS behavior has been verified

Summary

dsh-workspace-capability provides fine-grained Skill and MCP Server visibility control for DSH through workspace-level configuration files, supporting capability scope restrictions for presets and sub-Agents. It is suitable for scenarios requiring permission differentiation across different environments, but it is not a security sandbox and should not be relied upon for isolation.

  • Plugin directory page: https://www.skillhub.cn/plugins/versot/dsh-workspace-capability
  • GitHub: https://github.com/versot/dsh-workspace-capability
羽毛球分组比赛记分
小程序二维码

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

Xiaoye