dsh-plugin-modern-web-guidance: Enabling AI Agents to Write Modern Web Code

Introduction

The design philosophy of DeepSeek Harness (dsh) is “everything is a plugin.” When an agent is asked to write frontend code, it often directly reuses outdated patterns from its training data (e.g., legacy HTML/CSS/JS approaches) instead of leveraging the current browser-native, more efficient APIs. This results in code that is incompatible with modern browser features and incurs higher maintenance costs. dsh-plugin-modern-web-guidance integrates Google Chrome’s Modern Web Guidance to provide the agent with a curated, token-efficient Web platform API reference, ensuring it consults current best practices before writing code.

Plugin Overview

dsh-plugin-modern-web-guidance is a DeepSeek Harness plugin that packages Google Chrome’s Modern Web Guidance into the npm package modern-web-guidance and exposes three tools in dsh: modern_web_search, modern_web_retrieve, and modern_web_list.

The plugin is maintained by community developer korosu, is an open-source project, and is licensed under the MIT License. It is not affiliated with Google or DeepSeek.

Core Features

The plugin provides three command-line tools for retrieving modern usage patterns of Web platform APIs:

  1. modern_web_search
    - Accepts a short English query
    - Returns matching guidance IDs and descriptions

  2. modern_web_retrieve
    - Accepts one or more guidance IDs
    - Returns the full guidance text, including code patterns, caveats, and fallback solutions

  3. modern_web_list
    - Lists all available guides
    - Serves as a fallback when a search yields no results

All search operations are performed locally. The modern-web-guidance npm package it depends on is bundled within the plugin, so no additional downloads or network access are required.

Installation & Activation

Installing the plugin requires specifying a profile; the example below uses web:

dsh plugin --profile web add dsh-plugin-modern-web-guidance

Restart dsh after installation. You can verify that the plugin is registered with the following command:

dsh plugin --profile web list

If you need to install from the tarball on the release page, first download dsh-plugin-modern-web-guidance-<version>.tgz, then:

dsh plugin --profile web add ./dsh-plugin-modern-web-guidance-<version>.tgz

Usage

The plugin requires no additional configuration. When the agent is asked to write HTML/CSS or client-side JS, it should invoke the tools in the following order:

  1. Use modern_web_search to query the modern implementation of the target feature
  2. Use modern_web_retrieve to fetch the full guidance
  3. Write code based on the guidance

Example prompt:

“Make a modal dialog that closes on outside click and Esc, with a smooth open/close animation.”

If the model does not proactively invoke these tools, you can add an instruction in the AGENTS.md file at the project root:

Before any HTML/CSS/client-side JS task, call modern_web_search, then modern_web_retrieve.

Updating & Removal

The guidance content comes from the modern-web-guidance npm package, and its version is pinned at install time. To get updated guides, you need to update the plugin:

dsh plugin --profile web remove dsh-plugin-modern-web-guidance
dsh plugin --profile web add dsh-plugin-modern-web-guidance

Then restart dsh.

To disable the plugin without uninstalling it, add the following to the profile’s cordis.patch.yml:

- id: modern-web-guidance
  disabled: true

To fully uninstall:

dsh plugin --profile web remove dsh-plugin-modern-web-guidance

Notes

  • The plugin requires Node.js >= 22.19
  • Specific version ranges of peer dependencies must be met: @deepseek-ai/cordis and @deepseek-ai/dsh-tools
  • Telemetry is disabled by default; to enable it, set the environment variable DISABLE_TELEMETRY=0
  • Searches use English queries, and the returned guidance content is in English
  • It is recommended to review the source code and license before installing the plugin

Summary

dsh-plugin-modern-web-guidance provides DeepSeek Harness with a lightweight Web platform best-practice retrieval capability. Through localized search and retrieval, it enables the agent to prioritize modern browser APIs before coding, avoiding the generation of outdated code patterns. For dsh projects that require writing frontend code, this plugin helps reduce maintenance costs and improve code quality.

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

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

Xiaoye