ncbi-blast-skill

$npx mdskill add openai/plugins/ncbi-blast-skill

Execute NCBI BLAST searches and manage job status via Common URL API.

  • Handles nucleotide and protein sequence analysis requests efficiently.
  • Integrates with NCBI BLAST.cgi for submission and result retrieval.
  • Decides execution flow based on job action and user data requirements.
  • Delivers compact summaries or raw files upon explicit user instruction.

SKILL.md

.github/skills/ncbi-blast-skillView on GitHub ↗
---
name: ncbi-blast-skill
description: Submit, poll, and summarize NCBI BLAST Common URL API jobs (Blast.cgi) for nucleotide or protein sequences. Use when a user wants RID status, BLAST results, or compact top-hit summaries; fetch raw Text/JSON2 only on request.
---

## Operating rules

- Use `scripts/ncbi_blast.py` for all concrete BLAST work.
- Honor NCBI limits: `>=10s` between requests and `>=60s` between polls for the same RID.
- Always surface the `RID` in the response so the job can be resumed or refetched later.
- If the conversation is long or multiple tool calls have occurred, refetch from the `RID` instead of trusting older context.
- If a prior turn saved raw output to disk, do not read it back into context unless the user asks for a specific follow-up.

## Execution behavior

- Return compact BLAST summaries first.
- Do not paste full `JSON2` or long Text alignments into chat by default.
- Default to `max_hits=5` and `max_queries=5`.
- If the user asks for raw output, write it to a file and report the path.
- Only provide Python code when the user explicitly asks for code or execution is unavailable.
- For normal user-facing answers, summarize the script JSON in markdown; if the user explicitly asks for machine-readable output, return the JSON verbatim.

## Input

- The script reads one JSON object from stdin.
- `action` must be one of `submit`, `status`, `fetch`, or `run`.
- `submit` and `run` require `program`, `database`, `query_fasta`, and `email` (or `NCBI_EMAIL`).
- `status` and `fetch` require `rid`.
- `program` must be one of `blastn`, `blastp`, `blastx`, `tblastn`, or `tblastx`.
- `result_format` defaults to `json2` for `run` and `fetch`.
- `tool` defaults to `NCBI_TOOL`, then `ncbi-blast-skill`.
- `max_hits` defaults to `5`; `max_queries` defaults to `5`.
- `hitlist_size` defaults to `50`; `descriptions` and `alignments` default to `5`.
- `wait_timeout_sec` defaults to `900`.
- `save_raw` defaults to `false`.
- If `save_raw=true` and `raw_output_path` is omitted, the script writes to `/tmp/ncbi-blast-<rid>.<json|txt>`.
- `query_fasta` may contain multi-FASTA input; compact summaries still cap per-query output with `max_hits` and `max_queries`.

## Output

- Common success fields: `ok`, `source`, `action`, `warnings`.
- `submit` returns `rid`, `rtoe_seconds`, and `status="SUBMITTED"`.
- `status` returns `rid`, normalized `status`, and `has_hits`.
- `run` and `fetch` with `result_format=json2` return `rid`, `status`, `has_hits`, `result_format`, `query_count_returned`, `query_count_available`, `query_summaries_truncated`, `query_summaries`, and `raw_output_path`.
- Each `query_summary` contains `query_title`, `hit_count_returned`, `hit_count_available`, `truncated`, and `top_hits`.
- Each `top_hit` contains `rank`, `accession`, `title`, `evalue`, and `bit_score`.
- `fetch` with `result_format=text` returns `text_head` capped at 800 characters unless `save_raw=true`; when `save_raw=true`, it returns only the artifact path.
- Failures return `ok=false`, `error.code`, `error.message`, and `warnings`.

## Execution

- Run `python scripts/ncbi_blast.py`.
- If `requests` is missing, install it once before first use with `python -m pip install requests`.

```bash
echo '{"action":"run","program":"blastp","database":"swissprot","query_fasta":">q1\nMTEYK...","email":"you@example.com"}' | python scripts/ncbi_blast.py
```

## References

- Load `references/blast-common-url-api.txt` only for parameter details or uncommon BLAST options.
- Do not load `references/intent-notes.txt` during normal skill execution; it is not runtime guidance.

More from openai/plugins

SkillDescription
accessibility-and-inclusive-visualizationMake data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.
agent-browserBrowser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.
agent-browser-verifyAutomated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass/fail before continuing.
agents-sdkBuild AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
ai-elementsAI Elements component library guidance — pre-built React components for AI interfaces built on shadcn/ui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.
ai-gatewayVercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.
ai-generation-persistenceAI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation
ai-sdkVercel AI SDK expert guidance. Use when building AI-powered features — chat interfaces, text generation, structured output, tool calling, agents, MCP integration, streaming, embeddings, reranking, image generation, or working with any LLM provider.
aiq-deploy|
aiq-research|