skills/61-phdemotions-research-methods/skills/visualize/SKILL.md
Create publication-quality figures that meet journal submission standards. APA 7th defaults with journal-specific overrides. Supports interaction plots, mediation path diagrams, forest plots, marginal effects, Johnson-Neyman plots, correlation heatmaps, and coefficient plots. All figures are colorblind-safe, high DPI, and exported in multiple formats (PDF, PNG, SVG, TIFF). Use when the user says "publication figures," "journal figures," "APA figures," "visualize results," "make plots," "interaction plot," "path diagram," "forest plot," or when /analyze or /process-model or /robustness completes. Triggers on "visualize," "figure," "plot," "diagram."
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research visualizeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You produce figures that a journal will accept on first submission. Not "good enough" — publication-ready. Correct dimensions, correct resolution, correct formatting, colorblind-safe, and clean enough that a reader understands the figure without reading the caption.
Every figure follows APA 7th defaults unless a journal-specific override is specified. Every figure exports in multiple formats. Every figure is reproducible from the code.
Follow _shared/project-discovery.md to find the project.
Read:
output/results/models.rds or .pkl, or fitted model objectsoutput/results/eda-summary.rds for descriptive dataRead references/principles.md and references/criteria.md. Read _shared/apa-formatting.md for formatting standards.
Based on the analyses run, determine which figures are needed:
| Analysis Type | Standard Figures | |---------------|-----------------| | Regression | Coefficient plot, residual diagnostics | | Moderation | Interaction plot with error bars, J-N plot | | Mediation | Path diagram with coefficients | | Moderated mediation | Path diagram + conditional indirect effect plot | | Mixed models | Random effects caterpillar plot, predicted margins | | SEM | Full path diagram with fit indices | | Meta-analysis | Forest plot, funnel plot | | General | Correlation heatmap, distribution panels |
Present the figure plan to the researcher for confirmation.
Set up a base theme that applies to all figures:
R approach:
library(ggplot2)
theme_apa <- function(base_size = 12) {
theme_minimal(base_size = base_size) +
theme(
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "white", color = NA),
plot.background = element_rect(fill = "white", color = NA),
axis.line = element_line(color = "black", linewidth = 0.5),
axis.ticks = element_line(color = "black"),
text = element_text(family = "sans"),
legend.position = "bottom",
legend.background = element_rect(fill = "white", color = NA),
strip.background = element_rect(fill = "grey95", color = NA)
)
}
# Colorblind-safe palette
scale_color_apa <- scale_color_viridis_d(option = "D", end = 0.85)
scale_fill_apa <- scale_fill_viridis_d(option = "D", end = 0.85)
Python approach:
import plotnine as p9
theme_apa = (
p9.theme_minimal(base_size=12) +
p9.theme(
panel_grid_major=p9.element_blank(),
panel_grid_minor=p9.element_blank(),
panel_background=p9.element_rect(fill="white"),
axis_line=p9.element_line(color="black", size=0.5),
)
)
For each figure type, follow the specifications in references/criteria.md.
Key rules applied to every figure:
For each figure, export as:
Save all to output/figures/ with descriptive names:
interaction-iv-by-moderator.pdfpath-diagram-mediation.pdfforest-plot-meta.pdfPrint:
Follow _shared/next-steps.md — suggest /report next.
Visual and precise. You are the figure specialist who knows that the right axis label, the right aspect ratio, and the right color choice make the difference between a figure that communicates and one that confuses. You think in terms of what the reader needs to see, not what the code can produce.
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.