dsh-cursor-rules: Bringing Cursor Rules, Skills, and MCP Servers to DeepSeek Harness

Introduction

If you’ve already configured .cursor/rules/**, .cursor/skills/, or .cursor/mcp.json in Cursor, building agents with DeepSeek Harness (DSH) often means duplicating those rules and configurations once again. It’s redundant work and prone to inconsistencies. The dsh-cursor-rules plugin reads those Cursor directories directly, injects the rules into DSH’s context, actually connects the MCP servers, and provides a Web GUI panel to manage them all.

Plugin Positioning

dsh-cursor-rules is a DSH client plugin developed by maintainer kingchen952720252025. Its core value proposition is: no duplicate maintenance — it brings Cursor’s rules, skills, and MCP server configurations directly into the DSH context, and provides a visual rules panel.

Core Features

Rule Semantics Consistent with Cursor

The plugin supports four rule types, with frontmatter determining when they enter the context:

  • Always: alwaysApply: true. Injected in full at session start.
  • Auto Attached: alwaysApply: false with globs: [...]. Injected when the agent touches files matching any of the globs.
  • Agent Requested: alwaysApply: false with a description. Listed in the catalog only; the agent reads it when it deems it relevant.
  • Manual: Neither alwaysApply nor a description. Listed in the catalog only, for manual invocation.

Rules are scanned and injected in the following order:

  1. User-level directories (configured via userRuleDirs, defaults to ~/.dsh/rules and ~/.cursor/rules).
  2. Project-level directories (.cursor/rules/** from the project root down to the current working directory).

Rules with the same id at the project level override those at the user level.

Skills Loaded On Demand

The plugin scans the .cursor/skills directory and only registers subdirectories that contain a SKILL.md. Each skill’s name and description (falling back to the directory name if missing) are written into the context catalog along with a cursor_skill tool description. The plugin only reads the actual SKILL.md content and other files in the directory when the agent invokes cursor_skill({ name }).

MCP Servers Actually Connected

The plugin parses .cursor/mcp.json, supporting both url and command transport modes. The parser is JSONC-compatible (comments and trailing commas). Servers are not started by default — they are only mounted as @deepseek-ai/dsh-mcp-client instances after you enable them in the Web panel. Server names are normalized to cursor_<slug>, with duplicate names getting _2, _3 suffixes. The panel displays each server’s runtime status (idle / connecting / ready / failed) and failure reasons, but does not expose credential values in the UI.

Web GUI Panel

The plugin provides two entry points in the Web interface:

  • A cursor-rules row in the sidebar’s global panel list. Clicking it opens the main panel with three tabs (Rules / MCP / Skills).
  • A cursor-rules section on the settings page, listing all rules.

The panel lets you toggle MCP servers on/off and browse the rules catalog.

Zero Third-Party Dependencies

The plugin implements frontmatter parsing, JSONC parsing, and glob matching internally. No build step required — it ships self-contained.

Installation & Activation

Search for Cursor rules in the DSH plugin marketplace and install.

Install from the repository:

dsh plugin add github:kingchen95272025/dsh-cursor-rules

After installation, the plugin automatically registers a dsh-cursor-rules entry in your configuration. You can enable or disable it via the Web panel or the config file.

Configuration Options

The plugin’s config field (all keys are optional):

- insert:
    - id: dsh-cursor-rules
      name: dsh-cursor-rules
      config:
        enabled: true            # Master switch; nothing is registered when false
        includeUserRules: true   # Whether to scan user-level rules and skills directories
        userRuleDirs:            # Scan order for user-level rules
          - ~/.dsh/rules
          - ~/.cursor/rules
        maxBytes: 131072         # Maximum bytes per single injection
        trackTouches: true       # Whether to trigger Auto Attached rules on file touches
        projectRootMarkers:      # Markers used to locate the project root
          - .git
        httpPath: /cursor-rules  # HTTP path prefix for the Web panel
        stateFile: cursor-rules.json  # Location of MCP toggle state file
        enableSkills: true       # Whether to scan .cursor/skills
        userSkillDirs:           # User-level skills directories
          - ~/.cursor/skills
        skillCatalogBytes: 8192  # Byte budget for skill catalog injection
        enableMcp: true          # Whether to parse .cursor/mcp.json and allow mounting servers
        userMcpFiles:            # User-level MCP config files

Typical Usage

  1. Create .cursor/rules/base.mdc in the project root with frontmatter:
alwaysApply: true
---
# Project coding style
- Use 2 spaces for indentation.
- Use 4 spaces for function bodies.
  1. Create a skill directory under .cursor/skills/, e.g. review, and write in SKILL.md:
name: Code Review
description: Provide detailed feedback on code quality, style, and potential bugs.
---
Run the following checklist before finalizing a PR:
1. Check for variable shadowing.
2. Verify error handling.
3. Ensure all edge cases are covered.
  1. Declare MCP servers in .cursor/mcp.json:
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["-y", "mysql-mcp"],
      "env": { "MYSQL_URL": "mysql://user:pass@localhost:3306/db" }
    }
  }
}
  1. Install and enable the plugin in DSH. When the agent works on project files, it will automatically see the rules and invoke cursor_skill({ name: "Code Review" }) to fetch skill content when needed. You can enable MCP servers in the Web panel, and the agent will be able to use them.

Use Cases & Cautions

This plugin is ideal for developers who have already accumulated rules, skills, and MCP configurations in Cursor and want to migrate seamlessly to DSH. For new projects, you can also organize these assets under the .cursor/ directory directly without any extra maintenance.

Note: The plugin runs with the permissions of the current DSH process. Review the source code and license before installing.

Conclusion

dsh-cursor-rules makes Cursor’s rules system directly available in DSH, eliminating duplicate configuration and providing a visual management panel. If you’re already using Cursor rules or skills, this plugin reduces the repetitive work in DSH while keeping both toolsets consistent.

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

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

Xiaoye