Back to home@gsh150801

dsh-bioinf

Bioinformatics plugin for DeepSeek Harness (dsh)

Stars
0
Language
TypeScript
Created
Sep 1, 2026
Updated
Sep 1, 2026
GitHub repo

Introduction

dsh-bioinf

Bioinformatics skill router plugin for 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:

ComponentWhat it does
skill_search toolBM25-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 toolCategory tree (15 top-level categories, counts, sub-categories) for domain browsing.
bioinf-library skill providerRegisters 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 sectionRouting 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).

- 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):

[{"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

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.