| name | color-summary-slide |
| description | Build compact, color-coded summary slides (PPTX) where color encodes information type — for diagnostic-process walkthroughs, differential-diagnosis summaries, workup timelines, and image-annotation slides. Use when a user wants a small (1-4 slide) visual summary with a legend, step-card timeline, key-value data panels (e.g. CSF/lab), interpretation cards, and de-identified image panels. |
| allowed-tools | Bash, Read, Write, Glob, Grep |
Color-Coded Summary Slide
Overview
Use this skill to produce short, dense, color-coded summary slides (typically
1–4 slides) that explain a reasoning process — most often a clinical
diagnostic process: how a diagnosis was reached from presentation →
imaging → labs/CSF → differential → conclusion. The signature move is that
color encodes the type of information, not decoration, so a reader can
scan a slide and immediately tell clinical facts from imaging from lab data
from "ruled out" from "confirmed".
This is different from /journal-reading and /case-report (full decks). Reach
for this skill when the user wants a tight visual summary of a specific
question ("summarise how we diagnosed X", "make a 2-page slide on the workup",
"add a slide with the MRI and the findings").
Triggers: "色彩總結 / 顏色分類 slide", "diagnostic process slide", "summarise the
workup", "differential diagnosis slide", "compact summary slide", "add the
imaging screenshot with findings".
Prerequisites
pip3 install python-pptx pillow pymupdf
Design system (the rules)
-
Color = information type. Assign each information category a semantic key
and keep it stable across every slide. Defaults in scripts/colorsummary.py:
| key | color | use for |
|---|
clinical | amber | symptoms, history, triggers, teaching points |
imaging | blue | CT / MRI / X-ray / imaging findings |
csf / lab | purple | CSF, lab panels, fluid data |
infection / danger | red | infection, "negative / excluded", red flags |
tumor / good | green | tumor/positive evidence, normal values, "supports Dx" |
diagnosis | navy | conclusions, final diagnosis, takeaways |
Rename/extend the TYPES dict per domain, but never use a color for two
meanings in one deck.
-
Always show a legend on the first slide (deck.legend) so the color
mapping is explicit.
-
Compact + large font. Prefer few words, big type. Body 13–15 pt, values
14–16 pt bold, headers 26–28 pt. Cards taller, whitespace tighter.
-
Components (all in scripts/colorsummary.py):
header(title, sub, page) — navy bar + accent underline + page number.
legend(keys) — color→type key.
banner(kind, runs) — one accented strip (e.g. the clinical "trigger").
timeline(steps) — step cards with colored headers + arrows between them.
kv_panel(title, kind, rows) — key/value data table with flag chips
(e.g. ↑, ↑↑, normal, "malig (–)"); ideal for CSF/lab panels.
card(kind, title, body, solid=False) — an interpretation card; solid
fills the accent (use for the final diagnosis / conclusion).
takeaway(runs) — navy bottom bar for the one-line "so what".
image(path, caption) — de-identified image panel with border; returns the
right edge x so you can place annotation cards beside it.
-
Rich text format used by every component:
runs = [ line, line, ... ]
line = (text, size, bold, color)
line = [ (text, size, bold, color), ... ]
De-identification (REQUIRED for images)
Clinical screenshots (PACS/EMR) almost always contain PHI — patient name, full
chart number, DOB — in the top bar and side panels. Before placing any image
on a slide:
- Open it and locate identifier regions (usually the top strip and the left
study-list panel).
- Crop to just the region of interest (e.g. the brain) so identifiers are
physically removed — do not merely cover them.
- Re-open the crop and confirm no text identifiers remain.
from PIL import Image
im = Image.open("pacs_screenshot.png").convert("RGB")
im.crop((left, top, right, bottom)).save("crop_deid.png")
Never version-control the output or the source images (they contain PHI) — see
"Output" below.
Workflow
1. Gather the narrative
Read the source records (progress notes, imaging reports, lab/CSF data). Pull
out, per step: the date/tag, the finding, and which type it is (clinical /
imaging / csf / infection-negative / tumor-positive / diagnosis).
2. Plan the slides
Typical shapes (mix as needed):
- Timeline slide — presentation → workup steps → diagnosis set.
- Data + differential slide —
kv_panel (CSF/labs) on the left; stacked
cards on the right (supports-Dx / against-alternative / final diagnosis).
- Image slide — de-identified
image on the left; findings + conclusion
cards on the right.
3. Generate
Copy the example and adapt the content dicts:
cp .claude/skills/color-summary-slide/scripts/example_diagnostic_process.py /tmp/build.py
python3 /tmp/build.py path/to/deid_image.png /path/to/out.pptx
Or import the library directly:
import sys; sys.path.insert(0, ".claude/skills/color-summary-slide/scripts")
from colorsummary import Deck
deck = Deck()
s = deck.header("...", "...", page="1 / 3")
deck.legend(s, ["clinical", "imaging", "csf", "infection", "tumor"])
deck.save("out.pptx")
4. Verify layout
This environment cannot always render PPTX to preview. Check programmatically:
from pptx import Presentation
from pptx.util import Emu
p = Presentation("out.pptx"); SW, SH = p.slide_width, p.slide_height
for si, s in enumerate(p.slides, 1):
for sh in s.shapes:
if sh.left is None: continue
r, b = sh.left + (sh.width or 0), sh.top + (sh.height or 0)
if r > SW + 9144 or b > SH + 9144:
print("overflow slide", si, sh.shape_type)
No output = nothing runs off the slide. If a text box overflows, shorten the
text or enlarge the card (compactness comes from fewer words, not smaller font).
Output
- Save the
.pptx to the working directory (or the relevant {date} JR/ folder).
- PHI: if the content contains patient data, do not commit it to git —
deliver the file directly. The repo's
.gitignore already excludes *.pptx,
*.pdf, and *.docx.
Files
scripts/colorsummary.py — the helper library (Deck + components + palette).
scripts/example_diagnostic_process.py — runnable 3-slide worked example
(timeline → CSF panel + differential → image). Run it to see the output, then
copy and adapt.