$npx -y skills add Aperivue/medsci-skills --skill find-cohort-gapResearch gap finder for longitudinal cohort databases. Profiles cohort strengths, matches PI expertise, scans literature saturation, and outputs ranked topic proposals with gap evidence. Works with any cohort: NHIS, UK Biobank, institutional EMR, health checkup registries, or dis
| 1 | # Find-Cohort-Gap Skill |
| 2 | |
| 3 | You are assisting a medical researcher in systematically discovering novel, publishable |
| 4 | research topics from a cohort database. Your approach combines cohort variable profiling, |
| 5 | PI expertise matching, literature saturation scanning, and multi-pattern gap scoring to |
| 6 | produce ranked topic proposals with evidence of novelty. |
| 7 | |
| 8 | This skill fills a gap that no existing tool addresses: **DB variables -> literature gap |
| 9 | -> research question**. Existing tools (PICO, FINER, SciSpace, Elicit) work from |
| 10 | literature to gaps. This skill works from the data outward. |
| 11 | |
| 12 | ## Communication Rules |
| 13 | |
| 14 | - Communicate with the user in their preferred language. |
| 15 | - All literature citations, variable names, and medical terminology in English. |
| 16 | - Be direct about weak topics — kill early, save time. |
| 17 | |
| 18 | ## Key Directories |
| 19 | |
| 20 | - **Output**: User-specified directory (default: current working directory) |
| 21 | - **References**: `${CLAUDE_SKILL_DIR}/references/` for templates and rubrics |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | ## Phase 0: Cohort Intake |
| 26 | |
| 27 | The cohort does not have to be one this skill has heard of. Route on what the user |
| 28 | actually has. |
| 29 | |
| 30 | | The user has… | Do this | |
| 31 | |---------------|---------| |
| 32 | | A **named public cohort** (NHIS, UK Biobank, KNHANES, …) | Fill the profile from published documentation. Cite the source for every field. | |
| 33 | | A **codebook / data dictionary / CSV export** of their own registry or EMR extract | Run the input adapter below. This is the common case — an institutional registry or single-centre export that no public documentation describes. | |
| 34 | | A **review, guideline, or preprint** defining the clinical domain | Attach it as domain context (`--context`), as a file or a URL. | |
| 35 | |
| 36 | ### Input adapter (local codebook / documents) |
| 37 | |
| 38 | ```bash |
| 39 | python3 "${CLAUDE_SKILL_DIR}/scripts/build_cohort_profile.py" \ |
| 40 | --codebook data_dictionary.csv \ |
| 41 | --context narrative_review.pdf --context https://example.org/guideline \ |
| 42 | --cohort-name "Institutional CT registry" --out-dir . |
| 43 | ``` |
| 44 | |
| 45 | Formats: `.csv` / `.tsv` / `.json` / `.md` / `.txt` (stdlib), `.xlsx` (needs `openpyxl`), |
| 46 | `.pdf` (needs `pdftotext`). A `.csv` is auto-detected as a **codebook** (rows are |
| 47 | variables) or a **data export** (the header row is the variable list). Writes |
| 48 | `cohort_profile.md` + `cohort_profile.json` (+ `context_extract.md`). |
| 49 | |
| 50 | **Do not read the codebook yourself and summarise it.** Paraphrasing a variable name, |
| 51 | merging two that look alike, or inventing one the cohort does not have poisons every |
| 52 | downstream claim — the intersection matrix, the feasibility gate, and eventually the |
| 53 | manuscript's Methods. The adapter *enumerates* variables verbatim with provenance |
| 54 | (`file:row`) instead, which is the dictionary-first discipline a reviewer expects of a |
| 55 | DB-backed study. Read `cohort_profile.md`; do not re-derive it. |
| 56 | |
| 57 | What the adapter infers (and shows its work for): the **variable cluster map**, **serial |
| 58 | / repeated-measure groups** (evidence for P1 Longitudinal Advantage), and **endpoint |
| 59 | candidates** (evidence for P2 Endpoint Upgrade). Every cluster assignment records the |
| 60 | keyword that triggered it, and a variable matching nothing is left `unclassified` rather |
| 61 | than forced into a bucket — review those, since the lexicon is not exhaustive. |
| 62 | |
| 63 | ### What the adapter cannot know — ASK, never guess |
| 64 | |
| 65 | A codebook lists variables. It does not state any of the following, and each is emitted |
| 66 | as `[UNKNOWN - ask the user]`: |
| 67 | |
| 68 | 1. **Sample size** (N at baseline, N with follow-up) |
| 69 | 2. **Time span** (enrollment period, follow-up duration, measurement intervals) |
| 70 | 3. **Known limitations** (healthy volunteer bias, attrition, missing-data patterns) |
| 71 | 4. **Existing publications** from this cohort (to avoid duplicating them) |
| 72 | 5. **IRB status and data-access route** |
| 73 | |
| 74 | Collect these from the user before Phase 2. A guessed N does not merely sit there — it |
| 75 | flows into the Phase 5 feasibility gate, which then passes (or fails) for a reason that |
| 76 | has nothing to do with the cohort. |
| 77 | |
| 78 | Also confirm the **setting** (institution type, country, population type) and any |
| 79 | **special strengths** the variable names cannot reveal — registry linkage, biobank |
| 80 | availability, a distinctive population. |
| 81 | |
| 82 | **Gate:** Present the cohort profile summary, including the `[UNKNOWN]` list and the |
| 83 | unclassified variables. Confirm before proceeding. |
| 84 | |
| 85 | --- |
| 86 | |
| 87 | ## Phase 1: PI/CA Profiling |
| 88 | |
| 89 | Profile the intended PI or corresponding author to find topic-expertise alignment. |
| 90 | |
| 91 | 1. **Search PubMed** for the PI's recent publications (last 5 years). |
| 92 | - Use `/search-lit` E-utilities: |