Agent skill

Date Calculator

by aipoch in aipoch/medical-research-skills

Calculate medical date windows including gestational age, estimated delivery dates, and follow-up visit scheduling.

MITAuto-check passedResearch & Science

Install Date Calculator

skills CLI
$ npx skills add aipoch/medical-research-skills --skill date-calculator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills date-calculator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/scientific-skills/Other/date-calculator .claude/skills/date-calculator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
date-calculator
GitHub stars
2k
Token cost
~1.3k tokens
SKILL.md length
547 words
Files
4 (incl. scripts, references)
Skills in repo
567
Repo updated
First seen
Licence
MIT

At a glance

Calculate medical date windows including gestational age, estimated delivery dates, and follow-up visit scheduling.

  • Works in 5 steps: Confirm the user objective, required… → Validate that the request matches the… → Use the packaged script path or the… → …
  • Tasks that involve Clinical and healthcare research
  • SKILL.md covers Quick Check, When to Use, Workflow and Parameters, plus 6 more sections
  • Runs Python scripts from its folder; calls python

What it does

Date Calculator is an agent skill from aipoch/medical-research-skills. Calculate medical date windows including gestational age, estimated delivery dates, and follow-up visit scheduling. Produces structured JSON output for clinical research and trial coordination workflows.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `date-calculator_audit_result_v2.json`, `references/guidelines.md` and `scripts/main.py`).

It sits in Research & Science, covering Clinical and healthcare research. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.

When your agent uses it

  • Tasks that involve Clinical and healthcare research

Example prompts

  • “/date-calculator”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
  2. Validate that the request matches the documented scope and stop early if the task would require unsupported assumptions.
  3. Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
  4. Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
  5. If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Date Calculator loads about 1.3k tokens when it runs, and up to ~1.3k if it reads all its reference files. Until then it costs about 55 tokens; SKILL.md has 547 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 547 words, ~1,320 tokens.

Download SKILL.mdSave it as .claude/skills/date-calculator/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
date-calculator
description
Calculate medical date windows including gestational age, estimated delivery dates, and follow-up visit scheduling. Produces structured JSON output for clinical research and trial coordination workflows.
license
MIT
author
AIPOCH

Source: https://github.com/aipoch/medical-research-skills

Date Calculator

Calculate medical date windows for clinical research: gestational age from LMP, estimated delivery dates, and follow-up visit scheduling with configurable window sizes.

Quick Check

bash
python -m py_compile scripts/main.py
python scripts/main.py --help

When to Use

  • Computing gestational age and estimated delivery date from last menstrual period
  • Scheduling follow-up visit windows for clinical trials
  • Generating date ranges for protocol-defined visit windows

Workflow

  1. Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
  2. Validate that the request matches the documented scope and stop early if the task would require unsupported assumptions.
  3. Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
  4. Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
  5. If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.

Note on group parameter: If --group is not provided, log-rank test and Cox regression are skipped. Single-arm KM only. An informational note will be included in the output.

Fallback template: If scripts/main.py fails or a required parameter is absent, report: (a) which parameter is missing, (b) what partial calculation is still valid, (c) the manual formula for the requested calculation type.

Parameters

ParameterTypeRequiredDescription
--type, -tstringYesCalculation type: gestational or followup
--date, -dstringYesReference date in YYYY-MM-DD format
--weeksintNoFollow-up interval in weeks (default: 4; must be ≥ 1)
--window-daysintNoVisit window size in days (default: 7)
--timezonestringNoTimezone for calculation (default: UTC)
--output, -ostringNoOutput JSON file path (default: stdout)

Usage

text
# Gestational age from LMP
python scripts/main.py --type gestational --date 2024-01-15

# 4-week follow-up window
python scripts/main.py --type followup --date 2024-03-01

# Custom 6-week follow-up with ±5-day window
python scripts/main.py --type followup --date 2024-03-01 --weeks 6 --window-days 5

Output Format

Gestational:

json
{
  "lmp_date": "2024-01-15",
  "gestational_age": "12 weeks 3 days",
  "gestational_age_days": 87,
  "estimated_delivery_date": "2024-10-21",
  "calculation_date": "2024-04-12",
  "warning": "LMP date is in the future; gestational age calculated from today may be negative or unexpected"
}

Follow-up:

json
{
  "start_date": "2024-03-01",
  "followup_weeks": 4,
  "window_start": "2024-03-29",
  "window_end": "2024-04-05",
  "window_range": "2024-03-29 to 2024-04-05"
}

Output Requirements

Every response must make these explicit:

  • Objective and deliverable
  • Inputs used and assumptions introduced
  • Workflow or decision path taken
  • Core result: calculated dates and windows
  • Constraints, risks, caveats (e.g., timezone assumptions, calendar edge cases)
  • Unresolved items and next-step checks
Show full SKILL.md (235 more words)Show less

Input Validation

This skill accepts: medical date calculation requests specifying a calculation type (gestational or followup) and a reference date in YYYY-MM-DD format.

If the request does not involve medical date window calculation — for example, asking to schedule general appointments, perform time-zone conversions unrelated to clinical dates, or calculate non-medical intervals — do not proceed. Instead respond:

"date-calculator is designed to calculate medical date windows for clinical research. Your request appears to be outside this scope. Please provide a calculation type and reference date, or use a more appropriate tool for your task."

Validation rules:

  • Date must be in YYYY-MM-DD format; invalid formats are rejected with exit code 1.
  • If LMP date is in the future, a warning field is included in the output.
  • --weeks must be ≥ 1; zero or negative values are rejected with a clear error message.
  • --timezone defaults to UTC; use pytz timezone names (e.g., America/New_York).

Error Handling

  • If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.
  • If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.
  • If scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.
  • Do not fabricate files, citations, data, search results, or execution outcomes.

Response Template

  1. Objective
  2. Inputs Received
  3. Assumptions
  4. Workflow
  5. Deliverable
  6. Risks and Limits
  7. Next Checks

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in scientific-skills/Other/date-calculator of aipoch/medical-research-skills.

  • SKILL.md
  • date-calculator_audit_result_v2.json
  • references/guidelines.md
  • scripts/main.py

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Date Calculator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Date Calculator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Date Calculator this skillaipoch/medical-research-skills2k—~1.3kAutomated safety check: PassMIT
Clinical Trials Databasegoogle-deepmind/science-skills3.2k3 repos~3.2kAutomated safety check: PassApache-2.0
CHARLS Paper Reproduction Guidexjtulyc/MedgeClaw6171 repos~1.8kAutomated safety check: PassNone
Model AssessmentAperivue/medsci-skills3291 repos~4.5kAutomated safety check: PassMIT
Biomedical Analysis Dispatchxjtulyc/MedgeClaw6171 repos~2kAutomated safety check: PassNone
Research Proposalluwill/research-skills858—~4.4kAutomated safety check: NotesNone

Similar skills

  • Clinical Trials Database

    google-deepmind/science-skills

    Query ClinicalTrials.gov via APIv2. An agent skill from google-deepmind/science-skills.

    3.2k GitHub starsUsed in 3 repos~3.2k tokens
    Research & ScienceAuto-check passed
  • Guides an agent through reproducing papers built on the CHARLS health and retirement survey, from variable mapping to cognition, depression and isolation scores.

    617 GitHub starsUsed in 1 repo~1.8k tokens
    Research & ScienceAuto-check passed
  • Model Assessment

    Aperivue/medsci-skills

    A skill your agent uses when validating or evaluating a trained medical-imaging model.

    329 GitHub starsUsed in 1 repo~4.5k tokens
    Research & ScienceAuto-check passed
  • Routes bioinformatics, drug discovery, clinical and multi-omics tasks from a chat interface to Claude Code sessions running K-Dense scientific skills, with a live dashboard per task.

    617 GitHub starsUsed in 1 repo~2k tokens
    Research & ScienceAuto-check passed
  • Research Proposal

    luwill/research-skills

    A skill your agent uses when the user asks to write or draft a PhD / doctoral research proposal, research plan, 研究计划书, or 开题报告 — a forward-looking plan of background, gap, research questions…

    858 GitHub stars~4.4k tokensUpdated 8 days ago
    Research & ScienceAuto-check: notes
  • Medical Imaging Review

    LeonChaoX/qinyan-academic-skills

    Write comprehensive literature reviews for medical imaging AI research.

    938 GitHub starsUsed in 3 repos~1.1k tokens
    Research & ScienceAuto-check: notes

More from aipoch/medical-research-skills

All 567 skills in this repo
  • Academic Poster Generator

    aipoch/medical-research-skills

    Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…

    2k GitHub stars~2.2k tokensUpdated 21 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    2k GitHub stars~1.4k tokensUpdated 21 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    2k GitHub stars~3.7k tokensUpdated 21 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    2k GitHub stars~1.8k tokensUpdated 21 days ago
    Auto-check passed
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    2k GitHub stars~1.7k tokensUpdated 21 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    2k GitHub stars~1.3k tokensUpdated 21 days ago
    Auto-check passed

Questions about Date Calculator

What does Date Calculator do?

Calculate medical date windows including gestational age, estimated delivery dates, and follow-up visit scheduling. Date Calculator is an agent skill from aipoch/medical-research-skills. Calculate medical date windows including gestational age, estimated delivery dates, and follow-up visit scheduling.

When should I use Date Calculator?

Date Calculator fits situations like: tasks that involve Clinical and healthcare research.

How do I install Date Calculator in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill date-calculator -a claude-code`. Or copy the skill folder (scientific-skills/Other/date-calculator in aipoch/medical-research-skills) into .claude/skills/date-calculator in your project. Claude Code loads it when a task matches its description.

How do I install Date Calculator in Codex?

Run `npx skills add aipoch/medical-research-skills --skill date-calculator -a codex`. Or copy the skill folder (scientific-skills/Other/date-calculator in aipoch/medical-research-skills) into .agents/skills/date-calculator in your project. Codex loads it when a task matches its description.

Can I use Date Calculator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill date-calculator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/date-calculator, .gemini/skills/date-calculator, .github/skills/date-calculator and .opencode/skills/date-calculator in your project.

What does Date Calculator need to run?

Going by SKILL.md and its folder, Date Calculator needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Date Calculator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Date Calculator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Date Calculator use?

Date Calculator is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Date Calculator use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 28 tokens, read only when the agent opens those files.

What are the alternatives to Date Calculator?

Skills that share tags, products or a category with Date Calculator: Clinical Trials Database (google-deepmind/science-skills, 3.2k stars), CHARLS Paper Reproduction Guide (xjtulyc/MedgeClaw, 617 stars), Model Assessment (Aperivue/medsci-skills, 329 stars) and Biomedical Analysis Dispatch (xjtulyc/MedgeClaw, 617 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Date Calculator?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,974 GitHub stars. The repository holds 567 skills in this directory. The repository was last updated on September 17, 2026.

Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.