jeremy-allen/claude-skills/developing-packages-r

Claude Code and agent skill by jeremy-allen/claude-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Building robust R packages with modern tidyverse patterns. Use this skill when creating or maintaining R packages, designing APIs, choosing dependencies, implementing input validation, writing error messages, or deciding between internal and exported functions. Covers dependency strategy, tidyverse API design patterns, validation approaches, error handling with cli/rlang, testing levels, and documentation priorities.

Install

npx vskill@latest install jeremy-allen/claude-skills/developing-packages-r

SKILL.md

Developing Packages R

This skill covers building robust R packages with modern patterns and best practices.

Dependency Strategy

When to Add Dependencies vs Base R

Add dependency when:

  • Significant functionality gain
  • Maintenance burden reduction
  • User experience improvement
  • Complex implementation (regex, dates, web)

Use base R when:

  • Simple utility functions
  • Package will be widely used (minimize deps)
  • Dependency is large for small benefit
  • Base R solution is straightforward

See dependency-decisions.md for example decisions.

Tidyverse Dependency Guidelines
CategoryPackagesGuidance
Core (usually worth it)dplyr, purrr, stringr, tidyrComplex manipulation, functional programming
Specialized (evaluate carefully)lubridate, forcats, readr, ggplot2Only if heavy usage
Heavy (use sparingly)tidyverse, shinyMeta-package or interactive apps only

API Design Patterns

Modern Tidyverse API

See api-design.md for:

  1. Use .by for per-operation grouping
  2. Use {{ }} for user-provided columns
  3. Use ... for flexible arguments
  4. Return consistent types (tibbles, not data.frames)

Input Validation Strategy

Validation level depends on function type:

Function TypeValidation Level
User-facingComprehensive - check all inputs
InternalMinimal - assume valid, check invariants
vctrs-basedType-stable - automatic checking

See validation-patterns.md for examples.

Error Handling Patterns

Good error messages are:

  • Specific - say what went wrong
  • Actionable - say how to fix it
  • Traceable - include function context

See error-handling.md for:

  • cli package for user-friendly messages
  • rlang for developer tools
  • Including function name in errors

Internal vs Exported Functions

Export Function When:
  • Users will call it directly
  • Other packages might want to extend it
  • Part of the core package functionality
  • Stable API that won't change often
Keep Function Internal When:
  • Implementation detail that may change
  • Only used within package
  • Complex implementation helpers
  • Would clutter user-facing API

See internal-vs-exported.md for examples.

Testing Strategy

Testing Levels
LevelPurposeExample
Unit testsIndividual functionsEdge cases, error handling
Integration testsWorkflow combinationsEnd-to-end pipelines
Property-based testsInvariantsFunction properties hold

See testing-patterns.md for examples.

Documentation Priorities

Must Document:
  • All exported functions
  • Complex algorithms or formulas
  • Non-obvious parameter interactions
  • Examples of typical usage
Can Skip Documentation:
  • Simple internal helpers
  • Obvious parameter meanings
  • Functions that just call other functions

source: Sarah Johnson's gist https://gist.github.com/sj-io/3828d64d0969f2a0f05297e59e6c15ad

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
52
Repository forks
5
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 7 Apr 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/jeremy-allen/claude-skills/developing-packages-r/badge)](https://verified-skill.com/skills/jeremy-allen/claude-skills/developing-packages-r)

Something wrong with this skill or its page? Tell us.