aspi6246/code-audit
> Two-phase code audit workflow for empirical research scripts. Use this skill when the user asks to review, audit, check, validate, or verify R or Python research code — especially code that processes licensed or sensitive data (WRDS, CRSP, WellDatabase, PLIDA). Also use when the user says "check my code", "review this script", "does this look right", or "audit my analysis."
npx skills add https://github.com/aspi6246/Claude-Code-Skills-for-Academics --skill code-audit
This is a two-phase audit. Phase 1 is strictly read-only — do not
execute any code. Phase 2 only proceeds with explicit user approval.
This separation matters because research code often touches licensed
datasets (WRDS, CRSP, WellDatabase, PLIDA) that have access restrictions,
and because running code on large datasets without review risks producing
results from buggy pipelines that then get embedded in manuscripts.
Read the code without executing anything. Produce a structured report
covering the sections below.
Callaway & Sant'Anna, etc.) or is vanilla TWFE flagged as problematic?
renv.lock, sessionInfo(), or equivalent)?sample date ranges, variable names repeated as strings)
Do NOT proceed to this phase unless the user explicitly says something like
"go ahead and run it", "you can execute", or "test it."
When approved:
dataset as a first step
large or exactly zero when they shouldn't be)
Present findings as a structured report with severity levels:
Examples: wrong clustering, bad merge inflating observations, post-treatment
controls, missing fixed effects.
conclusions. Examples: no duplicate check, missing parallel trends test,
hardcoded sample restrictions.
code quality or reproducibility. Examples: absolute file paths, missing
comments, inefficient code patterns.
End every audit with a Recommendations section listing concrete,
actionable fixes ordered by severity. Each recommendation should reference
the specific line(s) of code involved.
Take aspi6246/code-audit from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.