SwiftUI-Agent-Skill
AGENTS.md3.7k starsChanged 4 months agoMITView on GitHub
This document provides guidance for AI agents working with this skill to ensure consistency and avoid common pitfalls. Exception: Mention organization patterns as optional suggestions for readability, never as requirements. Exception: Suggest separating business logic for testability without enforcing how. Agents using the trace tooling must: - Prefer app-scoped --attach or --launch recordings. - Explain the privacy implications and obtain explicit user approval before a system-wide recording. - Pass --allow-system-wide-recording with --all-processes after approval. - Avoid exposing environment-variable values or…
Trending
More talk lately.about the whole repository
Who's talking about AvdLee/SwiftUI-Agent-Skill
- @zeero26.bsky.social“SwiftLeeの人がSwiftUIのAgentSkillリリースしてた これは期待 AvdLee/SwiftUI-Agent-Skill: Add expert SwiftUI Best Practices …”Bluesky · Jan 31, 2026 · 6 likes
- @avanderlee.com“If you use agents for SwiftUI work, give them better context. My SwiftUI Expert Agent Skill focuses on …”Bluesky · Jul 18, 2026 · 3 likes
- @peterfriese.dev“Teach your AI agent SwiftUI best practices! 🎓 Antoine van der Lee and Omar Elsayed released an Agent Skill …”Bluesky · Jan 28, 2026 · 3 likes
- @avanderlee.com“Get it here: github.com/AvdLee/Swift...”Bluesky · Sep 19, 2026 · 2 likes
- @avanderlee.com“If you work on SwiftUI views, my SwiftUI Expert Agent Skill gives your agent focused guidance on state, …”Bluesky · Jul 20, 2026 · 2 likes
The biggest 5 of 24 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 24
Talked about on GitHub and Bluesky (24 times).
On GitHub · 18
- Oct 4, 2026claude-code-plugins.github.avdlee.swiftui-agent-skill: init at 5.2.1 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-marketplaces.github.avdlee.swiftui-agent-skill: init at 5.2.1 — sudosubin/agents.nix0 reactions
- Oct 4, 2026agent-plugins.github.avdlee.swiftui-agent-skill: init at 5.2.1 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.avdlee.swiftui-agent-skill: 5.1.0 → 5.2.1 — sudosubin/agents.nix0 reactions
- Oct 3, 2026chore(deps): update dependency avdlee/swiftui-agent-skill/skills/swiftui-expert-skill to v5 — AlonsoFloo/skills0 reactions
13 more on GitHub
- Sep 28, 2026chore(deps): update dependency avdlee/swiftui-agent-skill/skills/swiftui-expert-skill to v5 - autoclosed — AlonsoFloo/skills0 reactions · 1 comment
- Sep 26, 2026[Candidate] avdlee/swiftui-agent-skill/skills/swiftui-expert-skill - swiftui-expert-skill — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 26, 2026[Candidate] avdlee/swiftui-agent-skill/.agents/skills/update-swiftui-apis - update-swiftui-apis — ProSkillsMD/proskills0 reactions · 1 comment
- Sep 25, 2026agent-skills.github.avdlee.swiftui-agent-skill: init at 5.1.0 — sudosubin/agents.nix0 reactions
- Jun 18, 2026Add bootstrap-ios skill — RayFernando1337/rayfernando-skills0 reactions
- May 25, 2026Swift dev skills: install Axiom/AvdLee + create OSSignposter/benchmark/memory skills — fairchild/workspacessays it tested it0 reactions · 1 comment
- Mar 15, 2026Embed Swift & Spezi-Specific Skills & Embed In Future CLI Setup — StanfordSpezi/SpeziVibe0 reactions
- Feb 20, 2026swiftui-expert-skill — AAswordman/OperitSkillMarket0 reactions
- Feb 15, 2026[Bookshelf] SwiftUI Agent Skill の導入 — yuta24/Bookshelf0 reactions · 1 comment
- Feb 7, 2026SwiftUIの実装精度が悪いのでSkillを追加する — WHITS-ISLAND/inspirehub-mobile0 reactions
- Jan 31, 2026New skill: /avdlee-swiftui-expert-skill (safe risk) — aiskillstore/marketplace0 reactions
- Jan 29, 2026[FEATURE] Add support for installation with `npx skills add` — pzep1/xcode-build-skill0 reactions · 3 comments
- Jan 25, 2026Restructure repository to Agent Skills open format — efremidze/swift-patterns-skill0 reactions · 3 comments
On Bluesky · 6
- Jan 31, 2026SwiftLeeの人がSwiftUIのAgentSkillリリースしてた これは期待 AvdLee/SwiftUI-Agent-Skill: Add expert SwiftUI Best Practices guidance to your AI coding tool… — @zeero26.bsky.social6 likes and reposts
- Jul 18, 2026If you use agents for SwiftUI work, give them better context. My SwiftUI Expert Agent Skill focuses on state, layout, performance, modern… — @avanderlee.com3 likes and reposts · 1 reply
- Jan 28, 2026Teach your AI agent SwiftUI best practices! 🎓 Antoine van der Lee and Omar Elsayed released an Agent Skill to help AI tools review and… — @peterfriese.dev3 likes and reposts
- Sep 19, 2026Get it here: github.com/AvdLee/Swift... — @avanderlee.com2 likes and reposts
- Jul 20, 2026If you work on SwiftUI views, my SwiftUI Expert Agent Skill gives your agent focused guidance on state, view composition, performance, and… — @avanderlee.com2 likes and reposts
1 more on Bluesky
- May 1, 2026https://github.com/AvdLee/SwiftUI-Agent-Skill — @tom-doerr.bsky.social1 likes and repost
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- update-swiftui-apisSkill
- swiftui-expert-skillSkill
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 1 is common, 10 are distinctive, and 1 is very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
This is a SwiftUI skill: Do not include:
- Distinctive: line 15
Do not include formatting/linting rules: Avoid:
- Distinctive: line 25
Stick to facts, not architectures: Avoid:
- Very specific: line 43
Prefer app-scoped --attach or --launch recordings.
- Common: line 47
Avoid exposing environment-variable values or other secrets in output.
- Distinctive: line 48
Treat trace files and extracted logs as potentially sensitive user data.
- Distinctive: line 133
When adding new content:
- Distinctive: line 134
Ask: "Is this SwiftUI-specific?"
- Distinctive: line 135
Ask: "Is this a fact or an opinion?"
- Distinctive: line 136
Ask: "Can agents actually use this?"
- Distinctive: line 137
Ask: "Is this about correctness or style?"
- Distinctive: line 139
If unsure, err on the side of excluding content.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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
Agent Guidelines for SwiftUI Expert Skill
This document provides guidance for AI agents working with this skill to ensure consistency and avoid common pitfalls.
Core Principles
1. SwiftUI Focus Only
This is a SwiftUI skill. Do not include:
- Swift concurrency patterns (use
.taskfor SwiftUI-specific needs only) - General Swift language features unrelated to SwiftUI
- Backend or server-side Swift patterns
- UIKit patterns (except when bridging is necessary)
2. No Code Formatting or Linting
Do not include formatting/linting rules. Avoid:
- Property ordering requirements (environment, state, body, etc.)
- Code organization mandates
- Whitespace or indentation rules
- Naming convention enforcement
- File structure requirements
Exception: Mention organization patterns as optional suggestions for readability, never as requirements.
3. No Architectural Opinions
Stick to facts, not architectures. Avoid:
- Enforcing MVVM, MVC, VIPER, or any specific architecture
- Mandating view model patterns
- Requiring specific folder structures
- Dictating dependency injection patterns
- Prescribing router/coordinator patterns
Exception: Suggest separating business logic for testability without enforcing how.
4. Keep Tooling SwiftUI-Specific and Consent-Aware
The skill includes focused Instruments tooling for SwiftUI performance work.
Tool-specific instructions are allowed only when they directly support the
bundled trace recording and analysis workflows. Do not add unrelated IDE,
debugging, build-system, or general command-line guidance. The one other exception
is a brief mention of the RocketSim CLI for posing the iPhone Duo simulator when
verifying layouts (references/iphone-duo.md).
Agents using the trace tooling must:
- Prefer app-scoped
--attachor--launchrecordings. - Explain the privacy implications and obtain explicit user approval before a system-wide recording.
- Pass
--allow-system-wide-recordingwith--all-processesafter approval. - Avoid exposing environment-variable values or other secrets in output.
- Treat trace files and extracted logs as potentially sensitive user data.
Content Guidelines
Suggestions vs Requirements
Use "suggest" or "consider" for optional optimizations:
- ✅ "Consider downsampling images when using
UIImage(data:)" - ❌ "Always downsample images"
Use "always" or "never" only for correctness issues:
- ✅ "Never use
.indicesfor dynamic ForEach content" - ✅ "Always mark
@Stateasprivate"
Performance Optimizations
Present performance optimizations as optional improvements:
- Image downsampling: Suggest when
UIImage(data:)is encountered - POD view wrappers: Mention as advanced optimization technique
- Equatable conformance: Suggest for expensive views
Do not automatically apply optimizations. Let developers decide based on their performance needs.
What to Include
✅ Include These Topics:
- Property wrapper selection (
@State,@Binding,@Observable, etc.) - View composition and extraction patterns
- Performance patterns (stable identity, lazy loading, etc.)
- Common pitfalls and how to avoid them
- Sheet, navigation, and list patterns
- Liquid Glass API usage (iOS 26+)
- Accessibility best practices
❌ Exclude These Topics:
- Swift concurrency deep dives (actors, sendable, etc.)
- Code formatting and style rules
- Architectural patterns and mandates
- Tool usage unrelated to the bundled SwiftUI Instruments workflows
- File organization requirements
- Testing frameworks and patterns
- Build system configuration
- Project structure mandates
Language and Tone
Use Clear, Direct Language:
- "Consider X when Y" (for optimizations)
- "Avoid X because Y" (for anti-patterns)
- "X is preferred over Y" (for best practices)
Avoid Prescriptive Language:
- ❌ "You must organize properties in this order"
- ❌ "Always use MVVM architecture"
- ❌ "Run unrelated debugger or build-system commands"
- ❌ "Structure your project like this"
Examples
Good Example:
## ForEach Identity
**Always provide stable identity for `ForEach`.** Never use `.indices` for dynamic content.
When you encounter `UIImage(data:)`, consider suggesting image downsampling as a performance optimization.Bad Example:
## View Organization
**Always organize view properties in this order:**
1. Environment
2. State
3. Body
4. Helpers
**Use unrelated tooling:**
1. Reconfigure the build system
2. Run a general-purpose debugger workflowUpdating the Skill
When adding new content:
- Ask: "Is this SwiftUI-specific?"
- Ask: "Is this a fact or an opinion?"
- Ask: "Can agents actually use this?"
- Ask: "Is this about correctness or style?"
If unsure, err on the side of excluding content. It's better to have a focused, factual skill than a comprehensive but opinionated one.
Maintenance Skills
This repository includes a maintenance skill for keeping API guidance up to date:
.agents/skills/update-swiftui-apis/SKILL.md— Scan Apple's SwiftUI documentation via the Sosumi MCP, identify deprecated APIs and their modern replacements, and updateskills/swiftui-expert-skill/references/latest-apis.md. Use after new iOS/Xcode releases or when you want to refresh the deprecated API reference.
Summary
Focus: SwiftUI APIs, patterns, and correctness Avoid: Formatting, architecture, tools, Swift language features Tone: Factual, helpful, non-prescriptive Goal: Make agents SwiftUI experts without enforcing opinions
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.

