DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins

dsh-write-create-only

Write Create Only

“DSH·write create-only”: write only allows creating new files. If the target already exists, it is rejected directly before tool execution, with a prompt to use edit instead. Applies to all sessions globally, preventing the model from overwriting existing content with write. Pure host-side dsh plugi

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add dsh-write-create-only@0.1.2
READMECompatibilityVersions

Description

“DSH·write create-only”: write only allows creating new files. If the target already exists, it is rejected directly before tool execution, with a prompt to use edit instead. Applies to all sessions globally, preventing the model from overwriting existing content with write. Pure host-side dsh plugin.

Compatibility and provenance

Write Create Only is published as dsh-write-create-only and currently resolves to version 0.1.2. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
npm
Registry updated
11/4/2026

Versions

0.1.2stable
9/30/2026
0.1.1stable
9/28/2026
0.1.0stable
9/1/2026

Related plugins

Loading related plugins…

Latest
0.1.2
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
10.6 kB
Files
6
Surface
any
License
MIT
Source
npm
GitHub
★ 3
Weekly downloads
269
Security scan
✓ v0.1.2 scan passed
Last push
11/3/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in security-access.

Cc Safety Netcc-safety-netA coding agent CLI hook - block destructive commands and secret file accessPocketdsh-pocketPut DeepSeek Harness in your pocket: one package, one settings page, and scan a QR code on your phone to access DSH on your computer in sync (LAN + public network, real-time screen mirroring).Codex Subscriptiondsh-codex-subscriptionUse ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images and Fast mode, and control DSH from the ChatGPT mobile app (Beta)Xdpooldsh-xdpoolOne DSH model pool for every free quota you have: merge all locally signed-in WorkBuddy accounts with auto-failover, sign in to 13 vendors by QR/web, aggregate 76 vendors' free tiers, plus a usage dashboard, model routing, a local OpenAI-compatible gatewa

README

dsh·write 仅创建插件

禁止 write 覆盖已存在的文件:write 只允许创建新文件,目标已存在时在工具执行前直接拒绝并提示改用 edit,全局所有会话生效,防止模型用 write 把已有文件整体冲掉。纯 host 端插件,不碰 DSH 源码。

为什么

write 是全文件覆写。模型一旦误用 write 去改一个已有文件,原内容会被整段覆盖,而 dsh 默认的 fs-observation-policy 只要求「先读过」,并不禁止覆写。与其事后靠模型自觉,不如把「write = 仅创建」立成硬约束。

功能

  • 只拦 write:edit、read 等其余工具完全不受影响。
  • 目标已存在 → 拒绝:在 tools/pre-execute 瀑布里对 write 调用先 fs.stat 目标,已存在则返回 deny,错误信息明确提示「请改用 edit 做定向修改;只有创建新文件时才使用 write」,模型看到后会改走 edit。
  • 目标不存在 → 放行:新建文件一切照常。
  • 保守放行:路径无效、stat 抛错等不确定情形一律放行,绝不误伤合法调用。
  • 全局生效:所有 agent 与会话统一适用。

安装

从 GitHub 安装:源码在 src/,lib/ 不入仓库,安装时 npm 会触发 prepare 脚本现场构建。

dsh plugin --profile web add github:better-er/dsh-write-create-only

从 npm 安装:包内已含构建产物 lib/index.js,安装时不再构建。

dsh plugin --profile web add dsh-write-create-only

两种方式装完都会自动挂载,重启 DSH web 后启用,无需手工编辑任何文件。

卸载

dsh plugin --profile web remove dsh-write-create-only

彻底移除,重启 DSH web 后不再加载。

原理

dsh 的每个工具在执行前都会走 tools/pre-execute 这个异步瀑布,每个监听器按序决定 allow / ask / deny。本插件注册一个全局监听器:

  • 只对 exec.name === 'write' 生效;
  • 取出 exec.arguments.file_path,用会话工作目录 ctx.fs.resolve 成绝对目标,再 ctx.fs.stat;
  • stat 返回非空即目标已存在,返回 { kind: 'deny', reason } 拒绝本次调用;
  • 其余情况一律 return next() 放行到瀑布下一环。

选择 tools/pre-execute 而不是 fs/write-intent,是因为后者是单槽瀑布且已被默认的 fs-observation-policy 占用;而 tools/pre-execute 是多监听器瀑布,位置在工具执行最前面,既不影响 write 的 schema,也不与现有策略抢位。

开发与验证

npm install
npm run build     # 产出 lib/index.js
node scripts/smoke.mjs   # 无运行时冒烟验证:5 项断言覆盖拦截/放行/容错

License

MIT