Add agent skills under .agents/skills for Codex

Copy of the project skills (.claude/skills is gitignored) so Codex on
other machines picks them up; skills-lock.json records their sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 16:09:25 +00:00
parent 5a6fb2fc8c
commit 954bbf0127
135 changed files with 39094 additions and 0 deletions

View File

@@ -0,0 +1,263 @@
"""Curated sRGB palettes for scientific figures.
Sources were checked 2026-10-01. Palette selection alone never establishes
accessibility: audit the rendered foreground/background contrast and add
redundant encodings.
Paul Tol values and recommended fixed order:
https://sronpersonalpages.nl/~pault/data/colourschemes.pdf
(SRON/EPS/TN/09-002, issue 3.2, 18 August 2021)
"""
from __future__ import annotations
from typing import Final
# Okabe-Ito colors as reproduced in Wong, Nature Methods 8, 441 (2011).
OKABE_ITO: Final = {
"orange": "#E69F00",
"sky_blue": "#56B4E9",
"bluish_green": "#009E73",
"yellow": "#F0E442",
"blue": "#0072B2",
"vermillion": "#D55E00",
"reddish_purple": "#CC79A7",
"black": "#000000",
}
OKABE_ITO_LIST: Final = [
"#E69F00",
"#56B4E9",
"#009E73",
"#F0E442",
"#0072B2",
"#D55E00",
"#CC79A7",
"#000000",
]
# These five meet 3:1 against white in sRGB. Still use markers/line styles.
OKABE_ITO_ON_WHITE: Final = [
"#0072B2",
"#D55E00",
"#009E73",
"#CC79A7",
"#000000",
]
# Compatibility alias: Wong presents the same eight colors in another order.
WONG: Final = [
"#000000",
"#E69F00",
"#56B4E9",
"#009E73",
"#F0E442",
"#0072B2",
"#D55E00",
"#CC79A7",
]
# Paul Tol qualitative schemes in the fixed sequence recommended in issue 3.2.
TOL_BRIGHT: Final = [
"#4477AA",
"#EE6677",
"#228833",
"#CCBB44",
"#66CCEE",
"#AA3377",
"#BBBBBB",
]
TOL_HIGH_CONTRAST: Final = ["#004488", "#DDAA33", "#BB5566"]
TOL_VIBRANT: Final = [
"#EE7733",
"#0077BB",
"#33BBEE",
"#EE3377",
"#CC3311",
"#009988",
"#BBBBBB",
]
TOL_MUTED: Final = [
"#CC6677",
"#332288",
"#DDCC77",
"#117733",
"#88CCEE",
"#882255",
"#44AA99",
"#999933",
"#AA4499",
]
TOL_MEDIUM_CONTRAST: Final = [
"#6699CC",
"#004488",
"#EECC66",
"#994455",
"#997700",
"#EE99AA",
]
TOL_PALE: Final = [
"#BBCCEE",
"#CCEEFF",
"#CCDDAA",
"#EEEEBB",
"#FFCCCC",
"#DDDDDD",
]
TOL_DARK: Final = [
"#222255",
"#225555",
"#225522",
"#666633",
"#663333",
"#555555",
]
TOL_LIGHT: Final = [
"#77AADD",
"#EE8866",
"#EEDD88",
"#FFAABB",
"#99DDFF",
"#44BB99",
"#BBCC33",
"#AAAA00",
"#DDDDDD",
]
PALETTES: Final = {
"okabe_ito": OKABE_ITO_LIST,
"okabe_ito_on_white": OKABE_ITO_ON_WHITE,
"wong": WONG,
"tol_bright": TOL_BRIGHT,
"tol_high_contrast": TOL_HIGH_CONTRAST,
"tol_vibrant": TOL_VIBRANT,
"tol_muted": TOL_MUTED,
"tol_medium_contrast": TOL_MEDIUM_CONTRAST,
"tol_pale": TOL_PALE,
"tol_dark": TOL_DARK,
"tol_light": TOL_LIGHT,
}
PALETTE_METADATA: Final = {
"okabe_ito": {
"kind": "qualitative",
"source": "https://www.nature.com/articles/nmeth.1618",
"caveat": "Yellow and other light colors need outlines on white.",
},
"okabe_ito_on_white": {
"kind": "qualitative-subset",
"source": "derived from Okabe-Ito by WCAG sRGB contrast calculation",
"caveat": "At most five categories; use redundant encodings.",
},
"tol_bright": {
"kind": "qualitative",
"source": "https://sronpersonalpages.nl/~pault/data/colourschemes.pdf",
"maximum_categories": 7,
},
"tol_high_contrast": {
"kind": "qualitative",
"source": "https://sronpersonalpages.nl/~pault/data/colourschemes.pdf",
"maximum_categories": 3,
"caveat": "Designed to retain separation in grayscale.",
},
"tol_vibrant": {
"kind": "qualitative",
"source": "https://sronpersonalpages.nl/~pault/data/colourschemes.pdf",
"maximum_categories": 7,
},
"tol_muted": {
"kind": "qualitative",
"source": "https://sronpersonalpages.nl/~pault/data/colourschemes.pdf",
"maximum_categories": 9,
},
"tol_medium_contrast": {
"kind": "qualitative-pairs",
"source": "https://sronpersonalpages.nl/~pault/data/colourschemes.pdf",
"maximum_categories": 6,
},
"tol_pale": {
"kind": "text-background",
"source": "https://sronpersonalpages.nl/~pault/data/colourschemes.pdf",
"caveat": "Not intended for plot lines or categorical maps.",
},
"tol_dark": {
"kind": "text-foreground",
"source": "https://sronpersonalpages.nl/~pault/data/colourschemes.pdf",
"caveat": "Not intended as a multi-category plot palette.",
},
"tol_light": {
"kind": "labeled-cell-fill",
"source": "https://sronpersonalpages.nl/~pault/data/colourschemes.pdf",
"maximum_categories": 9,
},
}
SEQUENTIAL_COLORMAPS: Final = [
"viridis",
"plasma",
"inferno",
"magma",
"cividis",
]
# Candidates, not blanket accessibility certifications. Center and normalization
# must match the scientific meaning, and rendered contrast still needs review.
DIVERGING_COLORMAP_CANDIDATES: Final = ["RdBu_r", "PuOr", "BrBG"]
DIVERGING_COLORMAPS_SAFE = DIVERGING_COLORMAP_CANDIDATES # Compatibility alias.
DIVERGING_COLORMAPS_AVOID: Final = ["RdYlGn"]
FLUOROPHORES_TRADITIONAL: Final = {
"DAPI": "#0000FF",
"GFP": "#00FF00",
"RFP": "#FF0000",
"Cy5": "#FF00FF",
"YFP": "#FFFF00",
}
FLUOROPHORES_ACCESSIBLE: Final = {
"Channel1": "#0072B2",
"Channel2": "#E69F00",
"Channel3": "#D55E00",
"Channel4": "#CC79A7",
"Channel5": "#F0E442",
}
DNA_BASES: Final = {
"A": "#00CC00",
"C": "#0000CC",
"G": "#FFB300",
"T": "#CC0000",
}
DNA_BASES_ACCESSIBLE: Final = {
"A": "#009E73",
"C": "#0072B2",
"G": "#E69F00",
"T": "#D55E00",
}
def get_palette(palette_name: str = "okabe_ito_on_white") -> list[str]:
"""Return a copy of a named palette."""
try:
return list(PALETTES[palette_name])
except KeyError as exc:
available = ", ".join(sorted(PALETTES))
raise ValueError(
f"palette {palette_name!r} not found; available: {available}"
) from exc
def apply_palette(palette_name: str = "okabe_ito_on_white") -> list[str]:
"""Apply a named palette to Matplotlib, importing it only when requested."""
try:
import matplotlib as mpl
except ImportError as exc:
raise RuntimeError(
"Matplotlib is required to apply a palette; "
"install the pinned snapshot documented in SKILL.md"
) from exc
colors = get_palette(palette_name)
mpl.rcParams["axes.prop_cycle"] = mpl.cycler(color=colors)
return colors
if __name__ == "__main__":
for palette_name in sorted(PALETTES):
print(f"{palette_name}: {', '.join(PALETTES[palette_name])}")

View File

@@ -0,0 +1,68 @@
# Flagship Nature visual starting style
# Usage: plt.style.use('nature.mplstyle')
#
# Snapshot source accessed 2026-10-01:
# https://research-figure-guide.nature.com/figures/preparing-figures-our-specifications
# This preset does not establish submission compliance.
# Figure properties
figure.dpi: 100
figure.facecolor: white
figure.constrained_layout.use: False
figure.figsize: 3.503937, 2.625 # 89 mm single-column starting width
# Font properties (Nature prefers smaller fonts)
font.size: 7
font.family: sans-serif
font.sans-serif: Arial, Helvetica, DejaVu Sans
# Axes properties
axes.linewidth: 0.5
axes.labelsize: 7
axes.titlesize: 7
axes.labelweight: normal
axes.spines.top: False
axes.spines.right: False
axes.edgecolor: black
axes.axisbelow: True
axes.grid: False
axes.prop_cycle: cycler('color', ["#0072B2", "#D55E00", "#009E73", "#CC79A7", "#000000"])
# Tick properties
xtick.major.size: 2.5
xtick.minor.size: 1.5
xtick.major.width: 0.5
xtick.minor.width: 0.4
xtick.labelsize: 6
xtick.direction: out
ytick.major.size: 2.5
ytick.minor.size: 1.5
ytick.major.width: 0.5
ytick.minor.width: 0.4
ytick.labelsize: 6
ytick.direction: out
# Line properties
lines.linewidth: 1.0
lines.markersize: 3
lines.markeredgewidth: 0.4
# Legend properties
legend.fontsize: 6
legend.frameon: False
# Save properties; DPI affects embedded raster artists in vector output.
savefig.dpi: 450
savefig.format: pdf
savefig.bbox: standard
savefig.pad_inches: 0.05
savefig.transparent: False
savefig.facecolor: white
savefig.edgecolor: white
pdf.fonttype: 42
ps.fonttype: 42
svg.fonttype: none
# Image properties
image.cmap: viridis

View File

@@ -0,0 +1,68 @@
# Presentation/Poster style
# Usage: plt.style.use('presentation.mplstyle')
#
# Larger fonts and thicker lines for presentations,
# posters, and projected displays
# Reviewed with Matplotlib 3.11.2 on 2026-10-01.
# Figure properties
figure.dpi: 100
figure.facecolor: white
figure.constrained_layout.use: False
figure.figsize: 8, 6
# Font properties (larger for visibility)
font.size: 14
font.family: sans-serif
font.sans-serif: Arial, Helvetica, Calibri, DejaVu Sans
# Axes properties
axes.linewidth: 1.5
axes.labelsize: 16
axes.titlesize: 18
axes.labelweight: normal
axes.spines.top: False
axes.spines.right: False
axes.edgecolor: black
axes.axisbelow: True
axes.grid: False
axes.prop_cycle: cycler('color', ["#0072B2", "#D55E00", "#009E73", "#CC79A7", "#000000"])
# Tick properties
xtick.major.size: 6
xtick.minor.size: 4
xtick.major.width: 1.5
xtick.minor.width: 1.0
xtick.labelsize: 12
xtick.direction: out
ytick.major.size: 6
ytick.minor.size: 4
ytick.major.width: 1.5
ytick.minor.width: 1.0
ytick.labelsize: 12
ytick.direction: out
# Line properties
lines.linewidth: 2.5
lines.markersize: 8
lines.markeredgewidth: 1.0
# Legend properties
legend.fontsize: 12
legend.frameon: False
# Save properties
savefig.dpi: 300
savefig.format: png
savefig.bbox: standard
savefig.pad_inches: 0.1
savefig.transparent: False
savefig.facecolor: white
savefig.edgecolor: white
pdf.fonttype: 42
ps.fonttype: 42
svg.fonttype: none
# Image properties
image.cmap: viridis

View File

@@ -0,0 +1,77 @@
# General scientific-publication starting style
# Usage: plt.style.use('publication.mplstyle')
#
# Reviewed with Matplotlib 3.11.2 on 2026-10-01.
# This is not a journal-compliance profile.
# Figure properties
figure.dpi: 100
figure.facecolor: white
figure.autolayout: False
figure.constrained_layout.use: False
figure.figsize: 3.5, 2.5
# Font properties
font.size: 8
font.family: sans-serif
font.sans-serif: Arial, Helvetica, DejaVu Sans
# Axes properties
axes.linewidth: 0.6
axes.labelsize: 8
axes.titlesize: 8
axes.labelweight: normal
axes.spines.top: False
axes.spines.right: False
axes.spines.left: True
axes.spines.bottom: True
axes.edgecolor: black
axes.labelcolor: black
axes.axisbelow: True
axes.grid: False
# Five Okabe-Ito colors that meet 3:1 against white in sRGB.
# Still add markers, line styles, hatching, or direct labels.
axes.prop_cycle: cycler('color', ["#0072B2", "#D55E00", "#009E73", "#CC79A7", "#000000"])
# Tick properties
xtick.major.size: 3
xtick.minor.size: 2
xtick.major.width: 0.6
xtick.minor.width: 0.5
xtick.labelsize: 7
xtick.direction: out
ytick.major.size: 3
ytick.minor.size: 2
ytick.major.width: 0.6
ytick.minor.width: 0.5
ytick.labelsize: 7
ytick.direction: out
# Line properties
lines.linewidth: 1.5
lines.markersize: 4
lines.markeredgewidth: 0.5
# Legend properties
legend.fontsize: 7
legend.frameon: False
legend.loc: best
# Save properties
savefig.dpi: 300
savefig.format: pdf
# "tight" changes physical output dimensions; request it explicitly if wanted.
savefig.bbox: standard
savefig.pad_inches: 0.05
savefig.transparent: False
savefig.facecolor: white
savefig.edgecolor: white
# Editable TrueType text in PDF/PS. SVG text stays as text and is not embedded.
pdf.fonttype: 42
ps.fonttype: 42
svg.fonttype: none
# Image properties
image.cmap: viridis
image.aspect: auto

View File

@@ -0,0 +1,294 @@
{
"schema_version": "1.0",
"accessed": "2026-10-01",
"notice": "Dated publisher snapshots for planning only. They do not establish submission compliance; verify the target journal, article type, and submission stage.",
"profiles": {
"nature": {
"label": "Nature (flagship)",
"scope": "Final submission after acceptance in principle",
"phase": "final",
"journal_specific": true,
"sources": [
"https://www.nature.com/nature/for-authors/final-submission",
"https://research-figure-guide.nature.com/figures/preparing-figures-our-specifications"
],
"widths_mm": {
"single": 89.0,
"one-and-half-min": 120.0,
"one-and-half-max": 136.0,
"full": 183.0
},
"max_height_mm": 247.0,
"formats": {
"line-art": ["pdf", "eps", "ai", "ps"],
"photo": ["psd", "tiff", "jpeg"],
"combination": ["pdf", "eps", "ai", "ps"]
},
"raster_dpi": {
"photo": {"min": 300.0, "max": 600.0},
"line-art": null,
"combination": null
},
"color_modes": ["RGB", "CMYK"],
"preferred_color_mode": "RGB",
"max_file_bytes": null,
"notes": [
"Keep line art, text, and labels editable rather than rasterizing or outlining them.",
"The companion research-figure guide says image exports should be at least 450 dpi; the flagship final-submission page accepts photographic images at 300-600 dpi.",
"Panel labels are lowercase, bold, upright, 8 pt; other text is 5-7 pt at final size."
],
"accessed": "2026-10-01",
"source_status": "reviewed"
},
"science": {
"label": "Science (AAAS)",
"scope": "Revised manuscript figures",
"phase": "revised",
"journal_specific": true,
"sources": [
"https://www.science.org/content/page/instructions-preparing-initial-manuscript",
"https://www.science.org/content/page/instructions-preparing-revised-manuscript"
],
"widths_mm": {
"single": 57.0,
"double": 121.0,
"full": 184.0
},
"max_height_mm": null,
"formats": {
"line-art": ["pdf", "eps", "ai"],
"photo": ["tiff"],
"combination": ["pdf", "eps"]
},
"raster_dpi": {
"photo": {"min": 300.0},
"line-art": {"min": 300.0},
"combination": {"min": 300.0}
},
"color_modes": null,
"preferred_color_mode": null,
"max_file_bytes": null,
"notes": [
"Initial-submission figures may be embedded and should be 300 dpi; revised figures are uploaded separately.",
"Revised guidance prefers vectors and prohibits upsampling.",
"Lettering should be about 7 pt after reduction and never smaller than 5 pt.",
"Live pages blocked direct/fresh extraction on 2026-10-01; retain historical numbers provisionally."
],
"accessed": "2026-07-23",
"source_status": "historical-live-access-blocked"
},
"cell": {
"label": "Cell Press",
"scope": "Final production files for most Cell Press journals",
"phase": "final",
"journal_specific": false,
"sources": [
"https://www.cell.com/information-for-authors/figure-guidelines"
],
"widths_mm": {
"single": 85.0,
"one-and-half": 114.0,
"full": 174.0
},
"max_height_mm": null,
"formats": {
"line-art": ["pdf", "tiff", "eps"],
"photo": ["tiff", "pdf", "jpeg"],
"combination": ["pdf", "tiff", "eps"]
},
"raster_dpi": {
"photo": {"min": 300.0},
"line-art": {"min": 1000.0},
"combination": null,
"black-and-white": {"min": 500.0}
},
"color_modes": ["RGB"],
"preferred_color_mode": "RGB",
"max_file_bytes": 20000000,
"notes": [
"Widths apply to two-column article formats; three-column formats differ.",
"TIFF and PDF are preferred for most final production files; exceptions include STAR Protocols and Cell Leading Edge.",
"The 16.5 by 20 cm overall size is a recommendation, not a universal hard limit.",
"Use Arial, capital panel labels, and about 6-8 pt text at final size."
],
"accessed": "2026-10-01",
"source_status": "reviewed",
"recommended_max_height_mm": 200.0
},
"plos": {
"label": "PLOS research journals",
"scope": "Figures after provisional Editorial Accept (PLOS Computational Biology snapshot)",
"phase": "post-provisional-accept",
"journal_specific": false,
"sources": [
"https://journals.plos.org/ploscompbiol/s/figures"
],
"widths_mm": {
"minimum": 66.8,
"text-column": 132.0,
"full": 190.5
},
"width_range_px_at_300_dpi": [789, 2250],
"max_height_mm": 222.3,
"max_height_px_at_300_dpi": 2625,
"formats": {
"line-art": ["eps", "tiff"],
"photo": ["tiff"],
"combination": ["eps", "tiff"]
},
"raster_dpi": {
"photo": {"min": 300.0, "max": 600.0},
"line-art": {"min": 300.0, "max": 600.0},
"combination": {"min": 300.0, "max": 600.0}
},
"color_modes": ["RGB", "L"],
"preferred_color_mode": "RGB",
"max_file_bytes": null,
"max_file_bytes_exclusive": 10000000,
"notes": [
"PLOS waives formatting requirements until provisional Editorial Accept.",
"Use Arial, Times, or Symbol at 8-12 pt; combine all panels for one figure into one file.",
"The cited page states TIFF or EPS only and requires RGB 8-bit/channel or grayscale.",
"The <10 MB rule is screened as <10,000,000 bytes; verify how the submission portal reports MB.",
"Summary says <10 MB while detailed file-size guidance says 10 MB or less; the screen uses the stricter summary."
],
"accessed": "2026-10-01",
"source_status": "reviewed",
"tiff_requirements": {
"has_alpha": false,
"compression": "tiff_lzw",
"frames": 1
}
},
"elsevier": {
"label": "Elsevier general artwork guidance",
"scope": "Publisher-general defaults; target journals may override them",
"phase": "final",
"journal_specific": false,
"sources": [
"https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions/artwork-formats-checklist",
"https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions/artwork-sizing"
],
"widths_mm": {
"minimum": 30.0,
"single": 90.0,
"one-and-half": 140.0,
"full": 190.0
},
"max_height_mm": null,
"formats": {
"line-art": ["eps", "pdf"],
"photo": ["tiff", "jpeg"],
"combination": ["eps", "pdf", "tiff"]
},
"raster_dpi": {
"photo": {"min": 300.0},
"line-art": {"min": 1000.0},
"combination": {"min": 500.0}
},
"color_modes": ["RGB"],
"preferred_color_mode": "RGB",
"max_file_bytes": null,
"notes": [
"Elsevier explicitly directs authors to the target journal's Guide for Authors for overrides.",
"Normal lettering is generally 7 pt at final size; 6 pt is a rule-of-thumb floor for subscripts and superscripts."
],
"accessed": "2026-10-01",
"source_status": "reviewed"
},
"ieee": {
"label": "IEEE journals",
"scope": "IEEE Author Center journal graphics guidance",
"phase": "submission",
"journal_specific": false,
"sources": [
"https://journals.ieeeauthorcenter.ieee.org/create-your-ieee-journal-article/create-graphics-for-your-article/resolution-and-size/"
],
"widths_mm": {
"single": 88.9,
"full": 182.0
},
"max_height_mm": null,
"formats": {
"line-art": ["ps", "eps", "pdf"],
"photo": [],
"combination": ["ps", "eps", "pdf"]
},
"raster_dpi": {
"photo": {"min_exclusive": 300.0},
"line-art": {"min_exclusive": 600.0},
"combination": {"min_exclusive": 300.0}
},
"color_modes": null,
"preferred_color_mode": null,
"max_file_bytes": null,
"notes": [
"The cited page identifies PS, EPS, and PDF as acceptable vector formats.",
"IEEE states greater than 300 dpi for non-vector color/grayscale and greater than 600 dpi for black-and-white line art."
],
"accessed": "2026-10-01",
"source_status": "reviewed"
},
"bmc": {
"label": "BMC journal example",
"scope": "BMC Bioinformatics preparing-your-manuscript guidance; verify the target BMC journal",
"phase": "submission",
"journal_specific": true,
"sources": [
"https://link.springer.com/journal/12859/submission-guidelines"
],
"widths_mm": {
"half": 85.0,
"full": 170.0
},
"max_height_mm": 225.0,
"formats": {
"line-art": ["eps", "pdf"],
"photo": ["tiff", "jpeg", "png", "bmp"],
"combination": ["eps", "pdf"]
},
"raster_dpi": {
"photo": {"target": 300.0},
"line-art": {"target": 300.0},
"combination": {"target": 300.0}
},
"color_modes": null,
"preferred_color_mode": null,
"max_file_bytes": 10000000,
"notes": [
"The source says approximately 300 dpi at final size, not a universal minimum.",
"Figures are 600 px standard or 1200 px high-resolution on the web.",
"All fonts must be embedded and lines should be wider than 0.25 pt at final width."
],
"accessed": "2026-10-01",
"source_status": "reviewed",
"max_height_includes_legend": true
},
"acs": {
"label": "ACS Publications general graphics page",
"scope": "Legacy general manuscript-graphics page updated 2006-01-21; selected journal rules govern",
"phase": "submission",
"journal_specific": false,
"sources": [
"https://pubsapp.acs.org/paragonplus/submission/general/graphics_prep.html"
],
"widths_mm": {
"single": 82.55,
"full": 177.8
},
"max_height_mm": 241.3,
"formats": null,
"raster_dpi": null,
"color_modes": null,
"preferred_color_mode": null,
"max_file_bytes": null,
"notes": [
"The general page gives 3.25-inch and 7-inch widths but does not establish a current universal digital format/DPI profile.",
"It recommends lettering no smaller than 5 pt after reduction and lines no thinner than 1 pt.",
"Use the target ACS journal's current Author Guidelines for binding technical requirements."
],
"accessed": "2026-10-01",
"source_status": "legacy-2006-guidance"
}
}
}