Claude Code and Codex skills for empirical applied-microeconomics research: reproducibility auditing, LLM-assisted classification methods, event studies, data infrastructure (WRDS, Stata, pyfixest), and publication-grade tables, figures, and documents.
Each skill is a self-contained folder that teaches Claude Code or Codex a workflow, a methodology, or a hard-won fix. Install the whole set in either agent or copy individual skill folders — every skill stands alone, with no cross-skill dependencies.
- What this repository is for
- How the skills fit together
- Quick start
- The skills
- Installation
- Requirements
- Responsible use
- Platform notes
- License
Empirical research in applied micro runs through a long pipeline: raw data acquisition, classification and hand-coding (increasingly LLM-assisted), estimation, tables and figures, and finally a manuscript that co-authors and journals can consume. Errors compound quietly at every stage. The skills in this repository instrument that pipeline for Claude Code and Codex, with an emphasis on verification: checking that published numbers reproduce from the data, that machine-generated labels can be trusted, and that the plumbing between estimation output and camera-ready tables does not silently corrupt results.
The repository leads with its verification tooling. adversarial-empirical-review audits your own tables against your own data, and the LLM-methods cluster documents how to run classifier campaigns over research data without fooling yourself. Around that core sit the infrastructure skills (WRDS access, a pystata driver, pyfixest performance patterns, event-study methodology) and the output skills (estout-style LaTeX tables, Stata-look figures, verified citation placement, and document conversion).
The eighteen skills are a toolchain, ordered along the same pipeline an empirical paper travels.
Data acquisition. A project begins with the literature: lit-review-orchestrator takes a .tex or .docx describing the article, extracts a search plan, runs several deep-search engines concurrently, and returns a deduplicated, relevance-screened bibliography in which every entry has been confirmed to exist in a scholarly index. Once the reference base is set, wrds connects to Wharton Research Data Services through a fail-fast guard that cannot lock your account with retried logins, and documents query patterns for Compustat, CRSP, FactSet, and I/B/E/S. When source documents live behind bot-gated publisher sites, download-gated-pdfs retrieves the actual PDF binary through the Wayback Machine's raw-content endpoint.
Classification and labeling. Five skills cover the life cycle of an LLM classification campaign in order. Before any model is built, annotator-input-parity-check forces the question "what did the human labelers actually read?", because a model scored against labels produced from a document it never saw has a hard recall ceiling no prompt can fix. While the campaign runs, asyncopenai-concurrency-httpx-pool removes the silent throughput ceiling in AsyncOpenAI batch scorers. When a paused campaign is resumed days later, llm-campaign-drift-gate requires a cheap canary before production spend, so a provider-side model change cannot splice two scorers into one variable. When a validation gate fails, llm-gold-bound-failure-check diagnoses whether any prompt revision could pass it before money is spent. And when disputed cases go to a human, adjudication-sheets builds ruling sheets whose evidence is byte-identical to what the classifier saw, rather than a truncated preview.
Estimation. event-study-cars ships a runnable engine for cumulative abnormal returns validated to floating-point precision against the Stata reference implementation. stata drives a licensed Stata installation through pystata, exchanging data with pandas in memory. The two pyfixest-* skills cover high-throughput fixed-effects estimation in Python: one documents how the GPU demeaning backend changes coefficient-table shape, the other how to parallelize large regression grids that stay CPU-bound despite a GPU.
Tables and figures. latex-empirical-tables turns estimation output into estout-style LaTeX tables with a standard empirical-economics preamble, and repairs the failure modes (margin overflow, cramped notes, the "Misplaced \omit" error) that make such tables look broken. stata-style-figures gives matplotlib output the Stata stcolor look so figures across a paper share one consistent style.
Verification. adversarial-empirical-review spans the whole chain. It re-runs the project's pipeline in an isolated copy — in its strongest mode from the raw inputs, with every committed intermediate deleted first — and requires the regenerated tables to be identical to the ones in the manuscript. It is positioned last-before-submission but audits everything upstream.
Citation and delivery. cite-placement places citations from a user-supplied, verified bibliography into the manuscript. latex-to-word delivers the finished LaTeX paper to Word-only journals and co-authors without losing tables, equations, or cross-references, and markdown-to-pdf turns Markdown project documents into polished PDFs with every image verified as embedded.
Four scenarios, each showing what to say and what happens.
You have a returns panel and an events list and want publication-grade CARs. Say "compute CARs for these events with Patell and BMP tests". The event-study-cars skill activates and runs its shipped engine (scripts/eventstudy.py) on your returns, market, and events files, producing abnormal returns, per-event CARs, and a test-statistics table — with thin-trading adjustment and the no-zero-fill rule on by default, matching eventstudy2 for Stata.
You paused a DeepSeek scoring campaign five days ago and want to top up credits and finish. Say "resume the scoring run". The llm-campaign-drift-gate skill activates and, before any production spend, re-sends about a hundred cached prompts fresh and compares the scores against the cache. A pass costs roughly a dollar; a fail means the provider moved the alias, and the gate walks through dating the flip and separating serving drift from noise before you decide whether to re-score.
Your manuscript's tables are estout fragments and you want proof they reproduce from the data. Run /adversarial-empirical-review and supply the project config. The driver parses every table cell against a machine-readable artifact of computed values, re-executes the analysis in an isolated copy, and runs an adversarial drafter–reviewer–judge loop over anything that fails — converging only when every required check passes.
Your journal wants Word but the paper is LaTeX with regression tables and equations. Say "convert main.tex to Word". The latex-to-word skill activates and routes to its fidelity engine, which builds native Word tables from your booktabs fragments, converts math to native equations, embeds figures, and resolves \cref/\eqref cross-references from the compiled .aux.
| Skill | Role |
|---|---|
adversarial-empirical-review |
The flagship. Audits that every number in a paper's tables reproduces from the underlying data: a deterministic check battery, an independent cross-model reviewer, and a blind judge panel, with fail-closed crux checks and a from-raw reproduction mode. |
Re-runs an empirical paper's pipeline — raw data through to LaTeX tables — in an isolated copy and verifies that the tables the independent run regenerates are identical to the ones in the manuscript. The concern it addresses is concrete: after an AI has cleaned data and generated analysis code, an audit that merely reads the code judges plausibility, while the question that matters is whether the exact numbers printed in the tables are the numbers this code produces from this data. The audit closes that gap mechanically, and the whole loop is incumbent-preserving because the costly error in empirical work is corrupting a result that was already correct.
Activation. Manual-invoke only: run /adversarial-empirical-review in Claude Code, mention $adversarial-empirical-review in Codex, or name the skill explicitly. It deliberately does not auto-trigger on generic "review my results" or "check my tables" requests, because a run is token-intensive (multi-round, with re-execution and judge panels).
Key capabilities:
- Verifies three links mechanically: displayed cells match the computed-values artifact (
numbers.json), the committed artifact reproduces when the analysis re-executes in an isolated copy, and two re-runs agree with each other (determinism). - A from-raw mode (
snapshot_from_raw: true) deletes every committed intermediate from the copy and runs the full raw-inputs-to-tables pipeline twice, requiring byte identity between regenerated and committed table files — a hand-edited cell or a result living only in a stale cache cannot survive. - Generation-based certification: table fragments can be rendered deterministically from the computed artifact and re-verified byte-for-byte, closing the gaps any LaTeX parser leaves.
- An N-round adversarial loop repairs what the checks find: a Claude drafter proposes minimal diffs, the deterministic battery re-certifies each diff under a regression gate, a Codex reviewer from a separate model family files check-backed critiques, and residual disputes go to a blind judge panel that never learns which agent wrote what.
- Fail-closed by construction: a manuscript table with no computed-values spec is a failure, and the driver will not converge while any required check is unverified.
Scope. This is an empirical and code review — table numbers against what the pipeline computes. Research design, identification, interpretation, and prose are out of scope; the manuscript is read only to map paper Table numbers to fragment files.
Requirements. Python 3.12+; Claude Code as the current end-to-end orchestrator; the Codex CLI on PATH for the reviewer and judges. Codex can discover the skill, but the current driver still requires Claude Code to fulfil Claude-subagent dispatches.
Five skills that together document how to run LLM classifiers and rater panels over research data defensibly. They were extracted from production classification campaigns, and each addresses a failure mode that surfaces only at scale. They answer the referee's question — "how do you know the machine labels are right?" — constructively.
| Skill | Role |
|---|---|
annotator-input-parity-check |
Before building or auditing any model that replicates human labels, confirm the model sees the same evidence the annotators saw. |
llm-gold-bound-failure-check |
When a validation gate fails, diagnose whether the failure is bound by gold-label quality before spending on prompt revision. |
llm-campaign-drift-gate |
Gate the resumption of a multi-day scoring campaign on an unpinned model alias with a cheap canary, so a provider-side model change cannot split the sample. |
adjudication-sheets |
Build human adjudication and hand-labeling sheets whose evidence is untruncated and byte-identical to what the classifier saw. |
asyncopenai-concurrency-httpx-pool |
Raise real concurrency in AsyncOpenAI batch scorers past the default connection-pool ceiling that silently caps throughput near 100. |
A guardrail for any project that builds a classifier, LLM extractor, or scorer to replicate hand-coded labels. Before design, training, or audit, the skill has you write down the exact evidence the human annotators consulted — from the codebook or methodology section, not from folklore — and confirm the model receives that same input. Its central claim is that a large share of apparent "modeling" or "construct" failures in label-replication work are really an input mismatch: recall collapses on exactly the label subset whose evidence lives only in a document the model was never shown, and elaborate theory accumulates to explain why gold is "partially unpredictable".
Activation. Auto-triggers when a task involves designing or auditing a model against hand-coded labels, or diagnosing recall concentrated in a label subset. Invoke it by name ("run the annotator input parity check") to force the parity question before any other diagnosis.
Key capabilities:
- An inventory step: source documents the annotators saw, what they could not see, whether exogenous data entered the labels.
- A hard rule: any evidence the annotators had that the model lacks is a recall ceiling on the labels that evidence determines — restore parity rather than model around the gap.
- A quick falsification test for a claimed "unpredictable" subset: open the annotators' source for a handful of gold positives and check whether the label is visible there.
- Guidance on the honest fallback when parity is impossible (private knowledge, interviews): a construct split whose output is named as a different variable, never graded raw against the full gold.
Requirements. None — a methodology skill with nothing to install.
A near-zero-cost diagnostic to run before spending money "fixing" an LLM classifier that over-predicts a label. When precision is far below recall, the reflex is a prompt clarification that excludes the offending text; this skill catches the case where that fix cannot work. If the gold positives share the exact feature the revision would exclude, the edit removes true and false positives together, recall craters, and no prompt passes a gold-scored gate. The check itself costs nothing: read a sample of gold positives side by side with the false positives and ask whether they are the same kind of text.
Activation. Auto-triggers when a prompt edit is proposed to suppress over-prediction, when a validation gate has failed, or when a contested label shows low inter-rater agreement (Cohen's kappa below roughly 0.6 is the warning sign). Invoke it by name to force the "is this fixable by prompt?" question before a pilot is built.
Key capabilities:
- The step-0 comparison that separates gold-bound failures (stop; re-adjudicate the construct or re-interpret the measure) from genuinely fixable ones.
- A verified gated-pilot design for the fixable case: tune/holdout split stratified on the weak label, one surgical edit drafted from tune errors only, a gate pre-registered on the holdout before scoring, and a perturbation tolerance for untouched labels.
- A drift control built in: both prompts are scored fresh on the same model revision and the same day.
Requirements. None to install; assumes an existing scoring pipeline and gold set.
A safety gate for resuming or extending any multi-day LLM batch-scoring campaign that calls an unpinned model alias (deepseek-chat, a gpt-*-latest, any provider alias without a pinned version). Providers can silently repoint an alias, or ship a new serving revision of the same model, at any time; resuming across such a boundary splices two scorers into one variable, with the seam correlated with whatever orders the chunks. The gate costs on the order of a dollar and has caught a real serving-revision drift within a single alias before an eighty-dollar resume spend.
Activation. Auto-triggers on resume-and-finish situations — topping up credits, incremental scoring against an existing response cache, or a suspected score step-change at a resume seam. Invoke it by name before authorizing any resume spend.
Key capabilities:
- The canary: re-send roughly 100 cached prompts fresh and require about 97% all-field exact match with no systematic directional shift, via a standalone script that never writes through the production cache.
- Gold re-validation: re-score the validation panel and compare agreement metrics to the prior run within pre-set tolerances.
- Forensics for a failed canary: date the suspected flip against the provider's changelog, run a fresh-versus-fresh canary to separate serving drift from temperature-0 noise, and capture
response.modelon every call as the only direct evidence of a repoint. - A key subtlety: a new model can validate against gold as well as the old one while disagreeing with the old scores on many items — gold agreement alone never licenses splicing.
Requirements. None to install; assumes a pipeline with a response cache and re-issuable prompts.
A recipe for building the spreadsheets a human uses to rule on cases an LLM classifier or rater panel judged, without silently truncating the evidence. Sheets assembled from pipeline intermediates tend to carry "excerpt" columns made for machine diffing, so the decisive sentence often sits past the cutoff and the resulting rulings grade a different object than the one the classifier saw. The skill traces the true rating basis from the scoring code and delivers a ruling surface a person can actually read and fill in.
Activation. Auto-triggers when a task involves preparing an adjudication or hand-labeling sheet from pipeline data, or when a labeler reports "there is no information to label from" (frequently a CSV newline-mangling symptom rather than missing data).
Key capabilities:
- Reconstructs the exact text passed to the model and verifies it against stored excerpts or the request cache, rather than trusting intermediates.
- Delivers
.xlsxrather than.csvfor multi-line text: wrapped cells, frozen header, and a data-validation dropdown on the ruling column. - Handles Excel's 32,767-character cell cap with loud continuation markers and per-case companion text files, shipped together as one zip when the labeler works outside the project tree.
- Encodes the labeling epistemics: rule from the provided record only, silence is negative, outside research goes in a notes column so the labels cannot leak information the classifier never had.
- Documents the harvest gotchas, including the float round-trip ("1.0" versus "1") that falsely flags every row as a disagreement in a naive string compare.
Requirements. Python with pandas and openpyxl for the .xlsx output.
A fix for a silent throughput ceiling in asyncio batch scorers built on the OpenAI Python SDK, including OpenAI-compatible providers such as DeepSeek. Batch scorers gate concurrency with asyncio.Semaphore(N), but raising N above about 100 does nothing: the SDK's default httpx transport caps its connection pool at max_connections=100, so excess tasks queue inside httpx and never reach the provider. There is no error, only a flat throughput curve. The fix is two lines — construct the client with an httpx.AsyncClient whose httpx.Limits are sized to the semaphore — and both edits are required, because either alone caps the other.
Activation. Auto-triggers when a task involves diagnosing flat concurrency in an asyncio OpenAI-SDK scorer or planning a high-concurrency batch campaign.
Key capabilities:
- Root-cause explanation with the symptom checklist (server-side in-flight requests never exceed ~100 despite a larger semaphore).
- The exact client-construction pattern, verified at 2,000+ concurrent requests against a provider without hard rate limits.
- The caveats that keep it safe: keep the per-request retry envelope, expect a large but sub-linear speedup, and check provider rate limits before sizing the pool.
Requirements. The openai package and httpx (already an SDK dependency).
| Skill | Role |
|---|---|
event-study-cars |
Publication-grade cumulative abnormal returns: a runnable engine plus the full methodology, validated against eventstudy2 for Stata. |
wrds |
Fail-fast connection guard and query patterns for WRDS (Compustat, CRSP, FactSet, I/B/E/S, and other libraries). |
stata |
Drives a licensed Stata through pystata: one live session, in-memory pandas exchange, no do-file shelling. |
pyfixest-cupy64-absorbed-regressors |
Documents how pyfixest's GPU demeaning backend changes coefficient-table shape for fully-absorbed regressors. |
pyfixest-grid-sharding |
Diagnoses and fixes slow pyfixest regression grids by sharding the model list across OS processes. |
A complete methodology for computing cumulative abnormal returns with proper event-study test statistics — in essence a Python replication of eventstudy2, the Stata package by Thomas Kaspereit, so the same methodology can be run and audited outside Stata in any market, asset class, or event type. Event studies look deceptively simple, yet naive implementations get the answer confidently wrong in directions that flatter significance: zero-filled missing returns, uncorrected thin trading, survivorship from IPOs and delistings inside the window, boundary contamination, and tests that ignore event-induced variance. The skill encodes the corrections for all of these. Credit for the methodology belongs to Kaspereit and the econometrics literature his package operationalizes; cite eventstudy2 and the original papers, not this skill.
Activation. Auto-triggers when a task mentions abnormal returns, CARs, CAAR, AAR, event windows, market-model regressions, eventstudy2, thin trading, or event-study test statistics.
Key capabilities:
- A shipped, runnable engine (
scripts/eventstudy.py) — CSV/Parquet in, AR/CAR/test-statistic tables out, every methodological choice a CLI flag, plus a zero-input--selftest. - Fidelity verified against Stata
eventstudy2(v3.2b) on a CRSP sample across all four benchmark models: abnormal returns match to ~1e-8, CARs to ~6e-8, and CAAR plus the seven implemented test statistics (cross-sectional t, Patell, Patell-KP, Boehmer/BMP, Kolari/BMP-KP, generalized sign, Wilcoxon) to ~1e-7. - The full 8-step methodology in
references/: dateline construction, event-date mapping with amax_shiftexclusion guard, windows in trading time with an estimation gap, the Maynes–Rumsey trade-to-trade thin-trading transform, OLS with the Theil prediction-error correction, no-zero-fill abnormal returns, guarded CAR accumulation, and thirteen documented test statistics. - Support for RAW, comparison-mean, market-adjusted, factor-model (market model, FF3, FF5, Carhart), and BHAR benchmarks, plus a standalone post-hoc output-integrity checker (
scripts/validate_cars.py).
Requirements. Python with numpy, pandas, and scipy (pyarrow or polars additionally for Parquet). No Stata required.
Example. "Compute CARs for these events with Patell and BMP tests, estimation window −250 to −30."
Connects to and queries WRDS (Wharton Research Data Services) from Python. Its central component is a fail-fast connection guard: a naive wrds.Connection() is unsafe unattended, because a missing or stale .pgpass file makes the client fall back to an interactive password prompt and retry — and WRDS locks an account after a few consecutive failed logins. The guard validates credentials offline before any network call, suppresses the interactive prompt, makes at most one attempt, and raises a loud, actionable error instead of retrying. Around the guard, the skill documents query patterns, table maps, and identifier-linking recipes for Compustat, CRSP, FactSet, I/B/E/S, and the SEC Analytics Suite.
Activation. Auto-triggers whenever a task involves WRDS — downloading or exploring a WRDS-hosted database, joining WRDS datasets, or checking variable definitions and coverage. It does not trigger on general SQL questions.
Key capabilities:
- The guard (
scripts/wrds_connect.py): offline.pgpasspreflight (--checkcosts zero login attempts), no interactive fallback, one connection attempt with a timeout, and a typedWRDSAuthErrorwhose contract is "stop and refresh credentials, never retry". - Credential resolution entirely through arguments and environment variables (
WRDS_USERNAME/PGUSER,PGPASSFILE,WRDS_PASSWORD) layered on the standard libpq.pgpassmechanism — no password ever lives in a script or versioned file. - Query and linking recipes for the major libraries, returning pandas DataFrames from
raw_sql()/get_table().
Requirements. A WRDS subscription and account (the skill provides no credentials, and library access depends on your institution's subscriptions); Python with the wrds package; a configured .pgpass file or environment password.
Example. "Pull Compustat fundamentals for these gvkeys, 2010–2024, and link them to CRSP permnos."
Drives Stata through pystata, Stata's official Python integration, rather than shelling out to .do files or launching the Stata executable as a subprocess. A single live Stata session lives inside the Python process: commands and whole do-files run through stata.run(...), data crosses between Stata and pandas in memory without intermediate .dta files, stored r()/e()/s() results come back as plain Python dicts, and a failing command raises a real Python exception instead of leaving a log to parse.
Activation. Auto-triggers on statistical work where Stata is the natural tool — running Stata commands or .do files, working with .dta files, or estimating econometric models (IV, difference-in-differences, RDD, panel methods, clustering, margins) — even when the request never says "pystata".
Key capabilities:
- One-time configuration per Python process (
stata_setup.config(...), orpystata.config.init(...)for splash-free output), then everything through the live session. - An optional helper (
scripts/stata_runner.py) wrapping run/do-file/data-exchange/stored-results calls for scripts that make many Stata calls. - Documented edition constraints: developed against StataNow 19.5 BE, whose 2,048-variable ceiling and single computational core are called out; SE/MP users pass their own edition string.
- In-memory exchange with pandas and named Stata frames in both directions.
Requirements. A licensed, locally installed Stata (the skill does not bundle or license Stata); pystata and stata_setup, which ship with Stata; pandas and numpy.
Example. "Run this DiD in Stata with firm and year fixed effects, cluster by firm, and give me the coefficient table."
A troubleshooting note for a subtle behavior change in pyfixest: adding demeaner_backend="cupy64" to an existing pf.feols() or pf.fepois() call is not a pure performance switch. Regressors with zero within-fixed-effect identifying variation, which the default numba backend silently drops, are retained by the cupy64 path — including its CPU fallback when cupy is absent — and surface in the coefficient table as non-identified rows with huge coefficients and huge standard errors. The identified coefficients and their clustered standard errors still agree with the default backend to reporting precision, so this is a report-shape issue rather than a correctness problem for the estimates of interest, but it breaks byte-level diffs and any code that parses reports by line position.
Activation. Auto-activating knowledge skill: loads when a backend change alters a coefficient table, when absorbed-regressor rows appear unexpectedly, or when outputs are being diffed across backends. Nothing to run; the guidance shapes the diagnosis.
Key capabilities:
- Treat a backend change as potentially output-changing: verify coefficients of interest at ~4-decimal precision instead of expecting byte equality.
- Never read a retained absorbed-regressor row as an estimate; anchor report parsing on variable names, never line positions.
- A one-model verification recipe that distinguishes this behavior from a data change.
Requirements. pyfixest; cupy optional (the behavior appears even without a GPU).
A diagnosis-and-fix note for slow pyfixest regression grids — scripts that run dozens of feols/fepois models in a sequential loop and stay slow even with the GPU backend enabled and the GPU sitting idle. The root cause is that per-model, single-threaded CPU work (model-matrix construction, interactions, singleton detection, cluster-robust variance computation) dominates wall time, while GPU demeaning is a brief burst inside that pipeline; in a controlled experiment, GPU utilization stayed near 1% regardless of shard count. The correct objective is CPU-core saturation through process-level sharding of the model list.
Activation. Auto-activating knowledge skill: loads when a task matches a slow sequential model grid (roughly a minute per model on a 100k+ row panel, one busy core, idle GPU) or when scoping a job that will run many regressions.
Key capabilities:
- A diagnose-first rule: compare process CPU-minutes to wall-clock and check GPU utilization before blaming the backend.
- Shard the grid, not the data: split the model list across N OS processes with per-shard part-files and a merge step, sizing N by cores and by RAM (each shard holds the panel) before anything else.
- Amortize fixed costs inside a shard — build the panel and interactions once per variant, and use pyfixest's multiple-estimation syntax (
sw()/csw(), multiple depvars) so one model matrix serves several reported cells. - Operational rules: specify the sharding structure up front for any grid beyond about ten models, checkpoint per model so restarts are cheap, and cap GPU-sharing shards on memory-limited cards.
Requirements. pyfixest; cupy optional (the sharding advice applies with or without a GPU).
| Skill | Role |
|---|---|
latex-empirical-tables |
Build, fix, and diagnose estout-style LaTeX regression tables with a standard empirical-economics preamble. |
stata-style-figures |
Styles matplotlib figures to the Stata (stcolor) look for consistent publication figures. |
cite-placement |
Places citations from a user-supplied, verified bibliography into a manuscript; never invents a reference. |
Sets up, formats, fixes, and diagnoses LaTeX regression tables in empirical economics and finance papers. Such papers export estimation output from pyfixest, Stata, or R as estout/esttab "body fragments" — \multicolumn headers, coefficients with significance stars, parenthesized standard errors, no rules — pulled into the manuscript through wrapper macros. Done well this reads like a top-journal table; done naively it overflows the margin, jams the note legend into a boxed cell, and throws the classic Misplaced \omit error. The skill covers the whole arc, and explains the reasoning behind each choice so the pattern can be adapted rather than copied blindly.
Activation. Auto-triggers when creating a results document or preamble for regression output (any mention of estout, esttab, \estauto, \estwide, or table fragments), when repairing broken estout tables, or when diagnosing Misplaced \omit. It does not trigger for general LaTeX documents such as slides or letters.
Key capabilities:
- Build from scratch: a drop-in empirical-economics preamble defining
\estauto,\estwide,\estautoLT,\specialcell, and\sym, plus a standard results-document layout with auto-incrementing table fragments. - Fix existing tables: margin overflow, cramped or boxed notes, misaligned columns, and star formatting, with a real before/after conversion example included.
- The
\omitdiagnosis: the wrapper macros expand the TeX primitive\@@inputrather than\input, whose file-existence checks inject tokens into the first cell of a\multicolumnand break it. - Assembly: merging several self-compiling block documents into one master, and fixing skipped table numbers when
\captionofmeetslongtable.
Requirements. A LaTeX distribution.
Example. "This estout table overflows the right margin and the notes are in a box — make it look like a top-journal table."
A Stata-look (stcolor) house style for matplotlib publication figures: one rcParams block, a small named palette, and per-axes styling rules that reproduce the default scheme of Stata 18/19 — a white background, a recessive light-gray grid drawn below the data, no top or right spines, unframed legends, and TrueType-embedded fonts so PDFs survive journal typesetting. The aim is that every figure in a paper shares one clean look without hand-tuning matplotlib defaults per script.
Activation. Auto-activating knowledge skill: loads whenever a task generates or restyles matplotlib charts for papers, reports, or slides, even when the request never mentions Stata; also on explicit requests to match the stcolor scheme.
Key capabilities:
- The paste-in
rcParamsblock: Arial preferred (Helvetica and DejaVu Sans fallbacks), TrueType embedding, suggested base font size and a text-column figure width so fonts render at their stated size. - The named palette — protagonist blue, accent red, de-emphasized gray, a light band blue, and a gridline gray — with conventions for baseline-versus-corrected comparisons and context shading.
- The grid rule: gridlines on the value axis only, never both axes.
- A semantics rule for restyles: color and font change; meaningful encodings (marker fill, line style, shading) and the underlying data stay untouched.
Requirements. matplotlib. Arial gives exact visual parity but the fallbacks render fine without it.
Places pre-screened literature citations into a LaTeX or Word manuscript, or restyles the citations already in one, through a single launcher with three modes: inline placement (\cite{}/\citet{}/\citep{} with a compiled references.bib, for author-date journals), footnote placement (formatted \footnote{} or native Word footnotes with legal/notes styles — Bluebook, OSCOLA, Chicago, APA, McGill — and Id./supra short forms), and restyle (convert existing footnote citations between styles). A placement run maps the manuscript at paragraph level, ingests the screened spreadsheet into BibTeX, plans placements with parallel sub-agents, inserts into a fresh copy, and compiles.
Citation integrity. The skill never invents a citation. Placement draws exclusively from the .xlsx of screened references the author supplies; an optional verification pass checks each entry against OpenAlex and CrossRef (with Google Scholar as an additional cross-check when configured) and flags anything it cannot confirm; restyling reformats without re-sourcing. The bibliography is the author's — the skill's role is placement and formatting.
Activation. Manual-invoke only: run /cite-placement in Claude Code, mention $cite-placement in Codex, or name the skill explicitly. It does not auto-trigger on general citation or footnote requests.
Key capabilities:
- Three pipelines behind one Tkinter launcher, each with its own phased workflow and a human-in-the-loop approval gate for placements.
- Reference verification against authoritative databases before anything is placed.
- Style packs and short-form post-processing for the footnote styles, plus utilities to strip placed citations or regenerate cross-references after manual edits.
Requirements. Python 3.10+ with openpyxl; a LaTeX distribution (pdflatex with bibtex/biber for inline mode, xelatex for footnote and restyle modes); python-docx, lxml, and pydantic additionally for .docx manuscripts; an optional SEARCHAPI_API_KEY for the Google Scholar cross-check.
| Skill | Role |
|---|---|
latex-to-word |
High-fidelity conversion between LaTeX and Word in both directions, plus assembly of .tex from mixed sources. |
markdown-to-pdf |
Converts Markdown to a polished PDF with every image embedded and verified. |
download-gated-pdfs |
Retrieves the actual PDF binary from bot-gated sites via the Wayback Machine's raw-content endpoint. |
lit-review-orchestrator |
Document-driven literature search: extracts a search plan from a .tex/.docx, runs several deep-search engines, and returns a deduplicated, relevance-screened bibliography with every entry verified against a scholarly index. |
Converts academic manuscripts between LaTeX and Microsoft Word in both directions, and assembles a single .tex from mixed sources, through three routed workflows. Workflow B, the default for "deliver my LaTeX paper as Word", is a fidelity engine that builds native Word tables from booktabs/regression fragments, converts math to native OMML equations, embeds figures, produces real footnotes, and resolves \cref/\Cref/\eqref from the compiled .aux — all things plain pandoc drops or mangles. Workflow A is a footnote-preserving round-trip (.docx → .tex → .docx) for iterating with Word-based co-authors when the exchange is prose and speed matters. Workflow C is a set of knowledge patterns for pipelines that emit .tex from PDF, .docx, and LLM-generated content.
Activation. Auto-triggers on conversion requests in either direction — "tex to docx", "convert to Word", "convert this manuscript to LaTeX" — and on fidelity-sensitive delivery tasks where tables, equations, or cross-references must survive.
Key capabilities:
- One-command delivery:
python scripts/convert.py main.tex --out main.docx, reading cross-reference targets from the.aux. - TikZ/PGFPlots/algorithm environments rendered to images when a LaTeX toolchain is present.
- A GUI and version-aware helpers for the round-trip workflow, with automatic footnote-count sanity checks; output formatting is controlled by a style-templated reference document rather than pandoc flags.
- An optional visual QA step that renders the output to PDF (Word COM automation preferred, LibreOffice fallback) for a side-by-side check.
Requirements. pandoc (3.x for the fidelity engine; ≥ 2.11 for the round-trip); a LaTeX distribution with xelatex and latexmk; Python with python-docx and lxml; optionally PyMuPDF and Pillow for rasterization, and Word or LibreOffice for the QA render.
Example. "Deliver main.tex as a Word file for the journal — the regression tables and equations have to survive."
Converts a GitHub-flavored Markdown file into a polished PDF with every image preserved and scaled to the page. Pandoc's default LaTeX route breaks on real-world Markdown — box-drawing characters crash pdflatex, wide tables overflow, remote images need manual downloading — so this skill instead renders the Markdown to HTML the way a browser would and prints that, giving output that matches what the author reviewed on GitHub.
Activation. Auto-triggers on requests to save, convert, or export a .md file as PDF — READMEs, design documents, reports, notes — especially when the document carries images, tables, code blocks, or a linked table of contents. Not for .tex → PDF or .docx work, which have their own toolchains.
Key capabilities:
- A three-stage pipeline in one script: pandoc (GFM → standalone HTML with all resources embedded, remote images inlined as data URIs) → headless Chrome print-to-PDF with a GitHub-like print stylesheet → a pypdf check that the embedded image count covers every image reference, with page and dimensions reported.
- A stylesheet that constrains images to the printable width, keeps tall diagrams on one page, and avoids splitting an image across a page break.
- Flags for custom stylesheets, an explicit browser binary, a larger virtual-time budget for slow remote images, and keeping the intermediate HTML.
Requirements. pandoc on PATH; Chrome, Chromium, or Edge; pypdf optionally for the verification step.
Downloads the actual PDF binary from bot-gated sites via the Wayback Machine's raw-content (id_) URL form. Many think-tank and publisher sites serve an HTML bot-challenge page instead of the PDF to non-browser clients, and a browser User-Agent header does not help — the downloaded "PDF" turns out to be HTML that fails in any parser. Requesting https://web.archive.org/web/<year>id_/<original-url> returns the archived original binary untouched, and a pypdf open with a plausible page count confirms the download.
Activation. Auto-activating knowledge skill: loads when a .pdf URL yields HTML, or when a PDF parser rejects a freshly downloaded file with a header error such as invalid pdf header: b'<!DOC'.
Key capabilities:
- The retrieval recipe, including how the year placeholder redirects to the nearest capture and what the
id_suffix requests. - A verification step that a bot page fails immediately.
- Sensible fallbacks — try direct download first for ungated hosts, mirrors or parsed text when Wayback has no capture — and a staleness caveat for frequently revised documents.
Requirements. curl (or an equivalent HTTP client), pypdf for verification, and network access to web.archive.org.
Turns a document that describes an article — a full manuscript, an abstract, or a proposal — into a deduplicated, relevance-ranked bibliography in which every entry has been confirmed to exist in a scholarly index. One command runs the pipeline: it reads the .tex or .docx, derives a research question with channel-specific search briefs and a query list, runs several deep-search engines concurrently, then merges and deduplicates the candidates. The failure mode it targets is specific to literature search built on language models, where a deep-research agent can return a reference that reads perfectly — plausible authors, title, year, even a syntactically valid DOI — for a paper that was never written. A verification pass therefore cross-checks every candidate against OpenAlex, Crossref, and Semantic Scholar and drops any that none can confirm, recording the dropped entries in a separate audit file; the DOI check is guarded so a fabricated title carrying a real-but-unrelated DOI still fails. What survives is screened for relevance against the research question and delivered as a ranked spreadsheet alongside RIS and BibTeX.
Activation. Manual-invoke only: run /lit-review-orchestrator in Claude Code, mention $lit-review-orchestrator in Codex, or name the skill explicitly. It does not auto-trigger on general "review the literature" requests.
Terms of service. The Undermind stage automates a logged-in browser session against Undermind, a paid deep-search service with no public API, under your own paid account. Automated access may sit outside Undermind's terms of service, so this stage is used at your own risk under your own account. The pipeline does not depend on it: Undermind is opt-out (--skip undermind, or --quick to run SearchAPI Google Scholar alone), it degrades gracefully to the other channels when its credentials are absent, and two keyless channels — agent web search and a free OpenAlex/Crossref/Semantic Scholar index search — let the pipeline run with no search account at all.
Key capabilities:
- Document-driven planning: Stage 0 extracts the research question, per-channel search briefs, and the Google Scholar query list from the manuscript text, so the search reflects the article rather than a hand-typed keyword string.
- Several deep-search engines fused into one list: Undermind, Gemini Deep Research, and SearchAPI.io Google Scholar run concurrently, with opt-in Google Scholar Labs, SSRN, NBER, HeinOnline, and Semantic Scholar citation chaining for extra coverage.
- Verification by default: the anti-hallucination pass confirms each candidate against three scholarly indexes and drops what none can confirm, distinguishing an index outage (kept and tagged) from a genuine absence (dropped) and keeping the full set when more than thirty percent of papers cannot be checked.
- Agent-layer reasoning with no Anthropic API key: plan extraction, dedup judgments, relevance screening, keyless web search, and Undermind's clarifying answers are handed to the agent through an emit/ingest seam, with an autonomous Sonnet/DeepSeek path (
orchestrator.py) retained for unattended runs.
Requirements. Python 3.10+ and the packages in the skill's requirements.txt (python-docx, playwright, requests, aiohttp, openpyxl, among others), plus Playwright's Chromium build (playwright install chromium) for the Undermind and Scholar Labs browser drivers. The Undermind stage needs an Undermind account, and the Google Scholar stage needs a SEARCHAPI_API_KEY; GEMINI_API_KEY unlocks Gemini Deep Research. None of these is strictly required — the keyless web-search and free-index channels find and verify real papers with no account, while verification and enrichment draw on the free OpenAlex/Crossref/Semantic Scholar pools. SCHOLAR_EMAIL/SCHOLAR_PASSWORD add opt-in Scholar Labs, and ANTHROPIC_API_KEY is used only by the unattended fallback.
/plugin marketplace add kennethkhoocy/applied-micro-skills
/plugin install applied-micro@applied-micro-skills
Clone the repository, then copy its skill folders into Codex's user skill directory:
git clone https://github.com/kennethkhoocy/applied-micro-skills
mkdir -p ~/.agents/skills
cp -R applied-micro-skills/plugins/applied-micro/skills/. ~/.agents/skills/On Windows PowerShell, replace the last two commands with:
New-Item -ItemType Directory -Force "$HOME\.agents\skills"
Copy-Item -Recurse -Force "applied-micro-skills\plugins\applied-micro\skills\*" "$HOME\.agents\skills\"Codex also supports symlinked skill folders. If a per-skill example uses
~/.claude/skills/, substitute ~/.agents/skills/ when running it in Codex.
git clone https://github.com/kennethkhoocy/applied-micro-skills
# copy the skill folders you want from plugins/applied-micro/skills/
# into ~/.claude/skills/ — every skill is self-contained; no sibling
# folders required.
Most skills trigger automatically when a task matches their description; the two exceptions, adversarial-empirical-review and cite-placement, are manual-invoke by design. Use /skill-name in Claude Code or mention $skill-name in Codex. Restart the agent (or reload Claude Code plugins) if manually installed skills are not discovered immediately.
The minimal install is Claude Code or Codex alone. Six of the eighteen skills are knowledge skills with nothing else to install — annotator-input-parity-check, llm-gold-bound-failure-check, llm-campaign-drift-gate, pyfixest-cupy64-absorbed-regressors, pyfixest-grid-sharding, and download-gated-pdfs (the last needs only curl and pypdf for its verification step) — and they deliver their full value as soon as the skills are installed. The script-bearing skills need a working Python plus the libraries listed below, which most empirical researchers already have. The full stack adds the licensed and external pieces: a WRDS subscription for wrds, a licensed Stata installation for stata, pandoc and a LaTeX distribution for the document skills, a Chromium-family browser for markdown-to-pdf, and — only for Claude Code runs of adversarial-empirical-review's cross-model review — the Codex CLI. Each skill degrades independently: a missing external dependency disables that skill alone, never the set.
| Skill | Python packages | External tools and services |
|---|---|---|
adversarial-empirical-review |
Python 3.12+ (standard-library-first; polars optional) | Codex CLI on PATH (reviewer and judges) |
annotator-input-parity-check |
— | — |
llm-gold-bound-failure-check |
— | — |
llm-campaign-drift-gate |
— | — |
adjudication-sheets |
pandas, openpyxl | — |
asyncopenai-concurrency-httpx-pool |
openai, httpx | An LLM provider account for the pipeline it fixes |
event-study-cars |
numpy, pandas, scipy (pyarrow/polars for Parquet) | — |
wrds |
wrds | WRDS subscription; .pgpass credentials |
stata |
pystata, stata_setup (ship with Stata), pandas, numpy | Licensed Stata installation |
pyfixest-cupy64-absorbed-regressors |
pyfixest (cupy optional) | GPU optional |
pyfixest-grid-sharding |
pyfixest (cupy optional) | GPU optional |
latex-empirical-tables |
— | LaTeX distribution |
stata-style-figures |
matplotlib | Arial for exact parity (fallbacks included) |
cite-placement |
openpyxl; python-docx, lxml, pydantic for .docx |
LaTeX distribution; optional SEARCHAPI_API_KEY |
latex-to-word |
python-docx, lxml; PyMuPDF, Pillow optional | pandoc; LaTeX distribution (xelatex, latexmk); Word or LibreOffice optional for QA |
markdown-to-pdf |
pypdf (optional, for verification) | pandoc; Chrome/Chromium/Edge |
download-gated-pdfs |
pypdf | curl; access to web.archive.org |
lit-review-orchestrator |
Python 3.10+; python-docx, playwright, requests, aiohttp, openpyxl (full list in requirements.txt) |
Chromium via playwright install chromium; Undermind account for the Undermind stage; SEARCHAPI_API_KEY for Google Scholar; optional GEMINI_API_KEY, Scholar login, and ANTHROPIC_API_KEY (unattended fallback). Runs keyless via web and free-index search. |
Each skill's own README carries the authoritative details, version notes, and platform caveats.
These are research-integrity and infrastructure tools, and most of them exist precisely to make AI-assisted empirical work more verifiable. Two skills warrant explicit notes. adversarial-empirical-review audits your own manuscript against your own data; it is not a peer-review tool and should not be used to referee others' work. cite-placement places citations only from a bibliography you supply and verify; it will not generate references, and every placed reference is checked against OpenAlex/CrossRef. Users remain responsible for complying with their journals' AI-disclosure policies for any AI-assisted step of their workflow.
The skills were developed on Windows, and a few document Windows-specific behavior (.cmd shims, path conventions). Most code is cross-platform Python; the exceptions are flagged in the individual skill READMEs. stata requires a local Stata license and installation on any platform.
A companion repository, legal-scholarship-skills, carries the legal-scholarship toolchain (footnote citation placement, law-review docx workflows, PDF extraction). word-docx and pdf live there; they are linked rather than duplicated to keep this repository's identity tight.
MIT. Skill-specific attribution files, where present inside a skill folder, travel with that skill.