agentleFS
sreejithramansreejithraman/SreeStack/skills/swiftui/SKILL.md

swiftui

Skill1 starsChanged 16 days agoMITView on GitHub

SwiftUI interface work on Apple platforms. Use when choosing SwiftUI versus UIKit; building, reviewing, or restructuring SwiftUI views, state flow, navigation, presentation, collection interactions, toolbars, remote images, document apps, accessibility semantics, Liquid Glass, or SDK migration fixes; or applying a diagnosed SwiftUI performance fix.

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read only the references needed for the task:

    line 21
  2. Distinctive:

    Prefer native containers and controls for the target platform.

    line 54
  3. Distinctive:

    After performance diagnosis identifies the bottleneck, use the data-flow and composition guidance here to narrow invalidation or reduce …

    line 79

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SwiftUI

Shape the interface around SwiftUI's ownership, identity, and environment rather than reproducing an imperative view hierarchy. Preserve the product's existing architecture and deployment targets unless the task changes them.

For an authorized build or fix, implement and test the workflow below. For a plan or review, leave the product unchanged and turn its implementation and test steps into exact proposed changes, findings, and checks.

Workflow

  1. Inspect the affected scene, views, models, deployment targets, and existing design system. Trace each mutable value to its source of truth and each user action to the code that owns its effect.
  2. Read only the references needed for the task:
    • Model the Domain for state ownership and domain shapes; Boundary Discipline for interface boundaries; and Make Operations Idempotent when effects can overlap, repeat, or outlive their view. Apply these through SwiftUI's state, identity, and lifecycle rules below.
    • Choosing SwiftUI or UIKit when the framework is not fixed or the work could introduce a framework boundary. If UIKit owns the affected surface, continue with uikit and end this workflow. For a hybrid, name the boundary and continue here only for the SwiftUI-owned side.
    • State and data flow for ownership, Observation, bindings, environment values, or editable drafts.
    • Composition and identity for view boundaries, collection identity, update scope, or restructuring a large view.
    • Navigation and presentation for stacks, split views, routes, sheets, dialogs, or restoration.
    • SDK 27 migration when an Xcode 27 build introduces @State, result-builder, or preview diagnostics.
    • Collection interactions for reordering or swipe actions in lists, stacks, grids, or custom layouts.
    • Toolbars for overflow, pinned items, visibility priority, or minimization behavior.
    • Remote images for AsyncImage loading, request policy, session choice, or caching.
    • Document apps for creating or migrating a document-based app, viewer, reader, or writer.
    • Materials and Liquid Glass when adopting current platform materials or reviewing custom glass effects.
  3. Make the source of truth and view identity explicit before changing layout. Give each view only the values, bindings, and actions it needs. Keep durable storage and business rules outside transient view state.
  4. Prefer native containers and controls for the target platform. Add a UIKit or AppKit bridge at a deliberate boundary when SwiftUI lacks the required behavior; keep lifecycle and ownership on one side of that boundary.
  5. For interactive components, give immediate feedback and keep loading, empty, disabled, error, and overflow states close to the action or content they describe. Prevent interrupted or repeated async work from letting an older result overwrite the current state. Prefer platform controls and strong defaults over extra options; preserve valid activation and cancellation. When sizing a button, inspect its visible bounds and hit region after styling; compare the hit region, not the label frame, with the platform's button guidance.
  6. Preserve useful accessibility semantics. Expose the control's name, value, state, and actions, and keep focus and announcements aligned with the task and reading order rather than an incidental view hierarchy. Announce visible async status, validation, and errors when focus does not move and the change would otherwise be missed.
  7. Build the affected targets and exercise main, edge-state, interruption, and repeated-input transitions. When behavior or accessibility is in scope, exercise the supported touch, pointer, keyboard, focus, announcement, and VoiceOver reading paths. Use verify for visual or interactive acceptance checks. Use animate for motion design, ios-haptics for iOS tactile feedback, ui-design for visual hierarchy and token-system work, and diagnosing-bugs when a failure or performance regression needs investigation.

After performance diagnosis identifies the bottleneck, use the data-flow and composition guidance here to narrow invalidation or reduce body work without changing behavior.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.