Skills date-calculator

Calculates gestational age and follow-up date windows.

install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/aipoch-ai/date-calculator" ~/.claude/skills/openclaw-skills-date-calculator && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/aipoch-ai/date-calculator" ~/.openclaw/skills/openclaw-skills-date-calculator && rm -rf "$T"
manifest: skills/aipoch-ai/date-calculator/SKILL.md
source content

Date Calculator

Calculates medical date windows.

Features

  • Gestational age
  • Follow-up windows
  • Visit scheduling
  • Date adjustments

Parameters

ParameterTypeDefaultRequiredDescription
--type
,
-t
string-YesCalculation type (gestational or followup)
--date
,
-d
string-YesDate in YYYY-MM-DD format
--weeks
int4NoNumber of weeks for follow-up
--window-days
int7NoFollow-up window size in days
--output
,
-o
string-NoOutput JSON file path

Usage

# Calculate gestational age
python scripts/main.py --type gestational --date 2024-01-15

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

# Calculate custom follow-up (6 weeks)
python scripts/main.py --type followup --date 2024-03-01 --weeks 6

Output Format

Gestational calculation:

{
  "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"
}

Follow-up calculation:

{
  "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"
}

Risk Assessment

Risk IndicatorAssessmentLevel
Code ExecutionPython/R scripts executed locallyMedium
Network AccessNo external API callsLow
File System AccessRead input files, write output filesMedium
Instruction TamperingStandard prompt guidelinesLow
Data ExposureOutput files saved to workspaceLow

Security Checklist

  • No hardcoded credentials or API keys
  • No unauthorized file system access (../)
  • Output does not expose sensitive information
  • Prompt injection protections in place
  • Input file paths validated (no ../ traversal)
  • Output directory restricted to workspace
  • Script execution in sandboxed environment
  • Error messages sanitized (no stack traces exposed)
  • Dependencies audited

Prerequisites

No additional Python packages required.

Evaluation Criteria

Success Metrics

  • Successfully executes main functionality
  • Output meets quality standards
  • Handles edge cases gracefully
  • Performance is acceptable

Test Cases

  1. Basic Functionality: Standard input → Expected output
  2. Edge Case: Invalid input → Graceful error handling
  3. Performance: Large dataset → Acceptable processing time

Lifecycle Status

  • Current Stage: Draft
  • Next Review Date: 2026-03-06
  • Known Issues: None
  • Planned Improvements:
    • Performance optimization
    • Additional feature support