DeepSeek Harness 插件

dsh-claude-compat

DeepSeek Harness plugin: bridge Claude Code's .claude/ directory (skills, commands, rules) into DSH native skill registry and message-stream rules injection.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
biedongbin/dsh-claude-compat
最近更新
2026年8月22日
分类
工具与能力
GitHub stars
9
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/biedongbin/dsh-claude-compat
插件名:dsh-claude-compat
作者:biedongbin

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

<p align="center"> <img src="https://img.shields.io/badge/dsh-plugin-blue?style=for-the-badge" alt="DSH Plugin"> </p>

<h1 align="center">dsh-claude-compat</h1>

<p align="center"> <a href="README.zh-CN.md"><img src="https://img.shields.io/badge/🌐_简体中文-点我阅读中文-red?style=for-the-badge" alt="简体中文"></a> </p>

<p align="center"> <img src="https://img.shields.io/badge/version-0.7.0-blue?style=flat-square" alt="Version"> <img src="https://img.shields.io/npm/dm/dsh-claude-compat?style=flat-square&label=downloads/month&color=brightgreen" alt="npm downloads/month"> <img src="https://img.shields.io/npm/dt/dsh-claude-compat?style=flat-square&label=total%20downloads&color=blue" alt="npm total downloads"> <img src="https://img.shields.io/badge/node-%3E%3D20-green?style=flat-square&logo=node.js&logoColor=white" alt="Node"> <img src="https://img.shields.io/badge/license-MIT-orange?style=flat-square" alt="License"> </p>

<p align="center">DeepSeek Harness plugin that bridges Claude Code's <code>.claude/</code> directory into DSH natively — reuse your skills, slash commands, rules, agents, hooks, and MCP servers with zero migration.</p>

What it does

.claude/ pathMechanismBehavior
skills/**/SKILL.mdDSH skill providerName + description in the model-visible catalog; body loads on demand via the skill tool. New skills appear on the next catalog reconcile — no restart.
commands/*.mdDSH skill providerSame, plus user-invocable: /command-name works in the slash menu.
rules/*.mdMessage-stream injectionRules are concatenated, wrapped in a <system-reminder> envelope, and prepended as a user-role message at the front of the message array once per session — the same channel Claude Code uses (prependUserContext), which models follow reliably.
agents/*.mdDSH skill provider (delegation shim)DSH has no markdown subagent format, so each agent file becomes a skill whose body leads with an explicit "delegate with this persona" instruction. Model- and user-invocable, so /agent-name works. Same-name agents dedupe by rank like skills.
.claude/settings.jsonhooksTool/prompt hooksClaude Code hooks subset bridged onto DSH's tools/pre-execute (PreToolUse), tools/post-execute (PostToolUse) and agent/pre-step (UserPromptSubmit) waterfalls. Commands run via /bin/sh -c with a Claude-style JSON payload on stdin; exit code 2 denies/blocks, hookSpecificOutput overrides are honored, timeouts allow through with a warning.
<projectRoot>/.mcp.jsonMCP serversClaude Code-format MCP server definitions are translated to dsh-mcp-client plugin instances at DSH startup from the launch workspace: command → stdio, url → streamable-http. Malformed entries or a missing @deepseek-ai/dsh-mcp-client degrade to a warning, never a crash.
~/.claude/plugins (installed plugins)DSH skill providerInstalled Claude Code plugin-marketplace plugins contribute their skills/commands/agents (via each install's .claude-plugin/plugin.json manifest, or a directory scan when manifest-less) at rank 750 — the long tail: project .claude, DSH native, and ~/.claude all win collisions. Plugin MCP servers (mcpServers in the manifest) mount only when enablePluginMcp is opted in — mounting third-party MCP servers is a bigger trust step than listing skills.

The same directories are also read from the user-level ~/.claude/ (skills, commands, rules, agents, and ~/.claude/settings.json hooks). Same-name skills/commands/rules/agents are deduped with a fixed priority:

project .claude > DSH native (.dsh) > ~/.claude

  • Project .claude entries carry rank 50; DSH's own skills — project .dsh roots, .agents roots, and bundled skills (ranks 100600, BUNDLED_SKILL_RANK) — sit in between; ~/.claude entries rank 700. So a project skill always overrides the DSH-native and user copies, and a user skill never overrides a DSH-native one.
  • Rule files with the same basename in ~/.claude/rules are skipped when the project already provides one.

CLAUDE.md / AGENTS.md are not touched — DSH's built-in dsh-agent-instructions already handles those.

Built-in commands

Installing this plugin adds three management skills to the catalog:

| Command | What it does | |---|---| | /cc-plugin | Full Claude Code plugin management: list, install <name>[@marketplace], uninstall, enable, disable, update [name], search <term>, marketplace list\|add\|remove\|update. One-shot syntax /cc-plugin <name>@<marketplace> installs directly. Engine: the claude CLI when available, otherwise a built-in fallback (direct JSON + git, with timestamped backups of every file it touches). All state stays in Claude-native locations (~/.claude/plugins, ~/.claude/settings.json enabledPlugins) so Claude Code and DSH read the same truth. | | /reload-cc-plugins | Hot-reload the skill catalog: drop cached provider lists and notify observers so newly installed/removed skills appear in the current session — no restart, no new session. | | /reload-skills | Alias of /reload-cc-plugins. | | /cc-resume | List Claude Code conversation sessions for the current project (~/.claude/projects/) and import any of them into DSH with full user/assistant/tool history. Imported sessions appear in the DSH session list titled cc: <preview> and resume like native ones. list / import <sessionId> / --limit-turns N for huge sessions. |

Typical loop: /cc-plugin install ralph-loop@claude-plugins-official/reload-cc-plugins → new skills visible immediately. Plugin-shipped MCP servers still require a DSH restart (process-lifetime mount).

Requirements

  • DSH with a profile (e.g. web)
  • A project using Claude Code conventions: .claude/skills/, .claude/commands/, .claude/rules/, .claude/agents/, .claude/settings.json, and a project-root .mcp.json (all optional; ~/.claude/ equivalents are also picked up)
  • pnpm on PATHdsh plugin is a thin pnpm forwarder

Install / Update

One command — the package declares dsh.bundle, so DSH activates it automatically (no manual cordis.patch.yml editing). Install or update to the latest release:

dsh plugin --profile web add dsh-claude-compat@latest

Or from GitHub:

dsh plugin --profile web add github:biedongbin/dsh-claude-compat

Restart DSH (dsh web). Done — skills show up in /, rules are injected into every new session.

Configuration

OptionDefaultDescription
enableSkillstrueRegister the .claude/skills + .claude/commands + .claude/agents provider (project and ~/.claude)
enableRulestrueInject project + ~/.claude rules/*.md into the message stream
enableMcptrueTranslate <projectRoot>/.mcp.json into mounted MCP server plugins
mcpFailOnStartupErrorfalseForward to dsh-mcp-client: fail plugin startup when an MCP server fails to connect
enableHookstrueRun .claude/settings.json hooks (Pre/PostToolUse, UserPromptSubmit)
hooksTimeoutMs60000Per-hook run timeout (UserPromptSubmit capped at 10s regardless)
enableAgentstrueSurface .claude/agents/*.md as delegation-shim skills
rulesMaxBytes65536Hard cap on total injected project rules text
userRulesMaxBytes65536Hard cap on total injected ~/.claude/rules text
projectRootMarkers[".git"]Ancestor markers for project-root discovery
skillRank50Provider rank for project .claude skills (wins every DSH-native collision)
skillSourceproject-claudeSource tag for project catalog entries
userSkillRank700Provider rank for ~/.claude skills (loses to DSH-native 600)
userSkillSourceuser-claudeSource tag for ~/.claude catalog entries
userClaudeDir~/.claudeUser-level .claude directory (~ expands to the home dir)
enablePluginstrueSurface skills/commands/agents from installed Claude Code plugins (~/.claude/plugins)
pluginSkillRank750Provider rank for plugin content (the long tail — everything else wins)
pluginSkillSourceclaude-pluginSource tag for plugin catalog entries
pluginsRoot~/.claude/pluginsPlugin-marketplace root (installed_plugins.json + cache/)
enablePluginMcpfalseMount plugin-declared MCP servers (opt-in; requires enablePlugins and enableMcp)
enablePluginManagertrueRegister the /cc-plugin, /reload-cc-plugins, /reload-skills management skills
pluginManagerRank40Rank for the built-in management skills (top of the catalog)

Notes

  • Skill naming: DSH requires kebab-case skill names. Nested skill directories are flattened (gitnexus/gitnexus-guidegitnexus-gitnexus-guide); invalid frontmatter names fall back to the directory name.
  • MCP lifecycle: .mcp.json is read once at DSH startup from the launch workspace — not per session — and each server mounts for the process lifetime. Restart DSH to pick up edits.
  • Hooks scope: a deliberately small subset of Claude Code hooks: PreToolUse / PostToolUse / UserPromptSubmit. Matchers support exact names, * wildcards, and | alternation; commands run with stdin carrying the Claude-style JSON payload. Exit code 2 = deny (Pre) / block (Post); other non-zero exits and timeouts allow through with a warning.
  • Rules granularity: rules are read per new session (cached per session cwd). Editing a rule mid-session takes effect in the next session.
  • Rules content: rules are injected verbatim as instructions to the model. Only commit rules you want the model to follow — same trust level as CLAUDE.md.
  • Catalog snapshot timing: the skill catalog is snapshotted when a session is created. Skills installed or edited mid-session surface after /reload-cc-plugins (hot reload) or in the next session.

Troubleshooting

Known limitation: /cc-resume via the skill tool

In some DSH runtime configurations the skill tool resolves in an agent-scoped layer where globally registered providers are not visible — the invocation returns skill "cc-resume" is unknown or no longer available even though the catalog lists it. This is a DSH runtime layering behavior, not a plugin bug. The skill body only instructs the model to run the CLI, which is always available:

node node_modules/dsh-claude-compat/scripts/cc-resume.mjs list
node node_modules/dsh-claude-compat/scripts/cc-resume.mjs import <sessionId>

DSH won't start back up after a restart / port 3080 stuck. Old process still holding the port (symptom: EADDRINUSE in logs). Use the bundled restart script — it waits for a clean stop, falls back to SIGKILL, and verifies the port before reporting success:

npx dsh-claude-compat-restart        # bin alias (installed with the package)
bash node_modules/dsh-claude-compat/scripts/dsh-restart.sh   # direct
bash scripts/dsh-restart.sh --no-patch   # skip the prompt patch, restart only

The script also re-applies the idempotent dsh-terminal-bash prompt patch, which npx/npm updates silently revert. DSH_RESTART_PORT overrides the port (default 3080).

Installed a plugin via /cc-plugin but its skills don't show. Run /reload-cc-plugins. Still missing → restart DSH (plugin-shipped MCP servers always need a restart).

/cc-resume import fails on compression. The importer needs the zstd binary (macOS: brew install zstd; most Linux images ship it).

/cc-plugin reports "claude CLI unavailable". The fallback engine handles install/enable/disable; for marketplace add/update, install Claude Code (npm install -g @anthropic-ai/claude-code) or manage marketplaces from Claude Code directly.

Release notes

  • [Changelog](CHANGELOG.md) ([简体中文](CHANGELOG.zh-CN.md)) — release history from 0.1.0 to the latest version.

Acknowledgments

License

[MIT](LICENSE)

📈 NPM Downloads

![NPM Downloads](.github/assets/downloads.svg)

Data: api.npmjs.org · npmtrends

⭐ Star History

If this project helps you, please give it a ⭐ — it motivates us to keep improving.

<p align="center"> <img src="https://img.shields.io/github/stars/biedongbin/dsh-claude-compat?style=for-the-badge&logo=github&color=gold" alt="GitHub Stars"> <img src="https://img.shields.io/github/forks/biedongbin/dsh-claude-compat?style=for-the-badge&logo=github" alt="GitHub Forks"> <img src="https://img.shields.io/github/watchers/biedongbin/dsh-claude-compat?style=for-the-badge&logo=github" alt="GitHub Watchers"> </p>

<div align="center"> <a href="https://www.star-history.com/#biedongbin/dsh-claude-compat&Date"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=biedongbin/dsh-claude-compat&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=biedongbin/dsh-claude-compat&type=Date" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=biedongbin/dsh-claude-compat&type=Date" width="760" /> </picture> </a> </div>