R Playbooks
  • Playbooks
  • GitHub

R Playbooks

๐ŸŽฏ R Playbooks

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

๐Ÿ“š 79 playbooks ๐Ÿ“‚ 14 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-api-testing
"API testing for R: consumer-driven contract testing with pact, HTTP request/response mocking with httptest2, integration testing for Plumber APIs, and load/stress testing with vegeta or shinyloadtest"
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. Use mori for zero-copy shared memory to eliminate serialization overhead on large data. 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-cloud-sdk
"Integrate R applications with cloud services: AWS SDK via paws (S3, Lambda, SQS, RDS), Google Cloud via googleCloudStorageR/bigrquery, and Azure via AzureStor/AzureVision โ€” cloud-native data, compute, and storage patterns"
Deploy & DevOps
v1.0.0BOTH๐Ÿ“‹ 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.2.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-database-migrate
"Safe database schema migration for R projects: version-controlled migrations with DBI+dm, up/down scripts, seed data, dry-run validation against staging, and rollback procedures"
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-dependency-upgrade
"Safe R package dependency upgrade workflow: check for outdated packages, upgrade one at a time with git checkpoints, run full test suite after each upgrade, and rollback on failure"
Package Dev
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿš€r-deploy-kubernetes
"Deploy containerized R applications (Shiny, Plumber, targets pipelines) to Kubernetes, Cloud Run, or ECS with health checks, auto-scaling, secrets management, and blue-green deployments"
Deploy & DevOps
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-ml-init
"Scaffold a complete ML project with tidymodels: project structure, feature engineering with recipes, train/validate/test split strategy, cross-validation setup, vetiver deployment config, and CI/CD for model training"
ML & Tidymodels
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿค–r-ml-validate
"Validate and explain ML models: cross-validation diagnostics, residual analysis, calibration plots, DALEX model explanations, vip variable importance, shapviz SHAP values, fairness assessment, and model comparison framework"
ML & Tidymodels
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿค–r-model-monitor
"Monitor deployed ML models for data drift, concept drift, and performance decay โ€” detect distribution shifts with datadriftR and pointblank, track metrics with vetiver, and trigger automated retraining"
ML & Tidymodels
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿงชr-mutation-test
"Mutation testing for R with the muttest package (Appsilon): inject artificial bugs into code via treesitter-based parsing, measure test suite kill rate, identify weak tests, and strengthen gaps"
Testing & QA
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ””r-notification
"Send email and alert notifications from R applications: blastula for styled emails, Slack/Teams webhooks, pipeline status alerts, monitoring notifications, and scheduled report delivery"
Notifications
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“„r-observable
"Create interactive R-powered documents and dashboards with Observable JS and WebR: client-side R execution via WebR in Quarto, Observable Plot for interactive visualization, and Observable Framework for data apps"
Reports
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-package-audit
"Comprehensive R package health audit: run R CMD check, tests, coverage analysis, linting, security scan, dependency freshness check, and documentation validation โ€” produce a single health report with actionable recommendations"
Testing & QA
v1.0.0BOTH๐Ÿ“‹ 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-performance-benchmark
"Systematic R performance analysis: profile with profvis to find bottlenecks, benchmark with bench::mark for precise measurements, compare before/after optimizations, and identify the top optimizations by impact"
Observability
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-plan-feature
"Architectural planner: analyze requirements, design the approach, identify affected code and dependencies, estimate effort, and produce an actionable implementation plan before writing any code"
Architecture
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ—๏ธr-playbook-create
"Meta-playbook: guide the creation of a new well-structured R playbook following the project conventions โ€” discover the right category, define parameters and steps, write the system prompt, and validate against the schema"
Architecture
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-property-test
"Property-based testing for R: define invariants that must hold for all inputs, generate random test cases, shrink failing cases to minimal counterexamples, and add them as regression tests"
Testing & QA
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-schedule-pipeline
"Schedule targets pipelines for production: configure cron-based execution with cronR or GHA scheduled workflows, set up checkpoint/resume, failure notifications, logging, and pipeline health monitoring"
Data Pipelines
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-auth
"Add authentication and authorization to Shiny apps: credentials-based auth with shinymanager, OAuth/SSO with polished (Auth0), role-based access control, session timeouts, and secure credential storage โ€” never hardcode passwords"
Shiny Apps
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-fluent-components
"Build Fluent UI Shiny UIs (Appsilon): inputs with .shinyInput(), DetailsList, Pivot/CommandBar/Nav, Stack layout, MessageBar/Spinner feedback, and Modal/Panel overlays"
Other
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“‹r-shiny-fluent-init
"Scaffold a Shiny app with Microsoft Fluent UI (Appsilon): fluentPage shell, ThemeProvider, Stack layout, Fluent inputs, and tests โ€” the Bootstrap-free alternative for enterprise Shiny"
Other
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“‹r-shiny-fluent-theme
"Theme Fluent UI Shiny apps (Appsilon): brand tokens via ThemeProvider, custom colors and typography, dark mode toggle, WCAG accessibility verification"
Other
v1.0.0BOTH๐Ÿ“‹ 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-perf
"Shiny performance profiling and optimization: reactlog reactivity graph analysis, profvis server profiling, shinyloadtest multi-user load simulation, bindCache/memoise caching strategies, and performance regression testing"
Shiny Apps
v1.0.0BOTH๐Ÿ“‹ source
๐Ÿ“‹r-shiny-react
"Wrap custom React components for Shiny with shiny.react (Appsilon): reactElement(), setInput(), JS(), reactOutput()/renderReact(), and htmlDependency() for component JS bundles"
Other
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). Use mori for zero-copy shared memory on large reference data"
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-test-database
"Database interaction testing for R: test fixtures with DBI, transaction rollback between tests, query mocking, schema validation, and performance regression testing"
Testing & QA
v1.0.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-workflow-feature
"End-to-end feature workflow orchestrator: chains BDD spec โ†’ TDD implementation โ†’ code review โ†’ quality gate โ†’ release prep into one cohesive pipeline"
Architecture
v1.0.0BOTH๐Ÿ“‹ source

R Playbooks: curated AI coding playbooks for R development

 

Built with Quarto