agentleFS
Lling0000Lling0000/nature-skills/nature-figure/SKILL.md

nature-figure

Skill0 starsChanged 7 months agoMITView on GitHub

Submission-grade Nature/high-impact journal figure workflow for Python or R. Use whenever the user asks to create, revise, audit, or polish manuscript figures, multi-panel scientific plots, or journal-ready SVG/PDF/TIFF outputs, especially for Nature-family or other high-impact journals. Before plotting, define the figure's conclusion, evidence logic, export needs, and review risks. If the user has not chosen Python or R, ask "Python or R?" and stop. Use only the selected backend for figure generation, previewing, exporting, and QA. Supports matplotlib/seaborn and ggplot2/patchwork/ComplexHeatmap. Not for dashboards or Illustrator/Figma-first infographics.

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use nature-reviewer, nature-citation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • vcis-wangchenxuSkill

    nature-reviewer

    Simulate a Nature-style reviewer assessment for RL, MARL, LLM, and LLM Agent manuscripts. Use for pre-submission review, novelty assessment, technical soundness, reproducibility, benchmark fairness, safety, and reviewer-style critique.

    Also in 5 projects that use this

  • Chanw-researchSkill

    nature-citation

    Add strict Nature/CNS citations to manuscript text by splitting long passages into citable segments, searching only accepted flagship and subjournal titles from Nature Portfolio, the AAAS Science family, and Cell Press, filtering by publication time range, and exporting one reference-manager-ready output by default. Use this skill whenever the user asks to input text and automatically get references, add citations to a paragraph/manuscript, find Nature-series or CNS support for statements, create text-to-reference correspondence, "分段引用", "自动给出引用", "Nature系列引用", "CNS及子刊", "支撑文献", "补引用", "找引用", or export EndNote/RIS/ENW/Zotero RDF.

    Also in 6 projects that use this

  • vcis-wangchenxuSkill

    nature-reader

    Create a structured reader for RL, MARL, LLM, and LLM Agent papers. Use for paper summaries, Chinese-English reading notes, method decomposition, experiment extraction, reproducibility analysis, and idea mining.

    Also in 5 projects that use this

  • Delagong950Skill

    nature-experiment-log

    Standardized lab notebook with structured YAML-frontmatter experiment logs. Supports Obsidian vault integration, image/voice/text input, and batch/tracking systems.

    Also in 4 projects that use this

  • Delagong950Skill

    nature-ref-verifier

    Multi-source cross-validation of academic references. Verify authors, title, year, volume, issue, and pages against PubMed, CrossRef, and publisher pages. Detect fabricated citations.

    Also in 3 projects that use this

  • Galaxy-DawnSkill

    nature-response

    Draft, audit, or revise point-by-point reviewer response letters for Nature-family manuscript revisions. Use when the user provides reviewer comments, editor decision letters, revision notes, response drafts, or asks how to respond to major/minor revision requests, rebuttal letters, response to reviewers, peer-review reports, 审稿意见回复, 逐点回复, 修回信, 大修回复, 小修回复, or 如何回复 reviewer.

    Also in 4 projects that use this

  • +4 more from vcis-wangchenxu

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 12 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user provides a private plotting template collection, use it only as an internal adaptation source and do not reveal its path, …

    line 15
  2. Distinctive:

    Before generating or editing code, establish the contract below.

    line 24
  3. Distinctive:

    Backend selection is a blocking gate: If the user has not explicitly chosen Python or R in the current request or provided a clearly …

    line 26
  4. Distinctive:

    Do not generate mock data, write scripts, create figures, or choose Python/R by default.

    line 29
  5. Very specific:

    Missing runtime/package rule: After the backend is selected, check the selected runtime early (Rscript/R for R.

    line 41
  6. Distinctive:

    If the selected runtime or required packages are unavailable, stop before rendering and report the exact blocker.

    line 43
  7. Very specific:

    Only recommend a backend when the user explicitly asks you to choose or recommend one.

    line 48
  8. Distinctive:

    Do not disclose private local paths, private filenames, chat-attachment names, internal reference filenames, template identifiers, or the …

    line 68
  9. Distinctive:

    Python-only execution rule: When the user has selected Python, do all figure drawing, previewing, exporting, and visual QA in Python.

    line 77
  10. Very specific:

    Use text.usetex = True only when LaTeX is installed and math-rich labels are required.

    line 107
  11. Very specific:

    Start by classifying the requested figure into one of four archetypes: quantitative grid, schematic-led composite, image plate + quant, or …

    line 145
  12. Distinctive:

    Prefer one hero panel plus subordinate evidence panels over filling the canvas with equal-sized subplots.

    line 147
  13. Distinctive:

    If the user asks for a single chart, still identify its role in the manuscript claim: discovery, mechanism, validation, comparison, …

    line 148
  14. Distinctive:

    Keep the background white for plots and diagrams.

    line 150
  15. Distinctive:

    Prefer direct labels over legends when categories are spatially fixed or the legend would force unnecessary eye travel.

    line 151
  16. Distinctive:

    Keep one restrained palette per figure: usually one neutral family, one signal family, and one accent family.

    line 152
  17. Very specific:

    Treat statistics, n, error-bar definitions, source-data traceability, and image-integrity notes as part of the figure, not as optional …

    line 153
  18. Very specific:

    When the user asks for broad Nature style rather than ML/NMI-specific style, read references/nature-2026-observations.md before choosing …

    line 155

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Nature Figure Making Skill

A guide for producing publication-quality scientific figures as a visual argument, not as isolated pretty plots. Every figure starts from a claim, an evidence hierarchy, and a review-risk check before code or aesthetics.

The older Python/matplotlib rules in this skill remain valid. The skill now also supports R, especially ggplot2 + patchwork + ComplexHeatmap + ggrepel + svglite/cairo_pdf + ragg. If the user provides a private plotting template collection, use it only as an internal adaptation source and do not reveal its path, filenames, or provenance in user-facing output.

Color policy: prefer unified method families across all panels over maximal hue separation. For dense Nature Machine Intelligence-style figure pages, use the low-saturation NMI pastel family described in references/api.md and reserve green/red mainly for gains, drops, and other directional cues.

First move: figure contract before plotting

Before generating or editing code, establish the contract below.

Backend selection is a blocking gate. If the user has not explicitly chosen Python or R in the current request or provided a clearly language-specific input file/workflow, ask one concise question: Python or R? Then stop and wait for the user's answer. Do not generate mock data, write scripts, create figures, or choose Python/R by default. This overrides general autonomy/default-execution behavior for figure tasks.

The selected backend is exclusive for all figure generation. Once Python or R is selected, every plotting script, preview image, SVG/PDF/TIFF/PNG export, QA render, and visual workaround must be produced by that same backend. Do not use Python to draw a preview for an R figure, and do not use R to draw a preview for a Python figure, even if the selected runtime or packages are missing locally. The non-selected language may only be used for non-visual file inspection or data conversion when it does not open a graphics device, import plotting libraries, create image/vector files, or change the final visual appearance.

Missing runtime/package rule. After the backend is selected, check the selected runtime early (Rscript/R for R; Python and required plotting packages for Python). If the selected runtime or required packages are unavailable, stop before rendering and report the exact blocker. You may provide a selected-backend script and installation commands, or ask permission to install dependencies, but you must not fall back to the other language to make a substitute figure.

Only recommend a backend when the user explicitly asks you to choose or recommend one. In that case, use references/backend-selection.md, state the reason, and then proceed with the recommended backend.

  1. Core conclusion: write the one-sentence claim the figure must defend.
  2. Evidence chain: map each planned panel to the claim, and drop panels that do not carry a unique piece of evidence.
  3. Archetype: classify the figure as quantitative grid, schematic-led composite, image plate + quant, or asymmetric mixed-modality figure.
  4. Backend: use the selected Python or R track exclusively for all figure drawing, previewing, exporting, and visual QA. Do not cross-render with the other language.
  5. Journal/export contract: set final dimensions, editable text, source data, statistics, image-integrity notes, and export formats before styling.

The highest-priority rule is: the chart serves the scientific logic. Aesthetic polish, template matching, and complex layout are subordinate to making the core conclusion clear, defensible, and reviewable.

User-facing privacy rule

Do not disclose private local paths, private filenames, chat-attachment names, internal reference filenames, template identifiers, or the provenance of private working materials in user-facing replies, generated code comments, figure legends, reports, or manuscript text. Use generic descriptions such as "the provided R template collection", "a private working draft", or "the internal figure contract". Only reveal an exact path or source file when the user explicitly asks for that audit trail.

Python quick-start

Python-only execution rule. When the user has selected Python, do all figure drawing, previewing, exporting, and visual QA in Python. Do not call R/ggplot2, ComplexHeatmap, patchwork, or any R graphics device to create a temporary preview, fallback export, or layout approximation. If Python or required Python plotting packages are missing, stop before rendering and report the missing dependency. You may still write the Python script, provide pip/environment install commands, or ask permission to install dependencies, but do not cross-render the figure in R.

import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.rcParams.update({
    "font.family": "sans-serif",
    "font.sans-serif": ["Arial", "Helvetica", "DejaVu Sans", "sans-serif"],
    "svg.fonttype": "none",     # editable text in SVG
    "pdf.fonttype": 42,         # editable TrueType text in PDF
    "font.size": 7,             # use 15-24 only for large slide-sized panels
    "axes.spines.right": False,
    "axes.spines.top": False,
    "axes.linewidth": 0.8,
    "legend.frameon": False,
})

def save_pub_py(fig, filename, dpi=600):
    fig.savefig(f"{filename}.svg", bbox_inches="tight")
    fig.savefig(f"{filename}.pdf", bbox_inches="tight")
    fig.savefig(f"{filename}.tiff", dpi=dpi, bbox_inches="tight")

Use text.usetex = True only when LaTeX is installed and math-rich labels are required.

R quick-start

library(ggplot2)
library(patchwork)

theme_set(
  theme_classic(base_size = 6.5, base_family = "Arial") +
    theme(
      axis.line = element_line(linewidth = 0.35, colour = "black"),
      axis.ticks = element_line(linewidth = 0.35, colour = "black"),
      legend.title = element_text(size = 6.2),
      legend.text = element_text(size = 5.8),
      strip.text = element_text(size = 6.2, face = "bold"),
      plot.title = element_text(size = 7, face = "bold"),
      panel.grid = element_blank()
    )
)

save_pub_r <- function(plot, filename, width_mm = 183, height_mm = 120, dpi = 600) {
  w <- width_mm / 25.4
  h <- height_mm / 25.4
  svglite::svglite(paste0(filename, ".svg"), width = w, height = h)
  print(plot)
  dev.off()
  grDevices::cairo_pdf(paste0(filename, ".pdf"), width = w, height = h, family = "Arial")
  print(plot)
  dev.off()
  ragg::agg_tiff(paste0(filename, ".tiff"), width = w, height = h, units = "in", res = dpi)
  print(plot)
  dev.off()
}

Default operating stance

  • Start by classifying the requested figure into one of four archetypes: quantitative grid, schematic-led composite, image plate + quant, or asymmetric mixed-modality figure.
  • Prefer one hero panel plus subordinate evidence panels over filling the canvas with equal-sized subplots.
  • If the user asks for a single chart, still identify its role in the manuscript claim: discovery, mechanism, validation, comparison, robustness, or clinical/biological relevance.
  • Keep the background white for plots and diagrams; switch to black only for microscopy / volume-rendering image plates.
  • Prefer direct labels over legends when categories are spatially fixed or the legend would force unnecessary eye travel.
  • Keep one restrained palette per figure: usually one neutral family, one signal family, and one accent family.
  • Treat statistics, n, error-bar definitions, source-data traceability, and image-integrity notes as part of the figure, not as optional caption cleanup.
  • When the user asks for broad Nature style rather than ML/NMI-specific style, read references/nature-2026-observations.md before choosing layout.

When to load this skill

  • Python or R figures for papers, slides, or reports targeting Nature, Science, Cell, NeurIPS, ICLR, or similar venues.
  • Requests involving grouped bars, trend lines, heatmaps, radar plots, multi-panel grids, or PDF/SVG/high-DPI output.
  • Any mention of "Nature style", "publication figure", "paper figure", "SCI figure", "R plotting template", or "high-quality scientific plot".
  • Requests to improve a figure's logic, aesthetics, panel layout, figure legend, export quality, or journal-readiness.

When NOT to load

  • Plotly, Altair, Bokeh, or other interactive/web-first plotting.
  • EDA-only plots without a publication target.
  • Primary workflow is 3D, GIS, or non-scientific illustration tooling.
  • Illustrator / Figma–first layout.

Related files

FileOpen when
references/figure-contract.mdNeed to convert a user request into core conclusion, evidence hierarchy, panel map, and review-risk checks
references/backend-selection.mdUser has not chosen Python/R, asks for a recommendation, or a mixed Python/R workflow is possible
references/r-workflow.mdUser chooses R or provides R scripts/templates/data
references/r-template-index.mdNeed to adapt a user-provided or private R template collection without exposing source paths
references/qa-contract.mdBefore final delivery, revision package, microscopy/blot figure, or journal-specific audit
references/design-theory.mdTypography, color theory, layout rationale, export policy
references/api.mdPython PALETTE, helper function signatures, validation rules
references/common-patterns.mdPython layout patterns: hero panels, legend-only axes, dark image plates, asymmetric layouts
references/nature-2026-observations.mdReal Nature page archetypes: schematic-led composites, dark image plates, clinical triptychs, asymmetric hero layouts
references/tutorials.mdEnd-to-end walkthroughs: bars, trends, heatmaps
references/chart-types.mdRadar, 3D sphere, fill_between, scatter patterns

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.