Skip to content
dsh.fish
Bundle

dsh-bioinf

Bioinformatics skill router plugin for DeepSeek Harness: searchable index over a large skill library, an anysearch web-search provider, remote-exec tooling, and scenario guidance for literature review, bio-data analysis, and remote training

Source
gsh150801
License
MIT
Updated
Updated yesterday

Readme

# dsh-bioinf

Bioinformatics skill router plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).

Solves one core problem: a curated library of **986 bio-skills** cannot be published as a flat
per-session catalog (~230 KB / 60–80k tokens of prompt per session). This plugin replaces the
catalog with **search-based routing**:

| Component | What it does |
|---|---|
| `skill_search` tool | BM25-style scoring (idf-weighted fields: name ×6, category ×2, whenToUse ×1.5, description ×1) with CJK bigram support — Chinese and English queries both work. Returns top-k matches with exact names + categories. <10 ms per query over the full library. |
| `skill_categories` tool | Category tree (15 top-level categories, counts, sub-categories) for domain browsing. |
| `bioinf-library` skill provider | Registers all 986 skills into `ctx.skills` so the **native `skill` tool** loads bodies on demand (normalized kebab-case names; strips HTML provenance comments; guaranteed descriptions). |
| `dsh-bioinf-anysearch` (sibling row) | Registers an [anysearch] `WebSearchProvider` into `ctx.web` — powers the native `web_search` tool. Separate row because headless profiles mount no web seam. |
| `remote_exec` tool (opt-in) | SSH execution on a configured GPU/train server: `nvidia-smi`, nohup training, log polling, prediction. Registered only when `remote.host`/`remote.user` are set. |
| Guidance prompt section | Routing rules ("never guess a skill name") + three scenario playbooks: (A) literature deep-review with falsifiable hypotheses, (B) bio-data retrieval/analysis, (C) remote training/prediction. |

## Usage

Pair with `@deepseek-ai/dsh-tool-skill` config `catalog: off` (see `~/.dsh/profiles/bioinf/cordis.patch.yml`).

```yaml
- insert:
    - id: bioinf
      name: 'file:///D:/projs/bioinf_agent/deepseek-harness/packages/examples/dsh-bioinf/lib/index.js'
      config:
        skillsIndexFile: 'D:/projs/bioinf_agent/skills_meta/_dsh_index.json'
    - id: bioinf-anysearch
      name: 'file:///D:/projs/bioinf_agent/deepseek-harness/packages/examples/dsh-bioinf/lib/anysearch-plugin.js'
      config:
        apiKey: '...'
- id: tool-skill
  name: '@deepseek-ai/dsh-tool-skill'
  config:
    catalog: off
```

## Index format

`skillsIndexFile` points at a JSON array (build script: `D:/projs/bioinf_agent/tools_scan/build_index.py`,
inventory: `validate_skills.py`):

```json
[{"name":"scanpy","dir":"scanpy","cat1":"细胞组学与组学整合场景","cat2":"单细胞与转录组分析",
  "cat3":"scanpy","description":"...","whenToUse":"...","requirements":["pip install scanpy"],
  "hasScripts":false,"nScripts":0,"bodyChars":1234,"path":"D:/.../scanpy/SKILL.md"}]
```

## Development

```sh
pnpm run build:lib:host   # rebuilds lib/ (tsc project graph + tsdown)
pnpm exec vitest run packages/examples/dsh-bioinf/tests/
```

Unit suites (36 tests, no harness boot): `bioinf.spec.ts` (index/tokenizer/body
extraction/anysearch), `scenarios.spec.ts` (scenario A literature→hypothesis routing +
skill-load chain; scenario B data-source routes + category tree + `ssh` argv),
`perf.spec.ts` (measurement-based guardrails: per-step model-visible payload,
cold/cached index load).

The package follows repo conventions: `tsconfig.json` in the `tsc -b` graph (referenced from the
root `tsconfig.host.json`) and a local `tsdown.config.ts` with entries `index`, `anysearch-plugin`,
`search`, `anysearch`.

Install

dsh plugin --profile web add github:gsh150801/dsh-bioinf

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source