cardiology-visual-system
Unified visual content system for cardiology thought leadership. Automatically routes requests to the optimal tool—Fal.ai for blog imagery, Gemini for infographics, Mermaid for flowcharts/pathways, Marp for slides, Plotly for data visualization. One skill handles all visual needs within Claude Code.
What this skill does
# Cardiology Visual System
A unified meta-skill that intelligently routes visual content requests to the optimal tool. No more switching between Napkin.ai, NotebookLM, or other subscriptions—everything happens in Claude Code.
## Quick Reference: What Tool Does What
| You Ask For | Tool Used | Output |
|-------------|-----------|--------|
| Blog header, lifestyle photo, patient scenario | **Fal.ai** | PNG image |
| Infographic, explainer graphic, medical illustration | **Gemini** | PNG/JPG image |
| Flowchart, treatment algorithm, clinical pathway | **Mermaid** | SVG/PNG diagram |
| Slide deck, presentation | **Marp** | PPTX/PDF/HTML slides |
| Data chart, trial results, trends over time | **Plotly** | Interactive HTML or PNG |
| Interactive explainer, dashboard | **React Artifact** | Interactive HTML |
| Quick visualization prototype, exploratory data viz | **LIDA** ⚠️ | PNG + Code (prototype only) |
## Automatic Routing Logic
When you ask for visuals, I determine the best tool by analyzing your request:
### → Route to Fal.ai (Stock/Human Imagery)
Keywords: `blog image`, `header`, `hero image`, `lifestyle`, `patient photo`, `stock`, `person`, `family`, `emotional`, `scenario`
**Best for:**
- Blog post headers
- Patient experience illustrations
- Lifestyle/wellness imagery
- Emotional/human-centered scenes
- Recovery and hope imagery
**NOT for:** Medical devices, ECGs, diagrams, data, or text-heavy content
### → Route to Gemini (Infographics & Medical Illustrations)
Keywords: `infographic`, `explainer`, `illustration`, `visual summary`, `concept diagram`, `icons`, `steps`, `process visual`, `simplified`, `educational graphic`
**Best for:**
- Infographics (like Napkin.ai produces)
- Medical concept illustrations
- Simplified explainer graphics
- Educational visuals with icons
- Text-in-image content
- Visual summaries of articles
### → Route to Mermaid (Diagrams & Flowcharts)
Keywords: `flowchart`, `algorithm`, `pathway`, `decision tree`, `sequence`, `timeline`, `process flow`, `treatment algorithm`, `diagnostic pathway`, `workflow`
**Best for:**
- Clinical decision trees
- Treatment algorithms
- Diagnostic pathways
- Process workflows
- Organizational charts
- Sequence diagrams
- Gantt charts for timelines
### → Route to Marp (Slide Decks)
Keywords: `slides`, `presentation`, `deck`, `powerpoint`, `lecture`, `talk`, `keynote`
**Best for:**
- Conference presentations
- Educational lectures
- Patient education slides
- Grand rounds presentations
- CME content
### → Route to Plotly (Data Visualization)
Keywords: `chart`, `graph`, `plot`, `data`, `statistics`, `trial results`, `forest plot`, `trends`, `comparison`, `survival curve`, `Kaplan-Meier`, `bar chart`, `line graph`, `scatter`
**Best for:**
- Clinical trial results
- Statistical comparisons
- Trends over time
- Forest plots
- Survival curves
- Before/after data
- Multi-study comparisons
### → Route to React Artifact (Interactive)
Keywords: `interactive`, `dashboard`, `calculator`, `tool`, `widget`, `animated`, `explorable`
**Best for:**
- Risk calculators
- Interactive explainers
- Animated diagrams
- Patient education tools
- Explorable explanations
### → Route to LIDA (Quick Prototyping) ⚠️ PROTOTYPING ONLY
Keywords: `quick`, `prototype`, `exploratory`, `rough draft`, `multiple options`, `try`, `experiment`, `brainstorm visualization`
**⚠️ CRITICAL LIMITATIONS:**
- **PROTOTYPING ONLY** - NOT for publication or patient-facing materials
- Quality varies - ALWAYS review for medical accuracy
- Works best with ≤10 data columns
- No specialized medical charts (true forest plots, Kaplan-Meier)
- Requires manual validation before ANY use
**Best for:**
- Quick exploratory data visualization ("what does this data show?")
- Generating multiple visualization candidates
- Brainstorming chart types for new data
- Internal research review only
**NOT for:**
- Publication-ready charts → Use Plotly instead
- Patient-facing materials → Use production tools
- Regulatory submissions → Never
- Final blog posts → Use Plotly or Gemini
**When in doubt, use Plotly for data visualization instead of LIDA.**
---
## Tool 1: Fal.ai (Blog Imagery)
### Setup
```bash
export FAL_KEY="your-fal-api-key"
# Get key from: https://fal.ai/dashboard/keys
```
### Usage
```bash
python scripts/fal_image.py "A 55-year-old man experiencing chest pain at work" --output hero.png
```
### Models
| Model | Cost | Best For |
|-------|------|----------|
| `fal-ai/recraft-v3` | $0.04 | **Default** - Best quality |
| `fal-ai/flux-pro/v1.1` | $0.04 | Photorealism |
| `fal-ai/flux/schnell` | $0.003 | Fast/cheap drafts |
### What to Generate vs Not Generate
✅ **GENERATE:**
- Patient symptoms/experiences (chest pain, shortness of breath)
- Lifestyle scenes (exercise, healthy cooking)
- Doctor-patient conversations
- Family support moments
- Recovery celebrations
❌ **DO NOT GENERATE:**
- Medical devices (pacemakers, stents, valves)
- Clinical imagery (ECGs, angiograms, OR scenes)
- Anatomical diagrams
- Medications
---
## Tool 2: Gemini (Infographics)
### Setup
```bash
export GEMINI_API_KEY="your-gemini-api-key"
```
### Usage
```python
python scripts/gemini_infographic.py \
--topic "Heart Failure Stages" \
--style "minimalist medical" \
--output hf_stages.jpg
```
### Prompting for Medical Infographics
**Structure your prompt:**
```
Create a [STYLE] infographic showing [TOPIC].
Include:
- [Key point 1]
- [Key point 2]
- [Key point 3]
Style: [clean/minimalist/modern medical], use icons, clear hierarchy,
professional color palette (blues, teals for medical), easy to read text
```
**Example prompts:**
1. **Disease Progression:**
> "Create a minimalist medical infographic showing the 4 stages of heart failure (A, B, C, D). Use icons for each stage, show progression with arrows, include brief descriptions. Clean layout, medical blue color scheme."
2. **Treatment Comparison:**
> "Create an infographic comparing medication vs intervention for AFib. Two columns, icons for each approach, bullet points for pros/cons. Modern medical style."
3. **Risk Factor Summary:**
> "Create a visual summary of 7 modifiable risk factors for heart disease. Icon for each factor, clean grid layout, actionable tips. Professional medical illustration style."
---
## Tool 3: Mermaid (Diagrams)
You have Mermaid Chart MCP connected. Use it for structured diagrams.
### Common Cardiology Diagram Types
**1. Treatment Algorithm:**
```mermaid
flowchart TD
A[Acute Chest Pain] --> B{STEMI?}
B -->|Yes| C[Primary PCI < 90 min]
B -->|No| D{High-risk NSTEMI?}
D -->|Yes| E[Early invasive < 24h]
D -->|No| F[Ischemia-guided strategy]
```
**2. Clinical Pathway:**
```mermaid
flowchart LR
A[Diagnosis] --> B[Risk Stratification]
B --> C[Treatment Selection]
C --> D[Follow-up Protocol]
```
**3. Diagnostic Decision Tree:**
```mermaid
flowchart TD
A[Dyspnea] --> B{BNP elevated?}
B -->|Yes| C{Echo findings?}
B -->|No| D[Consider other causes]
C -->|HFrEF| E[GDMT initiation]
C -->|HFpEF| F[Diuretics + address comorbidities]
```
**4. Timeline (Gantt):**
```mermaid
gantt
title Post-MI Care Timeline
dateFormat YYYY-MM-DD
section Acute
Hospital stay :a1, 2024-01-01, 5d
section Recovery
Cardiac rehab :a2, after a1, 12w
section Long-term
Medication titration :a3, after a1, 6m
```
---
## Tool 4: Marp (Slides)
### Setup
```bash
npm install -g @marp-team/marp-cli
```
### Usage
1. I write Markdown with Marp syntax
2. Save as `presentation.md`
3. Convert:
```bash
marp presentation.md --pptx # PowerPoint
marp presentation.md --pdf # PDF
marp presentation.md -o slides.html # HTML
```
### Marp Template for Medical Slides
```markdown
---
marp: true
theme: default
paginate: true
backgroundColor: #ffffff
color: #333333
---
# Heart Failure Management
## Modern Approaches in 2024
Dr. [Your Name]
Interventional Cardiology
---
# AgendaRelated in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.