mcpField
I
infographic-generator

infographic-generator

github.com/drshailesh88Design & UI642 installsUpdated 24w ago
Repository

About infographic-generator

A Python tool for creating publication-grade infographics, aimed at medical content creators. It offers six templates and supports single-image generation, config-driven batches, and a Python API.

Key features

  1. 01Use six infographic templates
  2. 02Generate images from template data
  3. 03Run batches from JSON or YAML
  4. 04Validate configs and track progress
  5. 05Use parallel generation and a Python API

Use cases

  1. 01Visualize clinical trial statistics
  2. 02Create multi-section patient guides
  3. 03Show treatment comparisons or processes
  4. 04Generate graphics for a content campaign

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/drshailesh88/integrated_content_os --skill infographic-generator

After installing, type/infographic-generatorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

examples/
batch_demo.json
references/
style-guide.md
template-map.md
scripts/
batch_generate.py
infographic_cli.py

Details

From the project README

Infographic Generator

Generate publication-grade infographics that match your carousel visual quality. Uses mesh gradients, bold typography, icons, and branded footers.

World-Class Templates

TemplateUse CaseVisual Style
infographic-heroSingle key statGiant gradient stat badge, icon, branded footer
infographic-denseMulti-section contentGrid of styled cards with icons
infographic-comparisonDrug vs drug, treatment optionsSplit layout with contrast colors
infographic-mythDebunking misconceptionsRed/Green split with icons
infographic-processWorkflows, algorithmsNumbered steps with connectors
infographic-checklistPatient prep, guidesStyled checkbox items

Quick Start

Single Infographic
# Hero stat infographic
python skills/cardiology/infographic-generator/scripts/infographic_cli.py \
  --template infographic-hero \
  --data '{"stat":"26%","label":"Mortality Reduction","context":"HR 0.74 (95% CI 0.65-0.85)","source":"PARADIGM-HF","icon":"chart-down","tag":"CLINICAL TRIAL"}' \
  --output outputs/hero-paradigm.png

# Dense multi-section
python skills/cardiology/infographic-generator/scripts/infographic_cli.py \
  --template infographic-dense \
  --data '{"tag":"PATIENT GUIDE","title":"GLP-1 Roll-Off","icon":"pill","sections":[{"title":"Who this is for","bullets":["Stable HF patients","No recent decompensation"],"icon":"people"},{"title":"Red flags","bullets":["Weight gain >2kg/week","New edema"],"icon":"warning","accent":"danger"}],"callout":{"label":"Key","text":"Monitor weekly during taper"}}' \
  --output outputs/dense-glp1.png

# Comparison
python skills/cardiology/infographic-generator/scripts/infographic_cli.py \
  --template infographic-comparison \
  --data '{"tag":"TREATMENT CHOICE","title":"ACE-I vs ARB","left":{"label":"ACE Inhibitors","stat":"22%","statLabel":"Mortality Reduction","icon":"pill","bullets":["First-line","More cough"],"theme":"primary"},"right":{"label":"ARBs","stat":"18%","statLabel":"Mortality Reduction","icon":"shield","bullets":["ACE-I intolerant","Better tolerated"],"theme":"accent"}}' \
  --output outputs/comparison-acei-arb.png

# Myth buster
python skills/cardiology/infographic-generator/scripts/infographic_cli.py \
  --template infographic-myth \
  --data '{"tag":"MYTH BUSTED","title":"Statins cause muscle damage","myth":{"text":"Taking statins will definitely give you muscle pain"},"truth":{"text":"Only 5-10% experience symptoms, most can continue therapy"},"evidence":"Meta-analysis of 19 RCTs","source":"Lancet 2022"}' \
  --output outputs/myth-statins.png

# Process flow
python skills/cardiology/infographic-generator/scripts/infographic_cli.py \
  --template infographic-process \
  --data '{"tag":"ALGORITHM","title":"Starting SGLT2 Inhibitors","steps":[{"title":"Screen","description":"Confirm HFrEF, check eGFR","icon":"magnify"},{"title":"Initiate","description":"Start at recommended dose","icon":"pill"},{"title":"Monitor","description":"Check creatinine at 1-2 weeks","icon":"chart-up"}],"note":"eGFR ≥20 for most agents"}' \
  --output outputs/process-sglt2.png

# Checklist
python skills/cardiology/infographic-generator/scripts/infographic_cli.py \
  --template infographic-checklist \
  --data '{"tag":"PATIENT CHECKLIST","title":"Before Your Stress Test","icon":"heart","categories":[{"title":"24 Hours Before","items":[{"text":"Avoid caffeine"},{"text":"Continue medications"}]},{"title":"Day of Test","items":[{"text":"Wear comfortable shoes"},{"text":"Bring medication list"}]}],"callout":{"icon":"warning","text":"Tell staff about chest pain"}}' \
  --output outputs/checklist-stress.png
Batch Generation

Generate multiple infographics from a config file (perfect for content campaigns):

# From JSON config
python skills/cardiology/infographic-generator/scripts/batch_generate.py \
  --config examples/batch_demo.json

# Parallel generation (faster)
python skills/cardiology/infographic-generator/scripts/batch_generate.py \
  --config examples/batch_demo.json \
  --parallel 4

# Validate config without generating
python skills/cardiology/infographic-generator/scripts/batch_generate.py \
  --config my_config.json \
  --dry-run

Example batch config (examples/batch_demo.json):

[
  {
    "template": "infographic-hero",
    "data": {
      "stat": "26%",
      "label": "Mortality Reduction",
      "source": "PARADIGM-HF",
      "icon": "chart-down",
      "tag": "CLINICAL TRIAL"
    },
    "output": "outputs/hero-paradigm.png"
  },
  {
    "template": "infographic-myth",
    "data": {
      "tag": "MYTH BUSTED",
      "title": "Statins cause muscle damage",
      "myth": {"text": "Taking statins will give you pain"},
      "truth": {"text": "Only 5-10% experience symptoms"}
    },
    "output": "outputs/myth-statins.png"
  }
]

Batch Features:

  • ✅ Validate all configs before generating
  • ✅ Parallel generation (1-8 workers)
  • ✅ Stop on first error (optional)
  • ✅ JSON or YAML config formats
  • ✅ Progress tracking

Template Data Schemas

infographic-hero
{
  "stat": "26%",
  "label": "Mortality Reduction",
  "context": "HR 0.74, 95% CI 0.65-0.85",
  "source": "PARADIGM-HF Trial",
  "icon": "chart-down",
  "tag": "CLINICAL TRIAL",
  "theme": "primary|success|accent|dark",
  "showFooter": true,
  "footerName": "Dr. Shailesh Singh",
  "footerHandle": "@heartdocshailesh"
}
infographic-dense
{
  "tag": "PATIENT GUIDE",
  "title": "GLP-1 Roll-Off in Heart Patients",
  "subtitle": "A practical tapering guide",
  "icon": "pill",
  "sections": [
    {
      "title": "Who this is for",
      "bullets": ["Stable HF patients", "No recent decompensation"],
      "icon": "people",
      "accent": "teal|danger|success|accent"
    }
  ],
  "callout": { "label": "Bottom line", "text": "..." },
  "footer": "Educational infographic. Not medical advice.",
  "showBrandFooter": true
}
infographic-comparison
{
  "tag": "TREATMENT COMPARISON",
  "title": "ACE-I vs ARB in HFrEF",
  "left": {
    "label": "ACE Inhibitors",
    "stat": "22%",
    "statLabel": "Mortality Reduction",
    "icon": "pill",
    "bullets": ["First-line therapy", "More cough"],
    "theme": "primary|success|accent|danger"
  },
  "right": {
    "label": "ARBs",
    "stat": "18%",
    "statLabel": "Mortality Reduction",
    "icon": "shield",
    "bullets": ["ACE-I intolerant", "Better tolerated"],
    "theme": "accent"
  },
  "source": "Meta-analysis, Circulation 2022"
}
infographic-myth
{
  "tag": "MYTH BUSTED",
  "title": "Statins cause muscle damage in everyone",
  "myth": {
    "text": "Taking statins will definitely give you muscle pain",
    "icon": "cross"
  },
  "truth": {
    "text": "Only 5-10% experience symptoms, most can continue",
    "icon": "check"
  },
  "evidence": "Meta-analysis of 19 RCTs (n=71,000)",
  "source": "Lancet 2022"
}
infographic-process
{
  "tag": "TREATMENT ALGORITHM",
  "title": "Starting SGLT2 Inhibitors",
  "subtitle": "Step-by-step for clinicians",
  "steps": [
    { "title": "Screen", "description": "Confirm HFrEF", "icon": "magnify" },
    { "title": "Initiate", "description": "Start at dose", "icon": "pill" },
    { "title": "Monitor", "description": "Check creatinine", "icon": "chart-up" }
  ],
  "note": "eGFR ≥20 for most agents"
}
infographic-checklist
{
  "tag": "PATIENT CHECKLIST",
  "title": "Before Your Stress Test",
  "subtitle": "Complete preparation guide",
  "icon": "heart",
  "categories": [
    {
      "title": "24 Hours Before",
      "items": [
        { "text": "Avoid caffeine", "checked": false },
        { "text": "Continue medications", "checked": false }
      ]
    }
  ],
  "callout": { "icon": "warning", "text": "Tell staff about chest pain" }
}

Available Icons

Medical: pill, heart, heart-pulse, stethoscope, syringe, blood-drop, dna, microscope, brain, lungs, bone, hospital, ambulance, doctor

Charts: chart-up, chart-down, graph

Status: check, cross, warning, stop, star, fire, lightning, target, bulb, trophy, shield, clock, magnify, books, people

Arrows: arrow-up, arrow-down, arrow-right

Visual Design System

All templates use:

  • Mesh gradients (layered radials, not flat colors)
  • Font weights: 900 for headlines, 300 for subtitles
  • 3x+ size jumps for hierarchy
  • Icon containers with styled backgrounds
  • Gradient stat badges with shadows
  • Branded footer with handle

Defaults

  • Size: 1080x1350 (Instagram portrait, 4:5)
  • Font: Helvetica/Arial
  • Brand colors: Teal (#16697A), Coral (#EF5350), Success (#27AE60)

Output Location

Default: skills/cardiology/visual-design-system/outputs/infographics/

Python API

from skills.cardiology.visual_design_system.scripts.generate_infographic import generate

result = generate(
    "infographic-hero",
    {
        "stat": "26%",
        "label": "Mortality Reduction",
        "source": "PARADIGM-HF",
        "icon": "chart-down",
        "tag": "LANDMARK TRIAL"
    },
    "output.png",
    width=1080,
    height=1350
)

if result["success"]:
    print(f"Generated: {result['output']}")

Comments

Markdown supported