dsh-github-first-search: Let Agents Search GitHub First, Then the Entire Web

Introduction

In DeepSeek Harness (DSH) use cases, when an agent needs to research, evaluate, or troubleshoot, the common approach is to perform a general web search or to start writing code without any prior reference. This often leads to reinventing the wheel, overlooking existing mature solutions, or deviating from the optimal path due to outdated information.

DSH’s philosophy is “everything is a plugin”—extending the agent’s capabilities to change its behavioral patterns. dsh-github-first-search, maintained by horrorguitarmutsumi, is one such plugin. It bakes the “search GitHub first, then the wider web” workflow into the agent’s system prompt and tool definitions, so that when the agent needs to go online, it first looks for reference implementations on GitHub, and then supplements with web search for news and updates.

What Is This

dsh-github-first-search is a web-tool plugin for DeepSeek Harness (DSH). It packages a Rust engine and a roughly 100-line JS shell into a dsh plugin, exposing two tools on the agent side: search_github_repos and read_github_readme. The core logic (GitHub search, README fetching, rate-limit handling) lives in the Rust engine, while the JS shell only handles locating the binary, spawning the subprocess, and registering the tools.

Once installed, the plugin takes effect globally with no additional configuration required. When the agent needs to search online, it first calls search_github_repos per the system prompt rules, and falls back to web search only if GitHub returns nothing useful.

Core Features

search_github_repos

A real-time GitHub repository search tool that supports multiple GitHub qualifiers:

  • By language: --language rust
  • By star count: --min-stars 100
  • By organization: --org deepseek-ai
  • By sort order: --sort stars|forks|updated|best-match
  • By result count: --limit 5

Results are sorted by stars. The description includes a behavioral rule stating that this tool must be called before starting any project.

read_github_readme

Reads the README (Markdown) of a specified repository, truncated to 20,000 characters by default. Usage: readme owner/name [--max-chars N].

Installation & Enablement

Install from GitHub:

dsh plugin --profile web add github:horrorguitarmutsumi/dsh-github-first-search

No additional configuration is needed after installation. The plugin automatically registers its system-prompt rules and tool definitions, making them immediately available to the agent.

Typical Usage

After building the engine locally, you can try a quick run:

engine/target/release/github-first search --query "terminal ui" --language rust --limit 5

Within the dsh environment, the agent will preferentially call search_github_repos to find relevant repositories and can further call read_github_readme to pull in README content when needed.

Use Cases & Notes

This plugin is ideal for developers who want to prioritize referencing existing implementations during the research or selection phase, or who want the agent to check GitHub before any web search. The plugin runs with the permissions of the current dsh process. It is recommended to review the source code and license (MIT) before installing.

Wrap-up

dsh-github-first-search front-loads the “GitHub-first” rule through system-prompt rules and tool definitions, helping the agent search GitHub before going online and reducing redundant reimplementation. For more details, see the directory page and the GitHub repository.

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

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

Xiaoye