swiftui-development
Skill3 starsChanged 23 days agoMITView on GitHub
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.
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill to write declarative, reactive UI code.
- Very specific: line 23
When writing .swift view files.
- Distinctive: line 24
When designing the App's navigation structure.
- Distinctive: line 25
When handling animations and transitions.
- Distinctive: line 26
When binding ViewModel data to the interface.
- Distinctive: line 93
Single Source of Truth: Always maintain a single source of truth for your data.
- Very specific: line 94
Environment: Use .environment() to inject global dependencies or theme data.
- Very specific: line 96
State vs Binding: Use @State when the view owns the data, and @Binding (@Bindable for Observables) when it modifies parent data.
- Distinctive: line 97
Computed Properties: Use computed properties to derive UI state instead of manually syncing multiple state variables.
- Distinctive: line 102
All UI updates must be performed on the main thread (SwiftUI generally handles this, but be careful with callbacks from background tasks).
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
NavigationStackandnavigationDestination. - Previews: Rapidly iterate on UI using the
#Previewmacro. - Persistence Integration: Seamlessly integrate SwiftData (
@Query) into views.
When to Use This Skill
Trigger scenarios:
- When writing
.swiftview 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
@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
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
@Statewhen the view owns the data, and@Binding(@Bindablefor 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+,
@Observableis preferred. For legacy support, fallback toObservableObjectmay 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).
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Mindrally/skills★ 275same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- api-designSkill
- database-designSkill
- design-patternSkill
- enterprise-javaSkill
- frontend-reactSkill
- frontend-svelteSkill
- frontend-vueSkill
- git-guruSkill
- go-developmentSkill
- javascript-typescriptSkill
- product-managementSkill
- python-developmentSkill
- session-summarySkill
- swift-developmentSkill
- system-architectureSkill
- tech-documentationSkill
- testingSkill
- xcode-managementSkill
- api-designSkill
- database-designSkill
- design-patternSkill
- enterprise-javaSkill
- frontend-reactSkill
- frontend-svelteSkill
- frontend-vueSkill
- git-guruSkill
- go-developmentSkill
- javascript-typescriptSkill
- product-managementSkill
- python-developmentSkill
- session-summarySkill
- swift-developmentSkill
- swiftui-developmentSkill
- system-architectureSkill
- tech-documentationSkill
- testingSkill
- xcode-managementSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

