agentleFS
mark64oswaldmark64oswald/healthsim-workspace/skills/generation/SKILL.md

generation

Skill9 starsChanged 16 days agoApache-2.0View on GitHub

Conversation-driven specification and execution of healthcare data generation at scale. Use when building profiles, generating cohorts, creating journeys, batch generation, specifying distributions, or any at-scale data generation task.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. Deibler/edmund-harness★ 24same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository11 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use these skills when building specifications for data generation or executing batch generation.

    line 8
  2. Distinctive:

    Parameterize from published statistics: Do not guess distribution parameters.

    line 100
  3. Distinctive:

    Validate output against inputs: After generation, confirm the cohort's statistical profile (mean, median, standard deviation, category …

    line 101
  4. Distinctive:

    Real codes, synthetic entities: Use real, valid medical code systems for realism (see below), but all patients, members, encounters, and …

    line 146
  5. Distinctive:

    No real PHI: Never pull from or reference real patient databases.

    line 147
  6. Distinctive:

    When generating data, handle incomplete or invalid inputs gracefully:

    line 166
  7. Distinctive:

    Do NOT invent code systems: Use only recognized systems (ICD-10, CPT, HCPCS, LOINC, RxNorm, NDC, SNOMED CT, NPI).

    line 182
  8. Distinctive:

    Do NOT silently drop requested attributes: If the user asks for 10 fields and only 8 can be generated, surface the gap explicitly rather …

    line 184
  9. Distinctive:

    Do NOT extrapolate beyond the specification: If the user asks for "50 patients with diabetes," generate exactly 50 with diabetes -- do not …

    line 185
  10. Distinctive:

    Do NOT generate duplicate identifiers: Every patient ID, member ID, encounter ID, and claim ID must be unique within a cohort.

    line 186
  11. Distinctive:

    Before returning generated data, verify:

    line 190
  12. Distinctive:

    All code values exist in their respective standard (ICD-10, CPT, LOINC, etc.)

    line 192
  13. Distinctive:

    No duplicate identifiers exist across the generated dataset

    line 196

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Generative Framework Skills

Use these skills when building specifications for data generation or executing batch generation.

Quick Reference

SkillUse WhenLocation
Profile BuilderDefining population characteristics for batch generationbuilders/profile-builder.md
Journey BuilderDefining temporal event sequencesbuilders/journey-builder.md
Quick GenerateSimple single-entity generationbuilders/quick-generate.md
Profile ExecutorExecuting a profile specificationexecutors/profile-executor.md
Journey ExecutorExecuting a journey specificationexecutors/journey-executor.md
Cross-Domain SyncCoordinating cross-product generationexecutors/cross-domain-sync.md

Trigger Phrases

Building Specifications

  • "Build a profile for 100 Medicare members"
  • "Create a journey for diabetic patients"
  • "Specify a commercial cohort with CHF"
  • "Define a surgical episode journey"

Executing Specifications

  • "Generate patients from this profile"
  • "Execute the diabetic journey for 50 patients"
  • "Run batch generation for this cohort"

Using Templates

  • "Use the Medicare diabetic template"
  • "Start with the surgical episode journey"
  • "Generate using the commercial healthy profile"

Workflow Overview

1. Build a Profile (Optional)

{
  "profile": {
    "generation": { "count": 200, "products": ["patientsim", "membersim"] },
    "demographics": {
      "age": { "type": "normal", "mean": 74, "std": 6, "min": 65, "max": 85 },
      "gender": { "type": "categorical", "weights": { "M": 0.48, "F": 0.52 } },
      "geography": { "county_fips": "06073" }
    },
    "clinical": {
      "primary_condition": { "code": "E11.9", "prevalence": 0.40 },
      "comorbidities": [{ "code": "I50.9", "prevalence": 0.30 }]
    }
  }
}

2. Build a Journey (Optional)

Create a first-year diabetic journey:
- Initial diagnosis visit with labs
- Metformin prescription
- Quarterly follow-ups with A1c
- Possible titration to second agent

3. Execute Generation

Generate the cohort using this profile and journey
Save as cohort "ma-diabetic-cohort-2025"

Distribution Types

TypeUse CaseExample
categoricalDiscrete choicesGender: M/F/Other
normalBell curveAge centered at 72
log_normalSkewed positiveHealthcare costs
uniformEqual probabilityRandom day in range
explicitSpecific valuesExactly these NDCs

See distributions/distribution-types.md for details.

Statistical Fidelity — Matching Real Populations

Generated cohorts should use statistical distributions that match real-world population characteristics. The goal is realistic synthetic data, not random noise.

How to match a target population:

  1. Identify the source benchmark. For Medicare Advantage, use CMS enrollment statistics (mean age ~72, 55% female, regional mix). For Commercial, use employer-census norms. For Medicaid, use state-level demographics.
  2. Select distribution types that fit the data shape. Age in MA populations follows a roughly normal distribution centered near 72-74 with standard deviation ~7. Cost distributions are log-normal (many low-cost, few high-cost). Chronic condition prevalence uses categorical distributions with rates from CDC PLACES or CMS Chronic Conditions data.
  3. Parameterize from published statistics. Do not guess distribution parameters. Use published prevalence rates (e.g., 27% diabetes in Medicare, 14% heart failure) and demographic breakdowns. PopulationSim data (skills/populationsim/) provides county- and tract-level benchmarks for prevalence and social determinants.
  4. Validate output against inputs. After generation, confirm the cohort's statistical profile (mean, median, standard deviation, category proportions) matches the specification within an acceptable tolerance. Flag drift greater than 5% from target parameters.

Journey Patterns

PatternUse CaseExample
linearSimple sequenceOffice visit → Lab → Follow-up
branchingDecision pointsER → Admit OR Discharge
protocolTrial schedulesCycle 1 Day 1, Day 8, Day 15
lifecycleLong-term patternsNew member first year

See the journeys/ folder for pattern details.

Integration with Products

The Generative Framework orchestrates all HealthSim products:

When GeneratingProducts InvolvedCross-Domain Triggers
Patient cohortPatientSim, NetworkSimProvider assignment
Member claimsMemberSim, PatientSim, NetworkSimEncounter → Claim
Pharmacy fillsRxMemberSim, PatientSim, NetworkSimRx → Fill, DUR check
Trial subjectsTrialSim, PatientSim, NetworkSimSubject ↔ Patient linking

Templates

Pre-built profiles and journeys for common use cases:

Profile Templates

  • medicare-diabetic.md - Medicare T2DM cohort
  • commercial-healthy.md - Commercial healthy adults
  • medicaid-pediatric.md - Medicaid children

Journey Templates

  • diabetic-first-year.md - New T2DM diagnosis year 1
  • surgical-episode.md - Elective surgery episode
  • new-member-onboarding.md - New member first 90 days

Safety Guardrails

All generated data is synthetic and fictional. HealthSim produces simulated test data only. Never present generated records as real patient data.

  • No clinical advice. Generated data must not be used to make prescribing decisions, diagnoses, or treatment recommendations. If asked, remind the user this is synthetic test data, not real clinical information.
  • Real codes, synthetic entities. Use real, valid medical code systems for realism (see below), but all patients, members, encounters, and claims are generated/fictional.
  • No real PHI. Never pull from or reference real patient databases. All person-level data is simulated.

Standard Code Systems

Generated data should reference recognized healthcare code systems:

SystemUse
ICD-10Diagnosis codes
CPT / HCPCSProcedure codes
LOINCLab / observation codes
RxNorm / NDCMedication identifiers
SNOMED CTClinical terminology
NPIProvider identifiers

Real reference data (NPI registry, CMS facility files, published code sets) is safe to use. Synthetic data is generated for all patient/member-level entities.

Edge Cases and Error Handling

When generating data, handle incomplete or invalid inputs gracefully:

Missing or Partial Input

SituationHow to Handle
No age range specifiedDefault to plan-appropriate range (Medicare: 65-95, Commercial: 18-64, Medicaid Pediatric: 0-18)
No geography specifiedOmit geographic constraints; generate nationally representative distribution
Missing condition prevalenceUse published population baselines (e.g., CDC PLACES prevalence rates)
Incomplete journey stepsGenerate the specified steps; warn the user about gaps rather than inventing steps silently
Unknown or invalid ICD-10/CPT codeReject the code and ask the user to verify; never silently substitute a different code

What NOT to Generate

These are common mistakes to avoid:

  • Do NOT invent code systems. Use only recognized systems (ICD-10, CPT, HCPCS, LOINC, RxNorm, NDC, SNOMED CT, NPI). Never fabricate codes that look plausible but do not exist in the standard.
  • Do NOT generate clinically impossible combinations. Example: a 5-year-old with Medicare Fee-for-Service, or a pregnancy diagnosis on a male patient. Cross-check age, sex, and plan type against clinical plausibility.
  • Do NOT silently drop requested attributes. If the user asks for 10 fields and only 8 can be generated, surface the gap explicitly rather than returning incomplete records without explanation.
  • Do NOT extrapolate beyond the specification. If the user asks for "50 patients with diabetes," generate exactly 50 with diabetes -- do not add additional unrequested conditions for "realism" unless the user has opted into realistic comorbidity modeling.
  • Do NOT generate duplicate identifiers. Every patient ID, member ID, encounter ID, and claim ID must be unique within a cohort.

Validation Checklist

Before returning generated data, verify:

  1. All code values exist in their respective standard (ICD-10, CPT, LOINC, etc.)
  2. Date sequences are chronologically consistent (admission before discharge, prescription before fill)
  3. Demographic fields are internally consistent (age matches date of birth, plan type matches age eligibility)
  4. Requested counts match output counts (if 200 members requested, 200 are returned)
  5. No duplicate identifiers exist across the generated dataset

Related Skills

  • State Management - Save/load generated cohorts
  • Identity Correlation - Cross-product entity linking
  • PopulationSim - Real-world demographic data
  • NetworkSim - Real provider assignments

Implementation Status: Foundation phase. See GENERATIVE-FRAMEWORK-PROGRESS.md for details.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.