| name | scifig |
| description | Agent-only skill that turns experimental data (CSV/Excel/matrix) into publication-grade scientific figures. Auto-detects structure, infers scientific domain, recommends charts, generates Nature/Cell/Science-aligned matplotlib code, and exports vector graphics with statistical reports. Does not require the scifig Python package. Triggers on "generate figure", "plot data", "sci figure", "科研图", "画图", "多 panel". |
| allowed-tools | Agent, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep |
SciFig Generate
End-to-end workflow for turning experimental data into submission-ready scientific figures. Journal-token driven, domain-aware, narrative-first.
Quick Start
preference gates → Phase 1 dataProfile → Phase 2 chartPlan → Phase 3 styledCode → Phase 4 outputBundle
Each phase owns one artifact. Blocking findings route back to the owning phase.
COMPACT DIRECTIVE: The phase marked in_progress in TodoWrite is active — keep it uncompressed. If a sentinel survives without the full protocol, Read("phases/0N-xxx.md") before continuing.
Directory Map
See reference/structure.md for the full layout.
| Folder | Role |
|---|
phases/ | Phase 1–5 execution protocols |
specs/ | Chart catalog, journal profiles, policies |
runtime/ | Python generators, finalizer, registry |
knowledge/ | 94-case visual grammar (modules + techniques) |
resources/ | Palette/layout/zorder JSON registries |
reference/ | Coordinator details (gates, finalizer, checklist) |
Runtime Self-Containment
Agent-only — do not import the external pip install scifig package.
All behavior lives in this folder:
runtime/helpers.py — finalizer, layout audit
runtime/template_mining_helpers.py — journal kernel, palettes, idioms
runtime/generators_*.py — chart generators
runtime/registry.py — 121-chart registry
Generated scripts must embed and execute helper source inline.
Design Principles
- Journal-token driven — explicit style profiles, not ad-hoc choices
- Domain-aware charting — bias recommendations toward field conventions
- Narrative multi-panel — hero/support/validation story, not unrelated grids
- Palette governance — colorblind-safe, consistent semantic mappings
- Statistical honesty — no inferential claims without replicate meaning
- Template-grounded — rcParams, zorder, palettes trace to
knowledge/ corpus
Details: reference/coordinator.md
Knowledge Base
Before Phase 2/3, load knowledge/INDEX.md. Consult modules and techniques instead of inventing patterns.
Loading protocol, bootstrap code, maintenance: reference/knowledge-base.md
Finalizer rules: reference/finalizer.md
Preference Gates
Complete before any phase dispatch. Full card flow: specs/preference-collection.md
Gate summary: reference/coordinator.md
Never scan workspace for data files. Never Read/Bash paths before file-path and mode gates.
Phase Dispatch
Reference Specs (on demand)
Input Format
FILE: /path/to/data.csv
EXTRAS: optional figure request
DOMAIN_OVERRIDE: optional domain hint
MUST_HAVE: optional chart requirements
TodoWrite Pattern
One active phase at a time. Expand into sub-tasks while in_progress; collapse to summary when completed.
Related Commands
/spec-add learning ... — record plotting edge cases
/spec-add arch ... — new runtime helpers or generator APIs