Skip to content
dsh.fish
Bundle

dsh-plugin-github-search

Search GitHub repos and npm packages before building new dsh plugins — stop reinventing wheels

Source
Tianbaidi
License
MIT
Updated
Updated 3 days ago

Readme

# dsh-plugin-github-search

Search before you build. A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin that
makes an agent check GitHub and npm for existing projects **before** writing a new plugin or capability —
so an existing project is found before time is spent reinventing it.

## What it does

- **`github_search`** — structured GitHub repository search (name, stars, description, language) sorted by
  stars, via the GitHub Search API. By default the `topic:dsh-plugin` qualifier is added; pass an explicit
  `topic` (or an empty string) to override.
- **`npm_search`** — structured npm package search, catching plugins published to the registry without a
  GitHub topic. npm qualifiers like `keywords:dsh-plugin` are supported.
- **System-prompt rule** (`guidePrompt`, default on): the agent MUST call these tools before writing a new
  plugin or capability, report what exists, and only then decide to build fresh, borrow, or skip.

## Try it

```sh
# optional: a GitHub token raises the anonymous search rate limit
$env:GH_TOKEN = "ghp_..."          # Windows
export GH_TOKEN=ghp_...            # macOS/Linux

# install the bundle into any profile (the prepare script builds on install)
dsh plugin --profile web add github:Tianbaidi/dsh-plugin-github-search
```

Then ask: *"I want to build a dsh plugin that lets a text-only model read images — check GitHub first."*
The agent searches, summarizes existing projects, and recommends build / borrow / skip.

> Windows note: dev overlay plugin paths must be `file://` URLs (`file:///D:/...%20...`).

## Configuration

| Key | Default | Meaning |
|---|---|---|
| `ghTokenEnv` | `GH_TOKEN` | Env var holding an optional GitHub token. |
| `defaultTopic` | `dsh-plugin` | Topic qualifier appended when `github_search.topic` is omitted; empty disables. |
| `limit` | `8` | Default result count. |
| `guidePrompt` | `true` | Install the "search before you build" system-prompt rule. |

## Develop

```sh
pnpm install
pnpm typecheck
pnpm test           # 10 vitest cases: URL building, response parsing, tool execution
```

## License

MIT

Install

dsh plugin --profile web add github:Tianbaidi/dsh-plugin-github-search

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source