R Package Check
Run the full R package release gate, regenerate docs, run the test suite, run R CMD...
Install
npx skills add pedrohcgs/claude-code-my-workflow --skill r-package-check -g -a claude-code -y- Repository
- pedrohcgs/claude-code-my-workflow1.7k
- Category
- Testing
- Updated
- 1mo ago
- License
- MIT
- Context cost
- Lightabout 1,415 tokens
- Runs scripts
- No, instructions only
What it does
Run the full R package release gate, regenerate docs, run the test suite, run R CMD check --as-cran, and triage every ERROR / WARNING / NOTE against CRAN policy before a release or submission. Use when the user says "check my R package", "R CMD check", "is this package CRAN-ready", "run devtools::check", "prepare for CRAN submission", or points at a directory containing a DESCRIPTION file. Produces a check report + CRAN-submission checklist in `quality_reports/`.
/r-package-check, R Package Release Gate
Run the document → test → check → triage pipeline that decides whether an R package is releasable, then review the source for the issues R CMD check cannot see.
Input: $ARGUMENTS, the package root (a directory containing DESCRIPTION). If blank, autodetect by searching upward/within the working directory for DESCRIPTION.
Constraints
- Follow
.claude/rules/r-package-conventions.md, the CRAN-readiness bar (0 errors, 0 warnings, explained notes) is the gate. - Treat
man/andNAMESPACEas generated, regenerate withdevtools::document(); never hand-edit them. - Run the
r-package-revieweragent on the source before declaring the package releasable. - Do not bump the version or write to CRAN. This skill checks; the human decides when to submit.
Workflow Phases
Phase 0: Pre-Flight Report
## Pre-Flight Report, R Package Check
**Package:** [name + version from DESCRIPTION]
**Root:** [path]
**Exported functions:** [from NAMESPACE / `@export` count]
**Dependencies:** Imports [list] · Suggests [list] · Depends [list]
**Toolchain available:** devtools [✓/✗], roxygen2 [✓/✗], testthat [✓/✗], R CMD [✓/✗], covr [✓/✗]
**Plan:** document → test → check --as-cran → triage → review
Detect the toolchain with a quick probe; if devtools/R CMD is missing, stop and tell the user what to install.
Rscript -e 'cat("devtools:", requireNamespace("devtools", quietly=TRUE),
"roxygen2:", requireNamespace("roxygen2", quietly=TRUE),
"testthat:", requireNamespace("testthat", quietly=TRUE),
"covr:", requireNamespace("covr", quietly=TRUE), "\n")'
Phase 1: Document
Regenerate man/ + NAMESPACE and detect drift (generated docs that were not committed):


