review-r

Review R scripts and Quarto chapters for reproducibility and correctness.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/naj2r/claude-econ-paper-template --skill review-r-naj2r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-r
Source: https://github.com/naj2r/claude-econ-paper-template/tree/main/.claude/skills/review-r
Command: npx skills add https://github.com/naj2r/claude-econ-paper-template --skill review-r-naj2r

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The review-r Skill automates a structured, checklist-driven code review for R scripts and Quarto (.qmd) chapters to surface reproducibility, correctness, and style problems that can cause silent errors or non-reproducible results.

Core Features & Use Cases

  • Reproducibility checks: Verifies presence of set.seed when randomness is used, deterministic data loading patterns, and centralized library calls.
  • Correctness validation: Flags mismatches in regression specifications, missing-value handling issues, and risky joins that may duplicate rows.
  • Conventions & Quarto checks: Enforces project conventions (naming, preferred functions) and Quarto-specific requirements like unique chunk labels and proper captions.
  • Use Case: Run on an analysis chapter before merging to ensure code matches the paper's TWFE specifications, uses consistent naming, and will execute reproducibly on another machine.

Quick Start

Ask the review-r skill to audit path/to/chapter.qmd for reproducibility, correctness, and convention violations.

Frequently Asked Questions about review-r

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my R script for reproducibility issues before merging?

Checking Quarto chunk labels involves auditing .qmd files to ensure every code chunk has a unique label and proper captions, preventing rendering errors and maintaining document structure.

What is the best way to audit TWFE regression specifications in R code?

Reviewing Quarto chunk labels involves auditing .qmd files to ensure every code chunk has a unique label and proper captions, preventing rendering conflicts and maintaining document conventions.

Can I review .qmd files for style and convention violations without changing the code?

You can review .qmd files for style and convention violations through a read-only audit that classifies issues by severity and produces a report, ensuring your source files remain unmodified.

Does automated R code review detect risky joins and missing value handling?

Automated R code review does detect risky joins that may duplicate rows and flags missing-value handling issues, surfacing correctness problems that can cause silent errors in empirical research.

When do I need to run a reproducibility check on my empirical research R scripts?

You need to run a reproducibility check on empirical research R scripts during development and before merging, ensuring the code will execute reproducibly on another machine and match paper specifications.