Skip to content
Back to skills

R Conventions

ASecurity

R code conventions covering R 4.1+, tidyverse/base style, styler/lintr, roxygen2, testthat, error handling, input validation, C/C++/Rust interop, and CRAN compliance. Load when writing or reviewing R code.

  • 150 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 5, 2026
ai-agentsrustc++apisecuritydocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 5, 2026

npx -y skills add Goldziher/ai-rulez --skill r-conventions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of R Conventions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for R Conventions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/goldziher-r-conventions/badge)](https://www.skillsdirectory.com/skills/goldziher-r-conventions)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: r-conventions
description: R code conventions covering R 4.1+, tidyverse/base style, styler/lintr, roxygen2, testthat, error handling, input validation, C/C++/Rust interop, and CRAN compliance. Load when writing or reviewing R code.
---

- R 4.1+, a consistent style guide (e.g., tidyverse), a formatter (e.g., styler) and a linter (e.g., lintr).
- Base R pipe `|>` over magrittr `%>%`, prefer base R when tidyverse not needed.
- Package dev: `devtools`/`usethis`/`roxygen2`, `testthat` (80%+ via a coverage tool, e.g., covr).
- Documentation: roxygen2 for inline docs and NAMESPACE management. `@examples` on all exports.
- Vignettes with `knitr`/`rmarkdown` for long-form documentation and tutorials.
- Error handling: `tryCatch()`/`withCallingHandlers()`, `cli::cli_abort()` for user-facing errors.
- Input validation: `checkmate` or `rlang::arg_match()` for function parameter validation.
- Security: a dependency vulnerability scanner (e.g., oysteR).
- C/C++: `Rcpp` or `.Call()`, PROTECT/UNPROTECT all R objects. Rust: `extendr`/`rextendr`.
- CRAN: `R CMD check --as-cran` zero warnings/notes, maintain DESCRIPTION with proper versioning.
- Anti-patterns: `eval(parse(text=))` with user input, mixing Rcpp and raw C API, `T`/`F` instead of `TRUE`/`FALSE`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.