AI Agent Hub
Back to plugins
🧩

dsh-write-create-only

admin-security Updated 2026.09.02

Run the following command in DeepSeek Harness:

dsh plugin install better-er/dsh-write-create-only

Paste the following prompt into your AI chat to install this plugin:

Install this plugin in DeepSeek Harness by running dsh plugin install better-er/dsh-write-create-only; the source lives at https://github.com/better-er/dsh-write-create-only

About this plugin

write is a full-file overwrite operation. The moment a model mistakenly uses write on an existing file, the original content is wiped out entirely. DSH default fs-observation-policy only requires the file to have been read beforehand and does not forbid overwrites, making post-hoc correction costly and unreliable. dsh-write-create-only turns write into a create-only tool, enforcing the constraint before execution rather than hoping the model behaves.

The plugin registers a global listener in the tools/pre-execute waterfall that activates exclusively for write calls: it performs an fs.stat on the target path first. If the file already exists, the call is denied with a clear message suggesting edit for targeted modifications; if the path is new, execution proceeds as normal. Other tools such as edit and read remain completely unaffected. Uncertain cases like invalid paths or stat errors are always allowed through, ensuring no legitimate call is ever blocked. The rule applies uniformly across all agents and sessions.

Ideal for any DSH workflow involving multi-turn file operations, especially teams that frequently ask models to modify code or documentation. As a pure host-side plugin it touches no DSH internals, mounts automatically on install, and can be removed simply by restarting DSH web. Zero configuration, zero intrusion.

Use Cases

  • Model accidentally overwrites an existing code file with write
  • Multi-turn conversations where target files get wiped and are hard to recover
  • Teams need a unified write behavior boundary to prevent incidents

Best For

  • Developers who frequently ask models to modify code or documentation
  • Technical teams running multi-turn file operations in DSH
  • Operations staff with strict requirements on write safety