swiftui-preview
/swiftui-preview
Renderuje podglądy #Preview widoków SwiftUI do PNG przez Prefire, by sprawdzić układ na iPhonie, iPadzie i w ciemnym trybie.
- Autor
- barredewe ↗
- Repozytorium
- prefire ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 2
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Renderuje podglądy #Preview widoków SwiftUI do PNG przez Prefire, by sprawdzić układ na iPhonie, iPadzie i w ciemnym trybie.
Oryginalny opis (EN)
Look at SwiftUI views as images with Prefire. Use after changing a SwiftUI view, to check its layout on iPhone or iPad, in dark mode or with large Dynamic Type, or when the user asks how a screen looks. Renders #Preview blocks to PNG through the prefire MCP server (list_previews, render_previews, build_board) or the `prefire render` CLI, without Xcode Previews.
Jak działa
- Loop
- Reading the result
- Setup, when the tools are missing or fail
Podgląd SKILL.md
---
name: swiftui-preview
description: Look at SwiftUI views as images with Prefire. Use after changing a SwiftUI view, to check its layout on iPhone or iPad, in dark mode or with large Dynamic Type, or when the user asks how a screen looks. Renders #Preview blocks to PNG through the prefire MCP server (list_previews, render_previews, build_board) or the `prefire render` CLI, without Xcode Previews.
---
# Seeing SwiftUI with Prefire
Prefire builds the app and runs its generated snapshot tests in render mode, so every `#Preview`
comes back as a PNG of the current code. Use it to check your own UI changes instead of guessing.
## Loop
1. Call `list_previews` once to learn the preview names and where each is declared.
2. Change the view.
3. Call `render_previews` with only the previews you touched, for example
`{"previews": ["Sign in"], "devices": ["iPhone 16 Pro"], "color_scheme": "dark"}`.
A render builds the project, so it takes as long as a test run: ask for few previews.
4. Look at the images. Fix what is off and render again. Say what you checked.
Before calling a UI change done, render it at least once. For layout changes, also check a small
phone (`iPhone SE (3rd generation)`), an `iPad`, `dark`, and `accessibility3` Dynamic Type.
## Reading the result
- The first content block is JSON: each preview with `image` path, size, `device`, `source`
(`file:line`), `userStory`, `state` and `error`. `notes` lists names that matched nothing and
devices that were ignored.
- Images beyond `max_images` (default 6) are not attached; read them from their paths.
- `isError: true` with "no snapshot test ran in render mode" means the tests are not set up or
were generated by an older Prefire: see Setup.
- "xcodebuild exited with 65" means the build or a test failed. Read `xcodebuild.log` in the
output directory, fix the build, and render again. The last good render is kept.
- An unknown device gets a record with the error and the device names Prefire knows.
## Setup, when the tools are missing or fail
- Install the CLI: `brew install barredewe/prefire/prefire`.
- The project needs Prefire's snapshot tests: the `Prefire` package with `PrefireTestsPlugin` on a
test target. See https://github.com/BarredEwe/Prefire#-quick-start.
- `.prefire.yml` in the project folder needs a `render_configuration`:
```yaml
render_configuration:
scheme: MyApp # scheme whose tests include the snapshot tests
project: MyApp.xcodeproj # or workspace: MyApp.xcworkspace
destination: platform=iOS Simulator,name=iPhone 16 # platform=macOS for a Mac app
test_target: MyAppSnapshotTests # runs only the tests of the previews asked for
```
- Without the MCP server, the same works from a shell: `prefire render "Sign in" --device iPad`,
`prefire render --list`, `prefire board`.
Full guide: https://github.com/BarredEwe/Prefire/blob/main/Documentation/AI.md
Wersje
W bazie nie ma innych skilli o nazwie swiftui-preview.
Migawka bazy z 13.11.2026 · wersja paczki 7b84d2f8b639 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100xcode-preview-capture
Buduje i zapisuje podglądy SwiftUI oraz zrzuty ekranu symulatora, by ocenić wygląd widoków Swift. - 100preview-data-generator
Generuje przykładowe dane i macierz wariantów #Preview dla widoków SwiftUI: stany pusty, ładowanie, błąd, jasny i ciemny motyw, Dynamic Type, lokalizacje RTL i urządzenia. - 95xcode-preview-capture
Buduje i przechwytuje podglądy Xcode i SwiftUI, aby analizować wyrenderowany interfejs, sprawdzać układy i oglądać komponenty wizualne. - 95preview-build
Buduje podglądy SwiftUI i robi zrzuty symulatora, żeby ocenić wygląd interfejsu iOS w projektach Xcode, pakietach SPM lub plikach Swift. - 91ios-design
Stosuje wytyczne Apple Human Interface Guidelines przy budowie i przeglądzie interfejsów iPhone'a w SwiftUI i UIKit, w tym dostępność, Dynamic Type i Dark Mode. - 86ios-design-guidelines
Stosuje wytyczne Apple HIG dla iPhone'a przy budowie i przeglądzie interfejsów SwiftUI i UIKit z dostępnością i Dark Mode.