R Playbooks
  • Playbooks
  • GitHub

R Playbooks

๐ŸŽฏ R Playbooks

A collection of 54 AI-assisted playbooks for common R development workflows

๐Ÿ“š 54 playbooks ๐Ÿ“‚ 12 categories ๐Ÿ”„ auto-updated from repo

๐Ÿ”Œr-api-endpoint
Add a new Plumber endpoint with parameter docs, input validation, error handling, and tests
APIs
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ—๏ธr-async-mirai
"Add asynchronous parallel processing to R code using the mirai package: launch non-blocking background tasks, collect results, and handle errors. Ideal for API calls, file I/O, or heavy computation in Shiny, Plumber, targets pipelines, or R packages"
Architecture
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿงชr-bdd-feature
"BDD (Behavior-Driven Development): define a feature with user stories, acceptance criteria, and Gherkin scenarios; then implement scenario-by-scenario with testthat describe()/it() tests. Works for R packages, Shiny apps, Plumber APIs, or any R project"
Testing & QA
v1.1.0AUTO๐Ÿ“‹ source
๐Ÿ—๏ธr-box-module
"Create a module using the box package with explicit @export declarations, clean namespace isolation, and proper file structure. Core pattern in rhino, golem, and Shiny apps โ€” distinct from Shiny modules (UI+server)"
Architecture
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿš€r-ci-gha
"Set up GitHub Actions CI for an R package: R CMD check, test coverage, pkgdown, and linting"
Deploy & DevOps
v1.0.0AUTO๐Ÿ“‹ source
๐Ÿงชr-code-review
"Perform a structured code review for R code: check code style, logical correctness, security, performance bottlenecks, and documentation completeness"
Testing & QA
v1.1.0BOTH๐Ÿ“‹ source
๐Ÿ”’r-config-env
"Set up environment-specific configuration for R applications (development, staging, production) using the config package with YAML config files โ€” works with Shiny, Plumber, and targets projects"
Config & Security
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿš€r-connect-deploy
"Deploy an R application (Shiny app, Plumber API, Quarto doc, or static R Markdown) to Posit Connect with rsconnect manifest and git-backed deployment"
Deploy & DevOps
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“ฆr-cran-submission
"Full CRAN submission workflow: rhub checks on all platforms, CRAN policy compliance, devtools::release(), and post-submission monitoring"
Package Dev
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ›ก๏ธr-data-validate
"Validate data quality with pointblank or validate: schema checks, value ranges, completeness, uniqueness, and row counts. Works with data frames, database tables, or targets pipeline outputs"
Data & Validation
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ›ก๏ธr-dbi-setup
"Set up a DBI database connection with connection pooling ({pool}), parameterised queries, and safe credential management via environment variables"
Data & Validation
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“Šr-debug
"Debug R code systematically: traceback, browser(), debugonce(), rlang::last_trace(), and profiling with profvis"
Observability
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿš€r-docker-build
"Build a Docker image for an R project: package, Shiny app, or Plumber API"
Deploy & DevOps
v1.0.0AUTO๐Ÿ“‹ source
๐Ÿ›ก๏ธr-duckdb-pipeline
"Build an analytical data pipeline using {duckdb} and {arrow}: in-process OLAP queries, Parquet I/O, and dplyr/SQL on large files without loading into memory"
Data & Validation
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ”Œr-httr2-client
"Build a typed R API client package using {httr2}: OAuth2/API-key auth, retry logic, rate limiting, mocked tests, and httr2 request/response helpers"
APIs
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“ฆr-init-package
Scaffold a new R package with usethis, renv, testthat, roxygen2, pkgdown, and CI
Package Dev
v1.0.0AUTO๐Ÿ“‹ source
๐Ÿ”Œr-init-plumber
"Scaffold a Plumber API project with entrypoint, route files, middleware, health checks, testthat tests, and optional Dockerfile โ€” ready for CI/CD and Connect deployment"
APIs
v1.0.0AUTO๐Ÿ“‹ source
โœจr-init-shiny
"Scaffold a new Shiny application with golem or minimal structure, plus testthat unit tests, Cypress E2E test setup, renv dependency management, and Posit Connect deployment config"
Shiny Apps
v1.0.0AUTO๐Ÿ“‹ source
๐ŸŽฏr-init-targets
"Scaffold a targets data pipeline project with _targets.R, R/functions/, testthat tests, renv, and GitHub Actions CI integration โ€” optionally with parallel crew backend"
Data Pipelines
v1.0.0AUTO๐Ÿ“‹ source
๐Ÿงชr-lint
"Lint R code (scripts, packages, Shiny apps) for style, syntax, and code quality issues using lintr; auto-fix formatting with styler where possible"
Testing & QA
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“Šr-logger-setup
"Configure structured JSON logging with the logger package for any R application: Shiny, Plumber, targets pipelines, or R packages โ€” with log levels, file output, and CI-friendly formats"
Observability
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“Šr-otel-instrument
"Add OpenTelemetry observability to R applications: zero-code-change for Shiny 1.12+/plumber2"
Observability
v1.0.0AUTO๐Ÿ“‹ source
๐Ÿ“ฆr-pak-lockfile
"Create and use a pak lockfile for strict reproducible R package installations across dev, CI, and production environments โ€” prevents 'works on my machine' dependency drift"
Package Dev
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“ฆr-pkg-add-function
"Add a new exported function to an R package with roxygen2 documentation, testthat tests, and NAMESPACE export โ€” follows TDD workflow"
Package Dev
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“ฆr-pkg-check
"Run R CMD check on an R package and automatically fix common issues (missing imports, undocumented parameters, stale Rd files) before manual review"
Package Dev
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“ฆr-pkg-release
"Execute a full R package release: bump version with usethis, run all checks, update NEWS.md, create a git tag, and prepare for CRAN submission or GitHub release"
Package Dev
v1.0.0AUTO๐Ÿ“‹ source
๐Ÿ“ฆr-pkgcheck-review
"Run rOpenSci automated package checks with pkgcheck: comprehensive pre-submission validation including goodpractice, R CMD check, and pkgstats"
Package Dev
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“ฆr-pkgdown-site
Set up and deploy a pkgdown documentation site with Bootstrap 5, reference index, articles, and GitHub Pages
Package Dev
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ›ก๏ธr-pointblank-agent
"Set up automated data validation using pointblank agents: define validation rules (column types, value ranges, uniqueness, row counts), generate HTML/JSON reports, schedule checks in CI/CD, or embed in Plumber APIs and targets pipelines"
Data & Validation
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“Šr-profile
"Profile R code for performance bottlenecks using profvis, bench, and rprof: produces a report, never auto-modifies code"
Observability
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“„r-quarto-dashboard
"Create a Quarto 1.4+ Dashboard with rows, columns, value boxes, plots, and interactive widgets (Shiny or Observable JS)"
Reports
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“„r-quarto-render
"Render a Quarto document or project (.qmd) to HTML, PDF, or other formats with parameterized execution, execution profiling, and output validation โ€” for R-based Quarto projects"
Reports
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“„r-quarto-website
"Scaffold a Quarto website with navbar, sidebar, listings, and GitHub Pages deployment"
Reports
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ—๏ธr-refactor
"Safe refactoring of R code: capture current behavior with tests as a safety net, then restructure the code (extract functions, rename, reorganize) and verify nothing broke"
Architecture
v1.1.0BOTH๐Ÿ“‹ source
๐Ÿ“ฆr-renv-manage
"Manage an renv project: snapshot, restore, update packages, clean unused packages, repair broken lockfiles, and upgrade renv itself"
Package Dev
v1.0.0BOTH๐Ÿ“‹ source
โœจr-rhino-add-module
"Add a new box module (view/logic) to an existing rhino project following enterprise conventions"
Shiny Apps
v1.0.0BOTH๐Ÿ“‹ source
โœจr-rhino-build
"Build rhino project assets: Sass โ†’ CSS compilation, JavaScript bundling, and static asset preparation for deployment"
Shiny Apps
v1.0.0BOTH๐Ÿ“‹ source
โœจr-rhino-check
"Run rhino quality checks: lint, diagnostics, build, and tests โ€” the universal quality gate for rhino projects"
Shiny Apps
v1.0.0BOTH๐Ÿ“‹ source
โœจr-rhino-init
"Initialize an enterprise Shiny application with Appsilon's rhino framework: box modules, Sass styles, JavaScript bundling, Cypress E2E tests, testthat unit tests, Docker, and CI/CD"
Shiny Apps
v1.0.0AUTO๐Ÿ“‹ source
โœจr-rhino-test
"Run rhino test suites โ€” R unit tests, Cypress E2E tests (on by default), and snapshot reviews โ€” with auto-fix for common test issues"
Shiny Apps
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ—๏ธr-s7-class
"Define an S7 class (R's new OOP system) with typed properties, generic functions, and methods โ€” the modern alternative to S3/S4/R6. Usable in packages, Shiny modules, or Plumber serialization"
Architecture
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ”’r-security
"Scan R code for security vulnerabilities: hardcoded secrets, unsafe eval, path traversal, injection risks"
Config & Security
v1.0.0BOTH๐Ÿ“‹ source
โœจr-shiny-e2e-test
"Add end-to-end tests for a Shiny app using shinytest2 (R-native, headless) or Cypress (JavaScript, real browser). For unit tests or TDD, use r-tdd-feature or r-rhino-test instead"
Shiny Apps
v1.0.0AUTO๐Ÿ“‹ source
โœจr-shiny-module
"Create a new Shiny module with UI + server functions, reactive testing, and proper namespace isolation. Works with golem, rhino, or standalone Shiny apps"
Shiny Apps
v1.0.0BOTH๐Ÿ“‹ source
โœจr-shiny-theme-bslib
Apply a custom Bootstrap 5 theme to a Shiny app using bslib with Sass customization and Bootswatch themes
Shiny Apps
v1.0.0BOTH๐Ÿ“‹ source
๐ŸŽฏr-targets-add-target
Add a new target to an existing targets pipeline with its companion function and test
Data Pipelines
v1.0.0BOTH๐Ÿ“‹ source
๐ŸŽฏr-targets-branching
Add static branching (tar_map) or dynamic branching (tar_rep, pattern=map/cross) to a targets pipeline
Data Pipelines
v1.0.0BOTH๐Ÿ“‹ source
๐ŸŽฏr-targets-crew
Configure the crew parallel backend for a targets pipeline (mirai-based, replaces future)
Data Pipelines
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿงชr-tdd-bugfix
"TDD bugfix workflow: reproduce the bug by writing a failing test first, fix the code, then verify no regressions. Works for R packages, Shiny apps, Plumber APIs, or any R code"
Testing & QA
v1.1.0BOTH๐Ÿ“‹ source
๐Ÿงชr-tdd-feature
"TDD (Test-Driven Development): Red-Green-Refactor cycle โ€” write a failing test first, implement minimal code to pass, then refactor. Works for R packages, Shiny modules, Plumber endpoints, or any R code"
Testing & QA
v1.1.0BOTH๐Ÿ“‹ source
๐Ÿงชr-testthat-snapshot
"Add snapshot tests with testthat edition 3: output snapshots, value snapshots, error snapshots, and file snapshots. Works for R packages, Shiny reactive modules, and Plumber endpoint testing"
Testing & QA
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿค–r-tidymodels-tune
"Hyperparameter tuning for an existing tidymodels workflow: Bayesian optimisation or racing methods, with parallel execution via {finetune} or {tune}"
ML & Tidymodels
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿค–r-tidymodels-workflow
"Build a complete tidymodels ML workflow: recipe, model spec, workflow object, train/test split, fit, and evaluation with yardstick metrics"
ML & Tidymodels
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿš€r-vetiver-deploy
"Version, deploy, and monitor an R ML model using vetiver: pin the model for versioning, auto-generate a Plumber API endpoint, and deploy to Posit Connect or Docker with monitoring"
Deploy & DevOps
v1.0.0BOTH๐Ÿ“‹ source

R Playbooks: curated AI coding playbooks for R development

 

Built with Quarto