No slash command · from lab-skills
R renv package management for data science projects. Use when working with renv (renv.lock, renv::restore, renv::snapshot) in R analysis projects. Do NOT load for projects that do not use R or renv.
Ships in lab-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use rig to install and switch between multiple R versions.
rig list # View installed versions
rig add release # Install latest stable R
rig add 4.4 # Install specific version
rig default 4.4 # Set system default
rig default # Show current default
Pin the R version in .positron/settings.json (not committed to git):
macOS (Apple Silicon):
{
"r.rpath.mac": "/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/bin/R"
}
macOS (Intel):
{
"r.rpath.mac": "/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/bin/R"
}
Alternative: Use Positron's Command Palette (Cmd+Shift+P) → "R: Select R Binary".
Most R projects use renv for reproducible package management.
renv::status() # Check sync status
renv::restore() # Install packages from lockfile
renv::snapshot() # Record current packages to lockfile
renv::install("pkg") # Install a package
renv::update() # Update all packages
.Rprofile when R starts in the project directoryrenv::status() to see detailsrenv::restore()renv::snapshot() then commit renv.lock to gitCommit: renv.lock, renv/activate.R, .Rprofile
Ignore: renv/library/, renv/staging/, renv/local/
Bioconductor packages have coordinated releases tied to R versions.
install.packages("BiocManager")
BiocManager::install("DESeq2")
BiocManager::install(c("limma", "edgeR", "tximport"))
renv::snapshot() # Always snapshot after installing
With renv, you can also use:
renv::install("bioc::DESeq2")
| R Version | Bioconductor Version |
|---|---|
| R 4.3.x | Bioconductor 3.18 |
| R 4.4.x | Bioconductor 3.19–3.20 |
| R 4.5.x | Bioconductor 3.21 |
Check your current version:
BiocManager::version()
If renv reports Bioconductor version mismatches, verify that BiocManager::version() matches what's expected for your R version.
→ Run renv::status() to see details. Run renv::restore() to sync, or renv::snapshot() if you've installed new packages.
→ Try renv::install("package", rebuild = TRUE)
→ renv::deactivate(), remove renv/ and .Rprofile, then renv::init()
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub musserlab/lab-claude-skills --plugin lab-skills34 skills in this plugin
/audit-projectPeriodic project health check - cross-check docs, prune conventions, find drift. Use when project documentation feels stale, before milestones, or when CLAUDE.md is getting long. Do NOT load for auditing skills (use /audit-skills) or data analysis scripts (use /audit-script).
/audit-scriptSystematic audit of data analysis scripts for bugs, analytical reasoning, data handling, style, and reproducibility. Includes domain verification phase that researches tools, file formats, and methods to catch domain-specific errors (not just code bugs). Use when auditing a script, reviewing code for correctness, checking for bugs, preparing a script for publication, or when the user says "audit this script", "review this code", "check this for bugs", or "is this script correct". Three modes: thorough (collaborative section-by-section), fast (Claude-driven with discussion), and report-only. Do NOT load for quick one-off questions about a single line or function.
/audit-skillsAudit Claude Code skills for bloat, trigger accuracy, structural quality, redundancy, and pruning opportunities. Use when skills feel bloated, before publishing to lab repo, after building several new skills, when reviewing a single newly-created skill before publishing, or when the user says "audit my skills", "review skills", "check skill quality", "audit this skill", or invokes /audit-skills. Covers both user-level (~/.claude/skills/) and project-level (.claude/skills/) skills, and supports both full-library scans and single-skill reviews. Do NOT load for auditing data analysis scripts (use /audit-script) or project documentation (use /audit-project).
/cleanup-scriptsSession-scoped script cleanup for data science projects. Checks scripts/scratch/ for working files that need consolidation into .qmd scripts, flags numbered non-.qmd files in scripts/, and verifies script-output directory correspondence. Use when finishing a coding session, when scripts/scratch/ has accumulated files, or when the user says "clean up scripts", "consolidate scratch", or "check script conventions". Lightweight and fast — reads files, no expensive computation.
/conda-envConda environment activation for Python commands. Use when running Python scripts, pip, or conda-dependent tools./data-handlingData handling best practices for R and Python data science analysis scripts. Use when writing data manipulation code, analysis pipelines, or .qmd scripts that process scientific/analytical data (e.g., filtering, joining, normalizing datasets). Do NOT load for general Python scripting, infrastructure code, or configuration management.