neo-swift-ui
Skill7 starsChanged 6 months agoMITView on GitHub
Use this skill when building, debugging, refactoring, or reviewing SwiftUI apps or views for iOS 16+ and related Apple platforms. Trigger for NavigationStack, Observation/state flow, view composition, previews, performance, accessibility, and SwiftUI architecture.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- generate-skillSkill
- neo-azure-pipelinesSkill
- neo-clarificationSkill
- neo-clean-architectureSkill
- neo-code-reviewSkill
- neo-csharp-interface-generatorSkill
- neo-csharpSkill
- neo-dotnet-ef-coreSkill
- neo-dotnet-minimal-apisSkill
- neo-dotnet-mvcSkill
- neo-dotnetSkill
- neo-dotnet-tag-helperSkill
- neo-dotnet-webapiSkill
- neo-harness-projectSkill
- neo-harnessSkill
- neo-javascriptSkill
- neo-opentelemetrySkill
- neo-prSkill
- neo-python-managerSkill
- neo-pythonSkill
- neo-rabbitmqSkill
- neo-rustSkill
- neo-stop-slopSkill
- neo-sub-agentSkill
- neo-swiftSkill
- neo-typescriptSkill
- neo-vueSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Follow SwiftUI core principles to write concise, declarative Swift code.
- Very specific: line 32
Use Grid, ViewThatFits, or custom Layout protocols to implement complex layouts.
- Very specific: line 35
Check for "God Views" (views with excessive logic or body content) and suggest splitting them.
- Very specific: line 36
Ensure @State and @Binding are used correctly to avoid unnecessary view refreshes.
- Distinctive: line 37
Verify that the UI remains fluid and adheres to Apple's Human Interface Guidelines (HIG).
- Very specific: line 58
Declarative Style: Keep the view tree structure clear and avoid writing complex logic within body.
- Very specific: line 60
Preview Guidelines: Use the #Preview macro for rapid development, testing across multiple environment settings (Dark Mode, different …
- Distinctive: line 61
Type Safety: Prefer strongly typed navigation paths and environment keys.
- Distinctive: line 69
Ensure code compiles without warnings and uses the best available APIs for the target version.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Modern SwiftUI (iOS 16+) Expert Skill
Trigger On
- The user asks to write, debug, refactor, or review SwiftUI code.
- The target project version is iOS 16 or higher (utilizing features like
NavigationStack,Grid, etc.). - Development involves state management (
@State,@Observable), custom layouts, or animations.
Workflow
- Perceive (Version and Environment Awareness):
- Confirm if the deployment target is iOS 16+.
- Identify the current state management paradigm (traditional
ObservableObjectvs. modern@Observable). - Assess the usage of navigation components (check if deprecated
NavigationViewis still in use).
- Reason (Planning Phase):
- Plan the view hierarchy to maximize reusability and minimize redundant
bodycomputations. - Enforce the use of
NavigationStackorNavigationSplitViewfor navigation needs. - Select the correct data flow tools based on data lifecycle (
State,Binding,Environment).
- Plan the view hierarchy to maximize reusability and minimize redundant
- Act (Execution Phase):
- Follow SwiftUI core principles to write concise, declarative Swift code.
- Use
Grid,ViewThatFits, or customLayoutprotocols to implement complex layouts. - Leverage modern modifiers (e.g.,
.sheetwithdetents).
- Validate (Standard Validation):
- Check for "God Views" (views with excessive logic or
bodycontent) and suggest splitting them. - Ensure
@Stateand@Bindingare used correctly to avoid unnecessary view refreshes. - Verify that the UI remains fluid and adheres to Apple's Human Interface Guidelines (HIG).
- Check for "God Views" (views with excessive logic or
Feature Roadmap (SwiftUI Evolution)
iOS 13.0 - 15.0 (Foundation Era)
- Declarative Syntax: Core
Viewprotocol andbodyproperty. - State Management:
@State,@Binding,@ObservedObject,@EnvironmentObject. - Basic Containers:
VStack,HStack,ZStack,List. - Legacy Navigation:
NavigationViewandNavigationLink.
iOS 16.0 - 17.0 (Modern Era)
- NavigationStack: Decoupled and data-driven navigation pattern.
- Observation Framework:
@Observablemacro (Swift 5.9+) replacingObservableObject. - Advanced Layouts:
Grid,ViewThatFits, andLayoutprotocol. - Swift Charts: Native data visualization framework.
iOS 18.0+ (Latest Features)
- SwiftUI Animations: New phase-based and keyframe-based animation APIs.
- Interaction Enhancements: Improved Scroll View controls and gesture handling.
Coding Standards
- Declarative Style: Keep the view tree structure clear and avoid writing complex logic within
body. - Modularity: Split subviews into independent
structsinstead of computed properties. - Preview Guidelines: Use the
#Previewmacro for rapid development, testing across multiple environment settings (Dark Mode, different locales). - Type Safety: Prefer strongly typed navigation paths and environment keys.
Deliver
- Version-Optimized Code: Provide code utilizing iOS 16+ features (e.g.,
NavigationStack,presentationDetents). - Modular View Components: Deconstruct large views into single-responsibility, reusable components.
- Modern State Management: Prioritize the
@Observablepattern for projects supporting Swift 5.9+.
Validate
- Ensure code compiles without warnings and uses the best available APIs for the target version.
- Validate view
bodyexecution efficiency, ensuring no side effects are included. - Confirm that data flow follows the unidirectional flow principle whenever possible.
Documentation
Official References
Internal References
- SwiftUI Coding Style and Naming Conventions
- SwiftUI Anti-Patterns and Best Practices
- Modern SwiftUI Patterns Guide
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.

