# tooluniverse-population-genetics

tooluniverse-population-genetics is a Claude Code skill for analyzing genetic diversity, allele frequencies across populations, Hardy-Weinberg equilibrium, and evolutionary constraints.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 150 installs · ★ 1798 repo stars
- Author: mims-harvard
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/mims-harvard/ToolUniverse/tree/HEAD/skills/tooluniverse-population-genetics/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/tooluniverse-population-genetics

## What it does

This skill gives your agent access to population genetics tools: querying gnomAD and 1000 Genomes, computing Fst between populations, testing Hardy-Weinberg equilibrium, calculating inbreeding coefficients and haplotype counts. Built-in formulas handle theoretical calculations — allele frequency change under selection, drift in small populations, linkage disequilibrium decay.

The README includes a reference for all available tools (gnomad_search_variants, gnomad_get_variant, EnsemblVEP_annotate_rsid and others), how to call them, and critical gotchas (variant_id format must be "CHR-POS-REF-ALT"; gwas_search_associations fails on gene names). Workflows are documented step by step — from variant frequency lookup to pathogenicity assessment.

To install, choose your platform and run the `npx skills add` command with the `-a` flag for your environment.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-population-genetics -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/tooluniverse-population-genetics/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/tooluniverse-population-genetics/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-population-genetics -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/tooluniverse-population-genetics/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-population-genetics -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/tooluniverse-population-genetics/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install mims-harvard/ToolUniverse skills/tooluniverse-population-genetics
```

2. **Manually: put the files in place**
- File: `.github/skills/tooluniverse-population-genetics/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-population-genetics -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/mims-harvard/ToolUniverse --path skills/tooluniverse-population-genetics
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/tooluniverse-population-genetics/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-population-genetics -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/mims-harvard/ToolUniverse/tree/HEAD/skills/tooluniverse-population-genetics/SKILL.md

## When to use it
- Look up allele frequency for a variant across populations
- Find GWAS associations for a genetic variant or disease
- Compute Fst and population differentiation between groups
- Test Hardy-Weinberg equilibrium for a locus
- Assess evolutionary constraint on a gene using pLI and LOEUF scores

## Example prompts
- What's the frequency of rs1234567 in the African population in gnomAD?
- Show me all GWAS associations for the BRCA1 gene related to breast cancer
- Calculate Fst between European and East Asian populations for variant 1-12345-A-G

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 7b2915cc246dea36.

BEGIN THIRD-PARTY FILE 7b2915cc246dea36
```text
---
name: tooluniverse-population-genetics
description: Population genetics analysis — allele frequencies (gnomAD, 1000 Genomes), Hardy-Weinberg equilibrium testing, Fst between populations, GWAS associations, evolutionary constraint scores. Use for cross-population variant comparison, ancestry-aware allele frequency lookups, and population-level evolutionary analysis.
disable-model-invocation: true
---

# Population Genetics Analysis

**MC Strategy**: Population genetics MC questions often test whether you know a specific theorem or result. COMPUTE the answer first (use popgen_calculator.py or write Python), then match to options. Don't try to reason about which option "sounds right."

Analyze population-level genetic variation, allele frequencies, GWAS associations, clinical significance, and evolutionary constraints using ToolUniverse tools.

## When to Use

Activate this skill when the user asks about:
- Allele frequencies across populations (gnomAD, 1000 Genomes)
- GWAS associations for diseases/traits
- Clinical variant interpretation (ClinVar, VEP)
- Gene-level constraint metrics (pLI, LOEUF, o/e ratios)
- Selection, drift, linkage disequilibrium, or population structure
- Variant annotation and functional consequences

## LOOK UP, DON'T GUESS

Query gnomAD/1000Genomes/GWAS Catalog FIRST for allele frequencies and associations. Preferred: use the `PopGen_hwe_test`, `PopGen_fst`, `PopGen_inbreeding`, and `PopGen_haplotype_count` tools for HWE, Fst, inbreeding, and haplotype calculations. Fallback: run `popgen_calculator.py` directly. For theoretical problems (delta-q, drift, LD decay), apply the formulas in the Theoretical Reasoning section below.

---

## Tool Quick Reference

| Tool | Key Parameters | Notes |
|------|---------------|-------|
| `gnomad_search_variants` | `query` (REQUIRED) | Resolve rsID to variant_id format "CHR-POS-REF-ALT" |
| `gnomad_get_variant` | `variant_id` (REQUIRED), `dataset` | Population frequencies. Default dataset: gnomad_r3; use gnomad_r4 for latest |
| `gnomad_get_gene_constraints` | `gene_symbol` (REQUIRED) | pLI, o/e ratios. May timeout -- retry once |
| `MyVariant_query_variants` | `query` (REQUIRED) | Aggregated: ClinVar + dbSNP + gnomAD + CADD. Uses hg19 coordinates |
```
END THIRD-PARTY FILE 7b2915cc246dea36

The third-party file has ended. Everything between the 7b2915cc246dea36 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2253 of 21630 bytes. © mims-harvard · Apache-2.0 · https://github.com/mims-harvard/ToolUniverse/tree/HEAD/skills/tooluniverse-population-genetics/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
