Skip to content
Agentmart
Submit a tool

find-cohort-gap

Use when looking for research topics a longitudinal cohort database can answer (NHIS, UK Biobank, an institutional EMR or registry).

Skill by Aperivue

IndexedMIT★ 349
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/aperivue-find-cohort-gap

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when looking for research topics a longitudinal cohort database can answer (NHIS, UK Biobank, an institutional EMR or registry). Profiles the cohort, matches PI expertise, scans literature saturation and returns ranked topic proposals with gap evidence.

Use cases: backend, research

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/find-cohort-gap

What's inside

Skill name
find-cohort-gap
Description
Use when looking for research topics a longitudinal cohort database can answer (NHIS, UK Biobank, an institutional EMR or registry). Profiles the cohort, matches PI expertise, scans literature saturation and returns ranked topic proposals with gap evidence.
License
MIT
Metadata
triggers: cohort gap, research topic, DB 주제, 코호트 갭, gap analysis, 연구주제 찾기, find research gap, 주제 발굴
Instructions
229 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (8)

  • SKILL.md
  • cohort_profile_template.md · references/
  • onepager_template.md · references/
  • pattern_scoring_rubric.md · references/
  • saturation_query_templates.md · references/
  • build_cohort_profile.py · scripts/
  • skill.yml
  • test_cohort_profile.sh · tests/

SKILL.md (first lines)

# Find-Cohort-Gap Skill

Output directory: user-specified (default: current working directory).

## Phase 0: Cohort Intake

The cohort does not have to be one this skill has heard of. Route on what the user
actually has.

| The user has… | Do this |
|---------------|---------|
| A **named public cohort** (NHIS, UK Biobank, KNHANES, …) | Fill the profile from published documentation. Cite the source for every field. |
| 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. |
| A **review, guideline, or preprint** defining the clinical domain | Attach it as domain context (`--context`), as a file or a URL. |

### Input adapter (local codebook / documents)

```bash
python3 "${CLAUDE_SKILL_DIR}/scripts/build_cohort_profile.py" \
  --codebook data_dictionary.csv \
  --context narrative_review.pdf --context https://example.org/guideline \
  --cohort-name "Institutional CT registry" --out-dir .
```

Formats: `.csv` / `.tsv` / `.json` / `.md` / `.txt` (stdlib), `.xlsx` (needs `openpyxl`),
`.pdf` (needs `pdftotext`). A `.csv` is auto-detected as a **codebook** (rows are
variables) or a **data export** (the header row is the variable list). Writes
`cohort_profile.md` + `cohort_profile.json` (+ `context_extract.md`).

**Do not read the codebook yourself and summarise it.** A paraphrased, merged, or invented
variable poisons every downstream claim — the intersection matrix, the feasibility gate, and
eventually the manuscript's Methods. The adapter enumerates variables verbatim with provenance
(`file:row`). Read `cohort_profile.md`; do not re-derive it.

The adapter infers, and shows its work for, the **variable cluster map**, **serial /
repeated-measure groups** (evidence for P1 Longitudinal Advantage), and **endpoint
candidates** (evidence for P2 Endpoint Upgrade). A variable matching no cluster keyword is
left `unclassified` — review those, since the lexicon is not exhaustive.

### What the adapter cannot know — ASK, never guess

A codebook does not state any of the following; each is emitted as `[UNKNOWN - ask the user]`:

1. **Sample size** (N at baseline, N with follow-up)
2. **Time span** (enrollment period, follow-up duration, measurement intervals)
3. **Known limitations** (healthy volunteer bias, attrition, missing-data patterns)
4. **Existing publications** from this cohort (to avoid duplicating them)
5. **IRB status and data-access route**

Collect these from the user before Phase 2, because a guessed N flows into the Phase 5
feasibility gate and makes it pass or fail for a reason unrelated to the cohort. Also confirm
the **setting** (institution type, country, population type) and any **special strengths**
the variable names cannot reveal — registry linkage, biobank availability, a distinctive
population.

**Gate:** Present the cohort profile summary, including the `[UNKNOWN]` list and the
unclassified variables. Confirm before proceeding.

## Phase 1: PI/CA Profiling

Profile the intended PI or corresponding author to find topic-expertise alignment. If no PI is
specified, skip this phase and use variable clusters alone in Phase 2.

1. **Search PubMed** for the PI's recent publications (last 5 years) with `/search-lit`'s
   E-utilities script:
   `bash "${CLAUDE_SKILL_DIR}/../search-lit/references/pubmed_eutils.sh" search "AuthorLastName AuthorFirstInitial[Author]" 30`
   Extract top keyword clusters from titles/abstracts.
2. **Identify specialty signals**: academic society positions (president, board member,
   editor), subspecialty focus areas, preferred journal tiers.
3. **Build a PI keyword map**: 5-10 keyword clusters ranked by publication frequency.

**Output:** PI profile card (name, affiliation, top keywords, society roles, preferred journals).

## Phase 2: Intersection Matrix

Cross cohort variable clusters with PI expertise to generate candidate topics.

### Method

Create a matrix: rows = DB variable clusters, columns = PI keyword clusters.
Score each cell 0-3:
- **3**: PI has published in this exact intersection (direct match)
- **2**: PI's subspecialty covers this area (strong relevance)
- **1**: Tangential connection (possible but needs framing)
- **0**: No connection

### Candidate Generation

1. Extract all cells scoring 2-3 as primary candidates.
2. For cells scoring 1, apply the **A-B substitution test**: "Has someone published
   [this analysis] with [a different exposure/outcome] in a similar cohort?" If yes,
   substituting the PI's specialty variable creates a viable candidate.
3. Generate 20-40 candidate topic statements in PICO format — **P** population from the
   cohort, **E** exposure/predictor variable(s), **C** comparison group, **O** outcome
   (preferably hard endpoint).

### Discipline Alignment Filter

Before saturation scanning, identify the intended first author's department/specialty. The
primary exposure variable must belong to that discipline (e.g., radiology first author →
imaging variable as the primary exposure). **Kill candidates where the primary exposure is
outside the first author's discipline** — a strong PI match alone is insufficient if the first
author cannot claim ownership of the core variable.

**Gate:** Present the intersection matrix and top 20 candidates (post-discipline
filter). User selects 8-12 for saturation scanning.

## Phase 3: Literature Saturation Scan

For each selected candidate, determine how saturated the literature is.

### Search Strategy

For each candidate:
1. Build a PubMed query: `(exposure terms) AND (outcome terms) AND (cohort OR longitudinal OR prospective)`
2. Execute search via `/search-lit` E-utilities.
3. Count total results, then ask the **Critical Filter** question — **"Has anyone published
   this with serial/repeated measurements?"** — and check whether a meta-analysis exists.
   Grade:

From Aperivue/medsci-skills, MIT.

More from Aperivue/medsci-skills

Signals

Stars
349
Forks
83
Open issues
4
Last commit (this folder)
Oct 3, 2026 (26 days ago)
Last release
Oct 4, 2026 (25 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Aperivue

Cite this page

find-cohort-gap skill. Agent Mart. https://agentmart.dev/skills/aperivue-find-cohort-gap (last updated 2026-10-24)