一键导入
econ-visualization
Creates publication-quality economics figures with consistent academic styling. Use when creating or styling charts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Creates publication-quality economics figures with consistent academic styling. Use when creating or styling charts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scaffold a Quarto analysis notebook (generic or method-specific — DiD, IV, RDD, LASSO, Panel FE), register it in _quarto.yml, apply publication-quality figure styling, and generate dataset codebooks. Use when starting a new analysis notebook.
Manage the project's literature workflow — ideate research questions, run structured literature reviews, add citations to references.bib, write annotation notes in references/, and audit citation integrity. Use for any bibliography or literature task.
Audit a Quarto manuscript or a single notebook — freeze freshness, data-path existence, citation integrity, figure/table export presence, placeholder and anonymization checks. Produces a scored review report under notes/. Read-only — never modifies notebooks, data, or the manuscript.
Build publication-quality regression and robustness tables from notebook estimation output, exported to tables/ as CSV + Markdown + LaTeX. Use when creating a results table.
Draft and revise manuscript prose for index.qmd — sections, the abstract, regression-result interpretation, and referee responses. Use when writing or revising the manuscript.
Reads the manuscript and notebooks to generate a structured abstract. Use when writing or updating the abstract.
| name | econ-visualization |
| description | Creates publication-quality economics figures with consistent academic styling. Use when creating or styling charts. |
| argument-hint | <chart type> <data source> [description] |
| allowed-tools | Bash, Read, Write, Edit, Glob, Grep |
| version | 1.0.0 |
| workflow_stage | communication |
| tags | ["visualization","figures","ggplot2","matplotlib","publication-quality"] |
Create publication-quality figures with consistent academic styling, optimized for economics journals.
$ARGUMENTS — chart type and data description (e.g., "coefficient plot from notebook-02 regressions", "event study DiD results", "time series GDP per capita by country", "scatter income vs growth with fitted line", "RD plot running variable")Parse the chart type from the arguments. Supported chart types:
Ask the user for the language preference: Python, R, or Stata.
Apply project-wide figure standards (from CLAUDE.md):
../images/<label>.png#| label: fig-<name> and #| fig-cap: "<caption>"Generate code with academic styling conventions:
Python (matplotlib/seaborn):
fig, ax = plt.subplots(figsize=(6, 4))
# Use clean, minimal style
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.set_xlabel("X Label", fontsize=12)
ax.set_ylabel("Y Label", fontsize=12)
ax.tick_params(labelsize=10)
fig.savefig("../images/<label>.png", dpi=300, bbox_inches="tight")
R (ggplot2):
p <- ggplot(data, aes(x, y)) +
geom_point() +
theme_minimal(base_size = 12) +
theme(
panel.grid.minor = element_blank(),
plot.title = element_text(size = 14, face = "bold")
) +
labs(x = "X Label", y = "Y Label")
ggsave("../images/<label>.png", plot = p, width = 6, height = 4, dpi = 300)
Stata:
twoway (scatter y x), ///
scheme(s2color) ///
xtitle("X Label") ytitle("Y Label")
quietly graph export "../images/<label>.png", replace width(1800)
Apply chart-type-specific templates:
Coefficient plot: Horizontal forest plot with point estimates as dots, 95% CI as horizontal lines, vertical zero reference line (dashed). Order coefficients by magnitude or logical grouping. Use geom_pointrange() (R) or ax.errorbar() (Python).
Event study plot: X-axis = periods relative to treatment (t-3, t-2, ..., t+3). Point estimates with 95% CI error bars. Vertical dashed line at t=0 (treatment). Horizontal dashed line at y=0 (null effect). Normalize t-1 to zero (omitted period). Shade post-treatment region lightly.
RD plot: Binned scatter plot (evenly spaced bins or quantile bins). Fitted polynomial curves on each side of the cutoff. Vertical line at the cutoff. Different colors for below/above cutoff. Show the discontinuity visually.
Time series: Multiple series with distinct colors from a colorblind-safe palette. Legend placed inside the plot area (top-right or bottom-left to avoid clutter). Optional vertical lines for key events. Date formatting on x-axis.
Distribution: Kernel density with bw_method='scott' or histogram with Freedman-Diaconis bins. Vertical dashed lines for mean and median, labeled. If comparing groups, use semi-transparent overlapping densities.
Scatter plot: Point opacity at 0.5–0.7 for dense data. Optional OLS fit line with geom_smooth(method="lm") or np.polyfit. Label outliers if relevant. Consider log scales for skewed variables.
Heatmap: Diverging color palette (blue-white-red for correlations). Annotate cells with values. Mask the upper triangle for correlation matrices. Use sns.heatmap() (Python) or corrplot (R).
Apply universal styling rules:
Set2, Dark2 (categorical) or viridis, RdBu (sequential/diverging). Never use rainbow.Show the embed shortcode for manuscript integration:
{{< embed notebooks/<notebook>.qmd#fig-<name> >}}
viridis, Set2, or RdBu instead of jet or rainbow.alpha=0.3), jitter, hex bins, or contour plots instead of opaque points.