rap-test

Sets up the testthat framework and generates skeleton test files for R projects.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/ivyleavedtoadflax/RapSkill --skill rap-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rap-test
Source: https://github.com/ivyleavedtoadflax/RapSkill/tree/main/plugins/rap/skills/rap-test
Command: npx skills add https://github.com/ivyleavedtoadflax/RapSkill --skill rap-test

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the setup of the testthat testing framework and generates skeleton test files for R projects, ensuring code quality and reproducibility. It also facilitates data validation testing.

Core Features & Use Cases

  • Test Infrastructure Setup: Creates tests/testthat.R and skeleton test files for R functions.
  • Data Validation Testing: Generates specific tests for schema, value range, categorical data, missingness, uniqueness, and row counts.
  • RAP Compliance: Helps meet the Silver RAP requirement S6 for testing.
  • Use Case: After writing new R functions for your analysis pipeline, run /rap-test to quickly set up the necessary testing infrastructure and generate initial test files, ensuring your code is robust and verifiable.

Quick Start

Run the rap-test skill to set up the testthat testing framework and generate skeleton test files for your R project.

Frequently Asked Questions about rap-test

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

FAQPage Schema
How do I set up the testthat framework for R reproducible analysis?

Set up the testthat framework for R by running this skill to scan R files, generate skeleton test files, create tests/testthat.R, and update the DESCRIPTION file automatically.

Can I automatically generate data validation tests for an R project?

Yes, you can generate data validation tests for an R project. The skill creates skeleton tests covering schema, value range, categorical data, missingness, uniqueness, and row counts.

What is the Silver RAP requirement S6 for testing?

Silver RAP requirement S6 for testing mandates establishing a testing infrastructure. This skill helps R projects meet S6 compliance by setting up the testthat framework and generating initial test files.

How do I create skeleton test files for my R functions?

Create skeleton test files for R functions by running this skill. It scans your project for R files and automatically generates corresponding testthat test files to ensure code robustness.

Does this skill update the DESCRIPTION file for testthat?

Yes, this skill updates the DESCRIPTION file for testthat. It ensures the necessary testing dependencies and configurations are added to support the generated R testing infrastructure.

What are the limitations of automated R test generation?

Automated R test generation provides skeleton test files and infrastructure setup. You still need to manually refine the generated data validation tests to fully verify complex analysis pipeline logic.