skills/genomics-viz/SKILL.md
--- name: genomics-viz description: Builds interactive D3 visualizations of genetics and genomics concepts for the vault's docs/ GitHub Pages site — each one a teaching object with a takeaway-stating title, an annotation layer, and a guided reading order. Specializes d3-visualization, visual-storytelling-design, and cognitive-design for the crop-genetics / genomic-selection domain, supplying a concept-to-visualization catalog, preattentive encoding guidance, colorblind-safe palettes, accessibili
npx skillsauth add lyndonkl/claude skills/genomics-vizInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A visualization in this vault is a teaching object, not a decoration on a post. It exists to make one genetics claim — usually a single evergreen note — feel true to a reader who has the algebra but not yet the intuition. The bar is high: an interactive figure earns its place only when motion or interactivity does work that a static plot cannot (watching allele frequency drift to fixation across replicate populations teaches drift in a way a single trajectory never will).
This skill is the domain specialization layer. The mechanics live elsewhere and are assumed: d3-visualization for scales, shapes, layouts, transitions, and interaction (zoom/pan/brush); visual-storytelling-design for narrative structure and the annotation layer; cognitive-design for why an encoding works (preattentive processing, encoding hierarchy, working-memory limits). Use those three for the how; use this for the what, the genomics-specific encodings, and the publish path into docs/.
Every figure is built around the publishing claim, so begin from the evergreen note it serves, and let its declarative title become the figure's takeaway title.
Pick the form from the concept. Each row names the encoding spine and the one interaction that earns the "interactive" label.
| Concept (evergreen claim) | Chart form | Encoding spine | The interaction that teaches | |---|---|---|---| | Hardy–Weinberg equilibrium | parabola of genotype freqs vs allele freq p | x = p, y = freq of AA/Aa/aa as curves | drag p; watch the three curves and the Aa maximum at p=0.5 | | Allele-frequency drift | small-multiples of replicate trajectories | x = generation, y = p, one line per population | set N and replicates; press run; watch fixation/loss spread | | LD decay vs distance | scatter + fitted decay curve | x = distance (kb/cM), y = r² | slide recombination rate / N_e; the curve's half-life moves | | Recombination | chromosome ribbon with crossovers | position along homologs, crossover marks | step meioses; watch haplotype blocks reshuffle | | Additive vs dominance variance | stacked decomposition of genotypic values | genotype on x, value on y, V_A vs V_D bands | drag the heterozygote value; V_D appears as the curvature | | Breeder's equation / response | selection on a phenotype distribution | trait density, truncation point, shifted mean | drag the selection threshold; R = h²·S animates next gen | | GxE reaction norms | lines across environments | x = environment index, y = genotype mean | toggle genotypes; crossing norms = the interaction | | Genomic-prediction accuracy vs training-set size | learning curve | x = N_train (log), y = prediction accuracy r | slide heritability and marker density; curve saturates | | Population-structure PCA | scatter of PC1×PC2 | x = PC1, y = PC2, color = subpopulation | brush a cluster; lasso to inspect membership | | Manhattan plot | scatter of −log10(p) along the genome | x = genomic position, y = −log10(p), color = chr | hover a peak; zoom a region; significance line draggable | | Kinship / G-matrix heatmap | symmetric matrix heatmap | row × col = individuals, color = relatedness | reorder by cluster; hover a cell for the pair's coefficient |
Hold one claim per figure (the atomicity rule of conventions.md mirrored in pixels). A figure trying to show both drift and selection is two figures.
Encode the load-bearing variable in the channel the eye reads first. The cognitive-design encoding hierarchy for quantitative data, most to least accurate: position → length → angle/slope → area → color hue/saturation. Spend the top of the hierarchy on the variable the claim is about.
A bare chart asks the reader to find the point. An annotated chart makes it. Build the annotation layer on top, never inside, the data layer.
Non-negotiable, because this publishes to a public GitHub Pages site.
<figure><figcaption> describing the takeaway, and an SVG <title>/<desc> so screen readers reach the claim.aria-label); hover-only information also appears on focus.design-evaluation-audit (clarity, hierarchy, encoding correctness, accessibility) and cognitive-fallacies-guard (does the framing invite a misread — truncated axis implying a big effect, correlation in the Manhattan plot read as cause, a smoothed line hiding noise). Treat its output as advisory in the spirit of conventions.md §10: it proposes, the author approves.The site is plain static HTML/JS/CSS (conventions.md §2). One self-contained directory per figure so a post can embed it via iframe and it also stands alone.
docs/
index.html # gallery: cards linking each viz, grouped by phase
assets/
css/site.css
js/d3.v7.min.js # pinned D3; vizzes share one copy
js/palettes.js # viridis + Okabe–Ito, the house palettes
viz/
hardy-weinberg/
index.html # the standalone figure page
hardy-weinberg.js # the D3 build
data.json # seeded/simulated data (inspectable, reproducible)
README.md # claim, evergreen slug it serves, how to regenerate data
allele-drift/
index.html
allele-drift.js
...
Conventions for the layout:
hardy-weinberg, ld-decay, manhattan-plot).README.md records the evergreen slug it visualizes (provenance, mirroring the post viz: and based-on: fields), the takeaway title, the data source or simulation seed, and the regeneration command.post note links the figure via its viz: frontmatter field (docs/viz/hardy-weinberg/).*.js build self-contained and dependency-light; share only D3 and palettes.js from assets/.This skill produces or revises files under docs/. Like every agent in the system it proposes; the author approves (conventions.md §10) — it does not commit or publish on its own. A completed figure is: one claim, a takeaway title, a teaching interaction, correct encodings, a clean annotation layer, accessibility met, and a passed cognitive-design-architect review. If interactivity adds nothing the claim needs, ship a static figure and say so.
testing
Cluster a conference's event records into a small set of coarse themes with finer sub-clusters, an explicit outlier bucket, and soft (multi-membership) affinities — using the hybrid embed-then-label pipeline (embed abstracts, reduce, density-cluster, then LLM-label the clusters) when embedding libraries are available, and an LLM-reasoned hierarchical fallback when they are not. Embeddings do the grouping; the LLM only names the groups. Conference-agnostic. Use when turning structured event records into a navigable theme map for preference elicitation and scheduling, when you need 6-8 reasonable themes rather than 20 muddy ones, or when overlapping talks must belong to more than one theme. Trigger keywords - theme clustering, cluster talks, embed then label, soft membership, outlier talks, conference themes, topic map.
development
Build a personal conference schedule as a constraint-optimization problem — hard constraints (no time overlap, room-to-room travel time, capacity/registration, the attendee's own must-attends and blackouts) plus a user-owned weighted objective trading interest against breadth, pacing (maximize contiguous free time), and serendipity. Surfaces unbreakable conflicts (two high-value overlapping talks the model cannot rank) as decisions for the human rather than silently picking, and reports what each choice traded away. Conference-agnostic. Use to turn a preference profile plus a theme map into a day-by-day plan, to resolve overlapping sessions, or to balance a packed vs paced schedule. Trigger keywords - schedule optimization, conference schedule, constraint optimization, overlapping talks, contiguous free time, conflict surfacing, packed vs paced.
development
Parse a heterogeneous conference program (markdown, HTML, PDF-derived text, or JSON) into normalized event records with per-field confidence scores and independent classification axes (topic, depth, format, prerequisites, recorded, capacity). Detects the program's format before extracting, treats every inferred field as uncertain (present vs inferred vs missing), and flags thin or missing abstracts so downstream enrichment can target them. Conference-agnostic. Use when ingesting a conference or event schedule into a structured store, normalizing a talk/session list, or extracting per-session metadata with calibrated confidence. Trigger keywords - program ingestion, parse schedule, session extraction, event records, conference program, talk metadata, per-field confidence.
development
Build a personalized preference profile from a small number of well-chosen, cluster-grounded questions instead of a long survey. Represents the person's interests as an uncertainty region over the theme map, picks the single highest-information-gain choice-based question (contrasting real talks from different clusters), balances exploiting known interests against exploring uncertain ones, deliberately injects outlier probes to fight selection bias, and stops as soon as the schedule would be stable. Also elicits the user-owned objective weights and hard constraints. Interactive — runs where it can actually ask the person. Conference-agnostic. Use to turn a theme map into a preference profile, to decide what to ask a conference attendee, or to elicit scheduling priorities. Trigger keywords - preference elicitation, ask few questions, information gain, choice-based questions, selection bias probe, objective weights, attendee preferences.