multi-panel-figure-assembler
Assemble 6 sub-figures (A–F) into a high-resolution composite figure with consistent labels, padding, and publication-ready DPI.
Best use case
multi-panel-figure-assembler is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Assemble 6 sub-figures (A–F) into a high-resolution composite figure with consistent labels, padding, and publication-ready DPI.
Teams using multi-panel-figure-assembler should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/multi-panel-figure-assembler/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How multi-panel-figure-assembler Compares
| Feature / Agent | multi-panel-figure-assembler | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Assemble 6 sub-figures (A–F) into a high-resolution composite figure with consistent labels, padding, and publication-ready DPI.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)
# Multi-Panel Figure Assembler
Assemble 6 sub-figures (A–F) into a high-resolution composite figure with consistent styling, labels, and publication-ready output.
## Input Validation
This skill accepts: exactly 6 image files (panels A–F) in supported formats, plus an output path, for assembly into a composite figure.
If the request does not involve assembling exactly 6 image panels into a composite figure — for example, asking to generate plots from data, edit image content, or assemble a different number of panels — do not proceed. Instead respond:
> "multi-panel-figure-assembler is designed to assemble exactly 6 sub-figures (A–F) into a composite image. Your request appears to be outside this scope. Please provide 6 image files and an output path, or use a more appropriate tool for your task. For plot generation from data, consider matplotlib, seaborn, or R ggplot2."
Do not attempt any data processing or partial analysis before emitting this refusal. Validate scope first — this is the absolute first action before any other processing.
## When to Use
- Combining individual plot panels into a single composite figure for publication
- Standardizing label fonts, padding, and DPI across a figure set
- Producing 2×3 or 3×2 grid layouts from existing image files
- Automating figure assembly to ensure reproducibility
**Note:** This skill is fixed to exactly 6 panels (A–F labeling convention). For 4-panel (2×2) or 9-panel (3×3) layouts, a future `--panels` parameter may be added.
## Workflow
1. **Validate input** — confirm scope and that exactly 6 panels are provided before any processing. Do not generate any output before this check.
2. Confirm the user objective, required inputs, and non-negotiable constraints.
3. Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
4. Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
5. If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.
## Usage
```text
# Basic 2×3 layout
python scripts/main.py --input A.png B.png C.png D.png E.png F.png --output figure.png
# 3×2 layout at 600 DPI
python scripts/main.py --input A.png B.png C.png D.png E.png F.png --output figure.png --layout 3x2 --dpi 600
# Custom label styling
python scripts/main.py --input A.png B.png C.png D.png E.png F.png --output figure.png \
--label-size 32 --label-position topright --padding 20 --border 4
```
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `--input` / `-i` | 6 paths | Required | Input image paths for panels A–F |
| `--output` / `-o` | path | Required | Output composite file path |
| `--layout` / `-l` | enum | `2x3` | Grid layout: `2x3` or `3x2` |
| `--dpi` / `-d` | int | `300` | Output DPI |
| `--label-font` | str | `Arial` | Font family for panel labels |
| `--label-size` | int | `24` | Font size for panel labels |
| `--label-position` | str | `topleft` | Label position: `topleft`, `topright`, `bottomleft`, `bottomright` |
| `--padding` / `-p` | int | `10` | Padding between panels (pixels) |
| `--border` / `-b` | int | `2` | Border width around each panel (pixels) |
| `--bg-color` | str | `white` | Background color (white/black/hex) |
| `--label-color` | str | `black` | Label text color |
## Supported Formats
- Input: PNG, JPG, JPEG, BMP, TIFF, GIF
- Output: PNG (recommended), JPG, TIFF
## Quick Check
```bash
python -m py_compile scripts/main.py
python scripts/main.py --help
python -c "import PIL; print('Pillow OK')"
```
## Error Handling
- If fewer or more than 6 input images are provided, state the count mismatch and stop.
- If any input file path contains `../` or points outside the workspace, reject with a path traversal warning.
- If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.
- If `scripts/main.py` fails (e.g., returncode=2 from missing required args), report the exact error and provide the correct command syntax.
- If PIL/Pillow is not installed, print: `pip install Pillow numpy` and exit with a non-zero code.
- Do not fabricate files, citations, or execution outcomes.
## Fallback Template
When execution fails or inputs are incomplete, respond with this structure:
```
FALLBACK REPORT
───────────────────────────────────────
Objective : [restate the goal]
Blocked by : [exact missing input or error — e.g., only 4 of 6 panels provided]
Partial result : [what can be completed — e.g., layout plan, parameter defaults]
Assumptions : [layout, DPI, label style assumed]
Constraints : [format requirements, DPI minimum]
Risks : [aspect ratio mismatch, font availability]
Unresolved : [what still needs user input]
Next step : [minimum action needed to unblock]
───────────────────────────────────────
```
## Response Template
Use the following fixed structure for non-trivial requests:
1. Objective
2. Inputs Received
3. Assumptions
4. Workflow
5. Deliverable
6. Risks and Limits
7. Next Checks
If the request is simple, compress the structure but keep assumptions and limits explicit when they affect correctness.
## Notes
- Input images are automatically resized to match the largest dimension while maintaining aspect ratio
- For best results, use input images with similar aspect ratios
- Label fonts require the font to be available on the system; Arial falls back to DejaVu Sans if unavailable
- PNG output preserves transparency if any input images have alpha channels
## Prerequisites
```text
pip install Pillow numpy
```Related Skills
faers-multi-drug-soc-planner
Generates complete FAERS-based multi-drug single-SOC safety comparison research designs from a user-provided drug set, comparator, and adverse event domain. Always use this skill when users want to compare safety signals across multiple drugs using FAERS or OpenFDA data within one System Organ Class (SOC) or bounded AE domain. Trigger for:"FAERS study comparing drugs within one SOC", "publishable FAERS safety comparison paper", "compare neuropsychiatric adverse events across beta-blockers", "Lite/Standard/Advanced FAERS safety plans", "active-comparator restricted disproportionality", "adjusted ROR logistic regression FAERS", "within-class head-to-head drug comparison", "pharmacovigilance signal comparison", "single-SOC PT-level FAERS design", or any phrasing like "I want to compare drug X and drug Y for adverse events in FAERS" or "build a comparative pharmacovigilance paper". Always output four workload configurations (Lite / Standard / Advanced / Publication+) with a recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, and publication upgrade path.
result-figure-consistencycheck
Checks consistency between paper result descriptions and figure legends (text-only) when the input is a PDF-to-Markdown full text containing page breaks (e.g., `## Page XX`) and legend text; outputs a Markdown consistency report and a UTF-8 CSV issue list.
multi-source-news-writer
Integrates multiple news sources into a single, cohesive press release using an inverted pyramid structure and AP style. Use when you have raw news content and a topic, and need a professional press release.
figure-reference-checker
Use figure reference checker for academic writing workflows that need structured execution, explicit assumptions, and clear output boundaries.
figure-legend-gen
Generate standardized figure legends for scientific charts and graphs.
bidirectional-multi-phenotype-mr
Generates complete bidirectional multi-phenotype Mendelian randomization research designs from a user-provided exposure family and outcome family. Always use this skill whenever a user wants to design, plan, or build a genome-wide causal-inference study based on publicly available GWAS summary statistics, especially when the article logic includes multiple exposures, multiple outcomes or subtypes, bidirectional MR, IV filtering, IVW as the main estimator, weighted median / MR-Egger / MR-PRESSO sensitivity analyses, leave-one-out testing, heterogeneity / pleiotropy checks, and multiple-testing control with FDR. Covers five study patterns (single-family bidirectional MR, multi-phenotype screening MR, subtype-resolved MR, phenome-style bidirectional causal map, mechanism-prioritized MR follow-up) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version...
multi-database-literature-collector
Collects candidate biomedical literature across multiple databases, adapts search logic by database, preserves source metadata, and organizes results into a structured, screening-ready candidate pool. Always use this skill when a user wants cross-database literature collection, search strategy construction, candidate paper aggregation, or first-pass evidence organization before deduplication, screening, layered reading, or review planning. Requires real and verifiable literature records only. Every formal literature item must include a real link and DOI when available; never fabricate citations, titles, authors, years, journals, abstracts, PMIDs, or DOIs. If a DOI is unavailable or cannot be verified, state that explicitly rather than inventing one.
figure-first-paper-reader
Reads a paper figure by figure before re-integrating the full narrative, so the user can identify the core findings quickly and check whether each visual actually supports the authors' main claims. Always separate figure content, figure-linked claim, evidentiary strength, and unsupported interpretation. Never fabricate references, PMIDs, DOIs, figure content, panel labels, result values, or study details that were not actually provided.
figure-legend-writer
Writes complete, publication-grade figure legends that can stand on their own. Use when writing or revising figure legends for any scientific figure — bar charts, line graphs, scatter plots, box plots, heatmaps, survival curves, flow cytometry plots, western blots, microscopy images, or schematic diagrams. Also triggers on "write a figure legend for", "help me describe this figure", "my figure needs a legend", "write Figure 1 legend", or "what should a figure legend include".
skill-auditor
A comprehensive auditor for any agent skill — including Manus, OpenClaw/ClawHub, Claude, LobeHub, or custom SKILL.md-based skills. Use this skill whenever a user wants to evaluate, audit, review, score, or quality-check an agent skill before publishing, updating, or deploying. Covers two hard veto gates (structural redlines + research integrity redlines), static quality scoring across 25 criteria (ISO 25010 + OpenSSF + Agent), dynamic test input generation, multi-mode execution testing, multi-layer output evaluation with five specialized category rubrics (Evidence Insight / Protocol Design / Data Analysis / Academic Writing / Other), a Research Veto that applies to all four research categories, human eval viewer generation, actionable P0/P1/P2 optimization recommendations, and automatic skill improvement that outputs a polished, production-ready SKILL.md. Also use whenever a user says "audit my skill", "evaluate my skill", "improve my skill", or wants a corrected version after evaluation.
two-sample-mr-research-planner
Generates complete two-sample Mendelian randomization (MR) research designs from a user-provided research direction. Use when users want to design, plan, or build a study using two-sample MR to test causal relationships. Triggers:"design a two-sample MR study", "build a publishable MR paper", "test whether this biomarker causally affects this disease", "generate Lite/Standard/Advanced MR plans", "screen multiple exposures with MR", "bidirectional MR design", "causal inference using GWAS summary statistics", or "I want to study X and Y using MR". Always outputs four workload configurations (Lite / Standard / Advanced / Publication+) with a recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, and publication upgrade path.
research-proposal-generator
Generates a comprehensive research proposal design based on input literature, including hypothesis, mechanism verification, and budget. Use when the user wants to design a research project from a paper.