SwiftUI Conventions

SwiftUI Conventions is a skill for Claude Code, Codex from niels-emmer/myace. It costs 21 tokens per session (347 once invoked), scanned A, original, MIT.

A set of SwiftUI coding rules for managing view state, splitting views into reusable pieces, and checking different screen states in previews. SwiftUI is Apple's framework for building iPhone and iPad interfaces.

In plain words
What is it for?
Use it when building or reviewing SwiftUI views, view models, and previews for iOS apps.
Why use it?
It keeps state ownership and view structure consistent, reducing confusing updates and logic that is hard to test. It also makes empty and error screens visible during development.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions OpenCode.

Good fit Use it when building or reviewing SwiftUI views, view models, and previews for iOS apps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/niels-emmer/myace/swiftui-conventions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add niels-emmer/myace --skill swiftui-conventions
Clone the repo
git clone --depth 1 https://github.com/niels-emmer/myace

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for SwiftUI Conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/niels-emmer/myace/swiftui-conventions/github.svg)](https://agentmods.dev/skills/niels-emmer/myace/swiftui-conventions)
Your own site
<a href="https://agentmods.dev/skills/niels-emmer/myace/swiftui-conventions"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/swiftui-conventions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for SwiftUI Conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/niels-emmer/myace/swiftui-conventions"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/swiftui-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 347 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00347
Opus 5 $0.00010 $0.00173
Sonnet 5 $0.00004 $0.00069
Haiku 4.5 $0.00002 $0.00035

Measured 7d ago against content hash fa03da752feb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

SwiftUI Conventions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

collections/additional/ios-developer/skills/swiftui-conventions/SKILL.md · 26 lines

What it actually says

Purpose

Consistent SwiftUI patterns across the codebase — predictable state management and view composition.

Checklist

  • @State: for simple value-type state owned by a single view (toggles, text field values, expand/collapse).
  • @Binding: for child views that need to read/write a parent's state. Prefer binding to a specific field, not the entire model.
  • @StateObject: for reference-type view models owned by this view. The view that creates the model owns it with @StateObject.
  • @ObservedObject: for view models passed in from a parent. Never use @ObservedObject to create a model — that's @StateObject's job.
  • @EnvironmentObject: for app-wide dependencies (auth state, theme, data store). Use sparingly — prefer explicit passing for most cases.
  • View composition: extract reusable subviews into computed properties or small View structs. Use @ViewBuilder for conditional content.
  • Previews: every view has a preview provider showing default state, empty state, and error state.

Expected output

SwiftUI views with predictable state management, no business logic in views, and preview coverage for all states.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 26 lines · 21 tokens per session scan A fa03da752feb

Subscribe to this mod's changes

SwiftUI Conventions is a skill published in the GitHub repository niels-emmer/myace (1 stars, last pushed 4d ago), licensed MIT. It adds 21 tokens to every session and 347 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

swift-expert

Expert-level Swift development for iOS, macOS with SwiftUI, Combine, and modern Swift 5.9+. Use when the user mentions iOS, macOS, SwiftUI, Combine, async await, or Apple platforms, or when the task involves Modern Swift Features, Basics and Optionals, Functions and Closures, or Structs and Classes.

personamanagmentlayer/pcl · 76 tokens

ios-expert

Expert in iOS development with SwiftUI, UIKit, Combine, and Apple ecosystem integration. Use when the user mentions mobile, Swift, SwiftUI, UIKit, Apple platforms, or Xcode, or when the task involves iOS App Architecture, SwiftUI Fundamentals, UIKit Essentials, or Combine Framework.

personamanagmentlayer/pcl · 64 tokens

swift-architecture-skill

Swift iOS architecture guidance and playbooks for MVVM, MVI, TCA, Clean Architecture, VIPER, MVP, Coordinator, and Reactive patterns. Use when designing, implementing, refactoring, or reviewing the architecture of a SwiftUI or UIKit feature, module, or codebase.

efremidze/swift-architecture-skill · 65 tokens

antigravity-root

Enterprise-grade iOS development workflow for TTBaseUIKit-powered apps. Cross-functional product analysis | MVVM-C Architecture | UIKit + SwiftUI | TTViewCodable | TTBaseSUI | xcodebuild CLI Verification | Zero Regression | iOS 14+.

tqtuan1201/TTBaseUIKit · 57 tokens

ios-app-builder

Implement or finish a production-grade Swift and SwiftUI app from an accepted product specification. Use when creating Xcode targets, models, persistence, navigation, responsive views, imports/exports, StoreKit 2, privacy manifests, accessibility, migrations, error handling, tests, or replacing prototype behavior with…

MartinPuli/createAnApp · 69 tokens

swiftui-compose

Compose Multiplatform ↔ SwiftUI integration patterns. USE FOR: embedding Compose Multiplatform views in a SwiftUI app; embedding SwiftUI/UIKit components inside Compose Multiplatform; sharing state between Compose and SwiftUI; managing the Compose UIViewController lifecycle; bidirectional data flow with the…

sorunokoe/swiftui-compose-skill · 65 tokens