Communitygithub.com

qwased/dsh-web-search-browser

面向 DeepSeek Harness (DSH) 的浏览器网页搜索技能:通过 Playwright MCP 驱动本机 Edge 打开必应搜索,按可信/可疑/拦截三级安全规则过滤后输出。A browser web-search skill for DeepSeek Harness (DSH) via Playwright MCP + Edge + Bing with three-tier safety filtering.

dsh-web-search-browser 是什么?

dsh-web-search-browser is a Claude Code agent skill that 面向 DeepSeek Harness (DSH) 的浏览器网页搜索技能:通过 Playwright MCP 驱动本机 Edge 打开必应搜索,按可信/可疑/拦截三级安全规则过滤后输出。A browser web-search skill for DeepSeek Harness (DSH) via Playwright MCP + Edge + Bing with three-tier safety filtering.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add qwased/dsh-web-search-browser

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

web-search — DSH Browser Web Search with Edge

Perform a real browser-based web search in DSH using the native Edge browser and Playwright MCP: the model uses MCP browser tools to drive Edge, open Bing search, retrieve page snapshots into DSH context, then filter each result through safety rules and output a summary. This does not use DSH's built-in web_search interface—it executes an actual browser search.

Capability (Two Components)

ComponentLocationDescription
Playwright MCP ConfigurationDSH's cordis.yml (dsh-mcp-client plugin)Enables DSH to drive Edge
This skill document.agents/skills/web-search/SKILL.mdDocuments setup steps, search flow, and safety rules

Both components are required for the search capability to function.

1. Setup on a New Machine

Prerequisites

  • Node.js (including npm) installed
  • Microsoft Edge installed (Win10/11 native)
  • DSH already operational

Step 1: Install the Playwright MCP Package

If PowerShell execution policy blocks .ps1, use npm.cmd / npx.cmd.

npm install -g @playwright/mcp@latest --no-audit --no-fund

Verify it launches:

node "$env:APPDATA\npm\node_modules\@playwright\mcp\cli.js" --help

If you see a list of Options, it is installed.

Step 2: Register the MCP Client in DSH's cordis.yml

Add a @deepseek-ai/dsh-mcp-client plugin entry (one per MCP server) to the cordis.yml of the profile / preset that runs DSH:

- id: mcp-playwright
  name: '@deepseek-ai/dsh-mcp-client'
  config:
    serverName: playwright
    transport: stdio
    command: npx.cmd
    args: ['-y', '@playwright/mcp@latest', '--browser', 'msedge']
  • --browser msedge directly uses the local Edge browser—no need to download Chromium.
  • command set to npx.cmd bypasses PowerShell execution policy; if not blocked, plain npx works.
  • DSH registers MCP tools as mcp__<serverName>__<originalToolName>, e.g., mcp__playwright__browser_navigate, mcp__playwright__browser_snapshot, etc.

Step 3: Restart to Activate

cordis.yml is loaded at DSH startup; the MCP plugin executes listTools() on connection and registers the tools. After modification, restart DSH for the tools to appear.

2. Search Flow

  1. Call mcp__playwright__browser_navigate to open Bing: https://www.bing.com/search?q=<URL-encoded keywords>.
  2. Call mcp__playwright__browser_snapshot to capture the results page snapshot (title / domain / URL / description). If the snapshot lacks information, optionally use mcp__playwright__browser_take_screenshot to view the image.
  3. Classify each result according to the safety tier below.
  4. Only trusted results may be opened via mcp__playwright__browser_click for deeper reading; suspicious and blocked results are not accessed.
  5. Format the results per the output format and reply; referenced URLs should be written as Markdown links.

Each automatic search briefly opens an Edge window—this is normal. To run headlessly in the background, add --headless to the MCP arguments, but this removes visual feedback and is generally not recommended.

3. Safety Tiers (Moderate Filtering)

Search engine results are a mixed bag (phishing imitations, SEO farms, bundled downloads, malware hosters). Each result must be tiered systematically. The filtering uses pure rule-based logic with no external libraries.

🔒 Trusted (Details may be opened)

  • Official websites (domain closely matching brand, e.g., brand.com / brand.com.cn)
  • Authoritative sites: Wikipedia, Zhihu, official documentation, .gov / .edu / large tech company domains
  • Well-known, established, reputable sites (long registration, clear reputation)

⚠️ Suspicious (Show title and URL only; do not navigate or give download links)

  • Results marked as ads (Bing's ad label, sp=ad, Chinese 推广 (promoted), etc.)
  • Software download aggregators / resource sites (e.g., Huajun, Pacific, Software Home, Green Software Alliance, xpgod, ZOL Download, etc.)
  • Imitation domains: deliberately mimicking official names, e.g., brand-official.com, brand-download.net, hyphenated or numeric variants
  • Newly registered domains, missing HTTPS, keyword-stuffed descriptions

🚫 Blocked (Red-flagged, not used)

  • Clearly phishing, gambling, pornography, or suspicious sites prompting EXE downloads
  • Any "crack / green version / XYZ software download site"

4. Hard Rules

  • Never automatically download any file (exe / apk / zip / dmg — none at all)
  • Never provide download links from suspicious sites directly
  • For software, only recommend official sites or the system's official app store
  • Do not open suspicious page details by default; only trusted results are eligible for deep reading

5. Output Format

Return results in the following format (in the user's language, typically Chinese):

🔒 Trusted Results
1. [Title] (domain) – brief description
2. ...

⚠️ For Reference Only (Unverified)
- Title (domain) – Hint: why suspicious
- ...

🚫 Blocked (Not Recommended)
- Title (domain) – Reason

6. Why Filter Rules Instead of Changing the Search Engine

The problem is not the search engine but the lack of a filtering layer: switching engines only swaps one set of ads/promotions for another. Keeping filter rules means that results from any engine are first passed through the tiering. Avoid plugging into third-party URL blocklists (such as Huorong's URL database): such lists are closed-source and lack a public query API, making them unfeasible during the search flow.

相关技能