Install any skill in seconds. Free to start, no credit card required.
Get Started Free →rshankras/preview-data-generator
Generate sample data and a multi-variant
Passed 17 of 21 test cases with the skill, and 11 of 21 without it.
and 9 more in the full report
7 fixed11 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
We have a SwiftUI `CustomerProfileView` that displays a `Customer` model. Our codebase already has a unit test fixture extension `Customer.fixture()` defined in our test target. I need Canvas preview sample data including standard and long-name edge cases, plus visual previews for `CustomerProfileView`.
| Checked | Without skill | With skill |
|---|---|---|
| The Customer.preview sample property calls Customer.fixture() to establish default values. | Missed | Passed |
| Edge-case preview properties build upon Customer.fixture() or Customer.preview rather than re-declaring full model initializers. | Missed | Passed |
The instructions your model reads when the skill loads.
Generates two tightly-coupled things for a SwiftUI view:
#Preview matrix — the variant blocks you'd otherwise hand-write to prototype and QA a view across light/dark, Dynamic Type, locale/RTL, device sizes, and data states.This is the design-time counterpart to testing/test-data-factory (which makes fixtures for the test suite). Where a factory already exists, this skill reuses Model.fixture() instead of inventing parallel data.
Use this skill when the user:
@Model and needs an in-memory seeded container for previewsPreviewModifierJust need fixtures for unit tests? Use testing/test-data-factory instead.
Want screenshot regression tests? Pair this with testing/snapshot-test-setup — the same data + variant matrix feeds snapshot tests.
Load both before generating:
| File | Purpose |
|---|---|
| preview-data-patterns.md | Sample-data design, the edge-case catalog, SwiftData in-memory seeding, PreviewModifier (iOS 18), @Previewable, reusing test-data-factory |
| preview-matrix.md | The variant axes, preview traits:, .environment overrides, deployment-target fallbacks (#Preview vs PreviewProvider), data-state previews |
Generators are context-aware. Before writing code, detect:
| Check | How | Why it matters |
|---|---|---|
| Deployment target | Read project/.xcodeproj or Package.swift | iOS 17+ → #Preview macro; iOS 18+ → PreviewModifier + @Previewable; below 17 → PreviewProvider fallback |
| Target view + its models | Read the view file; Grep its init/properties for model types | Determines which types need sample data |
| Existing fixtures | Grep "static func fixture|extension .*{ static (let|var) preview" | Reuse Model.fixture() / existing .preview — never duplicate |
test cases passed, vs 11 / 21 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.