cnzgray

Dsh Claude Rules Bridge — Development skill for Claude Code

Development community

Bridge Claude Code's .claude/rules/.md (and .mdc) path-scoped rules plus the cwd→home CLAUDE.md hierarchy into DeepSeek Harness: always-apply rules at session start, path-scoped rules injected on re.

How to install Dsh Claude Rules Bridge

This entry records only its repository, not the path inside it, so there is no exact command to give. Open cnzgray/dsh-claude-rules-bridge and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Dsh Claude Rules Bridge does

Bridge Claude Code's .claude/rules/*.md (and *.mdc) path-scoped rules plus the cwd→home CLAUDE.md hierarchy into DeepSeek Harness: always-apply rules at session start, path-scoped rules injected on read/edit/write, plus a /claude-rules command and claude_rules tool.

Alternatives in Development

  • Fallback: Search Common Locations — for p in "$HOME/code/claude-code-orchestrator-kit" "$HOME/projects/claude-code-orchestrator-kit"; do -d "$p/ 172 ★
  • Dsh Plugin Cc — Bridge Deepseek-harness into Claude Code for review, critique, delegation, and session import 80 ★
  • Dsh Usage — 🌊 Persistent dock & fully-customizable balance/usage panel for DeepSeek Harness — activity heatmap, dual-chan 74 ★

README

@cnzgray/dsh-claude-rules-bridge

Bridges [Claude Code](https://code.claude.com/docs/en/memory)'s `.claude/rules/*.md` and `*.mdc` rule files into [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH / Cordis), mirroring the omp extension `claude-rules-bridge`:

  • Discovery — .claude/rules/ scanned from the session cwd (walked up to $HOME) plus ~/.claude/rules/. Frontmatter:
    • paths / globs / applyTo → file-match globs (merged)
    • alwaysApply → always injected at session start
    • description → metadata for the /claude-rules listing
  • alwaysApply rules → injected once at session start (in effect from the first agent request).
  • Path-scoped rules → injected dynamically on read / write / edit tool results when the touched file matches the globs.

`CLAUDE.md` / `AGENTS.md` are **not** handled here — the built-in `@deepseek-ai/dsh-agent-instructions` already implements the project-root baseline and on-touch nested loading, and its behavior is preferred.

Behavior

Layer When Content
Baseline agent/created (startup, resume, clear, compact) alwaysApply rules from .claude/rules/ (cwd → $HOME walk-up + ~/.claude/rules/)
Dynamic successful read / write / edit tool result path-scoped rules matching the touched file's globs (cwd-relative path + basename)
  • Files outside cwd get no rules.
  • Per-session dedupe: each rule is injected once per target path; a resume/compact reload resets the session state.
  • Token caps: 12 KB per injected block, 6 KB per rule file.

Seams

DSH-native seams, all from a root-realm listener (receives every agent's scoped events):

  • agent/created → agent.inject() the baseline (same pattern as @cnzgray/dsh-claude-auto-memory).
  • tools/result → agent.inject() a dynamic context message that the next pre-step claims (the same mechanism @deepseek-ai/dsh-agent-instructions uses).
  • ctx.commands.register → `/clau