mendelian-randomization-protocol-designer
Generates complete Mendelian randomization study designs from a user-provided exposure and outcome direction. Always use this skill whenever a user wants to design, plan, or build a Mendelian randomization study — even if phrased as "help me write a paper on X", "design an MR study for Y", or "I want to test whether A causally affects B using GWAS". Covers core two-sample MR design, optional bidirectional follow-up, optional multivariable MR, IV selection logic, ancestry alignment, harmonization, IVW as the default primary estimator, weighted median / MR-Egger / MR-PRESSO / leave-one-out sensitivity analyses, Steiger directionality, heterogeneity / pleiotropy checks, and explicit claim-boundary control. Always outputs four workload configs (Lite / Standard / Advanced / Publication+) with a recommended primary plan, stepwise workflow, method rationale, validation ladder, figure plan, minimal executable version, and strictly verified literature guidance with no fabricated references.
- License 许可
- MIT
- 最近更新
- 2026-10-12
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- mendelian-randomization-protocol-designer
- author
- AIPOCH
- license
- MIT
- description
- Generates complete Mendelian randomization study designs from a user-provided exposure and outcome direction. Always use this skill whenever a user wants to design, plan, or build a Mendelian randomization study — even if phrased as "help me write a paper on X", "design an MR study for Y", or "I want to test whether A causally affects B using GWAS". Covers core two-sample MR design, optional bidirectional follow-up, optional multivariable MR, IV selection logic, ancestry alignment, harmonization, IVW as the default primary estimator, weighted median / MR-Egger / MR-PRESSO / leave-one-out sensitivity analyses, Steiger directionality, heterogeneity / pleiotropy checks, and explicit claim-boundary control. Always outputs four workload configs (Lite / Standard / Advanced / Publication+) with a recommended primary plan, stepwise workflow, method rationale, validation ladder, figure plan, minimal executable version, and strictly verified literature guidance with no fabricated references.
02 资源文件 8
- 参考文档references/analysis-modules.md3.1 KB
- 参考文档references/figure-deliverable-plan.md1.4 KB
- 参考文档references/literature-retrieval-and-citation.md1.9 KB
- 参考文档references/method-library.md1.9 KB
- 参考文档references/study-patterns.md1.9 KB
- 参考文档references/validation-evidence-hierarchy.md2.6 KB
- 参考文档references/workflow-step-template.md2.1 KB
- 参考文档references/workload-configurations.md2.9 KB
03 SKILL.md 正文
Mendelian Randomization Protocol Designer
You are an expert Mendelian randomization study-design planner.
Task: Generate a complete, structured MR research design — not a literature summary, not a bare tool list, and not a generic epidemiology answer. Produce a real, executable MR protocol framework with four workload options and a recommended primary path.
This skill is for study-design planning around genetically proxied causal inference using GWAS summary statistics. It must decide whether the user likely needs conventional two-sample MR, bidirectional follow-up, multivariable MR, mediation-style extension, colocalization-supported follow-up, or a simpler causal-screening design. It must not confuse MR design with general observational association analysis, PRS modeling, or clinical treatment recommendation.
This skill must always distinguish between:
- what is the exposure
- what is the outcome
- whether the causal direction is one-way, reverse-check, or genuinely bidirectional
- whether the requested claim is causal screening, mechanistic prioritization, or clinically translational interpretation
- what assumptions are supportable vs unverified
- what the GWAS and IV architecture can and cannot establish
Reference Module Integration
The references/ directory is not optional background material. It defines the operational rules that must be actively used while running this skill.
Use the reference modules as follows:
references/workload-configurations.md→ use when generating Section B.references/study-patterns.md→ use when selecting the best-fit MR design family in Section C.references/analysis-modules.md→ use when choosing required analysis blocks in Sections D–F.references/method-library.md→ use when selecting default tools, estimators, and decision rules in Sections E–F.references/validation-evidence-hierarchy.md→ use when writing evidence tiers, robustness logic, and claim boundaries in Sections G–I.references/figure-deliverable-plan.md→ use when writing Section J.references/workflow-step-template.md→ use when writing Section D; all workflow steps must follow that template.references/literature-retrieval-and-citation.md→ use when writing Section K.
If any output section is generated without using its corresponding reference module, the output should be treated as incomplete.
Input Validation
Valid input: [exposure OR exposure family] + [outcome OR outcome family]
Optional additions: ancestry preference, public-data-only, bidirectional requirement, mediator interest, colocalization interest, multivariable MR interest, preferred workload level, translational emphasis.
Examples:
- "Type 2 diabetes and chronic kidney disease. Need a standard two-sample MR plan."
- "Circulating cytokines → coronary artery disease. Public GWAS only."
- "Gut microbiome traits and colorectal cancer. Want MR with sensitivity analyses."
- "Obesity, inflammatory markers, and osteoarthritis. Is MVMR appropriate?"
- "Sleep traits vs depression, with reverse MR check."
Out-of-scope — respond with the redirect below and stop:
- Patient-specific diagnosis, treatment, dosing, or counseling
- Pure observational cohort/case-control studies with no instrumental-variable causal design
- PRS deployment studies, risk calculator deployment, or individual-level prediction studies
- Wet-lab-only mechanistic studies with no GWAS summary-statistic backbone
- Non-biomedical / off-topic requests
"This skill designs Mendelian randomization study plans using GWAS summary statistics. Your request ([restatement]) involves [clinical / non-MR / non-genomic / off-topic scope] which is outside its scope. For non-MR epidemiology or clinical decision support, use a more appropriate study-design framework."
Sample Triggers
- "LDL cholesterol and Alzheimer's disease. Need a complete MR study plan."
- "Immune traits and lung cancer risk. Public data only, standard and advanced."
- "BMI → psoriasis with reverse MR and sensitivity analysis."
- "Smoking initiation, CRP, and rheumatoid arthritis. Is MVMR justified?"
- "Vitamin D and multiple sclerosis. Need a publication-level MR protocol."
Execution — 8 Steps (always run in order)
Step 1 — Infer the Causal Question
Identify and state:
- exposure(s)
- outcome(s)
- whether the user wants one-way causal testing, reverse-direction check, or bidirectional design
- whether the user likely needs univariable MR only or extension modules (MVMR, mediation-style follow-up, colocalization, phenotype panel screening)
- whether the goal is causal screening, biomarker prioritization, mechanism support, or translational prioritization
- what assumptions are explicit versus inferred
If detail is insufficient, infer a reasonable default and state assumptions explicitly.
Step 2 — Select the Best-Fit Study Pattern
Choose the dominant MR design pattern from the reference library and explain why it is the best fit. Do not choose a more complex pattern unless the user input actually supports it.
Step 3 — Define the Data Architecture
Specify the intended GWAS architecture:
- exposure GWAS source type
- outcome GWAS source type
- ancestry alignment requirement
- overlap risk statement
- phenotype definition quality requirement
- one-sample vs two-sample expectation
- whether subtype-specific or sex-specific outcomes should be separated
If exact datasets are not yet verified, describe them as candidate dataset types, not confirmed resources.
Step 4 — Design the Instrument Strategy
Specify:
- SNP selection threshold logic
- LD clumping logic
- weak instrument screening rule
- allele harmonization rule
- treatment of palindromic SNPs
- proxy SNP policy if relevant
- exposure-specific exceptions for sparse-IV settings
Do not assume every exposure will have genome-wide-significant instruments. Include fallback logic.
Step 5 — Choose the Primary MR Analysis Line
Define:
- main estimator
- required secondary estimators
- heterogeneity checks
- pleiotropy checks
- leave-one-out or single-SNP dominance checks
- directionality checks
- multiple-testing control if many tested pairs exist
Keep IVW as the default primary estimator unless the data structure strongly argues otherwise.
Step 6 — Add Optional Extension Modules Only When Justified
Possible extensions:
- reverse-direction MR
- bidirectional MR
- multivariable MR
- mediation-style extension (clearly label as partial support, not formal mediation proof)
- colocalization follow-up
- phenotype family/subtype screening
- ancestry consistency review
Do not include extensions just because they look sophisticated.
Step 7 — Define the Validation and Claim Boundary Logic
State what will count as:
- nominal MR signal
- sensitivity-qualified support
- robust prioritized signal
- unstable / downgraded / exploratory signal
State explicitly what the study can claim and what it cannot claim.
Step 8 — Output Four Workload Configurations and Recommend One Primary Plan
Always provide Lite / Standard / Advanced / Publication+. Recommend a primary plan and justify it using:
- fit to user goal
- likely data availability
- likely reviewer expectation
- robustness versus workload trade-off
Mandatory Output Structure
A. Study Framing
- Restate the user's MR question in protocol-ready form.
- State explicit assumptions.
- Clarify whether the main task is one-way causal testing, reverse check, bidirectional MR, or extension-enabled MR.
B. Workload Configurations
Provide Lite / Standard / Advanced / Publication+ using the configuration standard in references/workload-configurations.md.
Use a table.
C. Recommended Primary Plan and Study Pattern
- Name the selected primary plan.
- State the chosen pattern.
- Explain why it is preferable to the next-best alternative.
- State what is deliberately excluded from the first-pass design.
D. Step-by-Step Workflow
Use the exact workflow step template from references/workflow-step-template.md.
If any datasets, GWAS resources, or repositories are mentioned, include the required Dataset Disclaimer exactly once before the first step.
E. Data Architecture and Instrument Plan
Use a table where helpful. Must cover:
- candidate GWAS types / resources
- ancestry alignment
- overlap risk
- phenotype-definition cautions
- IV selection thresholds
- clumping logic
- weak-instrument logic
- sparse-IV fallback logic
F. Core Analysis Modules and Method Rationale
- List the required MR modules.
- State which are necessary / recommended / optional.
- For each module, explain why it is included and what it contributes.
- If MVMR, reverse MR, colocalization, or mediation-style follow-up is suggested, explain why that extension is justified here.
G. Validation Strategy and Evidence Hierarchy
Use the evidence-tier logic in references/validation-evidence-hierarchy.md.
Clearly separate:
- nominal signals
- sensitivity-qualified support
- robust prioritized signals
- exploratory follow-up-only results
H. Bias, Assumption, and Failure-Point Review
Must cover at least:
- weak instruments
- horizontal pleiotropy
- phenotype misdefinition
- ancestry mismatch
- sample overlap
- sparse IV count
- winner's curse / source instability where relevant
I. Claim Boundaries and Interpretation Rules
State explicitly:
- what the proposed MR design can support
- what it cannot support
- when causal language is acceptable
- when wording must be downgraded to supportive / exploratory / follow-up-priority language
J. Figure and Deliverable Plan
Use references/figure-deliverable-plan.md.
Map figures to Lite / Standard / Advanced / Publication+.
K. Literature Retrieval and Citation Plan
Use references/literature-retrieval-and-citation.md.
Output:
- K1. Core background references needed
- K2. Method justification references needed
- K3. Similar-study precedent search targets
- K4. Evidence gaps / unresolved verification needs
L. Minimal Executable Version and Publication Upgrade Path
- Define the smallest credible MR study version.
- State what must be added to move from Lite → Standard → Advanced → Publication+.
Hard Rules
MR Design Integrity
- Do not confuse causal inference by genetic instruments with ordinary observational association.
- Do not present MR as automatically equivalent to randomized trials.
- Do not recommend bidirectional MR, MVMR, or colocalization unless the question and data architecture actually support them.
- Do not assume every exposure has sufficient instruments.
- Do not ignore ancestry alignment, sample overlap risk, or phenotype-definition quality.
- Do not use post-outcome or downstream-consequence traits as if they were clean baseline exposures without stating the interpretation problem.
Instrument and Method Rules
- Default primary estimator: IVW.
- Standard sensitivity set usually includes weighted median, MR-Egger, heterogeneity review, pleiotropy review, and leave-one-out when instrument count allows.
- If instrument count is sparse, explicitly downgrade claim strength and adjust the sensitivity set rather than pretending full robustness is available.
- Do not output a method stack just because it is common; every module must be justified.
- Do not present Steiger directionality as proof of true biological direction.
Claim-Boundary Rules
- Do not write that MR "proves" mechanism.
- Do not write that MR alone establishes drug efficacy, mediation certainty, or cell-type specificity.
- Do not convert OR / beta estimates into clinical treatment advice.
- Do not treat nominal-significance hits as robust causal conclusions.
- Separate supportive, sensitivity-qualified, robust, and follow-up-priority evidence levels.
Literature and Data Integrity Rules
- Never fabricate literature, PMIDs, DOIs, trial IDs, GWAS accessions, sample sizes, ancestry labels, consortium names, or dataset availability.
- If an exact GWAS dataset is not verified, label it as a candidate source type rather than a confirmed dataset.
- Do not guess phenotype definitions from memory.
- If references cannot be directly verified, output no formal citation for that slot.
- If datasets are mentioned in workflow or planning sections, the required Dataset Disclaimer must be included.
Output Discipline Rules
- Always provide four workload configurations.
- Always recommend one primary plan.
- Always distinguish necessary / recommended / optional modules.
- Use tables when comparing configurations, data architecture, or validation tiers.
- Keep the plan executable. Do not output vague slogans like "perform MR and validate results" without operational detail.
What This Skill Should Not Do
- It should not produce patient-level medical advice.
- It should not invent exact GWAS resources that were not verified.
- It should not collapse one-way MR, reverse MR, bidirectional MR, and MVMR into one undifferentiated template.
- It should not recommend every possible sensitivity method for every scenario.
- It should not imply that more complex MR is always better.
Quality Standard
A strong output from this skill should read like a reviewer-aware MR protocol blueprint:
- the causal question is explicit
- the pattern choice is justified
- the GWAS / IV architecture is realistic
- robustness logic is proportional to the design
- claim boundaries are honest
- the workflow is executable
- literature and dataset statements are verified or clearly marked as unverified
04 同仓库更多 Skills
bio-workflows-metabolomics-pipeline
Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC/drift/normalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics/isotope-tracing.
bio-metabolomics-xcms-preprocessing
Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment/XcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave/grouping/alignment parameters. For drift correction and QC/CV filtering execution see metabolomics/normalization-qc; for metabolite identification see metabolomics/metabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics/msdial-preprocessing; for downstream statistics see metabolomics/statistical-analysis.
bio-metabolomics-statistical-analysis
Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA/HCA for QC), permutation-validated PLS-DA/OPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch/Mann-Whitney/ANOVA/LMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization/drift correction see metabolomics/normalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning/biomarker-discovery and machine-learning/model-validation; for pathway interpretation see metabolomics/pathway-mapping; for design/power/multiplicity regime see experimental-design/multiple-testing.
bio-metabolomics-pathway-mapping
Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA/QEA), mummichog/PSEA on raw m/z peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference/background set. For annotation confidence levels feeding ORA see metabolomics/metabolite-annotation; for gene-set concepts see pathway-analysis/go-enrichment and pathway-analysis/gsea; for joint gene+metabolite pathways see multi-omics-integration/mofa-integration.
bio-metabolomics-normalization-qc
Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS/GC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak/feature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics/xcms-preprocessing or metabolomics/msdial-preprocessing; transformation/scaling for modeling defers to metabolomics/statistical-analysis; cross-study design issues link to experimental-design/batch-design.
bio-metabolomics-msdial-preprocessing
Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA/DIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics/xcms-preprocessing; for lipid annotation mode see metabolomics/lipidomics; for MSI-level confidence honesty see metabolomics/metabolite-annotation; for drift correction and QC see metabolomics/normalization-qc.