科研 Skill
跨数据库复现队列研究方法
replicate-study
Extracts a published cohort study’s design and maps variables onto a new database. Use when applying an existing study’s methodology to a different database.
SKILL.md
Replicate Study Skill
Apply a published study's methodology to a different database and report every place the target database forced a deviation.
Inputs
- Source paper: PDF, DOI, or markdown of the paper to replicate
- Target database path: CSV/SAS data file(s) to use
- Harmonization table (optional): CSV mapping source → target variables
- Default:
references/harmonization_knhanes_nhanes.csv(if KNHANES↔NHANES)
- Default:
Reference Files
references/methodology_extraction_template.md— checklist for extracting study designreferences/harmonization_knhanes_nhanes.csv— KNHANES↔NHANES variable mapping (67 rows)references/harmonization_3country.csv— KNHANES+NHANES+CHNS 3-country mapping (46 rows)- Upstream templates (read on demand):
../write-paper/references/paper_types/nhis_cohort.md../write-paper/references/paper_types/cross_national.md../analyze-stats/references/analysis_guides/survey_weighted.md../analyze-stats/references/analysis_guides/propensity_score.md
Workflow
Phase 1: Source Paper Analysis
- Read the source paper (PDF → text, or markdown).
- Extract the methodology by filling
methodology_extraction_template.md: study design, database (name, country, years, N), population (inclusion/exclusion, age range), exposure and outcome (variable, definition, coding), covariates with definitions, statistical methods (regression type, adjustment models, subgroup analyses), survey design (weights, strata, PSU), and every sensitivity analysis. - Outdated source definitions: if the source used a pre-2023 definition that has since been
superseded (e.g., NAFLD → MASLD 2023, CKD-EPI 2009 → 2021 race-free), call
/define-variablesto cross-check whether to mirror the legacy definition (pure replication) or upgrade to the current one (extension). Record the choice in the difference report. - Output: structured extraction summary for user review.
Phase 2: Variable Mapping
- Load the harmonization table (columns:
domain,concept,concept_en, one variable/label column set per database such asknhanes_var/nhanes_var, andharmonization_notes). - For each extracted variable (exposure, outcome, covariates), find the matching row and flag it
DIRECT_MATCH / RECODE_NEEDED / NOT_AVAILABLE / PROXY_AVAILABLE. If a mapping is uncertain,
write
[VERIFY: variable_name]and ask the user to confirm it against the data dictionary; never guess a variable name, column name or coding. - Generate a mapping report:
- Green: directly available (no recoding)
- Yellow: available but needs recoding (document transformation)
- Red: not available in target DB (propose proxy or exclusion)
- Output: variable mapping table (
variable_mapping.csv) for user approval.
Phase 3: Code Generation
- Generate self-contained, reproducible analysis code (Python with
pandas+ R viasubprocessfor survey-weighted analysis): a. Data loading & cleaning: read target DB, derive inclusion/exclusion flags (keep every row) b. Variable derivation: recode variables per mapping table c. Survey design setup: define svydesign object (strata, PSU, weights) on the full file, then restrict it withsubset(design, <inclusion flag>); deleting rows before the design is declared gives wrong standard errors (/analyze-statssurvey_weighted.md, subpopulation analysis). Weighted analysis is mandatory for KNHANES/NHANES — never run unweighted models. Never pool data across surveys; analyze each country's data with its own survey design. d. Table 1: demographics by exposure group (weighted) e. Main analysis: replicate the primary model (logistic/Cox/linear regression) f. Subgroup analyses: if specified in source paper g. Sensitivity analyses: replicate all listed in source paper - Use
/analyze-statstemplates where available (survey_weighted, propensity_score). - Use Asian BMI cutoffs (≥25 for obesity) for Korean data, even if the source used WHO (≥30).
- Run the code on the target data; every number in
results/and the report comes from that executed output.
Phase 4: Difference Report
Save replication_report.md in the working directory, documenting every deviation from the
source methodology:
| Section | Content |
|---|---|
| Study Design | Same / Modified (explain) |
| Database | Source DB → Target DB (N, years, country) |
| Population | Inclusion/exclusion differences |
| Variable Mapping | Full mapping table with match status |
| Unavailable Variables | What's missing and how handled |
| Methodological Differences | Any forced changes (e.g., BMI cutoffs, LDL direct measurement vs Friedewald) |
| Expected Differences | Why results may differ (population, measurement, cultural) |
Note that KNHANES/NHANES are de-identified public data (IRB exempt or waived). Cite only with a
/search-lit-confirmed DOI/PMID; otherwise mark the reference [UNVERIFIED - NEEDS MANUAL CHECK].
Phase 5: Validation Checklist
Before reporting completion, verify:
- All source paper covariates accounted for (mapped, proxied, or documented as missing)
- Survey weights correctly applied (NEVER analyze unweighted if source used weights)
- Obesity/BMI cutoffs match target population standards (Asian vs WHO)
- Fasting requirements matched (fasting glucose, lipids)
- Age restrictions applied correctly
- Code runs without errors on target data
- Output tables match source paper structure
Output Files
{working_dir}/
├── replication_report.md — Structured difference report
├── variable_mapping.csv — Variable mapping table with match status
├── analysis_code.py — Main analysis script (Python + R calls)
├── analysis_code.R — R script for survey-weighted analysis
└── results/
├── table1.csv — Demographics table
├── main_results.csv — Primary analysis results
└── subgroup_results.csv — Subgroup analysis results (if applicable)
示例提示词
帮我把这篇队列研究的方法套用到我们自己的数据库上。
所属插件
安装该插件会一并获得同领域的 58 个 Skill / MCP。
同插件的其他科研 Skill
- 医学AI论文检索优化Optimizes a medical AI paper’s title, abstract and metadata for AI search engines. Use when a paper should be findable and citable by RAG tools and AI search.
- 临床数据统计分析与建模Generates reproducible Python or R code for clinical statistics and tables. Use when collected data needs Table 1, regression, survival or agreement analysis.
- 作者发表记录与策略分析Analyzes a PubMed author record to classify study types and authorship patterns. Use when planning a publication strategy from a researcher’s track record.
- 批量队列暴露结局分析Generates one cohort-analysis script per exposure-outcome pair from one template. Use when a validated method must run across many variable combinations at once.
- 样本量估算与检验效能Walks a decision tree to the right test and computes sample size with IRB text. Use when planning how many patients a study needs before data collection.
- 因果推断方法设计Runs DAG-based, instrumental-variable, difference-in-differences or RD analyses. Use when an association in observational data must support a causal claim.
- 报告规范逐条核查Audits a manuscript item by item against 49 reporting and risk-of-bias checklists. Use when checking a draft against STROBE, CONSORT, TRIPOD or similar guidelines.
- 临床数据清洗与画像Profiles a clinical dataset and generates cleaning code in staged, approved steps. Use when a CSV or Excel dataset needs missing-value and outlier checks before analysis.
- 跨国队列数据协调对比Harmonizes variables and runs parallel weighted analyses across national surveys like KNHANES and NHANES. Use when comparing one exposure-outcome link across countries.
- 变量定义与截断值溯源Maps exposure, outcome and covariate definitions to a cited guideline and DB columns. Use when variable cutoffs need a citable basis before the study protocol.
- 本地化临床数据脱敏Runs a local, network-free script that detects and removes identifiers from clinical data. Use when data may contain PHI and must be de-identified before LLM analysis.
- AI对标专家基准研究设计Plans the arms, rubrics, calibration probes and reviewer panel for an AI-vs-expert benchmark. Use before data collection when designing an AI-vs-human rating study.
- 放射影像AI研究设计审查Reviews a study’s analysis unit, cohort logic, leakage risk and reporting-guideline fit. Use when checking a clinical or medical-AI study design before drafting.
- 传染病仓室模型拟合Builds and fits SIR, SEIR and SEIHR compartmental models with Rt estimation. Use when an outbreak or epidemic’s spread needs mathematical modeling in Python.
- ICMJE利益冲突声明填写Clones a pre-filled synthetic ICMJE COI form, replacing only date, name and title. Use when each author on a submission needs a disclosure form filled quickly.
- 机构Word表单内容填充Fills an institutional Word form, such as an IRB protocol, without breaking its layout. Use when drafted content must be rendered into a CJK-aware .docx template.
- 队列数据库选题挖掘Profiles a longitudinal cohort database and ranks research-topic proposals with gap evidence. Use when looking for a question an available cohort or registry can answer.
- 投稿期刊匹配推荐Matches a manuscript abstract against curated journal profiles and ranks candidates. Use when choosing where to submit, or re-targeting after a rejection.
- DOI全文批量获取Batch-downloads open-access PDFs for a list of DOIs via Unpaywall, PMC and OpenAlex. Use when full texts are needed for a screening set such as a meta-analysis.
- 数据集编码本自动生成Profiles every variable in a tabular dataset into a structured, citable codebook. Use when a CSV, Excel or Stata dataset needs a data dictionary before analysis.
- 全球卫生数据获取分析Accesses and analyzes global health data from WHO GHO, IHME GBD and Our World in Data. Use when DALYs, age-standardized rates or choropleth maps are needed.
- 医学AI项目基金申请书撰写Structures a grant proposal’s significance, innovation, approach, aims and milestones. Use when drafting a research funding proposal, including a Korean grant plan.
- 卫生经济学评价建模Builds Markov cohort models with QALYs, PSA and cost-effectiveness planes. Use when a health intervention needs a formal cost-effectiveness evaluation.
- AI写作痕迹识别改写Scans a manuscript for AI writing patterns and rewrites flagged passages carefully. Use when a draft or response letter reads as obviously AI-written.
常见问题
跨数据库复现队列研究方法能做什么?
Extracts a published cohort study’s design and maps variables onto a new database. Use when applying an existing study’s methodology to a different database。
如何安装跨数据库复现队列研究方法?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「跨数据库复现队列研究方法」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
跨数据库复现队列研究方法需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
跨数据库复现队列研究方法经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。