developing-packages-r

Build R packages with tidyverse patterns and cli/rlang error handling.

2|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/justanesta/claude-code-resources --skill developing-packages-r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developing-packages-r
Source: https://github.com/justanesta/claude-code-resources/tree/main/skills/R/developing-packages-r
Command: npx skills add https://github.com/justanesta/claude-code-resources --skill developing-packages-r

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building robust R packages can be challenging without a structured approach to dependency decisions, API design, input validation, and error messages. This skill guides developers toward modern tidyverse patterns for package development, promoting consistency and maintainability.

Core Features & Use Cases

  • Dependency strategy guidance: balanced use of external packages vs base R to minimize maintenance while enabling powerful APIs.
  • Tidyverse API design patterns: consistent function interfaces, use of quosures, and per-operation grouping guidelines.
  • Validation and error handling: best practices using cli/rlang to provide clear, actionable messages.
  • Testing and documentation priorities: recommended levels and coverage to ensure reliability.

Quick Start

Initialize a new R package project with standard structure and guidance from this skill.

Frequently Asked Questions about developing-packages-r

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

FAQPage Schema
How do I structure input validation and error handling in an R package?

Structure R package validation and error handling using cli and rlang to generate clear, actionable messages. This tidyverse pattern ensures consistent function interfaces and robust user feedback during package execution.

What is the best way to manage dependencies when developing R packages?

Manage R package dependencies by balancing external packages against base R. This strategy minimizes maintenance overhead while enabling powerful, modern API designs for tidyverse package development.

How do I design a tidyverse API for an R package?

Design a tidyverse R package API by implementing consistent function interfaces, utilizing quosures, and following per-operation grouping guidelines. This ensures your package integrates seamlessly with the broader tidyverse ecosystem.

What testing levels should I prioritize for R package development?

Prioritize R package testing levels that ensure reliability through recommended coverage thresholds. This structured testing approach validates package functionality and maintains long-term maintainability across updates.

Can I use base R instead of external packages for tidyverse package development?

Yes, you can use base R instead of external packages during tidyverse development. Dependency strategy guidance recommends this balanced approach to minimize maintenance burdens while supporting powerful API design.

What documentation priorities should I follow when building an R package?

When building an R package, follow documentation priorities that focus on recommended coverage levels to ensure reliability and maintainability. This structured approach aligns with modern tidyverse patterns for long-term success.