Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Generates Swift test files for FOSMVVM ViewModels, covering codable round-trip encoding, versioning stability, and multi-locale translation verification. Works from conversation context to determine ViewModel structure and localization requirements. Produces test suites and YAML translation files.
A single expectFullViewModelTests() call replaces writing separate codable, versioning, and localization tests by hand.
When to use it
- Adding test coverage to a newly created ViewModel
- Verifying all localized strings have translations in every supported locale
- Testing nested ViewModel hierarchies with parent and child types
- Checking that @LocalizedSubs substitution produces the correct output strings
- Catching versioning regressions when a ViewModel structure changes
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: generate tests for DashboardViewModel which has @LocalizedString pageTitle and emptyMessage
- 1Identifies ViewModels and their @LocalizedString properties from conversation context
- 2Determines YAML entries needed for each locale (en, es by default)
- 3Generates DashboardViewModelTests.swift conforming to LocalizableTestCase with expectFullViewModelTests call
- 4Generates DashboardViewModel.yml with en and es translations for pageTitle and emptyMessage
- 5Reports file locations under Tests/{Target}Tests/Localization/ and Tests/{Target}Tests/TestYAML/
DashboardViewModelTests.swift and DashboardViewModel.yml ready to drop into the SPM test target