generate

generate is a command for Claude Code from BACC-Labs/cynthia-generator. It costs 15 tokens per session (3,436 once invoked), scanned A, original, MIT.

A command that creates made-up patient records in the FHIR R4 format, a standard way for healthcare systems to exchange data. The records follow diagnosis-based patterns and can cover medical histories over time.

In plain words
What is it for?
Use it to generate patients with chosen diagnoses, ages, genders, and history lengths. It can create related visits, measurements, medicines, procedures, and other FHIR records.
Why use it?
It provides realistic test records without using private information from real patients. This helps test electronic health record software with more than simple sample entries.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the cynthia-generator plugin — 1 skill, 3 commands, 1 agent shipped together

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.

agentmods
npx agentmods add commands/bacc-labs/cynthia-generator/generate
Clone the repo
git clone --depth 1 https://github.com/BACC-Labs/cynthia-generator

Made for: Claude Code.

Or install cynthia-generator, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 agent.

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 generate

README.md
[![agentmods](https://agentmods.dev/badge/commands/bacc-labs/cynthia-generator/generate.svg)](https://agentmods.dev/commands/bacc-labs/cynthia-generator/generate)
Your own site
<a href="https://agentmods.dev/commands/bacc-labs/cynthia-generator/generate"><img src="https://agentmods.dev/badge/commands/bacc-labs/cynthia-generator/generate.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,436 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00015 $0.03436
Opus 5 $0.00008 $0.01718
Sonnet 5 $0.00003 $0.00687
Haiku 4.5 $0.00002 $0.00344

Measured 6d ago against content hash 3b12bea43439, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

generate scanned grade A with 1 finding 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 6d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -o /tmp/cynthia_resp.json -w "%{http_code}" \
commands/generate.md · 425 lines

How it starts

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

Generate Synthetic Patient Data

Generate FHIR R4-compliant synthetic healthcare data with realistic longitudinal patient histories driven by diagnoses.

Overview

This command creates synthetic patient records for EHR testing without exposing real patient information. Data generation is diagnosis-driven, creating clinically appropriate patterns including encounters, observations, medications, procedures, and other FHIR resources based on the specified conditions.

How to Use This Command

The command works interactively, gathering required information through questions if not provided as arguments.

Interactive Mode (Recommended)

Simply run:

/generate

Claude will ask:

  1. How many patients to generate
  2. Primary diagnosis (natural language or ICD-10 code)
  3. Secondary diagnoses (optional)
  4. Age range for patients
  5. Gender distribution
  6. Ethnicity (optional)
  7. Time span for patient history
  8. Whether to export immediately after generation

Command-Line Arguments Mode

Provide parameters upfront:

/generate --patients 10 --diagnosis "Type 2 Diabetes" --age-range 45-65 --gender mixed --timespan 3y

Available Arguments:

  • --patients N: Number of patients to generate (default: 1)
  • --diagnosis "CONDITION": Primary diagnosis (natural language or ICD-10 code like "E11.9")
  • --secondary "COND1,COND2": Comma-separated secondary diagnoses
  • --age-range MIN-MAX: Age range in years (e.g., "45-65")
  • --gender male|female|other|mixed: Gender distribution
  • --ethnicity "VALUE": Ethnicity (optional)
  • --timespan Ny: Years of patient history (e.g., "3y" for 3 years)
  • --mode local|api: Generation mode (default: local, API integration future)

Instructions for Claude

When executing this command:

Step 1: Gather Parameters

If arguments not provided, use AskUserQuestion to interactively gather:

  1. Number of patients (default: 1)

    • Ask: "How many patients should I generate?"
    • Valid range: 1-100
  2. Primary diagnosis

    • Ask: "What is the primary diagnosis? (You can use natural language like 'Type 2 Diabetes' or ICD-10 codes like 'E11.9')"
    • Accept both natural language and ICD-10 codes
    • Use the FHIR healthcare data skill to map natural language to ICD-10

Read the full file on GitHub · 425 lines

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. 6d ago First seen · 425 lines · 15 tokens per session scan A 3b12bea43439

Subscribe to this mod's changes

generate is a command published in the GitHub repository BACC-Labs/cynthia-generator (5 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 3,436 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.