What problem does it solve?
This Skill provides a centralized, opinionated approach to validating function inputs in R by using a standalone file of check_* helpers. It helps packages enforce consistent, clear error messages at the boundary between user code and internal logic, reducing boilerplate.
Core Features & Use Cases
- Scalar validators: check_string, check_number_whole, check_name, check_bool, check_number_decimal
- Vector validators: check_character, check_logical, check_data_frame, and nuanced NA handling with allow_na
- Support for NULL through allow_null, and guidance on warning about invalid inputs at the entry point
- Clear guidance on wrapping existing check_ functions and propagating caller context to preserve accurate error reporting
Quick Start
Use the tidy-argument-checking approach to add a standalone file of check_* helpers to your package, then validate inputs at the start of exported functions.