Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

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.

Repozytorium
mindforge ↗
Licencja
MIT
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

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

  1. Instructions
  2. What This Skill Does
  3. When to Use This Skill
  4. Examples
  5. Best Practices
  6. Notes
Sekcje z nagłówków SKILL.md, w oryginale · 99 linii, 371 słów
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

RepozytoriumWynikLicencja
Ta strona · projanvil/mindforge100MIT
projanvil/mindforge100MIT
Mindrally/skills100Apache-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.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.