sample-group-sankey-plot

sample-group-sankey-plot is a skill for Claude Code, Codex from aipoch/medical-research-skills. It costs 64 tokens per session (2,318 once invoked), scanned A, original, MIT.

A workflow for turning sample annotation tables into Sankey or alluvial diagrams, which show how groups flow between categories. It accepts CSV or TSV files with samples as rows and at least two categorical stages.

In plain words
What is it for?
Use it to visualize changes between labels such as risk group, treatment response, subtype, or cohort, while exporting the selected data, chart, and session details.
Why use it?
It keeps the input and output consistent and prevents using a flow chart for data it cannot represent, such as continuous measurements or gene networks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to visualize changes between labels such as risk group, treatment response, subtype, or cohort, while exporting the selected data, chart, and session details.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aipoch/medical-research-skills/sample-group-sankey-plot
About the project

Medical Research Agent Skills is a library of agent instructions for medical and biomedical research, covering evidence analysis, study protocol design, data analysis, and academic writing. Researchers use it to guide compatible coding agents through common scientific workflows. The catalogue contains many of the library's skills and commands.

aipoch/medical-research-skills · 1,855 stars · on GitHub · aipoch.com

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 aipoch/medical-research-skills --skill sample-group-sankey-plot
Clone the repo
git clone --depth 1 https://github.com/aipoch/medical-research-skills

Made for: Claude Code, Codex.

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 sample-group-sankey-plot

README.md
[![agentmods](https://agentmods.dev/badge/skills/aipoch/medical-research-skills/sample-group-sankey-plot/github.svg)](https://agentmods.dev/skills/aipoch/medical-research-skills/sample-group-sankey-plot)
Your own site
<a href="https://agentmods.dev/skills/aipoch/medical-research-skills/sample-group-sankey-plot"><img src="https://agentmods.dev/badge/skills/aipoch/medical-research-skills/sample-group-sankey-plot/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 sample-group-sankey-plot

Your own site · 80×15
<a href="https://agentmods.dev/skills/aipoch/medical-research-skills/sample-group-sankey-plot"><img src="https://agentmods.dev/badge/skills/aipoch/medical-research-skills/sample-group-sankey-plot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,318 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00064 $0.02318
Opus 5 $0.00032 $0.01159
Sonnet 5 $0.00013 $0.00464
Haiku 4.5 $0.00006 $0.00232

Measured 11d ago against content hash 3a341a0a04f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

sample-group-sankey-plot scanned grade A with 0 findings 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 11d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

awesome-med-research-skills/Data Analysis/sample-group-sankey-plot/SKILL.md · 262 lines

How it starts

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

Sample Group Sankey Plot

Builds a reproducible Sankey/alluvial visualization from a tabular sample annotation file and exports the selected annotations, lodes-format table, plot PDF, and session metadata.

Input Validation

This skill accepts: a sample annotation table in CSV or TSV format where rows are samples and selected columns are categorical stages (e.g., risk group, response status, subtype, cohort label). At least 2 stage columns are required.

If the user's request does not involve generating a Sankey or alluvial flow diagram from categorical sample annotations — for example, asking to visualize a gene regulatory network, plot continuous-value trajectories, analyze pathway flow, or process non-tabular data — do not proceed with the workflow. Instead respond:

"sample-group-sankey-plot is designed to generate Sankey/alluvial plots from categorical sample annotation tables. Your request appears to be outside this scope. Please provide a sample annotation table with at least 2 categorical stage columns, or use a more appropriate tool for gene network visualization or pathway analysis."

Readability guidance: Sankey plots are recommended for fewer than 8 unique values per stage and fewer than 5 stages total. For larger inputs, filter or aggregate categories before plotting to ensure readable output.

Agent Response Contract

After a successful run, report to the caller:

Sankey plot generated successfully.
Stages plotted : <comma-separated stage column names>
Samples        : <row count>
Output prefix  : <output_prefix>
Outputs:
  table/selected_annotations.csv
  table/sankey_lodes.csv
  plot/<output_prefix>.pdf
  data/session_info.txt
Readability warnings (if any): <advisory messages or "none">

If the script exits with a non-zero status, surface the SKILL_* error code and message verbatim. Do not attempt to continue or retry silently.

When to Read External Files

Situation File to Read Purpose
Need to run analysis scripts/main.R Execute: Rscript scripts/main.R --input_file ... --output_dir ...
Need algorithm details references/algorithm.md Alluvial transformation logic, assumptions, and plotting choices
Encounter errors references/troubleshooting.md Common errors and solutions
Need CLI examples references/cli-guide.md Detailed CLI examples
Need test data tests/data/ Sample annotation tables for smoke tests and regression checks

Read the full file on GitHub · 262 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. 11d ago First seen · 262 lines · 64 tokens per session scan A 3a341a0a04f7

Subscribe to this mod's changes

sample-group-sankey-plot is a skill published in the GitHub repository aipoch/medical-research-skills (1,855 stars, last pushed 1mo ago), licensed MIT. It adds 64 tokens to every session and 2,318 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.