From r
R language expert skill. Use when writing, reviewing, or debugging R code, or when the user asks for R best practices, idiomatic R, or guidance on the R ecosystem. Covers base R, tidyverse style, vectorization, pipe usage, error handling, and performance patterns. Complements r-lib (package dev) and shiny (web apps) — this skill focuses on the language itself.
How this skill is triggered — by the user, by Claude, or both
Slash command
/r:expertThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill captures the non-inferable delta: R-version-pinned high-drift items,
This skill captures the non-inferable delta: R-version-pinned high-drift items, this project's toolchain preferences, and where to delegate. Generic tidyverse style (naming, spacing, assignment, basic pipes, vectorization, pre-allocation) is assumed — follow the tidyverse style guide; do not restate it here.
|> over magrittr %>% — base R, no import. Available since
R 4.1, but the _ named-argument placeholder (x |> f(y = _)) needs
R 4.2+ (R 4.3+ to use _ with extraction, e.g. _$col). Without _,
the piped value can only fill the first argument.\(x) — backslash function syntax, R 4.1+
(e.g. purrr::map_dbl(x, \(d) d^2)).testthat 3rd edition semantics (expect_snapshot(), parallel tests,
stricter expect_*) — opt in via DESCRIPTION's Config/testthat/edition: 3.
See r-lib-testing.cli::cli_abort() / cli::cli_inform() /
cli::cli_warn() (not bare stop() / warning() / message()). cli markup
({.val}, {.code}, pluralization) gives consistent, styled output.styler; lint with lintr.bench (benchmarking), data.table / arrow /
vroom (large data + fast IO), future + furrr (embarrassingly parallel).r-lib-package-dev, with deep dives in r-lib-testing
(testthat), r-lib-cli (user-facing messages), and r-lib-lifecycle
(deprecation / versioning).shiny-bslib (layouts, components) and shiny-bslib-theming
(theming, dark mode, brand.yml).npx claudepluginhub nq-rdl/agent-extensions --plugin rGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.