[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-swiftui-ui-patterns":3,"mdc--x5jyau-key":36,"related-org-openai-swiftui-ui-patterns":929,"related-repo-openai-swiftui-ui-patterns":1134},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":34,"mdContent":35},"swiftui-ui-patterns","build SwiftUI views and components","Build and refactor SwiftUI UI with component patterns and examples. Use when shaping navigation, state, layouts, controls, or screen composition.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"SwiftUI","swiftui","tag",{"name":17,"slug":18,"type":15},"iOS","ios",{"name":20,"slug":21,"type":15},"Xcode","xcode",{"name":23,"slug":24,"type":15},"UI Components","ui-components",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-04-06T18:40:03.214117",null,465,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":33},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fbuild-ios-apps\u002Fskills\u002Fswiftui-ui-patterns","---\nname: swiftui-ui-patterns\ndescription: Build and refactor SwiftUI UI with component patterns and examples. Use when shaping navigation, state, layouts, controls, or screen composition.\n---\n\n# SwiftUI UI Patterns\n\n## Quick start\n\nChoose a track based on your goal:\n\n### Existing project\n\n- Identify the feature or screen and the primary interaction model (list, detail, editor, settings, tabbed).\n- Find a nearby example in the repo with `rg \"TabView\\(\"` or similar, then read the closest SwiftUI view.\n- Apply local conventions: prefer SwiftUI-native state, keep state local when possible, and use environment injection for shared dependencies.\n- Choose the relevant component reference from `references\u002Fcomponents-index.md` and follow its guidance.\n- If the interaction reveals secondary content by dragging or scrolling the primary content away, read `references\u002Fscroll-reveal.md` before implementing gestures manually.\n- Build the view with small, focused subviews and SwiftUI-native data flow.\n\n### New project scaffolding\n\n- Start with `references\u002Fapp-wiring.md` to wire TabView + NavigationStack + sheets.\n- Add a minimal `AppTab` and `RouterPath` based on the provided skeletons.\n- Choose the next component reference based on the UI you need first (TabView, NavigationStack, Sheets).\n- Expand the route and sheet enums as new screens are added.\n\n## General rules to follow\n\n- Use modern SwiftUI state (`@State`, `@Binding`, `@Observable`, `@Environment`) and avoid unnecessary view models.\n- If the deployment target includes iOS 16 or earlier and cannot use the Observation API introduced in iOS 17, fall back to `ObservableObject` with `@StateObject` for root ownership, `@ObservedObject` for injected observation, and `@EnvironmentObject` only for truly shared app-level state.\n- Prefer composition; keep views small and focused.\n- Use async\u002Fawait with `.task` and explicit loading\u002Ferror states. For restart, cancellation, and debouncing guidance, read `references\u002Fasync-state.md`.\n- Keep shared app services in `@Environment`, but prefer explicit initializer injection for feature-local dependencies and models. For root wiring patterns, read `references\u002Fapp-wiring.md`.\n- Prefer the newest SwiftUI API that fits the deployment target and call out the minimum OS whenever a pattern depends on it.\n- Maintain existing legacy patterns only when editing legacy files.\n- Follow the project's formatter and style guide.\n- **Sheets**: Prefer `.sheet(item:)` over `.sheet(isPresented:)` when state represents a selected model. Avoid `if let` inside a sheet body. Sheets should own their actions and call `dismiss()` internally instead of forwarding `onCancel`\u002F`onConfirm` closures.\n- **Scroll-driven reveals**: Prefer deriving a normalized progress value from scroll offset and driving the visual state from that single source of truth. Avoid parallel gesture state machines unless scroll alone cannot express the interaction.\n\n## State ownership summary\n\nUse the narrowest state tool that matches the ownership model:\n\n| Scenario | Preferred pattern |\n| --- | --- |\n| Local UI state owned by one view | `@State` |\n| Child mutates parent-owned value state | `@Binding` |\n| Root-owned reference model on iOS 17+ | `@State` with an `@Observable` type |\n| Child reads or mutates an injected `@Observable` model on iOS 17+ | Pass it explicitly as a stored property |\n| Shared app service or configuration | `@Environment(Type.self)` |\n| Legacy reference model on iOS 16 and earlier | `@StateObject` at the root, `@ObservedObject` when injected |\n\nChoose the ownership location first, then pick the wrapper. Do not introduce a reference model when plain value state is enough.\n\n## Cross-cutting references\n\n- In addition to the references below, use web search to consult current Apple Developer documentation when SwiftUI APIs, availability, or platform guidance may have changed.\n- `references\u002Fnavigationstack.md`: navigation ownership, per-tab history, and enum routing.\n- `references\u002Fsheets.md`: centralized modal presentation and enum-driven sheets.\n- `references\u002Fdeeplinks.md`: URL handling and routing external links into app destinations.\n- `references\u002Fapp-wiring.md`: root dependency graph, environment usage, and app shell wiring.\n- `references\u002Fasync-state.md`: `.task`, `.task(id:)`, cancellation, debouncing, and async UI state.\n- `references\u002Fpreviews.md`: `#Preview`, fixtures, mock environments, and isolated preview setup.\n- `references\u002Fperformance.md`: stable identity, observation scope, lazy containers, and render-cost guardrails.\n\n## Anti-patterns\n\n- Giant views that mix layout, business logic, networking, routing, and formatting in one file.\n- Multiple boolean flags for mutually exclusive sheets, alerts, or navigation destinations.\n- Live service calls directly inside `body`-driven code paths instead of view lifecycle hooks or injected models\u002Fservices.\n- Reaching for `AnyView` to work around type mismatches that should be solved with better composition.\n- Defaulting every shared dependency to `@EnvironmentObject` or a global router without a clear ownership reason.\n\n## Workflow for a new SwiftUI view\n\n1. Define the view's state, ownership location, and minimum OS assumptions before writing UI code.\n2. Identify which dependencies belong in `@Environment` and which should stay as explicit initializer inputs.\n3. Sketch the view hierarchy, routing model, and presentation points; extract repeated parts into subviews. For complex navigation, read `references\u002Fnavigationstack.md`, `references\u002Fsheets.md`, or `references\u002Fdeeplinks.md`. **Build and verify no compiler errors before proceeding.**\n4. Implement async loading with `.task` or `.task(id:)`, plus explicit loading and error states when needed. Read `references\u002Fasync-state.md` when the work depends on changing inputs or cancellation.\n5. Add previews for the primary and secondary states, then add accessibility labels or identifiers when the UI is interactive. Read `references\u002Fpreviews.md` when the view needs fixtures or injected mock dependencies.\n6. Validate with a build: confirm no compiler errors, check that previews render without crashing, ensure state changes propagate correctly, and sanity-check that list identity and observation scope will not cause avoidable re-renders. Read `references\u002Fperformance.md` if the screen is large, scroll-heavy, or frequently updated. For common SwiftUI compilation errors — missing `@State` annotations, ambiguous `ViewBuilder` closures, or mismatched generic types — resolve them before updating callsites. **If the build fails:** read the error message carefully, fix the identified issue, then rebuild before proceeding to the next step. If a preview crashes, isolate the offending subview, confirm its state initialisation is valid, and re-run the preview before continuing.\n\n## Component references\n\nUse `references\u002Fcomponents-index.md` as the entry point. Each component reference should include:\n- Intent and best-fit scenarios.\n- Minimal usage pattern with local conventions.\n- Pitfalls and performance notes.\n- Paths to existing examples in the current repo.\n\n## Adding a new component reference\n\n- Create `references\u002F\u003Ccomponent>.md`.\n- Keep it short and actionable; link to concrete files in the current repo.\n- Update `references\u002Fcomponents-index.md` with the new entry.\n",{"data":37,"body":38},{"name":4,"description":6},{"type":39,"children":40},"root",[41,49,56,62,69,129,135,182,188,391,397,402,549,554,560,664,670,721,727,850,856,868,891,897],{"type":42,"tag":43,"props":44,"children":45},"element","h1",{"id":4},[46],{"type":47,"value":48},"text","SwiftUI UI Patterns",{"type":42,"tag":50,"props":51,"children":53},"h2",{"id":52},"quick-start",[54],{"type":47,"value":55},"Quick start",{"type":42,"tag":57,"props":58,"children":59},"p",{},[60],{"type":47,"value":61},"Choose a track based on your goal:",{"type":42,"tag":63,"props":64,"children":66},"h3",{"id":65},"existing-project",[67],{"type":47,"value":68},"Existing project",{"type":42,"tag":70,"props":71,"children":72},"ul",{},[73,79,93,98,111,124],{"type":42,"tag":74,"props":75,"children":76},"li",{},[77],{"type":47,"value":78},"Identify the feature or screen and the primary interaction model (list, detail, editor, settings, tabbed).",{"type":42,"tag":74,"props":80,"children":81},{},[82,84,91],{"type":47,"value":83},"Find a nearby example in the repo with ",{"type":42,"tag":85,"props":86,"children":88},"code",{"className":87},[],[89],{"type":47,"value":90},"rg \"TabView\\(\"",{"type":47,"value":92}," or similar, then read the closest SwiftUI view.",{"type":42,"tag":74,"props":94,"children":95},{},[96],{"type":47,"value":97},"Apply local conventions: prefer SwiftUI-native state, keep state local when possible, and use environment injection for shared dependencies.",{"type":42,"tag":74,"props":99,"children":100},{},[101,103,109],{"type":47,"value":102},"Choose the relevant component reference from ",{"type":42,"tag":85,"props":104,"children":106},{"className":105},[],[107],{"type":47,"value":108},"references\u002Fcomponents-index.md",{"type":47,"value":110}," and follow its guidance.",{"type":42,"tag":74,"props":112,"children":113},{},[114,116,122],{"type":47,"value":115},"If the interaction reveals secondary content by dragging or scrolling the primary content away, read ",{"type":42,"tag":85,"props":117,"children":119},{"className":118},[],[120],{"type":47,"value":121},"references\u002Fscroll-reveal.md",{"type":47,"value":123}," before implementing gestures manually.",{"type":42,"tag":74,"props":125,"children":126},{},[127],{"type":47,"value":128},"Build the view with small, focused subviews and SwiftUI-native data flow.",{"type":42,"tag":63,"props":130,"children":132},{"id":131},"new-project-scaffolding",[133],{"type":47,"value":134},"New project scaffolding",{"type":42,"tag":70,"props":136,"children":137},{},[138,151,172,177],{"type":42,"tag":74,"props":139,"children":140},{},[141,143,149],{"type":47,"value":142},"Start with ",{"type":42,"tag":85,"props":144,"children":146},{"className":145},[],[147],{"type":47,"value":148},"references\u002Fapp-wiring.md",{"type":47,"value":150}," to wire TabView + NavigationStack + sheets.",{"type":42,"tag":74,"props":152,"children":153},{},[154,156,162,164,170],{"type":47,"value":155},"Add a minimal ",{"type":42,"tag":85,"props":157,"children":159},{"className":158},[],[160],{"type":47,"value":161},"AppTab",{"type":47,"value":163}," and ",{"type":42,"tag":85,"props":165,"children":167},{"className":166},[],[168],{"type":47,"value":169},"RouterPath",{"type":47,"value":171}," based on the provided skeletons.",{"type":42,"tag":74,"props":173,"children":174},{},[175],{"type":47,"value":176},"Choose the next component reference based on the UI you need first (TabView, NavigationStack, Sheets).",{"type":42,"tag":74,"props":178,"children":179},{},[180],{"type":47,"value":181},"Expand the route and sheet enums as new screens are added.",{"type":42,"tag":50,"props":183,"children":185},{"id":184},"general-rules-to-follow",[186],{"type":47,"value":187},"General rules to follow",{"type":42,"tag":70,"props":189,"children":190},{},[191,226,263,268,289,307,312,317,322,381],{"type":42,"tag":74,"props":192,"children":193},{},[194,196,202,204,210,211,217,218,224],{"type":47,"value":195},"Use modern SwiftUI state (",{"type":42,"tag":85,"props":197,"children":199},{"className":198},[],[200],{"type":47,"value":201},"@State",{"type":47,"value":203},", ",{"type":42,"tag":85,"props":205,"children":207},{"className":206},[],[208],{"type":47,"value":209},"@Binding",{"type":47,"value":203},{"type":42,"tag":85,"props":212,"children":214},{"className":213},[],[215],{"type":47,"value":216},"@Observable",{"type":47,"value":203},{"type":42,"tag":85,"props":219,"children":221},{"className":220},[],[222],{"type":47,"value":223},"@Environment",{"type":47,"value":225},") and avoid unnecessary view models.",{"type":42,"tag":74,"props":227,"children":228},{},[229,231,237,239,245,247,253,255,261],{"type":47,"value":230},"If the deployment target includes iOS 16 or earlier and cannot use the Observation API introduced in iOS 17, fall back to ",{"type":42,"tag":85,"props":232,"children":234},{"className":233},[],[235],{"type":47,"value":236},"ObservableObject",{"type":47,"value":238}," with ",{"type":42,"tag":85,"props":240,"children":242},{"className":241},[],[243],{"type":47,"value":244},"@StateObject",{"type":47,"value":246}," for root ownership, ",{"type":42,"tag":85,"props":248,"children":250},{"className":249},[],[251],{"type":47,"value":252},"@ObservedObject",{"type":47,"value":254}," for injected observation, and ",{"type":42,"tag":85,"props":256,"children":258},{"className":257},[],[259],{"type":47,"value":260},"@EnvironmentObject",{"type":47,"value":262}," only for truly shared app-level state.",{"type":42,"tag":74,"props":264,"children":265},{},[266],{"type":47,"value":267},"Prefer composition; keep views small and focused.",{"type":42,"tag":74,"props":269,"children":270},{},[271,273,279,281,287],{"type":47,"value":272},"Use async\u002Fawait with ",{"type":42,"tag":85,"props":274,"children":276},{"className":275},[],[277],{"type":47,"value":278},".task",{"type":47,"value":280}," and explicit loading\u002Ferror states. For restart, cancellation, and debouncing guidance, read ",{"type":42,"tag":85,"props":282,"children":284},{"className":283},[],[285],{"type":47,"value":286},"references\u002Fasync-state.md",{"type":47,"value":288},".",{"type":42,"tag":74,"props":290,"children":291},{},[292,294,299,301,306],{"type":47,"value":293},"Keep shared app services in ",{"type":42,"tag":85,"props":295,"children":297},{"className":296},[],[298],{"type":47,"value":223},{"type":47,"value":300},", but prefer explicit initializer injection for feature-local dependencies and models. For root wiring patterns, read ",{"type":42,"tag":85,"props":302,"children":304},{"className":303},[],[305],{"type":47,"value":148},{"type":47,"value":288},{"type":42,"tag":74,"props":308,"children":309},{},[310],{"type":47,"value":311},"Prefer the newest SwiftUI API that fits the deployment target and call out the minimum OS whenever a pattern depends on it.",{"type":42,"tag":74,"props":313,"children":314},{},[315],{"type":47,"value":316},"Maintain existing legacy patterns only when editing legacy files.",{"type":42,"tag":74,"props":318,"children":319},{},[320],{"type":47,"value":321},"Follow the project's formatter and style guide.",{"type":42,"tag":74,"props":323,"children":324},{},[325,331,333,339,341,347,349,355,357,363,365,371,373,379],{"type":42,"tag":326,"props":327,"children":328},"strong",{},[329],{"type":47,"value":330},"Sheets",{"type":47,"value":332},": Prefer ",{"type":42,"tag":85,"props":334,"children":336},{"className":335},[],[337],{"type":47,"value":338},".sheet(item:)",{"type":47,"value":340}," over ",{"type":42,"tag":85,"props":342,"children":344},{"className":343},[],[345],{"type":47,"value":346},".sheet(isPresented:)",{"type":47,"value":348}," when state represents a selected model. Avoid ",{"type":42,"tag":85,"props":350,"children":352},{"className":351},[],[353],{"type":47,"value":354},"if let",{"type":47,"value":356}," inside a sheet body. Sheets should own their actions and call ",{"type":42,"tag":85,"props":358,"children":360},{"className":359},[],[361],{"type":47,"value":362},"dismiss()",{"type":47,"value":364}," internally instead of forwarding ",{"type":42,"tag":85,"props":366,"children":368},{"className":367},[],[369],{"type":47,"value":370},"onCancel",{"type":47,"value":372},"\u002F",{"type":42,"tag":85,"props":374,"children":376},{"className":375},[],[377],{"type":47,"value":378},"onConfirm",{"type":47,"value":380}," closures.",{"type":42,"tag":74,"props":382,"children":383},{},[384,389],{"type":42,"tag":326,"props":385,"children":386},{},[387],{"type":47,"value":388},"Scroll-driven reveals",{"type":47,"value":390},": Prefer deriving a normalized progress value from scroll offset and driving the visual state from that single source of truth. Avoid parallel gesture state machines unless scroll alone cannot express the interaction.",{"type":42,"tag":50,"props":392,"children":394},{"id":393},"state-ownership-summary",[395],{"type":47,"value":396},"State ownership summary",{"type":42,"tag":57,"props":398,"children":399},{},[400],{"type":47,"value":401},"Use the narrowest state tool that matches the ownership model:",{"type":42,"tag":403,"props":404,"children":405},"table",{},[406,425],{"type":42,"tag":407,"props":408,"children":409},"thead",{},[410],{"type":42,"tag":411,"props":412,"children":413},"tr",{},[414,420],{"type":42,"tag":415,"props":416,"children":417},"th",{},[418],{"type":47,"value":419},"Scenario",{"type":42,"tag":415,"props":421,"children":422},{},[423],{"type":47,"value":424},"Preferred pattern",{"type":42,"tag":426,"props":427,"children":428},"tbody",{},[429,446,462,487,507,524],{"type":42,"tag":411,"props":430,"children":431},{},[432,438],{"type":42,"tag":433,"props":434,"children":435},"td",{},[436],{"type":47,"value":437},"Local UI state owned by one view",{"type":42,"tag":433,"props":439,"children":440},{},[441],{"type":42,"tag":85,"props":442,"children":444},{"className":443},[],[445],{"type":47,"value":201},{"type":42,"tag":411,"props":447,"children":448},{},[449,454],{"type":42,"tag":433,"props":450,"children":451},{},[452],{"type":47,"value":453},"Child mutates parent-owned value state",{"type":42,"tag":433,"props":455,"children":456},{},[457],{"type":42,"tag":85,"props":458,"children":460},{"className":459},[],[461],{"type":47,"value":209},{"type":42,"tag":411,"props":463,"children":464},{},[465,470],{"type":42,"tag":433,"props":466,"children":467},{},[468],{"type":47,"value":469},"Root-owned reference model on iOS 17+",{"type":42,"tag":433,"props":471,"children":472},{},[473,478,480,485],{"type":42,"tag":85,"props":474,"children":476},{"className":475},[],[477],{"type":47,"value":201},{"type":47,"value":479}," with an ",{"type":42,"tag":85,"props":481,"children":483},{"className":482},[],[484],{"type":47,"value":216},{"type":47,"value":486}," type",{"type":42,"tag":411,"props":488,"children":489},{},[490,502],{"type":42,"tag":433,"props":491,"children":492},{},[493,495,500],{"type":47,"value":494},"Child reads or mutates an injected ",{"type":42,"tag":85,"props":496,"children":498},{"className":497},[],[499],{"type":47,"value":216},{"type":47,"value":501}," model on iOS 17+",{"type":42,"tag":433,"props":503,"children":504},{},[505],{"type":47,"value":506},"Pass it explicitly as a stored property",{"type":42,"tag":411,"props":508,"children":509},{},[510,515],{"type":42,"tag":433,"props":511,"children":512},{},[513],{"type":47,"value":514},"Shared app service or configuration",{"type":42,"tag":433,"props":516,"children":517},{},[518],{"type":42,"tag":85,"props":519,"children":521},{"className":520},[],[522],{"type":47,"value":523},"@Environment(Type.self)",{"type":42,"tag":411,"props":525,"children":526},{},[527,532],{"type":42,"tag":433,"props":528,"children":529},{},[530],{"type":47,"value":531},"Legacy reference model on iOS 16 and earlier",{"type":42,"tag":433,"props":533,"children":534},{},[535,540,542,547],{"type":42,"tag":85,"props":536,"children":538},{"className":537},[],[539],{"type":47,"value":244},{"type":47,"value":541}," at the root, ",{"type":42,"tag":85,"props":543,"children":545},{"className":544},[],[546],{"type":47,"value":252},{"type":47,"value":548}," when injected",{"type":42,"tag":57,"props":550,"children":551},{},[552],{"type":47,"value":553},"Choose the ownership location first, then pick the wrapper. Do not introduce a reference model when plain value state is enough.",{"type":42,"tag":50,"props":555,"children":557},{"id":556},"cross-cutting-references",[558],{"type":47,"value":559},"Cross-cutting references",{"type":42,"tag":70,"props":561,"children":562},{},[563,568,579,590,601,611,635,653],{"type":42,"tag":74,"props":564,"children":565},{},[566],{"type":47,"value":567},"In addition to the references below, use web search to consult current Apple Developer documentation when SwiftUI APIs, availability, or platform guidance may have changed.",{"type":42,"tag":74,"props":569,"children":570},{},[571,577],{"type":42,"tag":85,"props":572,"children":574},{"className":573},[],[575],{"type":47,"value":576},"references\u002Fnavigationstack.md",{"type":47,"value":578},": navigation ownership, per-tab history, and enum routing.",{"type":42,"tag":74,"props":580,"children":581},{},[582,588],{"type":42,"tag":85,"props":583,"children":585},{"className":584},[],[586],{"type":47,"value":587},"references\u002Fsheets.md",{"type":47,"value":589},": centralized modal presentation and enum-driven sheets.",{"type":42,"tag":74,"props":591,"children":592},{},[593,599],{"type":42,"tag":85,"props":594,"children":596},{"className":595},[],[597],{"type":47,"value":598},"references\u002Fdeeplinks.md",{"type":47,"value":600},": URL handling and routing external links into app destinations.",{"type":42,"tag":74,"props":602,"children":603},{},[604,609],{"type":42,"tag":85,"props":605,"children":607},{"className":606},[],[608],{"type":47,"value":148},{"type":47,"value":610},": root dependency graph, environment usage, and app shell wiring.",{"type":42,"tag":74,"props":612,"children":613},{},[614,619,621,626,627,633],{"type":42,"tag":85,"props":615,"children":617},{"className":616},[],[618],{"type":47,"value":286},{"type":47,"value":620},": ",{"type":42,"tag":85,"props":622,"children":624},{"className":623},[],[625],{"type":47,"value":278},{"type":47,"value":203},{"type":42,"tag":85,"props":628,"children":630},{"className":629},[],[631],{"type":47,"value":632},".task(id:)",{"type":47,"value":634},", cancellation, debouncing, and async UI state.",{"type":42,"tag":74,"props":636,"children":637},{},[638,644,645,651],{"type":42,"tag":85,"props":639,"children":641},{"className":640},[],[642],{"type":47,"value":643},"references\u002Fpreviews.md",{"type":47,"value":620},{"type":42,"tag":85,"props":646,"children":648},{"className":647},[],[649],{"type":47,"value":650},"#Preview",{"type":47,"value":652},", fixtures, mock environments, and isolated preview setup.",{"type":42,"tag":74,"props":654,"children":655},{},[656,662],{"type":42,"tag":85,"props":657,"children":659},{"className":658},[],[660],{"type":47,"value":661},"references\u002Fperformance.md",{"type":47,"value":663},": stable identity, observation scope, lazy containers, and render-cost guardrails.",{"type":42,"tag":50,"props":665,"children":667},{"id":666},"anti-patterns",[668],{"type":47,"value":669},"Anti-patterns",{"type":42,"tag":70,"props":671,"children":672},{},[673,678,683,696,709],{"type":42,"tag":74,"props":674,"children":675},{},[676],{"type":47,"value":677},"Giant views that mix layout, business logic, networking, routing, and formatting in one file.",{"type":42,"tag":74,"props":679,"children":680},{},[681],{"type":47,"value":682},"Multiple boolean flags for mutually exclusive sheets, alerts, or navigation destinations.",{"type":42,"tag":74,"props":684,"children":685},{},[686,688,694],{"type":47,"value":687},"Live service calls directly inside ",{"type":42,"tag":85,"props":689,"children":691},{"className":690},[],[692],{"type":47,"value":693},"body",{"type":47,"value":695},"-driven code paths instead of view lifecycle hooks or injected models\u002Fservices.",{"type":42,"tag":74,"props":697,"children":698},{},[699,701,707],{"type":47,"value":700},"Reaching for ",{"type":42,"tag":85,"props":702,"children":704},{"className":703},[],[705],{"type":47,"value":706},"AnyView",{"type":47,"value":708}," to work around type mismatches that should be solved with better composition.",{"type":42,"tag":74,"props":710,"children":711},{},[712,714,719],{"type":47,"value":713},"Defaulting every shared dependency to ",{"type":42,"tag":85,"props":715,"children":717},{"className":716},[],[718],{"type":47,"value":260},{"type":47,"value":720}," or a global router without a clear ownership reason.",{"type":42,"tag":50,"props":722,"children":724},{"id":723},"workflow-for-a-new-swiftui-view",[725],{"type":47,"value":726},"Workflow for a new SwiftUI view",{"type":42,"tag":728,"props":729,"children":730},"ol",{},[731,736,748,778,804,816],{"type":42,"tag":74,"props":732,"children":733},{},[734],{"type":47,"value":735},"Define the view's state, ownership location, and minimum OS assumptions before writing UI code.",{"type":42,"tag":74,"props":737,"children":738},{},[739,741,746],{"type":47,"value":740},"Identify which dependencies belong in ",{"type":42,"tag":85,"props":742,"children":744},{"className":743},[],[745],{"type":47,"value":223},{"type":47,"value":747}," and which should stay as explicit initializer inputs.",{"type":42,"tag":74,"props":749,"children":750},{},[751,753,758,759,764,766,771,773],{"type":47,"value":752},"Sketch the view hierarchy, routing model, and presentation points; extract repeated parts into subviews. For complex navigation, read ",{"type":42,"tag":85,"props":754,"children":756},{"className":755},[],[757],{"type":47,"value":576},{"type":47,"value":203},{"type":42,"tag":85,"props":760,"children":762},{"className":761},[],[763],{"type":47,"value":587},{"type":47,"value":765},", or ",{"type":42,"tag":85,"props":767,"children":769},{"className":768},[],[770],{"type":47,"value":598},{"type":47,"value":772},". ",{"type":42,"tag":326,"props":774,"children":775},{},[776],{"type":47,"value":777},"Build and verify no compiler errors before proceeding.",{"type":42,"tag":74,"props":779,"children":780},{},[781,783,788,790,795,797,802],{"type":47,"value":782},"Implement async loading with ",{"type":42,"tag":85,"props":784,"children":786},{"className":785},[],[787],{"type":47,"value":278},{"type":47,"value":789}," or ",{"type":42,"tag":85,"props":791,"children":793},{"className":792},[],[794],{"type":47,"value":632},{"type":47,"value":796},", plus explicit loading and error states when needed. Read ",{"type":42,"tag":85,"props":798,"children":800},{"className":799},[],[801],{"type":47,"value":286},{"type":47,"value":803}," when the work depends on changing inputs or cancellation.",{"type":42,"tag":74,"props":805,"children":806},{},[807,809,814],{"type":47,"value":808},"Add previews for the primary and secondary states, then add accessibility labels or identifiers when the UI is interactive. Read ",{"type":42,"tag":85,"props":810,"children":812},{"className":811},[],[813],{"type":47,"value":643},{"type":47,"value":815}," when the view needs fixtures or injected mock dependencies.",{"type":42,"tag":74,"props":817,"children":818},{},[819,821,826,828,833,835,841,843,848],{"type":47,"value":820},"Validate with a build: confirm no compiler errors, check that previews render without crashing, ensure state changes propagate correctly, and sanity-check that list identity and observation scope will not cause avoidable re-renders. Read ",{"type":42,"tag":85,"props":822,"children":824},{"className":823},[],[825],{"type":47,"value":661},{"type":47,"value":827}," if the screen is large, scroll-heavy, or frequently updated. For common SwiftUI compilation errors — missing ",{"type":42,"tag":85,"props":829,"children":831},{"className":830},[],[832],{"type":47,"value":201},{"type":47,"value":834}," annotations, ambiguous ",{"type":42,"tag":85,"props":836,"children":838},{"className":837},[],[839],{"type":47,"value":840},"ViewBuilder",{"type":47,"value":842}," closures, or mismatched generic types — resolve them before updating callsites. ",{"type":42,"tag":326,"props":844,"children":845},{},[846],{"type":47,"value":847},"If the build fails:",{"type":47,"value":849}," read the error message carefully, fix the identified issue, then rebuild before proceeding to the next step. If a preview crashes, isolate the offending subview, confirm its state initialisation is valid, and re-run the preview before continuing.",{"type":42,"tag":50,"props":851,"children":853},{"id":852},"component-references",[854],{"type":47,"value":855},"Component references",{"type":42,"tag":57,"props":857,"children":858},{},[859,861,866],{"type":47,"value":860},"Use ",{"type":42,"tag":85,"props":862,"children":864},{"className":863},[],[865],{"type":47,"value":108},{"type":47,"value":867}," as the entry point. Each component reference should include:",{"type":42,"tag":70,"props":869,"children":870},{},[871,876,881,886],{"type":42,"tag":74,"props":872,"children":873},{},[874],{"type":47,"value":875},"Intent and best-fit scenarios.",{"type":42,"tag":74,"props":877,"children":878},{},[879],{"type":47,"value":880},"Minimal usage pattern with local conventions.",{"type":42,"tag":74,"props":882,"children":883},{},[884],{"type":47,"value":885},"Pitfalls and performance notes.",{"type":42,"tag":74,"props":887,"children":888},{},[889],{"type":47,"value":890},"Paths to existing examples in the current repo.",{"type":42,"tag":50,"props":892,"children":894},{"id":893},"adding-a-new-component-reference",[895],{"type":47,"value":896},"Adding a new component reference",{"type":42,"tag":70,"props":898,"children":899},{},[900,912,917],{"type":42,"tag":74,"props":901,"children":902},{},[903,905,911],{"type":47,"value":904},"Create ",{"type":42,"tag":85,"props":906,"children":908},{"className":907},[],[909],{"type":47,"value":910},"references\u002F\u003Ccomponent>.md",{"type":47,"value":288},{"type":42,"tag":74,"props":913,"children":914},{},[915],{"type":47,"value":916},"Keep it short and actionable; link to concrete files in the current repo.",{"type":42,"tag":74,"props":918,"children":919},{},[920,922,927],{"type":47,"value":921},"Update ",{"type":42,"tag":85,"props":923,"children":925},{"className":924},[],[926],{"type":47,"value":108},{"type":47,"value":928}," with the new entry.",{"items":930,"total":1133},[931,952,975,992,1008,1027,1046,1062,1076,1090,1102,1117],{"slug":932,"name":932,"fn":933,"description":934,"org":935,"tags":936,"stars":949,"repoUrl":950,"updatedAt":951},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[937,940,943,946],{"name":938,"slug":939,"type":15},"Documents","documents",{"name":941,"slug":942,"type":15},"Healthcare","healthcare",{"name":944,"slug":945,"type":15},"Insurance","insurance",{"name":947,"slug":948,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":953,"name":953,"fn":954,"description":955,"org":956,"tags":957,"stars":972,"repoUrl":973,"updatedAt":974},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[958,961,963,966,969],{"name":959,"slug":960,"type":15},".NET","dotnet",{"name":962,"slug":953,"type":15},"ASP.NET Core",{"name":964,"slug":965,"type":15},"Blazor","blazor",{"name":967,"slug":968,"type":15},"C#","csharp",{"name":970,"slug":971,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":976,"name":976,"fn":977,"description":978,"org":979,"tags":980,"stars":972,"repoUrl":973,"updatedAt":991},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[981,984,987,990],{"name":982,"slug":983,"type":15},"Apps SDK","apps-sdk",{"name":985,"slug":986,"type":15},"ChatGPT","chatgpt",{"name":988,"slug":989,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":993,"name":993,"fn":994,"description":995,"org":996,"tags":997,"stars":972,"repoUrl":973,"updatedAt":1007},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[998,1001,1004],{"name":999,"slug":1000,"type":15},"API Development","api-development",{"name":1002,"slug":1003,"type":15},"CLI","cli",{"name":1005,"slug":1006,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":1009,"name":1009,"fn":1010,"description":1011,"org":1012,"tags":1013,"stars":972,"repoUrl":973,"updatedAt":1026},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1014,1017,1020,1023],{"name":1015,"slug":1016,"type":15},"Cloudflare","cloudflare",{"name":1018,"slug":1019,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":1021,"slug":1022,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":1024,"slug":1025,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":1028,"name":1028,"fn":1029,"description":1030,"org":1031,"tags":1032,"stars":972,"repoUrl":973,"updatedAt":1045},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1033,1036,1039,1042],{"name":1034,"slug":1035,"type":15},"Productivity","productivity",{"name":1037,"slug":1038,"type":15},"Project Management","project-management",{"name":1040,"slug":1041,"type":15},"Strategy","strategy",{"name":1043,"slug":1044,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":1047,"name":1047,"fn":1048,"description":1049,"org":1050,"tags":1051,"stars":972,"repoUrl":973,"updatedAt":1061},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1052,1055,1057,1060],{"name":1053,"slug":1054,"type":15},"Design","design",{"name":1056,"slug":1047,"type":15},"Figma",{"name":1058,"slug":1059,"type":15},"Frontend","frontend",{"name":988,"slug":989,"type":15},"2026-04-12T05:06:47.939943",{"slug":1063,"name":1063,"fn":1064,"description":1065,"org":1066,"tags":1067,"stars":972,"repoUrl":973,"updatedAt":1075},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1068,1069,1072,1073,1074],{"name":1053,"slug":1054,"type":15},{"name":1070,"slug":1071,"type":15},"Design System","design-system",{"name":1056,"slug":1047,"type":15},{"name":1058,"slug":1059,"type":15},{"name":23,"slug":24,"type":15},"2026-05-10T05:59:52.971881",{"slug":1077,"name":1077,"fn":1078,"description":1079,"org":1080,"tags":1081,"stars":972,"repoUrl":973,"updatedAt":1089},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1082,1083,1084,1087,1088],{"name":1053,"slug":1054,"type":15},{"name":1070,"slug":1071,"type":15},{"name":1085,"slug":1086,"type":15},"Documentation","documentation",{"name":1056,"slug":1047,"type":15},{"name":1058,"slug":1059,"type":15},"2026-05-16T06:07:47.821474",{"slug":1091,"name":1091,"fn":1092,"description":1093,"org":1094,"tags":1095,"stars":972,"repoUrl":973,"updatedAt":1101},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1096,1097,1098,1099,1100],{"name":1053,"slug":1054,"type":15},{"name":1056,"slug":1047,"type":15},{"name":1058,"slug":1059,"type":15},{"name":23,"slug":24,"type":15},{"name":970,"slug":971,"type":15},"2026-05-16T06:07:40.583615",{"slug":1103,"name":1103,"fn":1104,"description":1105,"org":1106,"tags":1107,"stars":972,"repoUrl":973,"updatedAt":1116},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1108,1111,1112,1115],{"name":1109,"slug":1110,"type":15},"Animation","animation",{"name":1005,"slug":1006,"type":15},{"name":1113,"slug":1114,"type":15},"Creative","creative",{"name":1053,"slug":1054,"type":15},"2026-05-02T05:31:48.48485",{"slug":1118,"name":1118,"fn":1119,"description":1120,"org":1121,"tags":1122,"stars":972,"repoUrl":973,"updatedAt":1132},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1123,1124,1125,1128,1131],{"name":1113,"slug":1114,"type":15},{"name":1053,"slug":1054,"type":15},{"name":1126,"slug":1127,"type":15},"Image Generation","image-generation",{"name":1129,"slug":1130,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675,{"items":1135,"total":1249},[1136,1153,1169,1181,1199,1217,1237],{"slug":1137,"name":1137,"fn":1138,"description":1139,"org":1140,"tags":1141,"stars":25,"repoUrl":26,"updatedAt":1152},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1142,1145,1148,1151],{"name":1143,"slug":1144,"type":15},"Accessibility","accessibility",{"name":1146,"slug":1147,"type":15},"Charts","charts",{"name":1149,"slug":1150,"type":15},"Data Visualization","data-visualization",{"name":1053,"slug":1054,"type":15},"2026-06-30T19:00:57.102",{"slug":1154,"name":1154,"fn":1155,"description":1156,"org":1157,"tags":1158,"stars":25,"repoUrl":26,"updatedAt":1168},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1159,1162,1165],{"name":1160,"slug":1161,"type":15},"Agents","agents",{"name":1163,"slug":1164,"type":15},"Browser Automation","browser-automation",{"name":1166,"slug":1167,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":1170,"name":1170,"fn":1171,"description":1172,"org":1173,"tags":1174,"stars":25,"repoUrl":26,"updatedAt":1180},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1175,1176,1179],{"name":1163,"slug":1164,"type":15},{"name":1177,"slug":1178,"type":15},"Local Development","local-development",{"name":1166,"slug":1167,"type":15},"2026-04-06T18:41:17.526867",{"slug":1182,"name":1182,"fn":1183,"description":1184,"org":1185,"tags":1186,"stars":25,"repoUrl":26,"updatedAt":1198},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1187,1188,1189,1192,1195],{"name":1160,"slug":1161,"type":15},{"name":1021,"slug":1022,"type":15},{"name":1190,"slug":1191,"type":15},"SDK","sdk",{"name":1193,"slug":1194,"type":15},"Serverless","serverless",{"name":1196,"slug":1197,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":1200,"name":1200,"fn":1201,"description":1202,"org":1203,"tags":1204,"stars":25,"repoUrl":26,"updatedAt":1216},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1205,1206,1209,1212,1213],{"name":1058,"slug":1059,"type":15},{"name":1207,"slug":1208,"type":15},"React","react",{"name":1210,"slug":1211,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":23,"slug":24,"type":15},{"name":1214,"slug":1215,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":1218,"name":1218,"fn":1219,"description":1220,"org":1221,"tags":1222,"stars":25,"repoUrl":26,"updatedAt":1236},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1223,1226,1229,1232,1235],{"name":1224,"slug":1225,"type":15},"AI Infrastructure","ai-infrastructure",{"name":1227,"slug":1228,"type":15},"Cost Optimization","cost-optimization",{"name":1230,"slug":1231,"type":15},"LLM","llm",{"name":1233,"slug":1234,"type":15},"Performance","performance",{"name":1214,"slug":1215,"type":15},"2026-04-06T18:40:44.377464",{"slug":1238,"name":1238,"fn":1239,"description":1240,"org":1241,"tags":1242,"stars":25,"repoUrl":26,"updatedAt":1248},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1243,1244,1247],{"name":1227,"slug":1228,"type":15},{"name":1245,"slug":1246,"type":15},"Database","database",{"name":1230,"slug":1231,"type":15},"2026-04-06T18:41:08.513425",600]