Automated summary
Reviews code quality in R, Stata, Python, or Julia scripts using a Debugger agent in standalone mode, focusing on categories 4-12 (structure, reproducibility, figure quality, etc.).
Strengths
- Systematic and standardized code quality assessment.
- Supports multiple languages (R, Stata, Python, Julia).
- Clear separation between critique and correction (no automatic edits).
- Generates detailed reports with severity levels.
Limitations
- Does not cover strategic alignment (categories 1-3) in standalone mode.
- Requires a configured and accessible Debugger agent.
- May be time-consuming for large numbers of scripts.
When you need a thorough, consistent code review across multiple scripts without immediate human oversight.
When you expect a review that includes business or strategic relevance, or if you want automatic fixes applied.
Security analysis
SafeThe skill uses only safe allowed tools (Read, Grep, Glob, Write, Task) and prohibits editing source files. It does not execute code or network calls, and the dispatching of a debugger agent is limited to code review tasks with no destructive actions.
No concerns found
How this analysis is madeExamples
Run the review-r skill on scripts/analysis.RRun the review-r skill on all scripts in scripts/R/ and scripts/stata/Run the review-r skill on scripts/python/name: review-r description: Code review dispatching the Debugger agent in standalone mode (categories 4-12 only). Checks code quality, reproducibility, figure standards, and professional polish. Use for R, Stata, Python, or Julia scripts. argument-hint: "[filename or 'all']" allowed-tools: ["Read", "Grep", "Glob", "Write", "Task"]
Review Code Scripts
Run the code review protocol by dispatching the Debugger agent in standalone mode.
In standalone mode, the Debugger runs categories 4-12 only (code quality). Categories 1-3 (strategic alignment) require a strategy memo and are only run within the pipeline or via /econometrics-check.
Workflow
Step 1: Identify Scripts
- If
$ARGUMENTSis a specific file: review that file only - If
$ARGUMENTSisall: review all scripts inscripts/R/,scripts/stata/,scripts/python/,scripts/julia/ - If
$ARGUMENTSis a directory: review all scripts in that directory
Step 2: Launch Debugger Agent
For each script (or batch), delegate to the debugger agent via Task tool:
Prompt: Review [file] in standalone mode (categories 4-12 only).
Categories:
4. Script structure (header, sections, flow)
5. Console hygiene (no print/cat pollution, clean output)
6. Reproducibility (set.seed, relative paths, no hardcoded values)
7. Function design (DRY, appropriate abstraction level)
8. Figure quality (labels, dimensions, theme, transparency)
9. RDS pattern (saveRDS for all computed objects)
10. Comments (explain why, not what)
11. Error handling (graceful failures, informative messages)
12. Polish (consistent style, no dead code, clean namespace)
Save report to quality_reports/[script_name]_code_review.md
Step 3: Present Summary
After all reviews complete:
- Total issues found per script
- Breakdown by severity (Critical / Major / Minor)
- Top 3 most critical issues across all scripts
- Code review score
Step 4: IMPORTANT
Do NOT edit any source files. Only produce reports. Fixes are applied after user review, either manually or by re-dispatching the Coder agent.
Principles
- Standalone mode = code quality only. Strategic alignment (does the code match the design?) requires a strategy memo.
- Language-flexible. Same categories apply to R, Stata, Python, Julia — adapt checks to language idioms.
- Proportional severity. A missing
set.seed()is Major. A missing comment is Minor. - Worker-critic separation. The Debugger never fixes code — it only critiques.
Design-to-Dev Specification Writer
Development
Translate your mockups into technical specifications for developers.
Exports & Barrel Files
Development
Defines conventions for module exports and barrel files: named exports only, no flat wildcards (except `export * as Name` for compound components), sectioned comments, types alongside values, and one export line per source file. Helps maintain consistent, tree-shakeable exports in portal apps using Turbopack or similar bundlers.
Write an Agent Skill
Development
Step-by-step guide to create a structured Agent Skill for coding agents, including directory structure, SKILL.md format, and design principles.