From thinking-frameworks-skills
Builds interactive D3 teaching visualizations of genetics concepts (Hardy-Weinberg, drift, LD decay) for a GitHub Pages docs site. Specializes d3-visualization, visual-storytelling-design, and cognitive-design for the crop-genetics/ genomic-selection domain.
How this skill is triggered — by the user, by Claude, or both
Slash command
/thinking-frameworks-skills:genomics-vizThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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 a...
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.
npx claudepluginhub lyndonkl/claude --plugin thinking-frameworks-skillsGuides custom D3.js visualizations: bar/line/scatter charts, network diagrams, geographic maps, hierarchies, and real-time data updates with zoom/pan/brush interactions.
Generates OpenChart VizSpec JSON for charts, tables, graphs, and sankeys from data. Guides chart selection, encoding rules, and editorial design like colors, typography, and annotations.
Designs clear, accessible data visualizations with chart selection for comparisons/trends/distributions, styling principles, color palettes, responsiveness, and best practices.