Skip to main content
skill CX Codex

r-empirical-finance — Claude Code skill: what it does, how to install

Sets the R conventions your agent follows for empirical finance work: fixest regressions, DiD and IV models, Parquet loading through arrow, plots in ggplot2.

no license ★ 165 updated 2026-08-21

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill r-empirical-finance -a claude-code
Open on GitHub

What r-empirical-finance does

This skill pins down the house style for R work in empirical finance. Regressions go through feols and feglm from fixest, large Parquet files through arrow, plots through ggplot2 on a minimal theme, and result tables through etable() or modelsummary.

Panel data gets its own section. Keys via setkey, a duplicate check right after loading, and explicit answers on whether the panel is balanced and how merges join. On the estimation side there are templates for two-way fixed effects with clustered standard errors, event studies with i(rel_year, ref = -1), IV/2SLS, and staggered DiD via sunab(). Unit-level clustering is the stated default; two-way clustering is fine on short panels as long as you call the choice out.

A gotcha list covers the usual breakage: lm() on panel data, a missing vcov argument, read.csv() on large files, hardcoded paths, summary stats without na.rm. You need fixest and arrow installed for those templates to run. The skill also fixes a project layout, keeps data/raw read-only, numbers scripts in run order, and points to references/fixest-patterns.md for deeper fixest detail.

What it helps with

  • Run a two-way fixed effects regression with clustered standard errors
  • Plot an event study around rel_year
  • Load a large Parquet panel and catch duplicate keys
  • Export a regression table to LaTeX for a paper
  • Refactor a script that still calls lm() on panel data

Example prompts for the agent

  • Estimate feols(roa ~ treatment | firm_id + year, data = dt, vcov = ~firm_id) and print it with etable
  • Build an event study on rel_year and draw the iplot
  • Clean this panel: set keys on firm_id and year, then check for duplicates

How to install r-empirical-finance

1Skills CLI (Vercel)

npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill r-empirical-finance -a claude-code

2Manually: put the files in place

~/.claude/skills/r-empirical-finance/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/r-empirical-finance/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about r-empirical-finance

How do I install r-empirical-finance in Claude Code?

Run npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill r-empirical-finance -a claude-code. The skill lands at ~/.claude/skills/r-empirical-finance/SKILL.md.

What does r-empirical-finance do?

It sets R coding conventions for empirical finance: fixest for panel regressions, arrow for Parquet, ggplot2 for plots, plus duplicate checks and clustered standard errors.

Which packages should be installed?

fixest, arrow, data.table and ggplot2. The feols and sunab() templates will not run without fixest.

Similar skills

All skills for Science and research →

From the same set17

The whole set →
pinboard This skill stores project notes, reminders, and ideas in PINBOARD.md. It can also list entries and move completed tasks to a Done section. CX Codex +1 ★ 165repo stars wtf Rewrites the previous answer in plain language when you did not follow it. Fires on “wtf”, “huh?” or “say that simpler”. CX Codex +1 ★ 165repo stars code-audit code-audit audits empirical R and Python scripts through a two-stage protocol before running computations on research data. CX Codex +1 ★ 165repo stars beamer-slides-teaching beamer-slides-teaching creates teaching decks in LaTeX Beamer using a defined set of layout conventions. Use it for lecture slides, discussion prompts, case studies, or multiple-choice questions. CX Codex +1 ★ 165repo stars paper-editor paper-editor audits academic finance manuscripts across seven editorial stages and verifies revisions for journal submissions or R&R reports. CX Codex +1 ★ 165repo stars edmans-audit edmans-audit is a Claude Code skill that checks a finance paper's LaTeX draft against Alex Edmans' rejection framework before journal submission. CX Codex +1 ★ 165repo stars beamer-check beamer-check compiles a Beamer deck, reviews every rendered slide, then repairs the overflows, broken figures and blank frames it turns up. CX Codex +1 ★ 165repo stars script-registry script-registry maintains an R Markdown script catalog across academic projects, tracks data dependencies, and prevents duplicate analysis files. CX Codex +1 ★ 165repo stars

Project sponsors

Companies that keep this analytics open