kennethkhoocy
UserClaude Code and Codex skills for empirical applied-micro research: reproducibility auditing, LLM-pipeline methods, event studies, WRDS, Stata, publication-grade tables
Categories
Indexed Skills (42)
adjudication-sheets
Build human adjudication / hand-labeling sheets from LLM-pipeline data without evidence truncation. Use when: (1) preparing a CSV/Excel sheet for a human to rule on cases an LLM classifier or rater panel judged, (2) a labeler reports "there is no information to label from" or cells look empty in Excel, (3) excerpt columns cluster at one exact length (e.g. all 1,500 chars — a hard truncation cap). Covers: full rating-basis recovery, Excel 32,767-char cell cap, multi-line CSV mangling, ruling dropdowns, companion text files.
annotator-input-parity-check
Before designing, training, or auditing ANY model that replicates human-annotated labels, audit the annotation protocol's INPUT — the exact document/evidence the human labelers consulted — and give the model that same input. Use when: (1) designing a classifier/LLM extractor whose target is a hand-coded label set, (2) a label-replication model shows low recall concentrated in a label subset and the diagnosis on offer is "the label's information is not in the features", (3) reviewers propose construct splits (e.g. "designation vs record-evident"), adjudication sittings, or per-domain stop rules to explain residual disagreement with gold, (4) validating an extraction pipeline against labels transcribed from a source document. Symptom of the underlying failure: elaborate theory accumulates to explain why gold is "partially unpredictable" when the model was simply never shown the document the annotators read.
asyncopenai-concurrency-httpx-pool
Raise real concurrency in asyncio LLM batch scorers built on the OpenAI SDK (AsyncOpenAI, including OpenAI-compatible providers like DeepSeek). Use when: (1) raising an asyncio.Semaphore above ~100 produces no throughput gain, (2) a batch pipeline saturates near 100 in-flight requests despite a larger semaphore, (3) planning a high-concurrency campaign against a provider with no hard rate limit (DeepSeek v4-flash tolerates 2000+ in flight). Root cause: AsyncOpenAI's default httpx pool caps max_connections at 100, silently bottlenecking any larger semaphore — you must pass a custom http_client with httpx.Limits sized to the semaphore.
llm-campaign-drift-gate
Gate resumption of any multi-day LLM batch-scoring campaign that calls an unpinned model alias (deepseek-chat, gpt-*-latest, gemini-*-preview, any provider alias without a pinned version). Use when: (1) resuming a paused or credit-exhausted scoring run days after its last chunk, (2) topping up credits to finish a campaign, (3) extending a cached scoring pipeline with new items. Prevents silently splicing two model versions or serving revisions into one measure. Verified 2026-07-16: for $0.30 caught a serving-revision drift WITHIN DeepSeek v4-flash (same alias, same family, litigation scores systematically shifted across a 2-day gap) before an $83 resume spend.
llm-gold-bound-failure-check
Diagnose whether an LLM classifier's validation-gate failure is GOLD-BOUND before spending on prompt revision or model changes. Use when: (1) a scoring pipeline over-predicts a label (precision low, recall high) and a prompt clarification is proposed to tighten it, (2) a pilot/validation gate fails and the fix candidates are prompt edits, (3) inter-rater agreement on the weak label was already low (κ < ~0.6). Core check: if gold POSITIVES share the exact feature the revision would exclude, no prompt can pass a gold-scored gate — recall craters while precision barely moves. Also documents the verified surgical-pilot design (single-section diff, tune/holdout split, pre-registered gate, perturbation check on untouched sections).
pyfixest-cupy64-absorbed-regressors
pyfixest demeaner_backend="cupy64" (including its CPU fallback when cupy is absent) is NOT numerically identical to the default numba backend and does NOT drop fully-absorbed/collinear regressors the same way. Use when: (1) adding demeaner_backend="cupy64" to existing pf.feols/fepois calls changes the printed coefficient table, (2) a regression report suddenly gains rows with absurd estimates (e.g. coef 435.8, SE 7106) for controls absorbed by the fixed effects, (3) diffing outputs before/after a backend change, or (4) anything parses a pyfixest text report by line position.
pyfixest-grid-sharding
Diagnose and fix slow pyfixest regression GRIDS (many feols/fepois calls run sequentially) that stay slow despite demeaner_backend="cupy64" and an idle GPU. Use when: (1) a script looping dozens of pf.feols models on a 100k+ row panel takes ~1 min/model, (2) process inspection shows ~1-1.5 cores busy and nvidia-smi shows ~0% GPU utilization with a resident cupy context, (3) planning any worker prompt that will run a model grid (robustness variants x FE structures x domains). Root cause: per-model CPU-side single-threaded fixed costs (formulaic model-matrix build, interaction construction, singleton detection, cluster vcov) dominate wall time; GPU demeaning is a small slice. Fix: shard the model grid across OS processes and/or use pyfixest multiple-estimation syntax; mandate this IN THE WORKER PROMPT.
latex-empirical-tables
Set up, format, fix, and clean up LaTeX regression and estimation tables in empirical economics or finance papers. Use when (a) creating a .tex, results.tex, main.tex, or preamble to display regression or estimation output from Python (pyfixest), Stata, or R — including any mention of estout, esttab, estauto, estwide, or table fragments; (b) formatting or repairing estout-style regression tables that overflow the right margin, have cramped or boxed notes, misaligned columns, or poor significance stars, or when asked to match a reference paper, make the note fill the table width, or choose among \estwide, \estauto, and landscape layouts; (c) diagnosing "Misplaced \omit" errors from \input-ed table fragments inside tabular environments. Covers \@@input, \estwide, \estauto, \estautoLT, \specialcell, \sym, minipage notes below tabulars, and the convert-and-verify workflow. Do NOT trigger for general LaTeX documents like beamer presentations, problem sets, letters, or CVs.
adversarial-empirical-review
N-round adversarial review pipeline for empirical research output — the chain from data to LaTeX tables to a manuscript that cites them. A Claude drafter proposes minimal diffs, a deterministic mechanical battery gates every diff from a clean state with a regression gate, a Codex reviewer files check-backed critiques, and a blind judge panel decides residual disputes. Manual-invoke ONLY: trigger when the user explicitly runs /adversarial-empirical-review or names 'adversarial-empirical-review' / 'adversarial empirical review'. Do NOT auto-trigger on generic 'review my results', 'check my tables', or manuscript-editing requests. For prose-style refinement use style-emulation instead; this skill AUDITS WHETHER THE TABLES ARE CORRECT — that each number in the tables is what the analysis code computes, reproduces from the data, and is internally consistent. It is an empirical + code review: the manuscript is read only to resolve table numbering, and prose is not examined.
event-study-cars
Complete methodology for computing publication-quality cumulative abnormal returns with proper event-study test statistics, matching the robustness of Kaspereit's eventstudy2 for Stata. Covers dateline construction, event-date mapping, estimation and event windows, thin-trading adjustment, OLS with Theil prediction error correction, abnormal return computation, CAR/CAAR/AAR accumulation, boundary contamination guards, and common tests such as Patell, BMP, Kolari-Pynnonen, generalized sign, Wilcoxon, and GRANK-T. Use when the user mentions abnormal returns, event windows, market-model regressions, CARs, CAAR, AAR, eventstudy2, thin trading, trade-to-trade returns, or event-study test statistics.
stata-style-figures
Style every matplotlib figure like the Stata 18/19 default (stcolor) scheme — Arial embedded as TrueType, white background, recessive light-gray grid below the data, no top/right spines, unframed legends, and the validated blue/red/gray palette. Use whenever a task generates or restyles charts, plots, or figures for papers, reports, or slides, even if the user doesn't mention Stata — this is the house style for all publication figures. Also use when asked to make figures "look like Stata", match the stcolor scheme, or restyle existing matplotlib output.
stata
Use this skill whenever the user asks to run Stata commands, estimate econometric models, work with .dta files, run a .do file, generate Stata output, or do any statistical analysis where Stata is involved. Also trigger when the user mentions Stata variables, Stata syntax, or econometric tasks where Stata is the natural tool, including regressions, IV estimation, diff-in-diff, RDD, panel data, clustering, summary statistics, and margins. Stata runs through pystata on StataNow 19.5 BE; configure once with stata_setup, then drive everything with stata.run() and exchange data directly with pandas. Prefer this skill over subprocess calls or .do-file shelling for Stata work, including cases where the user does not say pystata.
wrds
Connect to and query WRDS (Wharton Research Data Services) from any research project. Use this skill whenever the user needs to download, query, or explore data from WRDS — including Compustat, CRSP, FactSet, I/B/E/S, or any other WRDS-hosted database. Also trigger when the user mentions WRDS tables, WRDS libraries, or wants to look up variable definitions or coverage in WRDS datasets. Do NOT trigger for general SQL or database questions unrelated to WRDS.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables/formulas from PDFs (including scanned and photographed documents), OCR, combining or merging multiple PDFs, splitting, rotating, watermarking, creating new PDFs, encrypting/decrypting, and extracting images. Routes between pypdf (fast born-digital text), pdfplumber (tables), opendataloader-pdf (born-digital complex layout with optional Docling hybrid), and LightOnOCR-2-1B (vision-LM OCR for scanned/photographed docs; dolphin v2 fallback). If the user mentions a .pdf file or asks to produce one, use this skill.
word-docx
Unified skill for Microsoft Word .docx workflows: extracting comments or tracked changes, summarizing reviewer feedback, generating response-to-comments documents, building Word memos or reports, applying tracked edits, auditing OOXML internals, validating and repairing documents, accepting revisions, adding or resolving comments, converting legacy .doc files, unpacking or repacking .docx files, simplifying redline markup, rendering .docx to images, and building Word documents with tables of contents, multi-column layouts, or page-numbered headers and footers. Use whenever a task involves reading, reviewing, building, editing, or analyzing .docx files. Prefer this skill over ad-hoc python-docx or docx2python usage. Route PDFs, spreadsheets, presentations, Google Docs, and LaTeX-to-Word conversion pipelines to their dedicated skills.
writing-article-plans
Produce a detailed .md plan for an academic article that a separate drafter agent then writes section-by-section in LaTeX. This is the academic-writing analog of the superpowers brainstorming → writing-plans workflow: it first interviews the user one question at a time (thesis, contribution, article type, structure, scope), gets approval on a skeleton, then emits a task-decomposed plan that hands off to a fresh section-drafter subagent and downstream to lit-review-orchestrator, cite-placement, and, when it is installed, style-emulation. Use this whenever the user wants to plan, outline, structure, or scaffold a paper before drafting, or asks for 'a plan for a drafter', 'an article plan', 'a paper outline to draft from', 'plan this paper', or 'write up a plan for this article' — even if they don't say the skill name. Also use it in REVISION MODE when the user wants an existing draft restructured or substantively revised (reorganize sections, change or sharpen the argument, conform a manuscript to a genre struc
download-gated-pdfs
Download the actual PDF binary from bot-gated sites (taxpolicycenter.org, urban.org, SSRN-hosted mirrors, think-tank/publisher sites) via the Wayback Machine id_ URL form. Use when: (1) curl/WebFetch of a .pdf URL returns HTML instead of a PDF even with a browser User-Agent, (2) pypdf fails with "invalid pdf header: b'<!DOC'" or "EOF marker not found" on a freshly downloaded file, (3) Firecrawl can parse the PDF to markdown but you need the original file on disk (e.g., filing a reference copy).
download-gated-pdfs
Download the actual PDF binary from bot-gated sites (taxpolicycenter.org, urban.org, SSRN-hosted mirrors, think-tank/publisher sites) via the Wayback Machine id_ URL form. Use when: (1) curl/WebFetch of a .pdf URL returns HTML instead of a PDF even with a browser User-Agent, (2) pypdf fails with "invalid pdf header: b'<!DOC'" or "EOF marker not found" on a freshly downloaded file, (3) Firecrawl can parse the PDF to markdown but you need the original file on disk (e.g., filing a reference copy).
cite-placement
Place pre-screened literature citations into a LaTeX or Word manuscript, or restyle the citations already in one. Three modes: (1) inline placement — inline \cite{}/\citet{}/\citep{} with a compiled references.bib, for author-date journals (APA, MLA, Harvard, Chicago author-date, IEEE, Vancouver); (2) footnote placement — full formatted \footnote{} or OOXML footnotes for legal and notes styles (Bluebook, OSCOLA, Chicago, APA, McGill) with Id./supra short forms; (3) restyle — convert existing footnote citations from one style to another. This skill is manual-invoke ONLY — trigger ONLY when the user explicitly runs /cite-placement or explicitly names the "cite-placement" skill. Do NOT auto-trigger on general citation, footnote, or reference requests.
latex-to-word
Convert between LaTeX and Microsoft Word for academic manuscripts in either direction, and assemble .tex from mixed sources. Fires on: converting .tex/LaTeX to Word/.docx ("tex to docx", "latex to word", "tex2docx", "convert to word", "pandoc convert"); converting .docx manuscripts to LaTeX for editing and back ("convert to latex", "manuscript", "footnotes", "reference doc", the docx-to-tex-to-docx round-trip / academic paper editing pipeline); high-fidelity delivery where plain pandoc loses tables, mangles cross-references, or fails on custom macros — booktabs/regression tables, OMML equations, cleveref, \estauto, \@@input, \thanks, TikZ, native Word tables, longtable, siunitx; and building .tex from mixed PDF/docx/LLM-generated sources. Replaces and reroutes the retired skills manuscript-editing-template-latex, latex-to-docx-fidelity, tex2docx, and latex-from-mixed-sources.
markdown-to-pdf
Convert Markdown (.md) files to a polished PDF with ALL images preserved and scaled to the page. Use whenever the user asks to "save this markdown as a PDF", "convert README.md to pdf", "export the .md as a pdf", "turn these notes/docs into a PDF", or wants a PDF deliverable of any GitHub-flavored Markdown document (README, design doc, report, notes) — especially when it contains images or diagrams (remote or local), tables, code blocks, or a linked table of contents. Pipeline: pandoc (GFM → standalone HTML with embedded resources) → headless Chrome print-to-pdf with a GitHub-like print stylesheet → pypdf verification that every referenced image is embedded. Do NOT use for .tex → PDF (use a LaTeX toolchain) or for .docx work (use word-docx / tex2docx).
cite-placement
Place pre-screened literature citations into a LaTeX or Word manuscript, or restyle the citations already in one. Three modes: (1) inline placement — inline \cite{}/\citet{}/\citep{} with a compiled references.bib, for author-date journals (APA, MLA, Harvard, Chicago author-date, IEEE, Vancouver); (2) footnote placement — full formatted \footnote{} or OOXML footnotes for legal and notes styles (Bluebook, OSCOLA, Chicago, APA, McGill) with Id./supra short forms; (3) restyle — convert existing footnote citations from one style to another. This skill is manual-invoke ONLY — trigger ONLY when the user explicitly runs /cite-placement or explicitly names the "cite-placement" skill. Do NOT auto-trigger on general citation, footnote, or reference requests.
latex-to-word
Convert between LaTeX and Microsoft Word for academic manuscripts in either direction, and assemble .tex from mixed sources. Fires on: converting .tex/LaTeX to Word/.docx ("tex to docx", "latex to word", "tex2docx", "convert to word", "pandoc convert"); converting .docx manuscripts to LaTeX for editing and back ("convert to latex", "manuscript", "footnotes", "reference doc", the docx-to-tex-to-docx round-trip / academic paper editing pipeline); high-fidelity delivery where plain pandoc loses tables, mangles cross-references, or fails on custom macros — booktabs/regression tables, OMML equations, cleveref, \estauto, \@@input, \thanks, TikZ, native Word tables, longtable, siunitx; and building .tex from mixed PDF/docx/LLM-generated sources. Replaces and reroutes the retired skills manuscript-editing-template-latex, latex-to-docx-fidelity, tex2docx, and latex-from-mixed-sources.
markdown-to-pdf
Convert Markdown (.md) files to a polished PDF with ALL images preserved and scaled to the page. Use whenever the user asks to "save this markdown as a PDF", "convert README.md to pdf", "export the .md as a pdf", "turn these notes/docs into a PDF", or wants a PDF deliverable of any GitHub-flavored Markdown document (README, design doc, report, notes) — especially when it contains images or diagrams (remote or local), tables, code blocks, or a linked table of contents. Pipeline: pandoc (GFM → standalone HTML with embedded resources) → headless Chrome print-to-pdf with a GitHub-like print stylesheet → pypdf verification that every referenced image is embedded. Do NOT use for .tex → PDF (use a LaTeX toolchain) or for .docx work (use word-docx / tex2docx).
lit-review-orchestrator
Master controller for the lit-review pipeline, driven by a document. Give it a .tex or .docx file describing an article — a full manuscript, an abstract, or a proposal — and it extracts a search plan, runs Undermind (an automated Playwright driver in Classic mode) and Google Scholar (SearchAPI.io), then merges, deduplicates, and screens the results. Only use this skill when explicitly requested — e.g., the user says "run lit-review-orchestrator", "lit-review-orchestrator", or "/lit-review-orchestrator". Do NOT auto-trigger on general literature review requests.
deepresearch-search
Stage 2b of the lit review pipeline: run a Google Gemini Deep Research deep search (Interactions API) from the brief produced by Stage 0, then parse the cited report into the pipeline schema. API-driven (GEMINI_API_KEY), no browser. An alternative deep-search pathway alongside Undermind (Stage 1) and Scholar Labs (Stage 2). Only use this skill when explicitly requested. Do NOT auto-trigger on general literature review or paper search requests.
freesearch-search
Run the lit-review orchestrator free index search channel against keyless OpenAlex, Crossref, and Semantic Scholar keyword-search endpoints. Use when the user invokes the free search channel, asks for keyless scholarly index search, or needs Stage 4e fallback discovery without SearchAPI, Gemini, or Undermind credentials.
lit-dedup
Stage 5 of the lit review pipeline: merge and deduplicate papers from all prior stages (Undermind, Scholar Labs, supplementary search) into a single master list with provenance tracking. Two-pass dedup: exact DOI match then LLM fuzzy match via DeepSeek/Claude. Only use this skill when explicitly requested — e.g., the user says "run lit-dedup", "lit-dedup", or "/lit-dedup". Do NOT auto-trigger on general literature review requests.
lit-screen
Stage 6 of the lit review pipeline: screen paper abstracts against the research prompt. The orchestrator's agent-driven flow runs this re-ranker on Opus subagents; a standalone run uses the in-script Claude Sonnet API fallback. Rates relevance 1-10, tags each paper as theoretical/empirical, identifies methodology, and classifies relationship to user's work. Only use this skill when explicitly requested -- e.g., the user says "run lit-screen", "lit-screen", or "/lit-screen". Do NOT auto-trigger on general literature review requests.
scholarlabs-search
Stage 2 of the lit review pipeline: run a Google Scholar Labs deep search from the detailed research question produced by Stage 0, scrape each result's citation (Cite to BibTeX), then parse + enrich into the pipeline schema. The driver signs in to Google with a persistent profile and runs headless via Playwright. Only use this skill when explicitly requested. Do NOT auto-trigger on general literature review or paper search requests.
supplementary-search
Stage 4 of the lit review pipeline: search academic sources — general Google Scholar (--scholar), SSRN, NBER, HeinOnline, citation chaining via Semantic Scholar, and forthcoming paper lists from top finance journals. Long research prompts are automatically condensed into 3-5 short queries via Claude Sonnet before searching. Only use this skill when explicitly requested — e.g., the user says "run supplementary search", "supplementary-search", or "/supplementary-search". Do NOT auto-trigger on general literature review or paper search requests.
undermind-search
Stage 1 of the lit review pipeline: run an Undermind.ai "Classic" deep search from the natural-language brief produced by Stage 0, then parse + enrich the exported references into the pipeline schema. The driver logs in automatically with stored credentials and runs headless via Playwright. Only use this skill when explicitly requested. Do NOT auto-trigger on general literature review or paper search requests.
websearch-search
Run the lit-review orchestrator keyless agent-driven web search channel that uses WebSearch and WebFetch outputs normalized through websearch_ingest.py. Use when the user invokes the web search channel, asks for Stage 4d open-web literature discovery, or needs a Claude Code web-search fallback without SearchAPI, Gemini, or Undermind credentials.
lit-review-orchestrator
Master controller for the lit-review pipeline, driven by a document. Give it a .tex or .docx file describing an article — a full manuscript, an abstract, or a proposal — and it extracts a search plan, runs Undermind (an automated Playwright driver in Classic mode) and Google Scholar (SearchAPI.io), then merges, deduplicates, and screens the results. Only use this skill when explicitly requested — e.g., the user says "run lit-review-orchestrator", "lit-review-orchestrator", or "/lit-review-orchestrator". Do NOT auto-trigger on general literature review requests.
deepresearch-search
Stage 2b of the lit review pipeline: run a Google Gemini Deep Research deep search (Interactions API) from the brief produced by Stage 0, then parse the cited report into the pipeline schema. API-driven (GEMINI_API_KEY), no browser. An alternative deep-search pathway alongside Undermind (Stage 1) and Scholar Labs (Stage 2). Only use this skill when explicitly requested. Do NOT auto-trigger on general literature review or paper search requests.
freesearch-search
Run the lit-review orchestrator free index search channel against keyless OpenAlex, Crossref, and Semantic Scholar keyword-search endpoints. Use when the user invokes the free search channel, asks for keyless scholarly index search, or needs Stage 4e fallback discovery without SearchAPI, Gemini, or Undermind credentials.
lit-dedup
Stage 5 of the lit review pipeline: merge and deduplicate papers from all prior stages (Undermind, Scholar Labs, supplementary search) into a single master list with provenance tracking. Two-pass dedup: exact DOI match then LLM fuzzy match via DeepSeek/Claude. Only use this skill when explicitly requested — e.g., the user says "run lit-dedup", "lit-dedup", or "/lit-dedup". Do NOT auto-trigger on general literature review requests.
lit-screen
Stage 6 of the lit review pipeline: screen paper abstracts against the research prompt. The orchestrator's agent-driven flow runs this re-ranker on Opus subagents; a standalone run uses the in-script Claude Sonnet API fallback. Rates relevance 1-10, tags each paper as theoretical/empirical, identifies methodology, and classifies relationship to user's work. Only use this skill when explicitly requested -- e.g., the user says "run lit-screen", "lit-screen", or "/lit-screen". Do NOT auto-trigger on general literature review requests.
scholarlabs-search
Stage 2 of the lit review pipeline: run a Google Scholar Labs deep search from the detailed research question produced by Stage 0, scrape each result's citation (Cite to BibTeX), then parse + enrich into the pipeline schema. The driver signs in to Google with a persistent profile and runs headless via Playwright. Only use this skill when explicitly requested. Do NOT auto-trigger on general literature review or paper search requests.
supplementary-search
Stage 4 of the lit review pipeline: search academic sources — general Google Scholar (--scholar), SSRN, NBER, HeinOnline, citation chaining via Semantic Scholar, and forthcoming paper lists from top finance journals. Long research prompts are automatically condensed into 3-5 short queries via Claude Sonnet before searching. Only use this skill when explicitly requested — e.g., the user says "run supplementary search", "supplementary-search", or "/supplementary-search". Do NOT auto-trigger on general literature review or paper search requests.
undermind-search
Stage 1 of the lit review pipeline: run an Undermind.ai "Classic" deep search from the natural-language brief produced by Stage 0, then parse + enrich the exported references into the pipeline schema. The driver logs in automatically with stored credentials and runs headless via Playwright. Only use this skill when explicitly requested. Do NOT auto-trigger on general literature review or paper search requests.
websearch-search
Run the lit-review orchestrator keyless agent-driven web search channel that uses WebSearch and WebFetch outputs normalized through websearch_ingest.py. Use when the user invokes the web search channel, asks for Stage 4d open-web literature discovery, or needs a Claude Code web-search fallback without SearchAPI, Gemini, or Undermind credentials.
Bio shown is the top-scored skill's repo description as a fallback — real GitHub bios land in a future update.