biopython

biopython is a skill for Claude Code from ualberta-rcg/drac-agent-skills. It costs 84 tokens per session (1,452 once invoked), scanned A, original, MIT.

A Python toolkit for working with biological sequences, 3D molecular structures, genome files, and related research databases. It reads formats such as FASTA, FASTQ, GenBank, and PDB, and supports sequence comparison and evolutionary-tree analysis.

In plain words
What is it for?
Use it to filter and translate sequencing reads, compare DNA or protein sequences, query NCBI and PubMed, process BLAST results, and build or inspect phylogenetic trees.
Why use it?
It removes the need to write file parsers and database-request code from scratch for common molecular-biology tasks. It also helps keep large sequence files from being loaded into memory all at once.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the community-science plugin — 10 skills shipped together

Good fit Use it to filter and translate sequencing reads, compare DNA or protein sequences, query NCBI and PubMed, process BLAST results, and build or inspect phylogenetic trees.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ualberta-rcg/drac-agent-skills/biopython
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ualberta-rcg/drac-agent-skills --skill biopython
Clone the repo
git clone --depth 1 https://github.com/ualberta-rcg/drac-agent-skills

Made for: Claude Code.

Or install community-science, the plugin that ships this one along with the rest of its 10 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for biopython

README.md
[![agentmods](https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/biopython/github.svg)](https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/biopython)
Your own site
<a href="https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/biopython"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/biopython/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for biopython

Your own site · 80×15
<a href="https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/biopython"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/biopython.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,452 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.01452
Opus 5.5 $0.00034 $0.00581
Sonnet 5.5 $0.00017 $0.00290
Haiku 4.5 $0.00008 $0.00145

Measured 6d ago against content hash 724d4a85968a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

biopython scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

Target **Biopython 1.88+** (`Bio.HMM`, `Bio.MarkovModel`, and `Bio.Application` CLI wrappers were removed in 1.86 — invoke external aligners/BLAST+ via Python's `subprocess.run` with explicit argument lists).
community-skills/skills/biopython/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Biopython: Sequence, Structure & Genomics Workflows

Target Biopython 1.88+ (Bio.HMM, Bio.MarkovModel, and Bio.Application CLI wrappers were removed in 1.86 — invoke external aligners/BLAST+ via Python's subprocess.run with explicit argument lists).

Installation & HPC Environment

# Alliance CVMFS wheelhouse (inside a venv) + Bioinformatics binaries
module spider biopython blast+ mafft
pip install --no-index biopython

Core Patterns by Subpackage

1. Streaming Sequence I/O (Bio.Seq & Bio.SeqIO)

Always stream large FASTA/FASTQ files with SeqIO.parse (iterator) rather than SeqIO.to_dict in memory:

from Bio import SeqIO
from Bio.SeqUtils import gc_fraction

with open("reads.fastq") as handle:
    for rec in SeqIO.parse(handle, "fastq"):
        if len(rec.seq) >= 150 and min(rec.letter_annotations["phred_quality"]) >= 20:
            gc = gc_fraction(rec.seq)
            # Only call .translate(table=1, cds=True) on validated coding sequences

2. Modern Pairwise Alignment (Bio.Align.PairwiseAligner)

(Never use deprecated Bio.pairwise2; note that in Biopython 1.86+ PairwiseAligner defaults to gap_score = -1.0.)

from Bio import Align
from Bio.Align import substitution_matrices

aligner = Align.PairwiseAligner(mode="global")
aligner.substitution_matrix = substitution_matrices.load("BLOSUM62")
aligner.open_gap_score = -10.0
aligner.extend_gap_score = -0.5
best = aligner.align("MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSH", "MVHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLST")[0]
print(f"Score: {best.score:.1f}\n{best}")

3. Programmatic NCBI Entrez (Bio.Entrez)

NCBI requires a real contact Entrez.email (3 req/s unauthenticated; 10 req/s with NCBI_API_KEY read from env — never hardcode keys). Note that compute nodes without internet must stage NCBI downloads beforehand or use the cluster proxy:

import os
from Bio import Entrez, SeqIO

Entrez.email = "[email protected]"
Entrez.tool = "research_pipeline"
if key := os.environ.get("NCBI_API_KEY"):
    Entrez.api_key = key

with Entrez.efetch(db="nucleotide", id="NM_000518.5", rettype="gb", retmode="text") as h:
    record = SeqIO.read(h, "genbank")

Read the full file on GitHub · 121 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 121 lines · 84 tokens per session scan A 724d4a85968a

Subscribe to this mod's changes

biopython is a skill published in the GitHub repository ualberta-rcg/drac-agent-skills (2 stars, last pushed 7d ago), licensed MIT. It adds 84 tokens to every session and 1,452 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-25.

Related

biopython compared with skills from other repositories

biopython next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
biopythonualberta-rcg/drac-agent-skillsSkill27d agoMITA84Claude Code
jupyter-notebookNousResearch/hermes-agentSkill267ktodayMITA18Claude Code, Codex
matlabK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA44Claude Code
pennylaneK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA74Claude Code
cuequivariance-torchNVIDIA/skillsSkill4.2ktodayApache-2.0A37Claude Code, Codex
cuequivariance-jaxNVIDIA/skillsSkill4.2ktodayApache-2.0A38Claude Code, Codex
cuopt-numerical-optimization-apiNVIDIA/skillsSkill4.2ktodayApache-2.0A51Claude Code, Codex