skills/11-James-Traina-compound-science/skills/publication-output/SKILL.md
This skill covers publication-quality tables and figures for academic research papers. Use when formatting regression results, summary statistics, Monte Carlo output, or research visualizations for LaTeX inclusion. Triggers on "table", "figure", "tabulate", "stargazer", "publication-ready", "LaTeX table", "event study plot", "coefficient plot", "RD plot", "power curve", "specification curve", "binscatter", "format results", "booktabs".
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research publication-outputInstall 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.
Generate publication-quality tables and figures for academic research papers. Routes to the appropriate output type based on content, applies standard academic formatting conventions, and produces files ready for LaTeX inclusion.
Skip when:
empirical-playbook or causal-inference skill)submission-guide skill)Use when:
| Content type | Output | Reference |
|---|---|---|
| Regression results (coefficients, SEs, R², N) | Stargazer-style coefficient table | references/table-generation.md |
| Summary statistics (means, SDs, quantiles) | Descriptive statistics panel | references/table-generation.md |
| Monte Carlo output (bias, RMSE, coverage) | Simulation results table | references/table-generation.md |
| Balance / covariate comparison | Balance table with normalized differences | references/table-generation.md |
| Transition probabilities | Matrix with row/column labels | references/table-generation.md |
| First-stage IV results | First-stage regression table | references/table-generation.md |
| Time-relative coefficients (leads/lags) | Event study plot | references/figure-generation.md |
| Running variable + cutoff | RD plot with local polynomial | references/figure-generation.md |
| Multiple estimates with CIs | Coefficient comparison plot | references/figure-generation.md |
| Sample sizes × effect sizes | Power curve | references/figure-generation.md |
| Group distributions | Density / kernel density plot | references/figure-generation.md |
| Two continuous variables | Binned scatter plot | references/figure-generation.md |
| Sorted estimates + indicator matrix | Specification curve | references/figure-generation.md |
| Setting | Default |
|---|---|
| Format | LaTeX (booktabs: \toprule, \midrule, \bottomrule) |
| Stars | On coefficients, never on SEs (* p<0.10, ** p<0.05, *** p<0.01) |
| SEs | In parentheses, directly below coefficient |
| Decimal alignment | All numbers in a column align at decimal point |
| Fixed effects | Yes/No indicator rows, not coefficient rows |
| Negative numbers | Minus sign (economics convention), not parentheses |
| File location | tables/<descriptive-name>.tex |
| Label format | tab:<name> |
| Setting | Default |
|---|---|
| Font | Serif (Computer Modern / Times), 11-12pt labels |
| Size | 6.5" × 4.5" (single column), 13" × 4.5" (two-panel) |
| DPI | Vector (PDF) primary, 300 DPI PNG secondary |
| Style | White background, no gridlines, bottom+left axes only |
| Color | Grayscale-friendly with distinct markers and line styles |
| Colorblind | Okabe-Ito or ColorBrewer Set2 when color is used |
| File location | figures/<descriptive-name>.pdf + .png |
| Label format | fig:<name> |
| Language | Tables | Figures | |---|---|---| | Python | pandas, stargazer, pystout, tabulate | matplotlib + seaborn | | R | stargazer, modelsummary, kableExtra, gt, tinytable, fixest::etable() | ggplot2, coefplot, binsreg | | Julia | PrettyTables.jl, Latexify.jl | Plots.jl, Makie.jl | | Stata | esttab, outreg2, estout | twoway, coefplot, binscatter |
Package notes:
pystout (Python) — estout-style regression tables for statsmodels and linearmodels (OLS, IV2SLS, PanelOLS). Supports mgroups for column grouping, modstat for custom statistics rows.tinytable (R) — lightweight, native Typst support, used as modelsummary backend.fixest::etable() (R) — direct from estimation, handles multi-way FE notation automatically.Automated vs semi-automated tradeoff: Automated tools (esttab, stargazer) are quick but hard to customize. Semi-automated tools (save intermediates, generate LaTeX separately) are harder to start but easier to customize. Costs are convex for automated, concave for semi-automated.
Quarto+Typst: Quarto with Typst backend offers sub-second compilation for iterative work. Use keep-tex: true for journal submission when you need the raw LaTeX output.
Tables and figures often require multi-panel layouts:
| Pattern | Table panels | Figure layout | |---|---|---| | Multiple outcomes | Panel A/B/C by outcome | 1×2 or 1×3 side-by-side | | Multiple samples | Panel by subsample | 2×1 stacked | | Multiple methods | Panel by estimator (OLS/IV/GMM) | 2×2 grid | | Robustness variants | Columns within one panel | 2×3 grid | | Event study + pre-trends | — | 2×1 stacked (estimates + test) |
Ensure consistent axis scales, font sizes, and formatting across panels. Label panels as (a), (b), (c) or Panel A, Panel B, Panel C.
import pandas as pd
from stargazer.stargazer import Stargazer
from linearmodels.iv import IV2SLS
# Format results with stargazer
stargazer = Stargazer([ols_result, iv_result])
stargazer.custom_columns(["OLS", "IV/2SLS"])
stargazer.show_model_numbers(False)
stargazer.significant_digits(3)
with open("tables/main-results.tex", "w") as f:
f.write(stargazer.render_latex())
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams.update({"font.family": "serif", "font.size": 11})
fig, ax = plt.subplots(figsize=(6.5, 4.5))
ax.errorbar(leads_lags, coefficients, yerr=1.96 * se, fmt="o-", color="black", capsize=3)
ax.axhline(y=0, color="gray", linestyle="--", linewidth=0.8)
ax.axvline(x=-0.5, color="red", linestyle=":", linewidth=0.8)
ax.set_xlabel("Periods relative to treatment")
ax.set_ylabel("Coefficient estimate")
ax.spines[["top", "right"]].set_visible(False)
fig.savefig("figures/event-study.pdf", bbox_inches="tight")
Before finalizing any output:
econometric-reviewer agent preloads this skill to audit tables against code outputeconometric-reviewer may request formatted output during /workflows:review/workflows:compound captures table/figure templates into docs/solutions/development
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.