Source: https://github.com/aipoch/medical-research-skills
When to Use
- You need scientific-looking diagrams/posters (laboratory poster aesthetic) generated from a short natural-language brief.
- The user requests SVG output specifically (e.g., “output SVG”, “vector graphic”, “embeddable in a web page”).
- You want language-to-image results without using diffusion/LLM image models, prioritizing interpretable structure over photorealism.
- You need repeatable, parameter-controlled visuals (seed/palette/structure) for research notes, slides, or documentation.
- You want a structured visualization (grids, networks, waveforms, symbol rings) rather than an illustrative drawing.
Key Features
- Converts a natural-language brief into a renderable SVG with a scientific, restrained visual style.
- Multiple built-in styles via
STYLE:
lab-atlas (default): calm, stable, laboratory map feel
signal-loom: denser spectral waveforms, stronger texture
lattice-field: prominent lattice grids, denser nodes
- Produces SVG + JSON metadata (e.g.,
prompt, seed, palette) for traceability.
- Writes a convenience preview file:
output/svggen/latest.svg.
- Tunable density and composition controls (e.g., nodes, noise, bands, rings).
Dependencies
Note: No third-party Python packages are specified in the provided documentation. If scripts/svg_gen.py imports external libraries, add them here with exact versions.
Example Usage
# 1) Create the brief (UTF-8)
mkdir -p input
cat > input/brief.txt << 'EOF'
Scientific poster-style SVG: "Graph topology in latent space".
Include a calm lab-atlas aesthetic, visible grid + network + waveform layers,
and a few symbol rings. Use restrained colors, high text readability.
Keywords: latent space, manifold, spectral bands, topology.
EOF
# 2) (Optional) Edit configuration at the top of the generator script
# - STYLE (lab-atlas | signal-loom | lattice-field)
# - canvas width/height
# - density parameters (node_count, noise_points, band_count, ring_density)
# Example:
# sed -i 's/^STYLE = .*/STYLE = "lab-atlas"/' scripts/svg_gen.py
# 3) Run generation
python scripts/svg_gen.py
# 4) View output
# Primary output directory:
ls -la output/svggen/
# Quick preview file:
# open output/svggen/latest.svg (macOS)
# xdg-open output/svggen/latest.svg (Linux)
# start output/svggen/latest.svg (Windows)
Expected outputs:
output/svggen/latest.svg (latest render for quick preview)
output/svggen/<name>.svg (generated SVG)
output/svggen/<name>.json (metadata: includes prompt, seed, palette)
Implementation Details
Workflow
- Write requirements to
input/brief.txt (UTF-8).
- Adjust the configuration section at the top of
scripts/svg_gen.py (e.g., STYLE, canvas dimensions, density parameters).
- Run
python scripts/svg_gen.py.
- Open
output/svggen/latest.svg to inspect the result.
Prompt / Brief Guidelines
- Use clear research semantics: field, object, structure, atmosphere, keywords.
- English technical terms are allowed (e.g.,
latent space, graph topology) and should remain unchanged.
- Keep the brief concise; the script maps text into structural elements and symbols.
Composition & Quality Criteria
- Text readability: ensure key labels (e.g., prompt/mode text if present) are not obscured.
- Structural hierarchy: at least three layers should be simultaneously visible, chosen from:
- grid
- waveform / spectral bands
- network / nodes
- symbol rings
- Style consistency: avoid overly saturated colors; maintain scientific visual restraint.
Tuning / Troubleshooting Parameters
- Output too dense: decrease
node_count or noise_points.
- Output too empty: increase
band_count or ring_density.
- Style mismatch: switch
STYLE and regenerate.
Primary Entry Point
- Generator script:
scripts/svg_gen.py
1---2name: imagegenskill3description: Generate renderable, scientific-style SVG graphics directly from natural-language requirements (no image models). Use when users ask for an image/picture/scientific diagram/visualization poster or explicitly request SVG output for web-embeddable vector graphics.4license: MIT5---6> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)
7
8## When to Use
9
10- You need **scientific-looking diagrams/posters** (laboratory poster aesthetic) generated from a short natural-language brief.
11- The user requests **SVG output** specifically (e.g., “output SVG”, “vector graphic”, “embeddable in a web page”).
12- You want **language-to-image** results without using diffusion/LLM image models, prioritizing **interpretable structure** over photorealism.
13- You need **repeatable, parameter-controlled** visuals (seed/palette/structure) for research notes, slides, or documentation.
14- You want a **structured visualization** (grids, networks, waveforms, symbol rings) rather than an illustrative drawing.
15
16## Key Features
17
18- Converts a natural-language brief into a **renderable SVG** with a scientific, restrained visual style.
19- Multiple built-in styles via `STYLE`:
20 - `lab-atlas` (default): calm, stable, laboratory map feel
21 - `signal-loom`: denser spectral waveforms, stronger texture
22 - `lattice-field`: prominent lattice grids, denser nodes
23- Produces **SVG + JSON metadata** (e.g., `prompt`, `seed`, `palette`) for traceability.
24- Writes a convenience preview file: `output/svggen/latest.svg`.
25- Tunable density and composition controls (e.g., nodes, noise, bands, rings).
26
27## Dependencies
28
29- Python `3.8+`
30
31> Note: No third-party Python packages are specified in the provided documentation. If `scripts/svg_gen.py` imports external libraries, add them here with exact versions.
32
33## Example Usage
34
35```bash
36# 1) Create the brief (UTF-8)
37mkdir -p input
38cat > input/brief.txt << 'EOF'
39Scientific poster-style SVG: "Graph topology in latent space".
40Include a calm lab-atlas aesthetic, visible grid + network + waveform layers,
41and a few symbol rings. Use restrained colors, high text readability.
42Keywords: latent space, manifold, spectral bands, topology.
43EOF
44
45# 2) (Optional) Edit configuration at the top of the generator script
46# - STYLE (lab-atlas | signal-loom | lattice-field)
47# - canvas width/height
48# - density parameters (node_count, noise_points, band_count, ring_density)
49# Example:
50# sed -i 's/^STYLE = .*/STYLE = "lab-atlas"/' scripts/svg_gen.py
51
52# 3) Run generation
53python scripts/svg_gen.py
54
55# 4) View output
56# Primary output directory:
57ls -la output/svggen/
58# Quick preview file:
59# open output/svggen/latest.svg (macOS)
60# xdg-open output/svggen/latest.svg (Linux)
61# start output/svggen/latest.svg (Windows)
62```
63
64Expected outputs:
65
66- `output/svggen/latest.svg` (latest render for quick preview)
67- `output/svggen/<name>.svg` (generated SVG)
68- `output/svggen/<name>.json` (metadata: includes `prompt`, `seed`, `palette`)
69
70## Implementation Details
71
72### Workflow
73
741. Write requirements to `input/brief.txt` (UTF-8).
752. Adjust the configuration section at the top of `scripts/svg_gen.py` (e.g., `STYLE`, canvas dimensions, density parameters).
763. Run `python scripts/svg_gen.py`.
774. Open `output/svggen/latest.svg` to inspect the result.
78
79### Prompt / Brief Guidelines
80
81- Use clear research semantics: **field**, **object**, **structure**, **atmosphere**, **keywords**.
82- English technical terms are allowed (e.g., `latent space`, `graph topology`) and should remain unchanged.
83- Keep the brief concise; the script maps text into structural elements and symbols.
84
85### Composition & Quality Criteria
86
87- **Text readability**: ensure key labels (e.g., prompt/mode text if present) are not obscured.
88- **Structural hierarchy**: at least **three layers** should be simultaneously visible, chosen from:
89 - grid
90 - waveform / spectral bands
91 - network / nodes
92 - symbol rings
93- **Style consistency**: avoid overly saturated colors; maintain scientific visual restraint.
94
95### Tuning / Troubleshooting Parameters
96
97- Output too dense: decrease `node_count` or `noise_points`.
98- Output too empty: increase `band_count` or `ring_density`.
99- Style mismatch: switch `STYLE` and regenerate.
100
101### Primary Entry Point
102
103- Generator script: `scripts/svg_gen.py`