BeClaude

r-tidy-modelling

New
2Community RegistryData & Analyticsby Ahmad Sofi-Mahmudi · MIT

Expert agents for R data science and biostatistics covering data wrangling, feature engineering, model building, statistical evaluation, clinical trials, genomics, documentation generation, and reproducible reporting using tidyverse and tidymodels. All agents create new code in output folders - never modifying existing user code.

Community PluginView Source

Overview

A comprehensive Claude Code plugin for enterprise-scale R data science, data analysis, and biostatistics. This plugin provides specialized AI agents that act like the most experienced R data scientist in the world.

Features

  • 10 Specialized Agents: Expert AI assistants for different aspects of R data science
  • 23 Knowledge Skills: Deep domain knowledge in tidymodels, biostatistics, and more
  • 7 Workflow Commands: End-to-end analysis workflows for common tasks
  • TMwR Code Review: Anti-pattern detection for tidymodels workflows
  • Safe by Design: All generated code goes to output folders - your existing code is never modified

Installation

Add this plugin to your Claude Code configuration:

bash
# Clone the repository
git clone https://github.com/yourusername/TidyRModelling.git

# Add to your Claude Code plugins directory
# (Follow Claude Code plugin installation instructions)

Agents

Data Science Core

AgentModelDescription
r-data-architectOpusMaster strategist for R project architecture, pipeline design, and technology decisions
data-wranglerSonnetExpert in dplyr, tidyr, and data transformation
feature-engineerSonnetSpecialist in recipes-based feature engineering and preprocessing
tidymodels-engineerSonnetModel building with parsnip, workflows, tune, and stacks

Biostatistics

AgentModelDescription
biostatisticianSonnetClinical trials, survival analysis, epidemiology, and regulatory statistics

Visualization & Reporting

AgentModelDescription
viz-specialistSonnetPublication-quality graphics with ggplot2 and extensions
reporting-engineerSonnetQuarto, RMarkdown, Shiny dashboards, and automated reports

Quality & Documentation

AgentModelDescription
r-code-reviewerOpusCode quality, tidyverse style, TMwR compliance, performance optimization
r-docs-architectSonnetPackage documentation, pkgdown sites, roxygen2
r-tutorial-engineerSonnetTutorial creation, learnr apps, educational content

Skills (Knowledge Modules)

tidymodels Ecosystem

  • tidymodels-workflow - Complete modeling pipelines
  • recipes-patterns - Feature engineering patterns
  • resampling-strategies - Cross-validation and bootstrapping
  • model-tuning - Hyperparameter optimization
  • model-evaluation - Metrics and calibration
  • tidymodels-review-patterns - TMwR anti-pattern detection and compliance scoring

Biostatistics - Core

  • survival-analysis - Time-to-event methods (KM, Cox, competing risks, RMST)
  • clinical-trials - Trial design and analysis (group sequential, adaptive)
  • bayesian-modeling - brms, rstanarm, Stan
  • epidemiology-methods - Observational study methods, propensity scores
  • genomics-analysis - Bioconductor and RNA-seq

Biostatistics - Meta-Analysis

  • meta-analysis - Pairwise meta-analysis (meta, metafor)
  • network-meta-analysis - NMA, SUCRA, consistency (netmeta, gemtc)
  • ipd-meta-analysis - IPD-MA one-stage and two-stage methods

Biostatistics - Specialty Methods

  • diagnostic-accuracy - ROC curves, DCA, calibration (pROC, dcurves)
  • pharmacokinetics - NCA, PopPK, bioequivalence (PKNCA, nlmixr2)
  • health-economics - CEA, Markov models, PSA (BCEA, heemod, hesim)
  • mendelian-randomization - Two-sample MR, sensitivity analyses (TwoSampleMR)
  • causal-mediation - Mediation analysis (mediation, CMAverse)
  • real-world-evidence - Target trial emulation, IPTW (TrialEmulation)
  • advanced-adaptive-trials - Platform, basket, MAMS trials (adaptr, rpact)

Documentation

  • r-documentation-patterns - Documentation best practices
  • roxygen2-pkgdown - Package documentation tools

Commands (Workflows)

CommandDescription
/r-analysisEnd-to-end data analysis workflow
/r-code-reviewComprehensive code quality review (includes TMwR compliance)
/r-model-comparisonSystematic model comparison with workflow sets
/r-clinical-analysisRegulatory-compliant clinical trial analysis
/r-project-setupInitialize new R project with best practices
/r-doc-generateGenerate comprehensive documentation
/r-tutorial-createCreate tutorials from code

Code Review Types

The /r-code-review command supports specialized review types:

TypeDescription
fullAll review types including TMwR
styleTidyverse style guide compliance
performanceVectorization, memory, speed
securityInput validation, credentials
testsTest coverage and quality
tmwrTidymodels workflow review (data leakage, resampling, evaluation)

Safety Features

All agents follow strict safety protocols:

  • Never modify existing code - All generated code, reports, and documentation are written to the output/ directory
  • Preserve original files - Your data and code remain untouched
  • Review before integrating - Generated content can be reviewed before use

Default Output Structure

code
output/
├── code/           # Generated R scripts
├── reports/        # Quarto/RMarkdown documents
├── documentation/  # Package docs, README, vignettes
├── tutorials/      # Learning materials
├── models/         # Saved model objects (.rds)
└── figures/        # Generated plots

Usage Examples

Data Analysis

code
# Perform survival analysis on patient data
/r-analysis data/patients.csv survival html

Code Review

code
# Review all R code in the R/ directory
/r-code-review R/ full

Model Comparison

code
# Compare ML models for classification
/r-model-comparison data/credit.csv default classification rf,xgb,glmnet

Clinical Analysis

code
# Full clinical study analysis
/r-clinical-analysis data/adsl.sas7bdat,data/adae.sas7bdat full rtf

Documentation

code
# Generate complete package documentation
/r-doc-generate my_package full

Package Coverage

This plugin has expertise in the complete tidyverse and tidymodels ecosystem:

Core tidyverse

dplyr, tidyr, ggplot2, readr, purrr, tibble, stringr, forcats, lubridate

tidymodels

parsnip, recipes, workflows, tune, rsample, yardstick, broom, workflowsets, stacks, probably, censored

Biostatistics - Core

survival, survminer, cmprsk, flexsurv, mstate, rstpm2, brms, rstanarm, mmrm, gsDesign, rpact

Meta-Analysis

meta, metafor, dmetar, metasens, netmeta, gemtc, multinma, mada, robumeta

Pharmacokinetics & Health Economics

PKNCA, mrgsolve, nlmixr2, rxode2, BE, BCEA, heemod, hesim, dampack

Causal Inference & Epidemiology

MatchIt, WeightIt, cobalt, dagitty, ggdag, EValue, ivreg, tipr, adjustedCurves, TrialEmulation

Mendelian Randomization

TwoSampleMR, MendelianRandomization, MRPRESSO, mr.raps

Mediation Analysis

mediation, medflex, CMAverse, intmed

Adaptive Trials

adaptr, basket, MAMS, RBesT, gMCPLite

Diagnostic Accuracy

pROC, cutpointr, OptimalCutpoints, dcurves, irr

Visualization

ggplot2, patchwork, cowplot, ggpubr, ggrepel, ggforce, gganimate, plotly, gt, gtsummary

Bioconductor

DESeq2, edgeR, limma, clusterProfiler, ComplexHeatmap, Seurat

Reporting

quarto, rmarkdown, shiny, flexdashboard, pkgdown, roxygen2

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

MIT License - see LICENSE file for details.

Acknowledgments

  • Built following tidy modeling principles from Tidy Modeling with R
  • Agent architecture inspired by enterprise data science workflows
  • Biostatistics patterns based on regulatory best practices

Install & Usage

1
Create the skills directory
mkdir -p .claude/skills
2
Download the skill file
mkdir -p .claude/skills && curl -o .claude/skills/r-tidy-modelling.md https://raw.githubusercontent.com/choxos/TidyRModelling/main/SKILL.md
3
Invoke in Claude Code
/r-tidy-modelling
View source on GitHub
documentationagentrtidyversetidymodelsdata-sciencebiostatisticsclinical-trials

Frequently Asked Questions

What is r-tidy-modelling?

Expert agents for R data science and biostatistics covering data wrangling, feature engineering, model building, statistical evaluation, clinical trials, genomics, documentation generation, and reproducible reporting using tidyverse and tidymodels. All agents create new code in output folders - never modifying existing user code.

How to install r-tidy-modelling?

To install r-tidy-modelling, create the .claude/skills directory in your project, then run the curl command to download the skill file. Once installed, invoke it in Claude Code with /r-tidy-modelling.

What is r-tidy-modelling best for?

r-tidy-modelling is a community categorized under Data & Analytics. It is designed for: documentation, agent, r, tidyverse, tidymodels, data-science, biostatistics, clinical-trials. Created by Ahmad Sofi-Mahmudi.