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
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill r-empirical-finance -a claude-codeWhat 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 withetable - Build an event study on
rel_yearand draw theiplot - Clean this panel: set keys on
firm_idandyear, 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-code2Manually: put the files in place
~/.claude/skills/r-empirical-finance/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/r-empirical-finance/
1Skills CLI (Vercel)
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill r-empirical-finance -a codex2Manually: put the files in place
.agents/skills/r-empirical-finance/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill r-empirical-finance -a cursor2Manually: put the files in place
.cursor/skills/r-empirical-finance/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aspi6246/Claude-Code-Skills-for-Academics r-empirical-finance2Manually: put the files in place
.github/skills/r-empirical-finance/SKILL.md1Skills CLI (Vercel)
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill r-empirical-finance -a gemini-cli2Platform CLI
gemini skills install https://github.com/aspi6246/Claude-Code-Skills-for-Academics --path r-empirical-financeManually: put the files in place
.devin/skills/r-empirical-finance/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.