cran-check

Automate CRAN preparation with roxygen2, devtools, and testthat checks.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/drmowinckels/dotfiles --skill cran-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cran-check
Source: https://github.com/drmowinckels/dotfiles/tree/main/config/claude/skills/cran-check/cran-check
Command: npx skills add https://github.com/drmowinckels/dotfiles --skill cran-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the full CRAN preparation workflow for an R package, reducing manual guesswork and ensuring reproducible checks before submission.

Core Features & Use Cases

  • Roxygen2 documentation generation with roxygen2::roxygenise() to keep help files up to date.
  • Full CRAN checks using devtools::check(args = '--as-cran') and automated test execution with devtools::test().
  • Iterative fix-loop: parse check output, address errors, warnings, and notes, then re-run checks and tests until green.
  • Ideal for package developers preparing code for CRAN submissions or continuous integration.

Quick Start

In your package directory, trigger the cran-check workflow to validate CRAN readiness and automatically fix common issues.

Frequently Asked Questions about cran-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run R CMD check --as-cran for an R package before submission?

R CMD check --as-cran for an R package is fully automated by this workflow, which runs devtools checks, executes testthat tests, and parses output to iteratively fix errors, warnings, and notes until green.

How do I automate roxygen2 documentation updates during R package development?

Automating roxygen2 documentation updates during R package development is handled by running roxygen2::roxygenise() within the workflow, ensuring your help files stay current before executing full CRAN checks.

What's the best way to fix CRAN check warnings and notes in R packages?

The best way to fix CRAN check warnings and notes in R packages is using an iterative fix-loop that parses check output, applies corrections, and re-runs devtools checks and tests until all issues are resolved.

Do I need devtools and testthat to prepare an R package for CRAN submission?

Yes, you need devtools, testthat, and roxygen2 installed to prepare an R package for CRAN submission, as the workflow relies on these packages to generate documentation, execute tests, and run validation checks.

Can I use an automated fix-loop to validate R package CRAN readiness?

Yes, you can use an automated fix-loop to validate R package CRAN readiness, which parses check output, addresses errors and warnings iteratively, and re-runs checks until the package passes.

Why does my R package CRAN check keep failing with the same notes?

Your R package CRAN check may keep failing if notes are not parsed and addressed iteratively; this workflow automates parsing check output and applying fixes repeatedly until all notes are resolved.