code-audit — Claude Code skill: what it does, how to install
code-audit audits empirical R and Python scripts through a two-stage protocol before running computations on research data.
no license ★ 165 updated 2026-08-21
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill code-audit -a claude-codeWhat code-audit does
This workflow inspects data processing and econometric pipelines. The initial phase stays strictly read-only, preventing premature execution against restricted databases like CRSP or WRDS. It flags missing panel checks, inflated joins, bad controls, and invalid standard error clustering.
Execution happens only during the second stage when explicitly permitted. The assistant runs calculations against synthetic records or tiny sample extracts first, verifying coefficient stability and log convergence before any complete run.
Findings arrive structured by severity into critical bugs, warnings, and style notes, followed by code-level recommendations tied directly to line numbers.
What it helps with
- detect observation inflation during panel data merges
- verify standard error clustering and fixed effects choices
- audit difference-in-differences setups for parallel trends
- ensure script reproducibility with relative paths and fixed seeds
Example prompts for the agent
- Audit empirical analysis script run_models.R before estimation
- Review data cleaning logic in panel_build.py
- Check whether instrumented variables satisfy first-stage requirements
How to install code-audit
1Skills CLI (Vercel)
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill code-audit -a claude-code2Manually: put the files in place
~/.claude/skills/code-audit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/code-audit/
1Skills CLI (Vercel)
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill code-audit -a codex2Manually: put the files in place
.agents/skills/code-audit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill code-audit -a cursor2Manually: put the files in place
.cursor/skills/code-audit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aspi6246/Claude-Code-Skills-for-Academics code-audit2Manually: put the files in place
.github/skills/code-audit/SKILL.md1Skills CLI (Vercel)
npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill code-audit -a gemini-cli2Platform CLI
gemini skills install https://github.com/aspi6246/Claude-Code-Skills-for-Academics --path code-auditManually: put the files in place
.devin/skills/code-audit/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 code-audit
How to install code-audit in Claude Code?
Run npx skills add aspi6246/Claude-Code-Skills-for-Academics --skill code-audit -a claude-code or place the definition at ~/.claude/skills/code-audit/SKILL.md.
What does code-audit do?
It guides Claude Code through a structured review of scientific code, separating passive static analysis from safe test runs on sample data.
Does the skill run research scripts immediately?
No, phase one never executes code. Claude Code asks for explicit approval before launching any test executions.