Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"email": "contact@avanderlee.com"
},
"metadata": {
"description": "SwiftUI best practices for state management, modern APIs, view composition, performance, and iOS 26+ Liquid Glass."
"description": "SwiftUI best practices for state management, view composition, performance, and iOS 26+ Liquid Glass."
},
"plugins": [
{
"name": "swiftui-expert",
"description": "Expert SwiftUI guidance for modern APIs, state management, performance, and Liquid Glass patterns.",
"description": "Expert SwiftUI guidance for state management, view composition, performance, and Liquid Glass patterns.",
"repository": "https://github.com/avanderlee/SwiftUI-Agent-Skill",
"version": "1.1.3",
"author": {
Expand All @@ -27,7 +27,6 @@
"ios",
"apple",
"state-management",
"modern-apis",
"performance",
"liquid-glass"
],
Expand All @@ -37,7 +36,6 @@
"ios",
"apple",
"state-management",
"modern-apis",
"performance",
"liquid-glass"
],
Expand Down
3 changes: 1 addition & 2 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swiftui-expert",
"version": "1.1.3",
"description": "Expert SwiftUI guidance for state management, view composition, performance, modern APIs, and iOS 26+ Liquid Glass adoption.",
"description": "Expert SwiftUI guidance for state management, view composition, performance, and iOS 26+ Liquid Glass adoption.",
"author": {
"name": "Antoine van der Lee",
"email": "contact@avanderlee.com"
Expand All @@ -14,7 +14,6 @@
"ios",
"apple",
"state-management",
"modern-apis",
"performance",
"liquid-glass",
"view-composition",
Expand Down
18 changes: 0 additions & 18 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,10 @@ This document provides guidance for AI agents working with this skill to ensure

**Do not automatically apply optimizations.** Let developers decide based on their performance needs.

### Modern API Usage

**Enforce modern API usage for correctness:**
- ✅ `foregroundStyle()` instead of `foregroundColor()`
- ✅ `NavigationStack` instead of `NavigationView`
- ✅ `@Observable` instead of `ObservableObject` for new code

These are about using current, non-deprecated APIs, not optimization.

### State Management

**Be clear about `@MainActor` requirements:**
- Mention that `@Observable` classes may need `@MainActor`
- Note that projects with default actor isolation don't need explicit `@MainActor`
- Don't mandate it as "always required"

## What to Include

### ✅ Include These Topics:
- Property wrapper selection (`@State`, `@Binding`, `@Observable`, etc.)
- Modern API replacements for deprecated APIs
- View composition and extraction patterns
- Performance patterns (stable identity, lazy loading, etc.)
- Common pitfalls and how to avoid them
Expand All @@ -102,7 +85,6 @@ These are about using current, non-deprecated APIs, not optimization.
## Language and Tone

### Use Clear, Direct Language:
- "Use X instead of Y" (for deprecated APIs)
- "Consider X when Y" (for optimizations)
- "Avoid X because Y" (for anti-patterns)
- "X is preferred over Y" (for best practices)
Expand Down
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SwiftUI Expert Skill

Expert guidance for any AI coding tool that supports the [Agent Skills open format](https://agentskills.io/home) — modern SwiftUI APIs, state management, performance, and iOS 26+ Liquid Glass adoption.
Expert guidance for any AI coding tool that supports the [Agent Skills open format](https://agentskills.io/home) — SwiftUI state management, view composition, performance, and iOS 26+ Liquid Glass adoption.

This repository distills practical SwiftUI best practices into actionable, concise references for agents and code review workflows.

Expand All @@ -26,7 +26,7 @@ npx skills add https://github.com/avdlee/swiftui-agent-skill --skill swiftui-exp
For more information, [visit the skills.sh platform page](https://skills.sh/avdlee/swiftui-agent-skill/swiftui-expert-skill).

Then use the skill in your AI agent, for example:
> Use the swiftui expert skill and review the current SwiftUI code for state-management and modern API improvements
> Use the swiftui expert skill and review the current SwiftUI code for state-management and performance improvements

### Option B: Claude Code Plugin

Expand Down Expand Up @@ -87,7 +87,6 @@ This skill gives your AI coding tool practical SwiftUI guidance. It can:

### Guide Your SwiftUI Decisions
- Choose the right state management tool (`@State`, `@Binding`, `@Observable`, `@Bindable`)
- Recommend modern replacements for deprecated SwiftUI APIs
- Provide clear guidance for sheets, navigation, scrolling, and lists
- Advise on iOS 26+ Liquid Glass usage with safe availability fallbacks

Expand All @@ -103,9 +102,7 @@ This skill gives your AI coding tool practical SwiftUI guidance. It can:

## What Makes This Skill Different

**Non-Opinionated**: Focuses on SwiftUI correctness and modern APIs, not forcing an architecture, project structure, or code style.

**Modern-first**: Calls out deprecated APIs and offers up-to-date replacements.
**Non-Opinionated**: Focuses on SwiftUI correctness, not forcing an architecture, project structure, or code style.

**Practical & concise**: Treats the agent as capable; provides the checklists and pitfalls that actually matter in day-to-day SwiftUI work.

Expand All @@ -122,12 +119,10 @@ swiftui-expert-skill/
layout-best-practices.md - Layout patterns and GeometryReader alternatives
liquid-glass.md - iOS 26+ glass effects and fallback patterns
list-patterns.md - ForEach identity and list performance
modern-apis.md - Deprecated API replacements
performance-patterns.md - Hot-path optimizations and update control
scroll-patterns.md - ScrollViewReader and programmatic scrolling
sheet-navigation-patterns.md - Sheets and type-safe navigation
state-management.md - Property wrapper selection and data flow
text-formatting.md - Modern Text formatting and string utilities
view-structure.md - View extraction and composition patterns
```
<!-- END REFERENCE STRUCTURE -->
Expand All @@ -145,8 +140,6 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for:

Several SwiftUI guidelines in this skill were inspired by or derived from the following works:

- [SwiftAgents](https://github.com/twostraws/SwiftAgents) by [Paul Hudson](https://www.hackingwithswift.com) — an AGENTS.md for Swift and SwiftUI projects based on his article [What to fix in AI-generated Swift code](https://www.hackingwithswift.com/articles/281/what-to-fix-in-ai-generated-swift-code). His curation of modern SwiftUI best practices for AI agents has been the foundation for this skill.
- AGENTS file input from the developers of [Helm for App Store Connect](https://helm-app.com)
- [Skills](https://github.com/Dimillian/Skills) by [Thomas Ricouard](https://github.com/Dimillian) — a collection of SwiftUI-focused Codex skills covering UI patterns, performance auditing, and Liquid Glass.

## About the authors
Expand Down
Loading