DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-format-after-edit

Format After Edit

DeepSeek Harness 插件,会在代理编辑的每个文件上运行项目的格式化工具(Prettier、Biome、dprint、Ruff、Black、gofmt、rustfmt、clang-format 或您自己的工具)。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-format-after-edit@0.1.0
README兼容性版本

兼容性与来源证明

Format After Edit 以 dsh-format-after-edit 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/11/5

版本

0.1.0stable
2026/10/20

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
53.4 kB
文件数
17
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 2
周下载
25
最近提交
2026/10/30
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 developer-tools 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Experimental Inspector@deepseek-ai/dsh-experimental-inspector用于 Host 调试和 Client Runtime 检查的实验性跨 realm CDP hub

README

dsh-format-after-edit

English | 中文

Agents don't run your formatter. They write code with their own idea of quotes, wrapping and trailing commas, and you find out at review time, or when CI's format check fails and the agent spends a turn "fixing" whitespace. Telling it to run Prettier after every edit works until it forgets.

This DeepSeek Harness plugin runs the project's own formatter on each file right after the agent writes or edits it. When the formatter changes the file, the model is told, so its next edit doesn't target text that has moved:

The file src/api/client.ts has been updated successfully.

[dsh-format-after-edit] prettier reformatted src/api/client.ts (4 lines changed). Re-read the file
before editing it again, since text you saw earlier may have moved or changed.

When the formatter fails, which usually means the edit broke the syntax, the model sees why:

[dsh-format-after-edit] ruff could not format app/models.py. Your edit was saved, but this often
means it has a syntax error:
error: Failed to parse app/models.py:14:5: Expected an indented block after function definition

Install

dsh plugin --profile web add dsh-format-after-edit

That's the web profile, the browser UI you start with dsh web. If you run DSH another way, use headless (scripts and CI) or acp (editor integrations) instead. Each profile keeps its own plugin list, so add it to every profile you use. It's on as soon as it's installed. Remove it with dsh plugin --profile web remove dsh-format-after-edit.

It's also part of dsh-guard-pack, which installs nine guards at once.

Which formatter runs

The one your project is set up for. A formatter runs only when the project has its config and the tool is installed locally or on your PATH. Nothing is ever downloaded, so a repo without a formatter is left alone.

FilesFormatterWhen
JS, TS, JSON, CSS, Markdown, YAML, HTML, Vue, Svelte...Prettier.prettierrc*, prettier.config.* or a "prettier" key in package.json, and prettier in node_modules
JS, TS, JSON, CSS, GraphQL...Biomebiome.json(c), and @biomejs/biome in node_modules
Anything dprint has plugins fordprintdprint.json or .dprint.json(c), and dprint in node_modules
PythonRuffruff.toml, .ruff.toml or [tool.ruff] in pyproject.toml, and ruff in the venv or on PATH
PythonBlack[tool.black] in pyproject.toml, and black in the venv or on PATH
Gogofmta go.mod, and gofmt on PATH
Rustrustfmta Cargo.toml (its edition is used), and rustfmt on PATH
C, C++, Objective-C, protobufclang-formata .clang-format, and clang-format on PATH

The closest config wins, so a monorepo package with its own biome.json uses Biome even if the root has a .prettierrc. Each formatter's own ignore file (.prettierignore, Biome's files.ignore...) is respected. Lockfiles, node_modules, dist, build, vendor and minified files are never touched.

Your own formatter

For anything else, add a command. {file} becomes the edited file's path, quoted. Custom entries are checked before the built-in ones.

- id: format-after-edit
  config:
    custom:
      - files: ['*.php']
        command: vendor/bin/pint {file}
      - files: ['*.java']
        command: google-java-format --replace {file}
      - files: ['**/*.tf']
        command: terraform fmt {file}

Settings

The easy way: open Plugins in DSH's sidebar, click dsh-format-after-edit, change what you want and press Save. Custom commands go in cordis.patch.yml.

Add a row like this to ~/.dsh/profiles/<profile>/cordis.patch.yml, or to ~/.dsh/cordis.patch.yml for every profile. Keys you leave out keep their defaults.

- id: format-after-edit
  config:
    formatters: [prettier, biome, dprint, ruff, black, gofmt, rustfmt, clang-format]
    custom: []
    ignore: ['**/node_modules/**', '**/dist/**', '*.lock']   # replaces the default list
    tools: [write, edit, str_replace_editor]
    timeoutMs: 20000
    reportChanges: true   # tell the model when the file changed
    reportErrors: true    # tell the model when the formatter failed

Development

npm install        # from the repository root
npm test -w packages/dsh-format-after-edit
npm run test:e2e   # real dsh runs against a scripted local model, no API key needed

MIT licensed. Written by acus9345. Bug reports and ideas are welcome in the issues.