tdd-workflow

Implement a test-driven development workflow for R code with testthat.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a rigorous test-driven development (TDD) workflow for R code, ensuring high test coverage and robust, reliable software.

Core Features & Use Cases

  • Test-First Development: Guides you to write tests before writing any functional code.
  • Coverage Enforcement: Mandates minimum 80% test coverage, with higher requirements for critical logic.
  • Structured Testing: Promotes clear organization of unit, integration, and snapshot tests.
  • Use Case: When developing a new statistical function in an R package, use this Skill to ensure you write comprehensive tests for all expected inputs, edge cases, and error conditions before implementing the function itself.

Quick Start

Follow the TDD workflow by writing a test for your R function before you write the function's code.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I start test-driven development for an R package using testthat?

TDD in R requires writing testthat tests for your function before writing the implementation code. This workflow enforces writing tests first to ensure comprehensive coverage of expected inputs, edge cases, and error conditions.

What is the minimum code coverage required for R functions in this TDD workflow?

The minimum code coverage required is 80%. This test-driven development workflow mandates at least 80% coverage, with higher requirements applied to critical logic to ensure robust and reliable R software.

Does this TDD workflow support snapshot testing and integration tests in R?

Yes, this TDD workflow supports snapshot testing and integration tests in R. It provides structured testing principles that promote clear organization across unit, integration, and snapshot tests using the testthat package.

When should I use test-driven development for my R code?

Use test-driven development for R code when you are creating new statistical functions or packages and need to guarantee robust, reliable software. It is ideal for ensuring you handle all expected inputs and error conditions before implementation.

What's the best way to organize unit and integration tests in an R package?

The best way to organize tests in an R package is to follow structured testing principles that separate unit, integration, and snapshot tests. This TDD workflow guides clear test design and organization using testthat.