pipeline
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack — pandas + numpy + scipy +…
Cleans a Quarto (.qmd) file by replacing LaTeX holdovers with proper Quarto/Pandoc syntax so the document renders correctly to HTML, PDF (Typst/LaTeX), and Word. Fixes citations (\citep → [@key]), cross-references (\ref → @label), figures (\includegraphics → markdown), tables,
Claude Code
$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill quarto-clean --agent claude-code
Codex
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill quarto-clean -a codex -y
Cursor
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill quarto-clean -a cursor -y
Gemini CLI
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill quarto-clean -a gemini-cli -y
GitHub Copilot
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill quarto-clean -a github-copilot -y
OpenCode
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill quarto-clean -a opencode -y
Windsurf
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill quarto-clean -a windsurf -y
name: quarto-clean description: 'Cleans a Quarto (.qmd) file by replacing LaTeX holdovers with proper Quarto/Pandoc syntax so the document renders correctly to HTML, PDF (Typst/LaTeX), and Word. Fixes citations (\citep → [@key]), cross-references (\ref → @label), figures (\includegraphics → markdown), tables, text formatting (\textbf → **bold**), inline math (\( \) → $ $), hyperlinks (\href → [text](url)), footnotes (\footnote → ^[]), list environments, section headings, and R Markdown chunk options (dot-style → #| YAML). Use when asked to clean, fix, modernize, or port a Quarto or R Markdown document; when LaTeX commands appear in a .qmd file; when a document fails to render to Word or Typst; or when citations/cross-references do not appear in non-LaTeX output.' metadata: author: Christopher T. Kenny version: 1.1
You clean a Quarto (`.qmd`) document by replacing LaTeX holdovers with correct Quarto/Pandoc syntax. Many authors migrate manuscripts from LaTeX or R Markdown and leave behind patterns (e.g., `\citep{}`, `\ref{}`, `\textbf{}`) that silently fail when rendering to Word or Typst PDF. This skill finds and fixes them all in a single pass.
**This skill modifies the source file in place** (or writes to a second path if supplied). Before writing, tell the user what file will be changed and remind them that `git diff` or file history can recover the original.
---
| Position | Required | Description | |----------|----------|-------------| | 1 | **Yes** | Path to the `.qmd` file to clean (e.g., `paper/paper.qmd`). Cleaned in place by default. | | 2 | No | Output path. If supplied, writes the cleaned file there instead of overwriting the input. |
**Example invocations:**
/quarto-clean paper/paper.qmd /quarto-clean paper/paper.qmd drafts/paper-clean.qmd
---
Identify the input `.qmd` path (arg 1) and output path (arg 2, or same as arg 1 if omitted).
Use the `Read` tool to load the entire file. Hold the full content in memory — you will rewrite it in one shot with the `Write` tool at the end.
Work through the full content and apply every applicable transformation from the reference tables below. Key principles:
`~~~`), inline code (`` ` `` ), display math (`$$...$$`), inline math (`$...$`), or YAML front matter (`---` to `---`). Treat these regions as opaque.
commands naturally. `\textbf{something \cite{key}}` → `**something [@key]**`. `\footnote{See \cite{key} for details}` → `^[See [@key] for details]`.
(`\textbf{\emph{text}}`) may require multiple rules (`***text***`).
fix every instance.
Use the `Write` tool to overwrite the output path with the fully cleaned content. Do not use `Edit` for individual substitutions — rewrite the whole file so nothing is missed.
Tell the user:
(list with approximate line numbers so the user can find them)
---
Apply every applicable rule. Rules are ordered so that inner/simpler commands are converted before outer/wrapper commands, which handles nesting correctly.
Convert all natbib/biblatex citation commands to Pandoc bracket syntax. These must work in all output formats (HTML, Word, Typst PDF).
| LaTeX | Quarto | Notes | |-------|--------|-------| | `\cite{key}` | `[@key]` | | | `\citep{key}` | `[@key]` | | | `\citep{a,b}` | `[@a; @b]` | Split comma-separated keys | | `\citep[p.~5]{key}` | `[@key, p. 5]` | Locator (suffix only) | | `\citep[see][p.~5]{key}` | `[see @key, p. 5]` | Prefix + locator | | `\citet{key}` | `@key` | Narrative / in-text citation | | `\citet{a,b}` | `@a and @b` | Multiple narrative keys | | `\citealt{key}` | `@key` | No parentheses | | `\citeauthor{key}` | `@key` | Loses "author-only" semantics; flag in report | | `\citeyear{key}` | `[-@key]` | Year only; suppresses author | | `\nocite{key}` | Move to YAML `nocite: '@key'` | Remove from body; add to front matter | | `\nocite{*}` | Move to YAML `nocite: '@*'` | |
Convert `\label` and `\ref` commands. The label prefix maps directly:
| LaTeX prefix | Quarto prefix | Example LaTeX | Example Quarto | |--------------|--------------|---------------|----------------| | `fig:` | `fig-` | `\label{fig:map}` → `{#fig-map}` | `\ref{fig:map}` → `@fig-map` | | `tab:` or `table:` | `tbl-` | `\label{tab:results}` | `@tbl-results` | | `sec:` or `section:` | `sec-` | `\label{sec:intro}` | `@sec-intro` | | `eq:` or `eqn:` | `eq-` | `\label{eq:ols}` | `@eq-ols` | | `lst:` | `lst-` | | | | `thm:`, `lem:`, `prop:`, etc. | same with `-` | | |
Rules:
"Figure N"). Same for "Table", "Section", "Equation", "Appendix".
## 🔥 力荐 · StatsPAI — Stata 与 R 的 Python 平替,为 AI Agent 而生 🔁 Stata / R 平替:reghdfe、csdid、rdrobust、synth、fixest、did 等常用命令在 Python 中一站式替代,一个 import statspai as sp 搞定 DID / RD / IV / SCM / DML / matching 🤖 面向 Agent 设计:结构化结果对象 + 内置 MCP Server,Claude / Codex
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack — pandas + numpy + scipy +…
Use when the user asks to run a full empirical / causal analysis in Python — by default in the style of an applied economics…
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack — pandas + numpy + scipy +…
Classical end-to-end empirical analysis workflow in the traditional Stata ecosystem — native Stata + reghdfe + ivreg2 + csdid +…
Classical end-to-end empirical analysis workflow in the modern tidyverse + econometrics R ecosystem — dplyr + tidyr + haven +…
Systematic writing framework for philosophy and interdisciplinary academic papers from optimized outline to submission-ready…
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…