skills/67-econfin-workflow-toolkit/paper-writer/SKILL.md
Automatically write empirical sections of academic papers in LaTeX by reading tables/figures from a PDF. Trigger when user wants to write a paper from empirical results, has tables/figures in PDF, or says "write paper" / "paper-writer" / "写论文".
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research paper-writerInstall 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 writes the empirical sections of an academic finance/economics paper in LaTeX format. The user provides a PDF containing all tables and figures. The skill reads each table/figure sequentially, asks the user for the desired word count, then writes that section following established academic writing conventions.
Scope: Introduction, Literature Review, Hypothesis Development (verbal or theoretical model), research design sections (Data and Sample, Variable Construction, Empirical Model), empirical results, and conclusion. Does NOT write: Institutional Background.
$ARGUMENTS or ask).pages: "1-20").I have identified the following tables/figures and mapped them to sections:
Section | Tables/Figures | Default Words
---------------------------------|-------------------|-------------
Descriptive Statistics | Table 1, Fig 1-2 | 400
Baseline Regression | Table 2 | 650
Endogeneity | Table 3 | 800
Robustness Checks | Table 4-6 | 1000
Cross-sectional Heterogeneity | Table 7-8 | 500 per dimension
Mechanism Analysis | Table 9 | 600 per mechanism
Alternative Explanation | Table 10 | 750
Further Analysis | Table 11 | 650
Conclusion | (no table) | 350
Shall I proceed with this plan, or would you like to adjust?
main.tex).\label{} from table/figure .tex files for label synchronization.IMPORTANT — Writing Order vs. Document Order:
The writing order follows the logic of academic paper development (empirical results first, then build context around them). The document order is the standard paper structure. These are different:
Writing Order Document Order (final assembly)
───────────── ──────────────────────────────
① Phase 2: Empirical Results → Section 1. Introduction
② Phase 3: Research Design → Section 2. Institutional Background (if needed)
③ Phase 4: Lit Review & Hypotheses → Section 3. Literature Review
④ Phase 5: Introduction + Title + → Section 4. Theoretical Framework / Hypotheses
Abstract + Inst. Bkg. Section 5. Data and Methodology
⑤ Phase 6: Conclusion → Section 6. Empirical Results
⑥ Phase 7: Assembly & Finalize → Section 7. Conclusion
References → Figures → Tables
Online Appendix → Proofs → Appendix Tables
Writing empirical results first ensures that all subsequent sections (research design, literature review, hypotheses, introduction) are grounded in the actual findings.
Write the empirical sections first, as they are directly grounded in the tables/figures from the PDF. This becomes Section 6 (Empirical Results) in the final document.
For each section in the plan, follow this exact interaction pattern:
下面开始写 [Section Name]([Table/Figure X])。需要多少词?
main.tex. Do NOT save sections as separate .tex files (e.g., intro.tex, lit_review.tex). All section bodies live in a single main.tex file. The only \input{} calls in main.tex should be for table/figure files in results/.After completing all empirical sections, write the research design sections. These rely on the variable definition tables in the PDF and the empirical model specifications visible in the regression tables. This becomes Section 5 (Data and Methodology) in the final document. Follow the same interactive pattern as Phase 2.
For each section, prompt the user:
下面开始写 [Section Name]。需要多少词?
Write in this order:
Data and Sample Construction: Two sub-parts:
Variable Construction: Describe how each key variable is constructed. Cover ONLY the dependent variable(s) and the core independent variable — do NOT include control variables here (controls are described in Empirical Model). Reference the variable definition table in the PDF. Cite the original papers that proposed each measure where applicable.
Subsection titles MUST reflect the actual indicator content, not generic placeholders. Read the variable definition table to identify the actual measures and name the subsections accordingly. Examples:
\subsection{Measuring Corporate Innovation} — NOT \subsection{Dependent Variable}.\subsection{Measuring Investor Disagreement} — NOT \subsection{Independent Variable}.\subsection{Measuring [actual concept]} or \subsection{[Concept Name]}. Avoid the generic words "Dependent Variable" / "Independent Variable" in the subsection title.Empirical Model: Produce the econometric model in LaTeX equation format (use $X$ to express the vector of control variables, use Greek letters for fixed effects). Describe the empirical model and all variables in the equation. Include the description of control variables in this subsection — list the controls used, briefly justify their inclusion, and cite supporting literature. Reference the baseline regression table for the model specification. Cite methodological literature where appropriate.
Descriptive Statistics: Describe key variables from the summary statistics table.
| Section | Key Instructions |
|---------|-----------------|
| Data and Sample Construction | Data sources (~300 words) + Sample construction (~200 words). Default ~500 words total. |
| Variable Construction | Describe ONLY the dependent variable(s) and the core independent variable. Subsection titles must reflect actual indicator content (e.g., Measuring Corporate Innovation), NOT generic words like "Dependent Variable". Reference variable definition table. Default ~600 words. |
| Empirical Model | Produce the equation in \begin{equation}...\end{equation} format. Describe each component AND describe the control variables (controls live here, not in Variable Construction). Default ~500 words. |
| Descriptive Statistics | Choose the most important variables. Report mean and other statistics. Default ~400 words. |
After completing empirical results and research design, write the Literature Review and Hypothesis Development. These become Sections 3-4 in the final document. Writing these after the empirical work ensures the literature framing and hypotheses are properly aligned with the actual findings.
根据本文的研究内容,我建议 Literature Review 分为以下 [N] 个部分:
1. [Strand 1 topic and brief rationale]
2. [Strand 2 topic and brief rationale]
3. [Strand 3 topic and brief rationale]
...
请确认或调整以上分类。总共需要多少词?
\subsection{} under \section{Literature Review}. Follow these rules:
\cite{} (前引) and 50% \citep{} (后引). Across the entire Literature Review section, count roughly equal numbers of each. Use \cite{} for sentences where the cited author is the grammatical subject ("\cite{baker2003} document...", "As argued by \cite{hall2012}..."), and \citep{} for parenthetical support ("...prior work shows X \citep{baker2003}"). After drafting each strand, review the citations and rebalance toward 50/50 if needed.下面开始写 Hypothesis Development。请选择论证方式:
(A) 文字论述 (verbal arguments)
(B) 理论模型 (theoretical model with proofs)
The number and content of hypotheses are derived from the empirical results:
For each hypothesis:
下面开始写 Hypothesis [N](对应 [Baseline/Heterogeneity Table X])。需要多少词?\textbf{Hypothesis [N]:} ...Build a formal theoretical model with propositions/theorems that correspond to the baseline result and mechanism channels.
Ask: 理论模型需要覆盖哪些结果?(默认:baseline + mechanism channels)需要多少词?
Write the model in three parts under \section{Theoretical Framework}:
Part 1: Model Setup (\subsection{Model Setup})
Part 2: Main Results (\subsection{Main Results})
\begin{theorem}...\end{theorem} environment, then provide a brief intuition (~100 words).Part 3: Discussion (\subsection{Discussion})
Appendix: Proofs (separate file or appendix section)
\begin{proof}...\end{proof} environment.\appendix \section{Proofs of Theoretical Results}Write the Introduction after all substantive sections are complete. This ensures the motivation, findings summary, and contributions are fully informed by the actual results. This becomes Section 1 in the final document.
根据本文的研究内容,我建议投稿领域和目标期刊如下:
领域:[Finance / Economics / Accounting / Management]
推荐期刊:
1. [Top journal 1] — [brief rationale]
2. [Top journal 2] — [brief rationale]
3. [Top journal 3] — [brief rationale]
请确认目标期刊,Introduction 的写作风格将参考该期刊。
根据本文内容和目标期刊 [Journal Name] 的风格,我建议以下 10 个标题:
1. [title]
...
10. [title]
请选择一个标题,或提供你自己的标题。
Title style guidelines by journal:
\title{...}.Interaction pattern:
下面生成 Abstract、JEL codes 和 Keywords。
Abstract 默认 130 词,请确认或调整。
Assess whether an Institutional Background section is needed.
Decision logic: Evaluate whether the research setting would be unfamiliar to the target journal's typical readership.
Interaction pattern:
关于 Institutional Background:
本文使用 [setting] 数据,目标期刊为 [journal]。
[AI's assessment: 建议添加 / 建议不添加]
理由:[brief rationale]
是否添加?如果添加,需要多少词?
If added, write as \section{Institutional Background} placed between Introduction and Literature Review. Do NOT cite literature. Do NOT use bullet points.
The Introduction consists of 5 parts, written as \section{Introduction} without subsection headings.
Interaction pattern — ask for ALL five word counts at once:
下面开始写 Introduction(目标期刊:[Journal Name])。
各部分默认词数如下,请确认或调整:
1. Motivation: 800 词
2. Why this setting: 120 词
3. What we do and find: 400 词
4. Contributions (3个贡献): 400 词
5. Roadmap: 70 词
Part 1: Motivation — Motivate the research question. Cite literature from 2010-2026, anchoring the question in recent top-journal work (2023-2026). Do NOT talk about findings, contributions, or setting. Part 2: Why This Setting — Explain why the data/market is ideal. 2-3 institutional reasons. Part 3: What We Do and What We Find — Summarize strategy and results. No citations. No bullet points. Part 4: Contributions — Three strands of literature. Cite target journal's field literature. Part 5: Roadmap — "The remainder of the paper proceeds as follows..."
Write the Conclusion last. This becomes Section 7 in the final document.
Interaction pattern:
下面开始写 Conclusion。需要多少词?(默认 350)
Summarize main findings, contributions, policy implications, and limitations. Do NOT cite literature in conclusion. Do NOT use bullet points.
When writing each section, follow ALL of these rules strictly:
---) in any section you draft. The LaTeX em-dash --- is a common AI-writing tell and clutters academic prose. Use the punctuation the sentence's logic calls for instead: parentheses (or commas) for a parenthetical aside; a colon or semicolon for a connector before an explanation; a period and two sentences for an abrupt shift; a comma plus a connecting word for a list continuation. The en-dash -- for page and number ranges remains correct and should still be used (e.g., 2012--2026).A top-journal manuscript engages the field densely and currently. Editors and referees read a thin or dated bibliography as a signal that the author has not done the homework, so hold the assembled paper to two floors:
ref.bib. Citations accumulate across the citation-heavy sections (Introduction motivation and contributions, Literature Review, Hypothesis Development, Variable Construction, Empirical Model), so seed enough as you write each of those rather than trying to bolt references on at the end. Fifty is a floor, not a target to stop at; a typical empirical finance/economics paper cites 50-90.Non-fabrication overrides the quota. A recency floor is exactly the pressure that tempts a model to invent plausible-looking recent papers, and a fabricated or misattributed citation is worse than a missing one: referees wrote the very frontier you are citing and will catch it. So never manufacture an entry to reach a count. When you need recent work to satisfy the 2023-2026 quota, use WebSearch / WebFetch to find real, verifiable papers (correct authors, exact title, journal, year, and a working DOI) and cite those. If after genuine searching you still cannot reach 15 verifiable recent top-journal papers on the topic, stop and tell the user the number you found and which strands are thin, rather than filling the gap with invented references. Meeting the floors honestly is the goal; faking them defeats the purpose.
\section{} and \subsection{} for headings.\section{...}, \subsection{...}, or \subsubsection{...} — do not insert an empty line in between. Blank lines BETWEEN paragraphs of body text are fine; the rule applies only to the heading→first-paragraph boundary. Example:
\section{Empirical Results}
This section presents our baseline findings ... % ← no blank line above
NOT:
\section{Empirical Results}
This section presents our baseline findings ... % ← wrong: blank line above
Table~\ref{tab:X} and figures as Figure~\ref{fig:X}.\cite{} (前引, inline) and \citep{} (后引, parenthetical). Use \cite{} when the author is the grammatical subject (e.g., "\cite{baker2003} find that..."). Use \citep{} when the citation is parenthetical support (e.g., "...consistent with prior evidence \citep{baker2003}").
\cite{} and 70% \citep{}.\cite{} and 50% \citep{}. The Literature Review surveys the field and benefits from a heavier presence of author-as-subject sentences ("\cite{baker2003} document that..."), so balance the two roughly evenly across the entire Literature Review.$...$ for inline math, \begin{equation}...\end{equation} for display math.theorem, proposition, lemma, corollary, assumption, definition, remark, proof. Use \begin{theorem}...\end{theorem} etc. Packages loaded: amsmath, amssymb, amsthm, mathtools.\begin{center}
(Insert Table \ref{actual_label} about here)
\end{center}
\begin{center}
(Insert Table \ref{label1} and Table \ref{label2} about here)
\end{center}
Figure instead of Table:
\begin{center}
(Insert Figure \ref{actual_label} about here)
\end{center}
\bigskip \noindent [Insert ... about here] form with square brackets.S-numbering) is not placed in the body. Just mention and cross-reference it in prose, pointing the reader to the appendix. For example: "Detailed variable definitions are provided in Table~\ref{actual_label} of the Online Appendix." or "The results are robust to these alternatives (see Table~\ref{actual_label} in the Online Appendix)." The "Insert ... about here" markers signal where main-body exhibits should be typeset; appendix exhibits are already collected in the appendix, so a placement marker there would be redundant.\label{}. Use these actual labels throughout the text. Never use placeholder labels like tab:1 or tab:X.Read the full templates from references/prompt_templates.md. Key defaults:
| Section | Key Instructions | |---------|-----------------| | Descriptive Statistics | Choose the most important variables. Report mean and other statistics. Add ~50 words for correlation matrix if present. | | Baseline Regression | Describe the main finding. Interpret economic significance. Discuss fixed effects and controls. | | Endogeneity | Describe each endogeneity test (IV/2SLS, PSM, DID, etc.). Explain why each instrument/method is valid. | | Robustness Checks | Write ALL robustness tests together in one section. Adjust length based on number of tests. | | Cross-sectional Heterogeneity | Explain the economic intuition behind each subsample split. Link to hypotheses if applicable. Default ~500 words per heterogeneity dimension (e.g., two dimensions → ~1000 words total). Ask the user for the number of dimensions if not obvious from the tables. | | Mechanism Analysis | Describe the channel/mechanism tests. Explain the causal chain. Default ~600 words per mechanism (e.g., two mechanisms → ~1200 words total). Ask the user for the number of mechanisms if not obvious from the tables. | | Alternative Explanation | Address potential alternative explanations and how the tests rule them out. | | Further Analysis | Describe additional analyses that extend the main findings. | | Conclusion | Summarize main findings, contributions, policy implications, and limitations. Do NOT cite literature in conclusion. |
After all sections are written, assemble the complete LaTeX document.
Single-file rule. The body of the paper (Introduction, Institutional Background, Literature Review, Theoretical Framework / Hypothesis Development, Data and Methodology, Empirical Results, Conclusion) lives entirely inside main.tex. Do NOT split section bodies into separate files like intro.tex, lit_review.tex, empirical_results.tex, conclusion.tex, etc. The only \input{} calls in main.tex are for tables/figures stored in results/ and (optionally) appendix tables. If a draft already has body sections in separate files, paste their content into main.tex and delete the standalone files.
The output is a single main.tex file with the following structure:
\documentclass[12pt,a4paper]{article}
% ... preamble with all packages, math environments, formatting ...
\begin{document}
\begin{titlepage}
\title{...}
\author{...}
\date{...}
\maketitle
\begin{abstract} ... \end{abstract}
\end{titlepage}
% Double-spaced body
\renewcommand{\baselinestretch}{2}
\normalsize \baselineskip=25pt
\section{Introduction}
\section{Institutional Background} % if applicable
\section{Literature Review}
\section{Theoretical Framework / Hypothesis Development}
\section{Data and Methodology}
\section{Empirical Results}
\section{Conclusion}
% References (after Conclusion, before figures/tables)
\clearpage
\bibliographystyle{jfe}
\bibliography{ref}
% Figures first, then main-body Tables (after references, before appendix)
\clearpage
\begin{figure}...\end{figure}
\clearpage
\input{results/table1.tex}
% ... main-body tables only (NOT variable definitions or robustness tables) ...
% Appendix last
\clearpage
\begin{large}
\begin{center}
\bf [Paper Title]\\ Online Appendix
\end{center}
\end{large}
\setcounter{figure}{0}
\setcounter{table}{0}
\renewcommand{\thetable}{S\arabic{table}}
\renewcommand{\thefigure}{S\arabic{figure}}
\appendix
\section{Proofs of Theoretical Results}
% ... proofs ...
% Appendix tables (variable definitions, robustness checks)
\clearpage
\input{results/variables.tex}
\clearpage
\input{results/robustness1.tex}
% ... etc.
\end{document}
After assembling the document, synchronize all \ref{} references with the actual \label{} in the table/figure .tex files:
\label{}.\ref{} in the main text to match the actual labels from the files.\ref{tab: patterns that don't match any label).This ensures all cross-references compile correctly without "??" in the PDF.
\cite{} and \citep{} entries and list them in BibTeX format in ref.bib. Every key cited in the text must have a matching ref.bib entry, and every ref.bib entry should be cited at least once.ref.bib has fewer than 50 distinct entries, or fewer than 15 in 2023-2026 from top journals, close the gap by adding genuinely relevant work to the citation-heavy sections (Introduction contributions, Literature Review, Hypothesis Development) and then re-extracting. Use WebSearch / WebFetch to source real recent top-journal papers — never invent entries to hit the numbers.ref.bib so the recency tally is accurate.jfe.bst style by default (can be changed to match target journal).Present final summary to user:
论文组装完成。输出文件:
- main.tex (X words, Y sections)
- ref.bib (Z entries, 其中 W 篇为 2023-2026 顶刊近期文献)
- results/ (N tables + M figures)
文档结构:
Title Page → Abstract → Body → References → Figures → Tables → Appendix
main.tex.results/ subdirectory and included via \input{}.\ref{} labels in the main text must always match the actual \label{} in the table/figure source files. Always scan and synchronize labels during assembly.tools
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.