dsh-agents-md: Edit and Generate AGENTS.md in the DSH Settings Panel

Preface

DeepSeek Harness (DSH) reads the rules in AGENTS.md to determine how the agent executes commands, writes code, and follows conventions within the current workspace. Rules can be placed globally (effective for all projects) or in the project root directory (effective only for that project). In actual use, paths are hard to remember, switching projects requires repeatedly finding files, and achieving “inheriting global rules plus adding a few” often necessitates manual copy-pasting. A single mistake can overwrite existing content. The following introduces the community plugin dsh-agents-md (Maintainer: Ytibu, GitHub: Ytibu/dsh-agents-md): It provides an “AGENTS.md Management” entry in the DSH Web Settings, allowing reading and writing of both global and project-level AGENTS.md files. It can also use AI to generate project rules by either “merging global rules” or “directly overwriting.” The plugin does not change core DSH behavior; it merely adds a visual editing interface for these files.

What is this

dsh-agents-md is a DSH client plugin (declared as dsh.client in package.json, platform is web). The current version is 1.0.0, License MIT, Node >=20.

The DSH version used for development and testing is 0.2.0-rc.2 (corresponding to @deepseek-ai/dsh-desktop / @deepseek-ai/dsh-desktop-runtime 0.2.0-rc.2, distributed via nightly). The plugin relies on DSH internal contracts (non-stable public APIs) and may fail after version changes; after switching versions, you should run node check-contracts.mjs locally to verify compatibility.

Community Directory Page: skillhub.cn/plugins/Ytibu/dsh-agents-md. This directory is an independent community site with no official affiliation with DeepSeek / High-Flyer. The DSH ecosystem philosophy is “everything is a plugin”; please review the source code and license before installing third-party plugins. The plugin reads and writes to the disk with the current DSH process permissions and creates backups before writing, but it is still recommended to use it in a trusted environment.

Core Features

1. Edit Global Rules

Read and write the global AGENTS.md that is effective for all projects.

  • Path resolution is consistent with DSH: prefers $DSH_HOME/AGENTS.md, uses ~/.dsh/AGENTS.md if $DSH_HOME is not set.
  • The Settings page displays the resolved real path.
  • If the file does not exist, saving will automatically create it.

2. Edit Project Rules

Read and write the AGENTS.md in the root directory of a specified workspace.

  • Select a workspace from a dropdown list to edit the AGENTS.md in its root directory.
  • Also supports automatic creation and automatic backup.

3. Generate Project Rules

Describe the desired rules in natural language, and the plugin will call AI to generate standardized AGENTS.md content.

Generation Method Behavior Applicable Scenarios
Merge Global Rules Fuses the input with the global AGENTS.md into a complete set of rules: retains valid global requirements, merges duplicate items, and prioritizes project input in case of conflicts. Projects that need to adhere to global conventions but have additional requirements.
Directly Overwrite Generates rules based solely on input, without referencing global rules. Projects that are completely independent and do not inherit global rules.

If the global rules do not exist or are empty, “Merge Global Rules” will directly use your input content without error.

Process Overview:

  1. Select a workspace
  2. Write down requirements (example):
This project must use pnpm, do not use npm
Commit messages should be in Chinese
Write a migration script before changing the database
  1. Select “Merge Global Rules” or “Directly Overwrite”
  2. Preview first; it only writes to disk after clicking “Confirm Write”—there will be no changes to the disk before confirmation.

Before writing, an automatic backup is created as AGENTS.md.bak-<timestamp>; multiple saves within the same millisecond will not overwrite each other.

Timing of Effects

After saving:

  • New Sessions: Effective immediately
  • Current Sessions: DSH dynamically detects and perceives new rules after the next file operation (the plugin itself does not perform hot reload).

Installation and Enablement

DSH 0.2.0-rc.2 does not yet ship with the dsh CLI. The method provided in the README is to manually install to any profile (directory shaped like $DSH_HOME/profiles/<name>).

Step 1: Add the dependency to the package.json of that profile and run pnpm install in the profile directory:

"dsh-agents-md": "file:/absolute/path/to/dsh-agents-md"

Step 2: Add the plugin name to the dsh.profile.bundles array in the same package.json (adding to dependencies alone will not load the plugin):

"dsh": {
  "profile": {
    "bundles": [
      "@deepseek-ai/dsh-base",
      "@deepseek-ai/dsh-web-app",
      "dsh-agents-md"
    ]
  }
}

After completion, restart dsh web and open Settings → “AGENTS.md Management”.

README Note: Once the CLI is released with the version, you can also use dsh plugin --profile web add Ytibu/dsh-agents-md; the plugin’s package.json has already declared dsh.bundle.patch and dsh.client.

Typical Usage

Change global conventions only: Enter “AGENTS.md Management”, edit the global rules and save; new sessions will run according to the new global rules.

Add rules specifically for a repository: Select the corresponding workspace in the dropdown, directly edit the project AGENTS.md, or switch to the generation feature, write requirements in plain language, select “Merge Global Rules”, preview, and confirm write if satisfied.

401 / Session not authenticated: The API is protected by DSH authentication; non-browser sessions will be rejected; simply refresh the page to log in again.

Entry not visible in Settings: The common reasons are that only dependencies were added without adding to bundles, or dsh web was not restarted and the page was not refreshed.

Applicable Scenarios and Notes

Suitable for developers already using DSH 0.2.0-rc.2 who frequently need to maintain global or project-level AGENTS.md. Not suitable for environments without the corresponding nightly version installed or running; for other DSH versions, please run node check-contracts.mjs first and rely on its conclusions.

The Host side registers read/write and generation-related APIs (such as /api/agents-md/global, /api/agents-md/project, /api/agents-md/compose, etc.) via ctx.connection.fetch.register, utilizing the Connection’s /api channel and browser authentication. When submitting issues, the README suggests attaching the DSH version and the full output of node check-contracts.mjs to help distinguish between version incompatibility and code issues.

Conclusion

dsh-agents-md consolidates the searching, editing, merge generation, and backup of AGENTS.md into the DSH settings panel, reducing the cost of manually maintaining rule files. Directory Page: https://www.skillhub.cn/plugins/Ytibu/dsh-agents-md; Source Code and Detailed Documentation: https://github.com/Ytibu/dsh-agents-md.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye