Toolverse
All skills

types-check

by r-lib

Validate function inputs in R using a standalone file of check_* functions. Use when writing exported R functions that need input validation, reviewing existing validation code, or when creating new input validation helpers.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
r-lib
Category
Mobile

About this skill

Validate function inputs in R using a standalone file of check_* functions. Use when writing exported R functions that need input validation, reviewing existing validation code, or when creating new input validation helpers.

How to use

  1. Uruchom w swoim projekcie R polecenie usethis::use_standalone("r-lib/rlang", "types-check"), aby zainstalować skill jako plik standalone z funkcjami check_*. Upewnij się, że rlang jest już importowany w twoim pakiecie.

  2. W funkcji, którą chcesz zabezpieczyć, dodaj wywołania checkerów na początku ciała funkcji. Na przykład, jeśli funkcja przyjmuje argument name (ciąg znaków), dodaj check_string(name) lub check_name(name) dla nazw zmiennych.

  3. Wybierz odpowiedni checker w zależności od typu argumentu: check_bool() dla flag logicznych (TRUE/FALSE), check_string() dla tekstu, check_number_whole() dla liczb całkowitych, check_number_decimal() dla liczb zmiennoprzecinkowych, check_logical() dla wektorów logicznych, check_character() dla wektorów znakowych, check_data_frame() dla ramek danych.

  4. Dostosuj zachowanie checkera za pomocą argumentów opcjonalnych: allow_na = TRUE, jeśli funkcja powinna akceptować wartości NA, min i max dla checkerów liczb (check_number_whole, check_number_decimal) aby ograniczyć zakres, allow_infinite = TRUE/FALSE dla kontroli nieskończoności w liczbach.

  5. Przetestuj funkcję z nieprawidłowymi danymi wejściowymi — checker automatycznie wyrzuci błąd z jasnym komunikatem wskazującym, co jest nie tak (np. "123 musi być ciągiem znaków, a nie liczbą 123").

  6. Jeśli tworzysz własne funkcje walidacyjne, możesz je dodać do pliku standalone obok istniejących checkerów, zachowując ten sam styl komunikatów błędów.

Related skills

claude-mobile-ios-testing

by krzemienski

Use when testing iOS apps on simulator, capturing screenshots for validation gates, automating UI testing with expo-mcp and xc-mcp, or verifying visual correctness - combines expo-mcp autonomous testing (React Native level) with xc-mcp simulator management (iOS level)

Mobile
15111

mobile-ios-design

by wshobson

Master iOS Human Interface Guidelines and SwiftUI patterns for building native iOS apps. Use when designing iOS interfaces, implementing SwiftUI views, or ensuring apps follow Apple's design principles.

Mobile
107284

xcodebuildmcp

by cameroncooke

Official skill for XcodeBuildMCP. Use when doing iOS/macOS/watchOS/tvOS/visionOS work (build, test, run, debug, log, UI automation).

Mobile
2225

godot

by bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI

Mobile
547680

sequential-thinking

by mrgoonie

Use when complex problems require systematic step-by-step reasoning with ability to revise thoughts, branch into alternative approaches, or dynamically adjust scope. Ideal for multi-stage analysis, design planning, problem decomposition, or tasks with initially unclear scope.

Mobile
60238

react-native-design

by wshobson

Master React Native styling, navigation, and Reanimated animations for cross-platform mobile development. Use when building React Native apps, implementing navigation patterns, or creating performant animations.

Mobile
1964