skills/60-regisely-superpapers/skills/tables-and-figures/SKILL.md
Use when generating a LaTeX results table, creating a figure for a paper, formatting descriptive statistics, preparing regression output for publication, or producing vector-quality graphics. Enforces booktabs, threeparttable, vector PDFs, and script-generated output.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research tables-and-figuresInstall 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.
This skill produces publication-quality tables and figures that are regenerated by scripts, not hand-edited. Tables use booktabs for professional rules and threeparttable for integrated notes. Figures are vector PDFs — PNG and JPG are forbidden in the final paper. Every table and figure comes from a script under code/ and is included in the paper via \input{} or \includegraphics{}.
Generate every table and figure from a script in code/ that reads from data/processed/ and writes to output/tables/ or output/figures/. Never hand-edit the output file.
Use booktabs rules in tables. \toprule, \midrule, \bottomrule. Never \hline. Never vertical bars.
Wrap every table in threeparttable with a notes block documenting: standard error type, significance convention, sample, data source.
Save figures as vector PDF. Use ggplot2 with ggsave(..., device = cairo_pdf) in R, or matplotlib.pyplot.savefig(..., format='pdf') in Python. Raster formats (PNG, JPG) are forbidden in the final paper.
Include in the paper with \input{} or \includegraphics{}. Never paste numbers or copy images.
Use the naming convention:
tab_<purpose>.tex — tab_descriptives.tex, tab_main_results.tex, tab_robustness.texfig_<purpose>.pdf — fig_event_study.pdf, fig_trends.pdfTable notes and figure captions follow the user's paper language. The file names and script comments stay in English; the user-facing text in the notes and captions follows the paper's language setting.
No table may overflow the text width. After generating a table, verify it fits within \linewidth. If it overflows:
@{} column separators or \setlength{\tabcolsep}{3pt}.\resizebox{\linewidth}{!}{...} — but only if font remains readable.pdflscape package (\begin{landscape}...\end{landscape}). Add \usepackage{pdflscape} to the preamble.
Never let a table bleed into the margin. After compilation, check for Overfull \hbox warnings on table lines and fix them.Standard regression results table:
\begin{table}[htbp]
\centering
\begin{threeparttable}
\caption{Main Results}
\label{tab:main}
\begin{tabular}{lcc}
\toprule
& (1) & (2) \\
& OLS & FE \\
\midrule
Treatment & 0.123*** & 0.098** \\
& (0.034) & (0.041) \\
\midrule
N & 10{,}234 & 10{,}234 \\
R$^2$ & 0.42 & 0.58 \\
\bottomrule
\end{tabular}
\begin{tablenotes}[flushleft]
\footnotesize
\item \textit{Notes:} Standard errors clustered at the state level in parentheses. * p$<$0.10, ** p$<$0.05, *** p$<$0.01. Sample covers 2010--2020. Data: IBGE PNADC.
\end{tablenotes}
\end{threeparttable}
\end{table}
Required packages in paper preamble:
\usepackage{booktabs}
\usepackage{threeparttable}
Default: * p<0.10, ** p<0.05, *** p<0.01 (economics and finance convention).
Alternative: * p<0.05, ** p<0.01, *** p<0.001 (common in psychology and medicine).
Detect the convention by reading CLAUDE.superpapers.md from the current working directory, or walking up parent directories until found, and using the significance_convention field. If the file is absent or the field is unset, ask the user — do not silently default. Always document the convention in the table note; do not assume the reader knows which convention is used.
theme_minimal() or theme_classic() in ggplot2, with adjustments for print. Avoid grey backgrounds from ggplot2's default theme.viridis, RColorBrewer Dark2 or Set1). For B&W print compatibility, use dash patterns or shapes rather than relying on color alone.Unemployment rate (%), Year, Real GDP (log)).ggsave("output/figures/fig_name.pdf", width = W, height = H, device = cairo_pdf).Example figure code (R/ggplot2):
library(ggplot2)
p <- ggplot(data, aes(x = year, y = unemployment, color = region)) +
geom_line(linewidth = 0.8) +
scale_color_viridis_d(option = "D") +
labs(x = "Year", y = "Unemployment rate (%)", color = NULL) +
theme_minimal(base_size = 11) +
theme(
legend.position = "bottom",
panel.grid.minor = element_blank()
)
ggsave(
"output/figures/fig_unemployment.pdf",
plot = p,
width = 6.5, height = 4,
device = cairo_pdf
)
\hline instead of booktabs rules|).tex table files\resizebox as a first resort instead of redesigning column layout or reducing paddingcode/output/tables/ or output/figures/booktabs and threeparttabletools
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.