🎁 福利专区全网大模型免费应用 + 新用户福利 + 注册活动入口,低成本玩转 AI

智能体规则加载 acus9345/dsh-load-agent-rules

DeepSeek Harness
acus93457 天前有提交已提供中文文档扫描:未发现敏感能力

很多仓库早就给 AI 智能体写好了规则,只是格式不是 DeepSeek Harness 读的那种。团队里有人写了…

31.5/100
综合分
2
GitHub 星标
—
npm 周下载
—/5
用户评分

数据截至 2026/10/25 · 周下载取自 npm 全网(含 CI / 镜像),非本站安装数;综合分由星标、活跃度与兼容性检查合成。

安装命令 · 需先装 dsh CLI 引擎
dsh plugin --profile web add acus9345/dsh-load-agent-rules
该包不可直接 npm 安装,改从 GitHub 源安装(明细见下方安装检查)

状态速览

判定依据:实装验证 · 静态安装检查 · 自动扫描 · 仓库维护状态
信任档位:仅索引
是什么
dsh 原生插件 · skill
装得上吗
本站尚未做安装检查
L4 · 真实安装等级说明 →
安全吗
本站尚未对该插件做风险分级
暂未覆盖,不等同于无风险
还在维护吗
活跃:最近一次提交在 7 天前
档位由哪些信号合成

本站实装验证(真实安装 L4 覆盖全站;L5 为运行时冒烟或实机截图,覆盖范围小于 L4) · 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。 下方各区块是它的证据明细。

验证判据与等级说明 →
社区实装还没有人打卡 · 装过的第一个就是你
安全扫描自动 · 静态分析源码
v2.7.0
🟢 扫描:未发现敏感能力尚无人工评估
展开查看扫描说明与证据 ↓

静态扫描未发现敏感能力:最多只发网络请求、读取自身元数据或只读文件,未发现执行命令、文件写入或敏感信息读取。

扫描于 2026/10/31(1 天前) · 范围 入口闭包 + 发布文件清单 · 来源 GitHub 仓库

静态扫描只反映源码中出现的调用,不构成安全背书;人工评估与自动扫描相互独立、互不覆盖。

依赖的 DSH / Cordis 模块
@deepseek-ai/cordis@deepseek-ai/dsh@deepseek-ai/dsh-agent@deepseek-ai/dsh-fs@deepseek-ai/dsh-llm@deepseek-ai/dsh-session@deepseek-ai/dsh-tools@deepseek-ai/schemastery
给这个插件打分还没有人投票↓
用户评分
还没有人投票,来当第一个

DeepSeek Harness 插件,加载你仓库里已有的 Cursor、Copilot、Windsurf 等 AI 规则文件。

README

由 DeepSeek 最新模型翻译生成
dsh-load-agent-rules 很多仓库早就给 AI 智能体写好了规则,只是格式不是 DeepSeek Harness 读的那种。团队里有人写了 .cursor/rules/testing.mdc,另一个人加了 .github/copilot-instructions.md,还有那个月大家都在试 Windsurf 时留下的 .windsurfrules。DSH 只读 AGENTS.md 和 CLAUDE.md,其余一律忽略。于是「我们用 Vitest,不用 Jest」「别改老迁移文件」这些话,智能体根本听不到,尽管它们就明明白白写在仓库里。 这个插件会找出这些规则文件,按每个工具原本的用法交给模型。你不用转换,也不用复制。 安装 dsh plugin --profile web add dsh-load-agent-rules 这里用的是 web 配置档,也就是你用 dsh web 启动的浏览器界面。如果你用别的方式跑 DSH,就换成 headless(脚本和 CI)或 acp(编辑器集成)。每个配置档各管一份插件列表,所以你用到的每个配置档都要加一遍。下个会话就会生效。卸载用 dsh plugin --profile web remove dsh-load-agent-rules。
展开完整文档(README 剩余 1 节)
dsh-load-agent-rules

很多仓库早就给 AI 智能体写好了规则,只是格式不是 DeepSeek Harness 读的那种。团队里有人写了 .cursor/rules/testing.mdc,另一个人加了 .github/copilot-instructions.md,还有那个月大家都在试 Windsurf 时留下的 .windsurfrules。DSH 只读 AGENTS.md 和 CLAUDE.md,其余一律忽略。于是「我们用 Vitest,不用 Jest」「别改老迁移文件」这些话,智能体根本听不到,尽管它们就明明白白写在仓库里。

这个插件会找出这些规则文件,按每个工具原本的用法交给模型。你不用转换,也不用复制。

安装

dsh plugin --profile web add dsh-load-agent-rules

这里用的是 web 配置档,也就是你用 dsh web 启动的浏览器界面。如果你用别的方式跑 DSH,就换成 headless(脚本和 CI)或 acp(编辑器集成)。每个配置档各管一份插件列表,所以你用到的每个配置档都要加一遍。下个会话就会生效。卸载用 dsh plugin --profile web remove dsh-load-agent-rules。

从克隆的仓库安装

想试本地改动,就打包成 tarball 再装:

git clone https://github.com/acus9345/dsh-load-agent-rules
cd dsh-load-agent-rules
npm install
npm pack
dsh plugin --profile web add ./dsh-load-agent-rules-0.2.0.tgz

会读哪些文件

| 工具 | 文件 |
| Cursor | .cursor/rules/*/.mdc(子文件夹里嵌套的也算)、.cursorrules |
| GitHub Copilot | .github/copilot-instructions.md、.github/instructions/.instructions.md |
| Windsurf | .windsurf/rules/.md、.windsurfrules |
| Cline | .clinerules(文件或文件夹) |
| Kiro | .kiro/steering/.md |
| Roo Code | .roo/rules/、.roorules |
| Gemini CLI | GEMINI.md |
| JetBrains Junie | .junie/guidelines.md |

很多仓库把同一段文字放在好几个名字下,常常是符号链接。重复的会被丢掉,跟你的 AGENTS.md 或 CLAUDE.md 完全一样的内容也会丢掉,因为 DSH 本来就加载它们。

规则怎么送到模型

上面每个工具对「规则什么时候生效」都有自己的说法。插件保留这些含义,而不是把所有规则一股脑塞进提示词。

常驻规则在会话开始时进一次上下文。包括 Cursor 的 alwaysApply: true、Copilot 的主指令文件、Windsurf 的 always_on、Kiro 的 inclusion: always,以及 .cursorrules 这类普通文件。如果规则文件在会话中途变了,或者上下文压缩把规则挤掉了,它们会再送一次。

按文件生效的规则等到相关时才出场。Cursor 规则里的 globs: ".tsx"、Copilot 文件里的 applyTo: "src/db/"、Kiro 的 fileMatch、Windsurf 的 glob 规则,都会在智能体第一次读取或编辑匹配文件时挂上去。只挂一次,不是每次碰到都挂。嵌套在 packages/web/.cursor/rules/ 里的规则,只在 packages/web/ 内生效。
只有描述、没有正文的规则(Cursor 的「agent requested」、Windsurf 的 model_decision)按名称和描述列出。模型判断某条规则相关时,可以用一个小工具 project_rule 打开它。仅手动触发的规则也会出现在这个列表里。

所以模型的第一次请求会带上类似这样的内容:

These are the project rules written for this repository. Follow them like the rest of your instructions.

<rule name=".cursor/rules/style.mdc">
Use tabs for indentation. Prefer named exports.
</rule>

More project rules are available. File-scoped rules are added automatically the first time you read or edit a matching file.
Read any of them with the project_rule tool when it is relevant to your task:
- .cursor/rules/react.mdc (applies to .tsx): React conventions
- .github/instructions/db.instructions.md: Database migration conventions

设置

最省事的办法:打开 DSH 侧边栏里的 Plugins,点 dsh-load-agent-rules,改好你要改的项,按 Save。下一次工具调用就会生效,不用重启(只有 toolName 这一项仍需重启,所以没放在页面上)。

也可以在 ~/.dsh/profiles/<profile>/cordis.patch.yml 里加一行,或者加到 ~/.dsh/cordis.patch.yml 对所有配置档生效。没写的键保持默认值。

- id: load-agent-rules
config:
sources: [cursor, copilot, windsurf, cline, kiro, roo, gemini, junie] # drop any you don't want
maxBaselineBytes: 48000 # budget for always-on rules; the rest are listed instead
maxAttachBytes: 24000 # budget for rules attached on one file touch
maxFileBytes: 200000 # skip rule files bigger than this
toolName: project_rule # '' to not register the tool
touchTools: [read, write, edit, str_replace_editor]

如果常驻规则超出预算,放不下的那些会连同一条说明一起列出,模型再用工具去读。不会有任何内容被悄悄砍掉。

开发

npm install
npm test # discovery and rendering unit tests
npm run test:e2e # real dsh runs against a scripted local model, no API key needed

安装测试会跑 dsh plugin add,这需要 PATH 里有 pnpm。

MIT 协议。作者 acus9345。欢迎在 issues 里提 bug 和想法。
预览分享卡片长什么样 ↓acus9345/dsh-load-agent-rules
分享 · DeepSeek Harness Hub
acus9345/dsh-load-agent-rules

很多仓库早就给 AI 智能体写好了规则,只是格式不是 DeepSeek Harness 读的那种。团队里有人写了…

回到顶部