pipeline
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack — pandas + numpy + scipy + statsmodels + linearmodels + pyfixest +…
Takes a proofread or apsa-style report file (or any markdown file using **Original:** / **Recommended:** syntax) and rewrites the original source file with git merge conflict markers so the user can accept or reject each suggested edit using VS Code or Positron''s built-in merge
$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill pseudo-merge --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/pseudo-mergeContext preview
The summary Claude sees to decide when to auto-load this skill.
Takes a proofread or apsa-style report file (or any markdown file using **Original:** / **Recommended:** syntax) and rewrites the original source file with git merge conflict markers so the user can accept or reject each suggested edit using VS Code or Positron''s built-in merge
name: pseudo-merge description: 'Takes a proofread or apsa-style report file (or any markdown file using **Original:** / **Recommended:** syntax) and rewrites the original source file with git merge conflict markers so the user can accept or reject each suggested edit using VS Code or Positron''s built-in merge conflict UI. Branch names are "original" and "claude-edits". Use when asked to apply edits, insert conflict markers, or set up merge resolution for a copy-edit report. Supports an optional @sec-label argument to restrict markers to one section.' metadata: author: Christopher T. Kenny version: 1.0
You take a copy-edit report (produced by the `proofread` or `apsa-style` skills, or any markdown file using the same `**Original:**` / `**Recommended:**` syntax) and rewrite the original source file with **git merge conflict markers**. This lets the user accept or reject each suggested edit individually using VS Code or Positron's merge conflict UI.
The fake branch names are always:
**This skill modifies the original source file in place.** Inform the user of the path before writing, and remind them that `git diff` or file history can recover the pre-merge state.
---
| Position | Required | Description | |----------|----------|-------------| | 1 | **Yes** | Path to the report file (e.g., `paper/paper-copy-edits.md` or `paper/paper-style-edits.md`) | | 2 | No | Path to the original source file to modify. If omitted, derived automatically (see below). | | `@sec-label` | No | Quarto section reference (e.g., `@sec-intro`). Detected by the leading `@`. If supplied, only conflict markers within that section are inserted. May appear in any argument position. |
**Example invocations:**
/pseudo-merge paper/paper-copy-edits.md /pseudo-merge paper/paper-copy-edits.md @sec-intro /pseudo-merge paper/paper-style-edits.md paper/paper.qmd @sec-data /pseudo-merge reviews/my-edits.md src/manuscript.qmd
Scan **all arguments** for one that begins with `@`. That is the section filter. Strip the leading `@` to get the Quarto label (e.g., `@sec-intro` → `sec-intro`).
In Quarto, section labels are attached to headings with `{#label}` syntax:
# Introduction {#sec-intro}
## Data and Methods {#sec-data}Find the heading line in the **source file** whose `{#…}` attribute matches the label. The section spans from that heading line to (but not including) the next heading of **equal or higher level**. Track the line range of that span.
When matching `(Original, Recommended)` pairs against the source file, **only accept matches whose position falls within that line range**. Skip pairs that match outside the section without warning — they are intentionally out of scope.
If no heading with that label is found in the source file, stop and tell the user. List all `{#sec-*}` labels found in the file.
1. Strip the suffix `-copy-edits`, `-style-edits`, or `-edits` from the report filename stem. 2. Append `.qmd`. 3. Look for that file in the same directory as the report.
Examples:
If the derived path does not exist and no second argument was given, stop and ask the user for the source file path.
---
The skill reads any markdown file that contains issue blocks of this shape (produced by `proofread` and `apsa-style`):
**Original:** Full original sentence here. **Recommended:** Full corrected sentence here.
These may appear inside a section heading block like:
### [CRITICAL · Grammar] Subject-verb disagreement **Original:** The results shows that incumbents win more often in low-turnout elections. **Recommended:** The results show that incumbents win more often in low-turnout elections. **Reason:** ...
Extract every `(Original, Recommended)` pair in order from top to bottom.
---
Replace each matched original sentence in the source file with:
<<<<<<< original The results shows that incumbents win more often in low-turnout elections. ======= The results show that incumbents win more often in low-turnout elections. >>>>>>> claude-edits
Rules:
---
1. **Read the report file** using the `Read` tool. Extract all `(Original, Recommended)` pairs in document order.
2. **Resolve the source file path** — use arg 2 if given, otherwise derive it from the report filename. Confirm the file exists.
3. **Inform the user** — before making any changes, tell them:
4. **Read the source file** using the `Read` tool.
5. **Match and replace** — for each `(Original, Recommended)` pair, working top to bottom:
a. **Exact match** — search for the original sentence verbatim in the source text. If found, replace with the conflict block.
b. **Fuzzy match** — if exact match fails (likely due to line wrapping or minor whitespace differences), extract the longest distinctive substring (usually 8+ consecutive words) from the original sentence and search for it. Once located, expand the match to the full surrounding sentence before rep
📌 文档结构(2026-07-22 起): 本文件是中文默认入口 —— banner + badges + 信任面 + 9 阶段流水线速览 + 76 行合集总表。 每个合集的完整描述、按用途分组、精确数字、验证方法在 docs/CONTENT_ZH.md(扩展正文,总表行内的 → 直接跳转到对应锚点)。 English version: README-en.md · 中文扩展正文:docs/CONTENT_ZH.md · README-zh-CN.md 已弃用(重定向占位) 🌐 语言: English |
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack — pandas + numpy + scipy + statsmodels + linearmodels + pyfixest +…
Use when the user asks to run a full empirical / causal analysis in Python — by default in the style of an applied economics paper (AER / QJE / JPE / ReStud /…
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack — pandas + numpy + scipy + statsmodels + linearmodels + pyfixest +…
Classical end-to-end empirical analysis workflow in the traditional Stata ecosystem — native Stata + reghdfe + ivreg2 + csdid + did_imputation +…
Classical end-to-end empirical analysis workflow in the modern tidyverse + econometrics R ecosystem — dplyr + tidyr + haven + fixest + sandwich + lmtest +…
Systematic writing framework for philosophy and interdisciplinary academic papers from optimized outline to submission-ready manuscript. Use when users want…