Introduction

When building agents with DeepSeek Harness (DSH), you often encounter requirements such as: asking the model to look up metadata for a specific repository, finding issues under a repo, or reading a source code file. The philosophy of DSH is “Everything is a plugin,” so you do not need to integrate this online retrieval capability from scratch; the community already has ready-made implementations. The dsh-plugin-github introduced below is one of them: after installation, the agent gains two tools that can directly search GitHub repositories and issues, and fully read a single resource.

What is this

dsh-plugin-github is a DSH plugin maintained by moxingovo, licensed under MIT. It solves the problem of allowing the agent to access public GitHub data via tool calls, rather than relying on manually pasting content.

The two tools have a clear division of labor:

  • github_search: Retrieve repositories and issues/PRs using GitHub native search syntax, for example repo:vercel/next.js is:issue;
  • github_get: Fully read a single resource—repository metadata, issue/PR body, or decoded file content.

The plugin is available anonymously by default, with an anonymous rate limit of 60 requests per IP per hour; by configuring a read-only fine-grained token, you can unlock code search and increase the rate limit to 5000 requests per hour. The design is read-only: the plugin never creates issues, comments, or code.

Installation and Enabling

Official installation command:

dsh plugin --profile web add dsh-plugin-github

The README also provides an equivalent command for direct installation from Git:

dsh plugin --profile web add git+https://github.com/moxingovo/dsh-github

After installation, restart dsh web. New sessions will automatically gain the two tools github_search and github_get, with no extra registration steps.

Optional Token: Unlocking Code Search and Higher Rate Limits

In anonymous mode, most functions are usable, but code search and higher rate limits require a token. First, create a fine-grained personal access token on GitHub, select “Public Repositories (read-only)” for Repository access, and then put it in an environment variable or $DSH_HOME/.env:

GITHUB_TOKEN=github_pat_...

Without configuring a token, everything proceeds as usual and is available anonymously; the token only affects code search and rate limit quotas.

Configuration Options

After the steps above, the plugin is ready to use. When tuning is needed, the plugin provides four fields:

Configuration Default Value Description
tokenEnv GITHUB_TOKEN The name of the environment variable storing the optional token
requestTimeoutMs 30000 Timeout for a single request (milliseconds)
searchMaxPerPage 30 Maximum number of items per page for github_search (API limit is 100)
fileMaxChars 200000 Maximum number of characters for github_get to read a file (value-level truncation, with truncated flag)

The override method is to modify any field in profiles/web/cordis.patch.yml, with later layers taking precedence line by line.

Error Codes

When a tool fails, it returns an error with a structured error code. For troubleshooting, refer to:

  • GITHUB_UNAUTHORIZED: 401, common when calling code search without a token;
  • GITHUB_FORBIDDEN: 403, rate limit exceeded or insufficient permissions;
  • GITHUB_NOT_FOUND: 404;
  • GITHUB_API_ERROR: 422 or other non-2xx responses;
  • GITHUB_BAD_RESPONSE: Response body is not JSON;
  • GITHUB_REDIRECT_REFUSED: Credential security protection, request redirect was refused;
  • GITHUB_REQUEST_FAILED: Network error;
  • GITHUB_FILE_TOO_LARGE: Files larger than 1MB will not be returned inline by the API.

Security Design

There are three constraints related to the token:

  1. The token is only read from environment variables and will not appear in configuration files, logs, or tool outputs;
  2. All requests reject redirects, ensuring the token cannot be forwarded to other sources;
  3. The token is only sent to api.github.com.

Combined with the read-only design mentioned earlier, this plugin cannot write to GitHub and will not take credentials outside the expected scope.

Attached Skills

The plugin comes with two skills in the skills/ directory: plugin-tool-github explains how to use the tools, and plugin-web-github explains service configuration and error codes. Copy these into the harness’s skills directory, and the agent will consult them before calling the tools, reducing misuse.

Known Issues and Workarounds

Early rc versions of the upstream DeepSeek Harness declared an unpublished peer dependency: dsh-agent 0.0.1-rc.1/rc.2 and dsh-session 0.0.1-rc.1/rc.2 both depend on @deepseek-ai/dsh-type-meta, which has not yet been published to npm. If a newly installed parser lands on these versions, it will report a 404 for @deepseek-ai/dsh-type-meta (reproduced under pnpm 11 and the npmmirror mirror; npm resolves to 0.0.1-rc.5 and installs normally).

Two ways to work around this:

  1. Use npm with the repository’s package-lock.json for installation (npm ci);
  2. Execute dsh plugin add within an already set up harness workspace, as its lockfile locks to resolvable versions.

This is an upstream rc release issue; it will naturally disappear once the upstream fixes the metadata. Also, if you want to participate in the development of the plugin itself, Node 22+ is required. Execute npm ci && npm test in the repository; the test suite runs completely offline (HTTP is mocked).

Applicable Scenarios and Notes

Suitable scenarios:

  • Allow the agent to reference real issue/PR discussions from a repository;
  • Query repository metadata or read decoded source code files;
  • Only need to retrieve public data, no write operations required.

Note two points. First, the anonymous rate limit is 60 requests per IP per hour; if using it frequently, please configure a token as mentioned above. Second, the plugin runs with the permissions of the current dsh process; it is recommended to check the source code and license before installing—this project is MIT, and the source code is available on GitHub.

Conclusion

Recap: dsh-plugin-github uses the two tools github_search and github_get to cover the main scenarios of GitHub retrieval. It is available anonymously, uses a read-only design, and tokens are optional. If you are using DSH to build agents and need to integrate public GitHub data, you can start with this.

  • Community plugin directory page: https://www.skillhub.cn/plugins/moxingovo/dsh-github (The community directory is an independent site and has no official affiliation with DeepSeek or Fangj)
  • Source repository: https://github.com/moxingovo/dsh-github