dsh-cc-switch-skills: Mounting the cc-switch skills directory into DSH sessions

Preface

In DeepSeek Harness (DSH), skills are registered via ctx.skills and loaded using the skill tool in sessions. If you also use cc-switch to manage skills, skill files typically land in ~/.cc-switch/skills under the user directory (on Windows: C:\Users\<current user>\.cc-switch\skills), and each skill is usually a directory package containing SKILL.md. Manually copying the same batch of files to DSH’s custom root directory, or maintaining two sets of paths one by one, is redundant and prone to desynchronization.

Below we introduce the community plugin dsh-cc-switch-skills (maintainer artorias-zj): it scans that directory and registers all skills when DSH starts, and automatically refreshes after the directory is modified (added/deleted/changed), without needing to restart DSH.

What Is This

dsh-cc-switch-skills is a DSH plugin (Cordis bundle) that scans cc-switch’s skill root directory at mount time, writes the discovered skills into DSH’s ctx.skills, makes them appear in the session skill directory, and makes them callable through the skill tool. The plugin only reads the local ~/.cc-switch/skills, does not access external networks, does not report telemetry, and does not modify skill files on disk.

The current package version is 1.0.1, license MIT. SkillHub categorizes it under “Workflow”; in the repository README’s Plugin Info it is classified under Skills & Agents.

Core Features

Startup Loading and Hot Reloading

  1. The plugin mounts with DSH and performs a full scan and registration of the configured root directory.
  2. By default it recursively watches that directory; additions, renames, deletions, and frontmatter changes will be reflected in the directory on the next directory refresh.
  3. If the root directory does not yet exist, the plugin will keep probing until the directory appears.

Supported Skill Shapes

Only one level of structure is scanned, with two shapes:

  • Directory package: <name>/SKILL.md
  • Flat file: <name>.md

YAML frontmatter

Parsing rules aligned with the official @deepseek-ai/dsh-skill-filesystem:

  • Required semantics: name (kebab-case), description
  • Optional: whenToUse, metadata, disable-model-invocation, user-invocable
  • When disable-model-invocation: true, the skill does not appear in the model-side directory; when user-invocable: false, it does not appear in user-facing commands.

Compared to the official provider, in order to “load all skills” as much as possible, it has higher tolerance for incomplete frontmatter:

  • Missing or non-kebab-case name → falls back to the directory name/file name, and logs a warning
  • Missing description → falls back to the first non-empty line of the body (truncated to 160 characters), and logs a warning

Still skipped with warnings: invalid YAML, missing frontmatter, invalid invocation boolean values, names still invalid after fallback. Warnings are output to the DSH log (hub.log).

Lazy-Loaded Body and Resource Paths

Directory entries carry only metadata; each skill invocation re-reads the current file, so directly editing SKILL.md takes effect without a restart. resourceBase points to the skill directory, making it easy for the model to resolve relative paths such as scripts/, references/, assets/, etc.

Naming Conflict Precedence

The default rank is 300, at the same level as the official custom skill root: project-level skills take precedence, and user-level cc-switch sources come after when names conflict.

Installation and Activation

Recommended one-line CLI (web profile):

dsh plugin --profile web add github:artorias-zj/dsh-cc-switch-skills

In desktop environments, replace --profile web with --profile desktop. The README notes: after future publication to npm, the command may become dsh plugin --profile web add dsh-cc-switch-skills.

After installation, the live profile takes effect immediately; otherwise DSH needs to be restarted, and the skills should appear in the session directory.

Environment requirements (from the repository Plugin Info): DeepSeek Harness 0.2.x (requires the ctx.skills service); Node.js ^22.15 or >=24; supports Windows / macOS / Linux.

Uninstall: remove it on the DSH plugin page, or uninstall the bundle named dsh-cc-switch-skills via plugin_manager’s remove_bundle.

Optional Configuration

On the plugin line inserted in cordis.patch.yml, you can set config:

Field Default Meaning
dir <homedir>\.cc-switch\skills Scan root; supports the ~/ prefix; can also be overridden with the DSH_CC_SWITCH_SKILLS_DIR environment variable
providerName cc-switch Provider name registered to ctx.skills (cannot be the reserved name runtime)
rank 300 Precedence when names conflict with other providers; smaller numbers take priority
watch true Whether to watch the directory and auto-refresh

Typical Usage

  1. Use cc-switch or manually maintain skills under ~/.cc-switch/skills (directory packages or single-level .md files).
  2. Install this plugin and confirm DSH has started; skills sourced from cc-switch should appear in the session skill directory.
  3. In conversations, load them by name via DSH’s skill tool; after modifying SKILL.md, call again to read the latest body.

No additional API is needed: the behavior is entirely accomplished by DSH’s built-in skill registration and the skill tool.

Use Cases and Notes

Suitable for: Those who have invested many skill packages in cc-switch’s skills directory, want to directly reuse the same set of files in DSH web/desktop sessions, and rely on file watching to keep the directory and disk consistent.

Notes:

  • The plugin reads the local directory with the permissions of the current DSH process user; please review the GitHub source code and the MIT license yourself before installing.
  • Only scans one level of subdirectories or .md files under the configured root; deeper nesting will not be automatically registered.
  • When names conflict with project skills, project skills take precedence; if you rely on cc-switch-side names, you need to avoid conflicts with project skills or adjust rank (only change it after understanding the precedence rules).

Links

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

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

Xiaoye