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
Autonomous multi-round research review loop using MiniMax API. Use when you want to use MiniMax instead of Codex MCP for external review. Trigger with "auto review loop minimax" or "minimax review".
tools
Autonomous research review loop using any OpenAI-compatible LLM API. Configure via llm-chat MCP server or environment variables. Trigger with "auto review loop llm" or "llm review".
tools
Autonomous multi-round research review loop using MiniMax API. Use when you want to use MiniMax instead of Codex MCP for external review. Trigger with "auto review loop minimax" or "minimax review".
tools
Autonomous research review loop using any OpenAI-compatible LLM API. Configure via llm-chat MCP server or environment variables. Trigger with "auto review loop llm" or "llm review".