Skip to content
Back to search

elsevier-figure-style

An unofficial, source-backed AI Agent Skill for generating and auditing Elsevier-style manuscript figures.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/guhou-hvi--elsevier-figure-style/badge.svg)](/listings/guhou-hvi--elsevier-figure-style)

HTML

<a href="/listings/guhou-hvi--elsevier-figure-style"><img src="/api/listings/guhou-hvi--elsevier-figure-style/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Requirements: Python 3.10 or newer. The Skill is listed on [skills.sh](https://www.skills.sh/guhou-hvi/elsevier-figure-style/elsevier-figure-style) and installs from the public GitHub repository:

npx skills add guhou-hvi/elsevier-figure-style

The skills CLI copies the Skill; install Python and R packages separately. For the default project-level Codex install, run the bundled preflight before first Python use (adjust the base directory for another Agent or a global install):

python .agents/skills/elsevier-figure-style/scripts/check_environment.py

If the preflight reports missing packages, install them in the environment where the Agent will run the scripts:

python -m pip install -r .agents/skills/elsevier-figure-style/requirements.txt

For repository development, use a virtual environment, then install the development dependencies and verify local Skill discovery:

python -m pip install -r requirements-dev.txt
npx skills@1.5.15 add . --list

Generate the synthetic examples:

python examples/python/good_line_plot.py
python examples/python/good_heatmap.py
python examples/python/good_bar.py
python examples/python/good_scatter.py

Run the Python source audit:

python skills/elsevier-figure-style/scripts/check_elsevier_figure_style.py --path examples/python --profile editor

Run an exported-figure audit with explicit artwork classification:

python examples/schematic/generate_metadata_fixtures.py
python skills/elsevier-figure-style/scripts/check_exported_figure_metadata.py --path examples/outputs/schematic_demo.tiff --figure-type schematic --artwork-type combination --target-layout single --profile editor

Both checkers return nonzero on `FAIL` by default. Add `--format json` for machine-readable results, `--fail-on warn` for a stricter CI gate, or `--fail-on never` for report-only use.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 280 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # elsevier-figure-style
  2. English | [简体中文](./README.zh-CN.md)
  3. [![CI](https://github.com/guhou-hvi/elsevier-figure-style/actions/workflows/ci.yml/badge.svg)](https://github.com/guhou-hvi/elsevier-figure-style/actions/workflows/ci.yml)
  4. [![skills.sh](https://skills.sh/b/guhou-hvi/elsevier-figure-style)](https://www.skills.sh/guhou-hvi/elsevier-figure-style)
  5. [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21378648.svg)](https://doi.org/10.5281/zenodo.21378648)
  6. [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
  7. [![Status: v0.1 beta](https://img.shields.io/badge/status-v0.1%20beta-orange.svg)](#release-status)
  8. **You already know journal figures need consistent formatting. So why does it still become last-minute rework?** Requirements are scattered, writing takes months, exports change what looked correct on screen, and consistency drifts across scripts, tools, and collaborators.
  9. - **At the first plot:** you want to start with the right format, but publisher guidance, journal-specific instructions, and practical checks do not live in one place.
  10. - **On every new figure:** you keep rewriting figure size, fonts, line widths, legends, and export settings instead of reusing one maintained profile, especially when you are new to research.
  11. - **Months into writing:** you once checked the font size, figure width, and DPI, but it is easy to miss one of them when revising an old figure or adding a new one.
  12. - **When revisiting old figures:** copied scripts carry stale or inconsistent style settings, so a small data update turns into another formatting pass.
  13. - **At final export:** the plotting code looks fine, yet labels become unreadable at column width or the output carries the wrong resolution, transparency, color mode, or dimensions.
  14. - **Across a team and toolchain:** figures from different scripts, software, and collaborators gradually diverge in fonts, colors, line widths, and layout.
  15. - **After editorial feedback:** a fix applied to one figure or response letter is not captured as a reusable rule, so the same comment can return on another figure.
  16. - **After changing journals:** another target means another round of requirements to find, interpret, and apply consistently.
  17. `elsevier-figure-style` turns those easy-to-forget requirements into repeatable checks throughout the paper workflow. An AI agent applies a shared profile while generating quantitative result figures, audits plotting code and export metadata during writing, and inspects the final rendering at its intended size before submission. For schematics and graphical abstracts, v0.1 audits metadata and the rendered export. The bundled manifest provides a source-backed Elsevier-style profile; replace the manifest and evidence bundle to adapt the workflow to another journal, and extend the detector when the new profile introduces a new rule type.
  18. | | **Line plot** | **Bar chart** | **Scatter plot** |
  19. |---|:---:|:---:|:---:|
  20. | **Before / ad hoc** | ![Ad hoc line plot](./docs/assets/comparison/before-line.png) | ![Ad hoc bar chart](./docs/assets/comparison/before-bar.png) | ![Ad hoc scatter plot](./docs/assets/comparison/before-scatter.png) |
  21. | **After / profile-backed** | ![Profile-backed line plot](./docs/assets/comparison/after-line.png) | ![Profile-backed bar chart](./docs/assets/comparison/after-bar.png) | ![Profile-backed scatter plot](./docs/assets/comparison/after-scatter.png) |
  22. The six figures above use the same synthetic study data and axis ranges, so the line, bar, and scatter comparisons isolate formatting changes.
  23. This comparison highlights five areas the project handles:
  24. - **Final-size readability:** the profile standardizes text and graphical styling, and the Agent inspects the final export at its intended display size.
  25. - **Titles and formulas:** the helper removes single-panel titles; the Agent or plotting code explicitly uses MathText for formulas.
  26. - **Layout and styling:** the manifest standardizes line widths, markers, bars, and ticks, with decorative grids disabled by default.
  27. - **Series and legends:** the helper provides a color-vision-friendly palette and distinct markers, while visual QA checks legends for overlap and overflow.
  28. - **Export checks:** the helper produces profile-backed submission outputs and the metadata checker audits bitmaps; PDF, SVG, and EPS follow the manual visual-review route.
  29. Regenerate and audit the examples:
  30. ```bash
  31. python examples/readme/generate_before_after.py
  32. python skills/elsevier-figure-style/scripts/check_exported_figure_metadata.py --path examples/outputs/readme/bitmap --figure-type result --artwork-type line --target-layout one-half --profile editor
  33. ```
  34. > This is an independent, unofficial project with no Elsevier affiliation or endorsement. Verify the current Guide for Authors for your target journal. The English README is canonical if translations differ.
  35. ## Why This Exists
  36. Figure requirements pass through publisher guidance, plotting code, collaborative edits, manuscript layout, and final export. Each handoff can introduce drift, and a submission-day checklist arrives too late to prevent it. `elsevier-figure-style` provides a continuous, source-backed review mechanism with traceable rule IDs, so every stage reuses the same profile.
  37. It helps at four points in a paper workflow:
  38. - **During figure generation:** apply one shared matplotlib or ggplot2 profile before ad hoc styles spread across scripts.
  39. - **During manuscript writing:** revise result plots and inspect exported schematic figures at their intended size.
  40. - **Before submission:** combine source-code checks, export metadata checks, and visual QA.
  41. - **When targeting another journal:** select another versioned manifest while reusing the supported detectors and workflow.
  42. ## Two Figure Tracks
  43. ### Quantitative result figures
  44. Generate, revise, and audit line plots, uncertainty bands, heatmaps, bar/barh charts, scatter plots, Pareto/frontier plots, ablation curves, and other metric-driven figures.
  45. The Python path provides profile-backed helpers, an AST-based static checker, bitmap metadata checks, and visual QA. R/ggplot2 has profile-backed theme/export support but no static checker in v0.1.
  46. ### Schematic and conceptual figures
  47. Audit mechanism diagrams, workflows, principle illustrations, conceptual panels, and graphical abstracts for readability, overlap, alignment, panel labels, clutter, and export metadata.
  48. The v0.1 schematic workflow covers audit. The skill must view or render the final export before reporting a visual `PASS`; source editing and redrawing fall outside this release scope.
  49. ## One Manifest Entry Point
  50. The default profile is controlled by:
  51. ```text
  52. skills/elsevier-figure-style/assets/elsevier_figure_style.json
  53. ```
  54. The manifest contains the profile identity, style values, audit profiles, export thresholds, detector settings, and references to the evidence/checklist files. Python, R, and both checkers read this same file.
  55. `bundle_root` is the security boundary for a profile bundle. It may be `.` or `..`; the schema and every referenced resource must use a relative path and remain inside that boundary.
  56. At runtime, the Python helper validates manifests with its own bundled schema; a profile's `$schema` reference must resolve inside the bundle but cannot replace the runtime trust schema.
  57. Switch an existing profile bundle with one argument:
  58. ```bash
  59. python skills/elsevier-figure-style/scripts/check_elsevier_figure_style.py --path examples/python --config path/to/journal_profile.json --profile editor
  60. ```
  61. A new journal profile consists of a manifest plus its referenced evidence and checklist files. Configure existing detector thresholds, severity, profile gates, and override policy in the bundle. Implement detector code when the journal introduces a new rule class.
  62. ## Rule Profiles and Evidence
  63. - `official`: official publisher guidance and target-journal instructions, with non-policy `STYLE-*` input and integration findings labeled separately.
  64. - `editor`: `official` plus authorized redacted revision evidence and core visual QA heuristics. Default.
  65. - `strict`: `editor` plus public cases and the complete visual QA checklist.
  66. Every substantive finding uses a rule ID from `skills/elsevier-figure-style/references/source-basis/rule-registry.md`. D-level visual checks retain an explicit heuristic label, separate from official Elsevier policy.
  67. ## Quick Start
  68. Requirements: Python 3.10 or newer. The Skill is listed on [skills.sh](https://www.skills.sh/guhou-hvi/elsevier-figure-style/elsevier-figure-style) and installs from the public GitHub repository:
  69. ```bash
  70. npx skills add guhou-hvi/elsevier-figure-style
  71. ```
  72. The skills CLI copies the Skill; install Python and R packages separately. For the default project-level Codex install, run the bundled preflight before first Python use (adjust the base directory for another Agent or a global install):
  73. ```bash
  74. python .agents/skills/elsevier-figure-style/scripts/check_environment.py
  75. ```
  76. If the preflight reports missing packages, install them in the environment where the Agent will run the scripts:
  77. ```bash
  78. python -m pip install -r .agents/skills/elsevier-figure-style/requirements.txt
  79. ```
  80. For repository development, use a virtual environment, then install the development dependencies and verify local Skill discovery:
  81. ```bash
  82. python -m pip install -r requirements-dev.txt
  83. npx skills@1.5.15 add . --list
  84. ```
  85. Generate the synthetic examples:
  86. ```bash
  87. python examples/python/good_line_plot.py
  88. python examples/python/good_heatmap.py
  89. python examples/python/good_bar.py
  90. python examples/python/good_scatter.py
  91. ```
  92. Run the Python source audit:
  93. ```bash
  94. python skills/elsevier-figure-style/scripts/check_elsevier_figure_style.py --path examples/python --profile editor
  95. ```
  96. Run an exported-figure audit with explicit artwork classification:
  97. ```bash
  98. python examples/schematic/generate_metadata_fixtures.py
  99. python skills/elsevier-figure-style/scripts/check_exported_figure_metadata.py --path examples/outputs/schematic_demo.tiff --figure-type schematic --artwork-type combination --target-layout single --profile editor
  100. ```
  101. Both checkers return nonzero on `FAIL` by default. Add `--format json` for machine-readable results, `--fail-on warn` for a stricter CI gate, or `--fail-on never` for report-only use.
  102. ## Project-Local Python Setup
  103. Avoid machine-specific Skill paths in long-lived figure scripts. Vendor the selected helper/profile bundle into a project:
  104. ```bash
  105. python skills/elsevier-figure-style/scripts/init_figure_style_project.py --target path/to/project --config skills/elsevier-figure-style/assets/elsevier_figure_style.json --dry-run
  106. python skills/elsevier-figure-style/scripts/init_figure_style_project.py --target path/to/project --config skills/elsevier-figure-style/assets/elsevier_figure_style.json
  107. ```
  108. The command creates `path/to/project/figure_style/`. Existing bundles are preserved by default; `--force` replaces one explicitly.
  109. ```python
  110. from figure_style import apply_journal_style, line_style_kwargs, save_figure
  111. spec = apply_journal_style()
  112. ```
  113. Existing `apply_elsevier_style()` and other v0.1 helper names remain supported.
  114. ## R Quick Start
  115. R support requires `ggplot2` and `jsonlite`:
  116. ```r
  117. install.packages(c("ggplot2", "jsonlite"))
  118. ```
  119. Run the synthetic demo:
  120. ```bash
  121. Rscript examples/r/good_ggplot_demo.R
  122. ```
  123. Use `theme_journal()`, `journal_palette()`, and `save_journal()` for shared-profile behavior. The Elsevier-named aliases remain available.
  124. ## Prompt Examples
  125. ```text
  126. Use $elsevier-figure-style to generate a line plot from this CSV with the editor profile.
  127. ```
  128. ```text
  129. Use $elsevier-figure-style to audit this matplotlib script and exported TIFF before Elsevier submission.
  130. ```
  131. ```text
  132. Use $elsevier-figure-style to audit this mechanism diagram. Render it, check overlap and readability, and report rule IDs.
  133. ```
  134. ```text
  135. Use $elsevier-figure-style with this custom journal profile JSON and revise the result figures without changing the underlying data.
  136. ```
  137. ## Project Layout
  138. ```text
  139. skills/elsevier-figure-style/
  140. SKILL.md
  141. requirements.txt
  142. agents/openai.yaml
  143. assets/
  144. elsevier_figure_style.json
  145. journal_figure_profile.schema.json
  146. scripts/
  147. elsevier_plot_style.py
  148. elsevier_theme.R
  149. check_elsevier_figure_style.py
  150. check_exported_figure_metadata.py
  151. init_figure_style_project.py
  152. check_environment.py
  153. references/
  154. source-basis/
  155. examples/
  156. tests/
  157. docs/assets/
  158. SECURITY.md
  159. ```
  160. ## Source Basis
  161. The default profile operationalizes stable parts of current public Elsevier guidance:
  162. - [Artwork and media instructions](https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions)
  163. - [Artwork overview](https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions/artwork-overview)
  164. - [Artwork formats checklist](https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions/artwork-formats-checklist)
  165. - [Artwork sizing](https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions/artwork-sizing)
  166. - [Artwork types](https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions/artwork-types)
  167. - [Artwork FAQ](https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions/artwork-faq)
  168. - [Graphical abstract guidance](https://www.elsevier.com/researcher/author/tools-and-resources/graphical-abstract)
  169. The bundled sources were last verified on 2026-07-10. Use the checklist before submission and the target journal's current Guide for Authors as the final authority.
  170. ## Contributing
  171. Contributions of authorized, redacted editor or reviewer figure-format comments are welcome. Share a reusable paraphrase with private correspondence, manuscript identifiers, identities, unpublished results, and confidential technical content removed. See [CONTRIBUTING.md](./CONTRIBUTING.md).
  172. Report vulnerabilities through the private process in [SECURITY.md](./SECURITY.md).
  173. ## Release Status
  174. `v0.1.0` is a public beta with the following scope:
  175. - Python/matplotlib helpers, source checking, and bitmap metadata checks.
  176. - Profile-backed R/ggplot2 themes and export helpers.
  177. - Agent-assisted visual QA for exported figures.
  178. - One built-in Elsevier-style manifest and configurable built-in detectors.
  179. Bitmap formats receive automated metadata checks; PDF, SVG, and EPS follow the manual visual-review route. Schematic figures receive audit coverage, while new detector classes require Python implementation. Static source checking is available for Python in v0.1.
  180. ## Citation
  181. If this Skill supports your research, cite the software using the metadata in [CITATION.cff](./CITATION.cff). On GitHub, select **Cite this repository** to generate APA or BibTeX output.
  182. ```bibtex
  183. @software{ji_elsevier_figure_style_2026,
  184. author = {Ji, Peng},
  185. title = {elsevier-figure-style},
  186. version = {0.1.0},
  187. year = {2026},
  188. doi = {10.5281/zenodo.21378649},
  189. url = {https://doi.org/10.5281/zenodo.21378649},
  190. license = {MIT}
  191. }
  192. ```
  193. ## License
  194. Copyright © 2026 Peng Ji and contributors. This project is licensed under the [MIT License](./LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.