swiftui-development
/swiftui-development
Pisze pliki widoków SwiftUI, projektuje nawigację aplikacji i wiąże dane ViewModel z interfejsem, opierając się na Observation i SwiftData.
- Autor
- projanvil ↗
- Repozytorium
- mindforge ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 25.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Pisze pliki widoków SwiftUI, projektuje nawigację aplikacji i wiąże dane ViewModel z interfejsem, opierając się na Observation i SwiftData.
Oryginalny opis (EN)
Specialized in building user interfaces using modern SwiftUI, covering NavigationStack, Observation framework, and SwiftData integration. Use this skill when writing SwiftUI view files, designing app navigation, handling animations and transitions, or binding ViewModel data to the interface.
Jak działa
- Instructions
- What This Skill Does
- When to Use This Skill
- Examples
- Best Practices
- Notes
Podgląd SKILL.md
---
name: swiftui-development
description: Specialized in building user interfaces using modern SwiftUI, covering NavigationStack, Observation framework, and SwiftData integration. Use this skill when writing SwiftUI view files, designing app navigation, handling animations and transitions, or binding ViewModel data to the interface.
---
# SwiftUI Development Skill
## Instructions
Use this skill to write declarative, reactive UI code. Always adhere to the iOS Human Interface Guidelines (HIG).
## What This Skill Does
- **UI Construction**: Build interfaces using Views, Modifiers, and Layout containers.
- **State Management**: Manage data flow using the Observation framework (`@Observable`, `@State`, `@Environment`).
- **Navigation**: Handle routing using `NavigationStack` and `navigationDestination`.
- **Previews**: Rapidly iterate on UI using the `#Preview` macro.
- **Persistence Integration**: Seamlessly integrate SwiftData (`@Query`) into views.
## When to Use This Skill
Trigger scenarios:
- When writing `.swift` view files.
- When designing the App's navigation structure.
- When handling animations and transitions.
- When binding ViewModel data to the interface.
## Examples
### Example 1: Observation-based ViewModel and View
```swift
@Observable
class CounterModel {
var count = 0
func increment() {
count += 1
}
}
struct CounterView: View {
@State private var model = CounterModel()
var body: some View {
VStack {
Text("Count: \(model.count)")
.font(.largeTitle)
Button("Add") {
model.increment()
}
}
}
}
#Preview {
CounterView()
}
```
### Example 2: Type-Safe Navigation with NavigationStack
```swift
enum Route: Hashable {
case profile(id: String)
case settings
}
struct ContentView: View {
@State private var path = NavigationPath()
var body: some View {
NavigationStack(path: $path) {
List {
NavigationLink("Go to Profile", value: Route.profile(id: "123"))
NavigationLink("Settings", value: Route.settings)
}
.navigationDestination(for: Route.self) { route in
switch route {
case .profile(let id):
ProfileView(userId: id)
case .settings:
SettingsView()
}
}
}
}
}
```
## Best Practices
- **Single Source of Truth**: Always maintain a single source of truth for your data.
- **Environment**: Use `.environment()` to inject global dependencies or theme data.
- **Avoid Massive Views**: Break down complex views into smaller component views (`struct SubView: View`).
- **State vs Binding**: Use `@State` when the view owns the data, and `@Binding` (`@Bindable` for Observables) when it modifies parent data.
- **Computed Properties**: Use computed properties to derive UI state instead of manually syncing multiple state variables.
## Notes
- For iOS 17+, `@Observable` is preferred. For legacy support, fallback to `ObservableObject` may be needed, but strictly mark it.
- All UI updates must be performed on the main thread (SwiftUI generally handles this, but be careful with callbacks from background tasks).
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · projanvil/mindforge | 100 | MIT |
| projanvil/mindforge | 100 | MIT |
| Mindrally/skills | 100 | Apache-2.0 |
Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki d1f4cabff114 (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
- 100swift-app-scaffold
Zakłada nową aplikację iOS lub macOS: Package.swift i architekturę SwiftUI z Observation, SwiftData, NavigationStack i Swift Testing. - 100swift-modern-architecture
Modernizuje stare wzorce w kodzie Swift i SwiftUI: wybiera ViewModel, SwiftData, nawigację i API współbieżności. - 100swiftui-expert
Buduje ekrany i funkcje w projekcie iOS 18+ w SwiftUI, porządkuje stan przez Observation, naprawia błędy Swift 6 i pisze testy. - 90neo-swift-ui
Pomaga budować, debugować i recenzować aplikacje i widoki SwiftUI dla iOS 16+: NavigationStack, Observation i przepływ stanu, kompozycja widoków, podglądy, wydajność, dostępność i architektura. - 100swiftui
Wspiera SwiftUI: deklaratywne układy iOS i macOS, stan z @Observable, modyfikatory widoków, animacje i NavigationStack przy budowie interfejsów na platformy Apple. - 100swiftui-dev
Wspiera pracę z SwiftUI: refaktoryzacja struktury widoków, Observation, granice zależności i ViewModeli, audyt renderowania oraz profilowanie hotspotów przez xctrace i Time Profiler.