Install
$ agentstack add skill-axect-skills-scienceplot-py ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
scienceplot-py — Matplotlib Script Generator (scienceplots / science+nature)
Generate a Python plotting script that always follows the user's lab template shape. The skill writes a .py file and returns its path; it does not run the script. The user executes it themselves (the user prefers uv run per their global preferences).
The canonical template lives at ~/Socialst/Templates/PyPlot_Template/pq_plot.py. Every variant in this skill is a structural extension of that file.
Mandatory style invariants
Every generated script MUST keep these load-bearing patterns intact. Do not "clean up" any of them, even if they look redundant or unused.
import scienceplots— required. It registers thescienceand
nature styles by import side-effect; the symbol is never referenced directly. Linters will flag it as unused — keep it anyway.
- Style context block — all plotting code lives inside
with plt.style.context(["science", "nature"]):. Never substitute plt.style.use(...) or call any plotting outside this block.
pparamdict — axis configuration is a dict, applied with
ax.set(**pparam). Do not inline ax.set_xlabel(...), set_ylabel(...), set_title(...) calls when pparam would do.
ax.autoscale(tight=True)— called on every axis, before
ax.set(**pparam). For subplots, loop over all axes.
- Raw-string LaTeX — every label, title, legend entry uses
r'...'.
Non-raw '$x$' works for the literal $x$ but breaks the moment a backslash appears (\alpha, \sigma, \mathrm{...}). Always r-prefix.
- savefig —
fig.savefig(, dpi=300, bbox_inches='tight').
Default filename is plot.png. PDF/SVG output is fine if asked, but keep dpi=300 and bbox_inches='tight'. (Bump higher only if the user explicitly asks for it — the lab default is 300.)
Workflow
- Gather what the user has not already given:
- Data source: parquet / CSV /
.npy/.npz, plus the file path - x / y column or array names (and y-error if errorbar)
- Plot variant: single line, multi-line + legend, scatter / errorbar, or
subplots (rows × cols)
- Axis labels, title, legend labels (LaTeX OK — strings will be wrapped
in raw-string form)
- Output path (default:
plot.pngnext to the data file or in cwd)
- Pick the matching template under
references/:
single_line.py— one series, one ax (mirrorspq_plot.py)multi_line.py— multiple series, one ax, with legendscatter_errorbar.py—ax.errorbar(...)(orax.scatter(...))subplots.py— multi-panelfig, axes = plt.subplots(rows, cols)
- Swap in the requested data-loader block. See
references/data_loaders.md for parquet / CSV / .npy / .npz snippets.
- Substitute column names, label strings, title, output filename. Preserve
every invariant from the section above.
- Write the
.pyfile with the Write tool. Do not execute it. - Print the output path and a one-line "run with
uv run" hint.
Do not invoke uv / python from this skill.
Data sources
| Source | Imports | Read call | |---------------|------------------------|----------------------------------------------------| | Parquet | import pandas as pd | df = pd.read_parquet('data.parquet') | | CSV | import pandas as pd | df = pd.read_csv('data.csv') | | NumPy .npy | import numpy as np | data = np.load('data.npy') (then column-slice) | | NumPy .npz | import numpy as np | data = np.load('data.npz'); x = data['x'] |
Full snippets in references/data_loaders.md.
Templates
Each reference is a self-contained, runnable skeleton matching the mandatory style invariants. Read the file, adapt strings/columns in memory, then Write the result to the user's chosen path.
| Variant | File | |------------------------|---------------------------------------| | Single line (base) | references/single_line.py | | Multi-line + legend | references/multi_line.py | | Scatter / errorbar | references/scatter_errorbar.py | | Subplots (multi-panel) | references/subplots.py | | Data loaders | references/data_loaders.md |
What this skill does NOT do
- It does not run the generated script. The user runs it (preferred:
uv run ).
- It does not install
scienceplots/matplotlib/pandas/numpy.
Assume they are already available in the target environment.
- It does not produce methodology / architecture / pipeline diagrams. For
those, use the paperbanana skill or wide-slide-illustrator.
- It does not change the style invariants. If the user asks for a different
style (e.g., seaborn, ggplot, plain matplotlib), tell them this skill is specifically for the science+nature template and offer to write the alternative as a plain script outside the skill.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Axect
- Source: Axect/skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.