Awesome-Agent-Skills-for-Empirical-Research review-r
Run the R code review protocol on R scripts. Checks code quality, reproducibility, domain correctness, and professional standards. Produces a report without editing files. Make sure to use this skill whenever the user wants their existing R code evaluated or audited — not when they want new analysis written. Triggers include: "review my R script", "check my R code", "is my code replication-ready", "audit this R file", "does this code follow conventions", "will this reproduce", "check my analysis script", "code review", "review-r", or when the user has an existing .R file and wants quality feedback rather than new code.
git clone https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research
T=$(mktemp -d) && git clone --depth=1 https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/15-Felpix-Studios-social-science-research/skills/review-r" ~/.claude/skills/brycewang-stanford-awesome-agent-skills-for-empirical-research-review-r-aa3d9a && rm -rf "$T"
skills/15-Felpix-Studios-social-science-research/skills/review-r/SKILL.mdReview R Scripts
Run the comprehensive R code review protocol.
Steps
-
Identify scripts to review:
- If
is a specific$ARGUMENTS
filename: review that file only.R - If
is a name pattern (e.g.,$ARGUMENTS
): glob for matchingmodel_name
files. If multiple matches, use AskUserQuestion:.R- header: "Scripts"
- question: "Multiple R scripts match that pattern. Which should I review?"
- multiSelect: true
- options: list up to 4 matched files (label: filename, description: path and last modified). User can select multiple.
- If
is$ARGUMENTS
: review all R scripts inall
andscripts/R/Figures/*/ - If
is empty, glob for all$ARGUMENTS
files. If multiple found, use AskUserQuestion as above..R
- If
-
For each script, launch the
agent with instructions to:r-reviewer- Follow the full protocol in the agent instructions
- Read
for current standardsrules/r-code-conventions.md - Save report to
quality_reports/[script_name]_r_review.md
-
After all reviews complete, present a summary:
- Total issues found per script
- Breakdown by severity (Critical / High / Medium / Low)
- Top 3 most critical issues
-
IMPORTANT: Do NOT edit any R source files. Only produce reports. Fixes are applied after user review.