find-cohort-gap

find-cohort-gap is a skill for Claude Code from Aperivue/medsci-skills. It costs 62 tokens per session (3,860 once invoked), scanned A, original, MIT.

A research-gap finder that starts with the variables available in a medical cohort database, such as UK Biobank or hospital records. It compares those data with researcher expertise and existing publications.

In plain words
What is it for?
Profiling cohort variables, checking how saturated a topic is in the literature, matching topics to a principal investigator’s expertise, and proposing ranked research questions.
Why use it?
It helps researchers avoid topics that are already heavily studied or cannot be answered by their data. It ranks possible questions and explains the evidence for each gap.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable. Also seen: model in frontmatter.

Part of the medsci-project plugin — 6 skills shipped together

Good fit Profiling cohort variables, checking how saturated a topic is in the literature, matching topics to a principal investigator’s expertise, and proposing ranked research questions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aperivue/medsci-skills/find-cohort-gap
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 Aperivue/medsci-skills --skill find-cohort-gap
Clone the repo
git clone --depth 1 https://github.com/Aperivue/medsci-skills

Made for: Claude Code.

Or install medsci-project, the plugin that ships this one along with the rest of its 6 skills.

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 find-cohort-gap

README.md
[![agentmods](https://agentmods.dev/badge/skills/aperivue/medsci-skills/find-cohort-gap/github.svg)](https://agentmods.dev/skills/aperivue/medsci-skills/find-cohort-gap)
Your own site
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/find-cohort-gap"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/find-cohort-gap/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 find-cohort-gap

Your own site · 80×15
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/find-cohort-gap"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/find-cohort-gap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,860 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 10
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
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.00062 $0.03860
Opus 5 $0.00031 $0.01930
Sonnet 5 $0.00012 $0.00772
Haiku 4.5 $0.00006 $0.00386

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

Security

Grade A, and why

find-cohort-gap 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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/build_cohort_profile.py, tests/test_cohort_profile.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/find-cohort-gap/SKILL.md · 351 lines

How it starts

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

Find-Cohort-Gap Skill

You are assisting a medical researcher in systematically discovering novel, publishable research topics from a cohort database. Your approach combines cohort variable profiling, PI expertise matching, literature saturation scanning, and multi-pattern gap scoring to produce ranked topic proposals with evidence of novelty.

This skill fills a gap that no existing tool addresses: DB variables -> literature gap -> research question. Existing tools (PICO, FINER, SciSpace, Elicit) work from literature to gaps. This skill works from the data outward.

Communication Rules

  • Communicate with the user in their preferred language.
  • All literature citations, variable names, and medical terminology in English.
  • Be direct about weak topics — kill early, save time.

Key Directories

  • Output: User-specified directory (default: current working directory)
  • References: ${CLAUDE_SKILL_DIR}/references/ for templates and rubrics

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)

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).

Read the full file on GitHub · 351 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 351 lines · 62 tokens per session scan A 5a8f96af2b3f

Subscribe to this mod's changes

find-cohort-gap is a skill published in the GitHub repository Aperivue/medsci-skills (292 stars, last pushed 4d ago), licensed MIT. It adds 62 tokens to every session and 3,860 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.

Related

Other skills, from other repositories