[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74109":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":29,"discoverSource":30},74109,"SwiftUI-Agent-Skill","AvdLee\u002FSwiftUI-Agent-Skill","AvdLee","Add expert SwiftUI Best Practices guidance to your AI coding tool (Agent Skills open format).","",null,"Python",2985,137,19,2,0,24,41,150,72,108.42,"MIT License",false,"main",[],"2026-06-12 04:01:13","# SwiftUI Expert Skill\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](https:\u002F\u002Fgithub.com\u002FAvdLee\u002FSwiftUI-Agent-Skill\u002Fblob\u002Fmain\u002FLICENSE)\n[![Weekly Installs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fweekly%20installs-16.6k-brightgreen)](https:\u002F\u002Fskills.sh\u002Favdlee\u002Fswiftui-agent-skill\u002Fswiftui-expert-skill)\n[![GitHub Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002FAvdLee\u002FSwiftUI-Agent-Skill)](https:\u002F\u002Fgithub.com\u002FAvdLee\u002FSwiftUI-Agent-Skill\u002Freleases)\n[![GitHub Stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FAvdLee\u002FSwiftUI-Agent-Skill?style=flat)](https:\u002F\u002Fgithub.com\u002FAvdLee\u002FSwiftUI-Agent-Skill\u002Fstargazers)\n\nExpert guidance for any AI coding tool that supports the [Agent Skills open format](https:\u002F\u002Fagentskills.io\u002Fhome) — SwiftUI state management, view composition, performance, and iOS 26+ Liquid Glass adoption.\n\nThis repository distills practical SwiftUI best practices into actionable, concise references for agents and code review workflows.\n\n## Who this is for\n- Teams adopting modern SwiftUI APIs who want quick, correct defaults\n- Developers reviewing or refactoring SwiftUI views and data flow\n- Anyone shipping performant lists, scrolling, sheets, and navigation in SwiftUI\n\n## See also my other skills:\n- [Swift Concurrency Expert](https:\u002F\u002Fgithub.com\u002FAvdLee\u002FSwift-Concurrency-Agent-Skill)\n- [Core Data Expert](https:\u002F\u002Fgithub.com\u002FAvdLee\u002FCore-Data-Agent-Skill)\n- [Swift Testing Expert](https:\u002F\u002Fgithub.com\u002FAvdLee\u002FSwift-Testing-Agent-Skill)\n\n## How to Use This Skill\n\n### Option A: Using skills.sh\nInstall this skill with a single command:\n\n```bash\nnpx skills add https:\u002F\u002Fgithub.com\u002Favdlee\u002Fswiftui-agent-skill --skill swiftui-expert-skill\n```\n\nFor more information, [visit the skills.sh platform page](https:\u002F\u002Fskills.sh\u002Favdlee\u002Fswiftui-agent-skill\u002Fswiftui-expert-skill).\n\nThen use the skill in your AI agent, for example:\n> Use the swiftui expert skill and review the current SwiftUI code for state-management and performance improvements\n\n### Option B: Claude Code Plugin\n\n#### Personal Usage\nTo install this Skill for your personal use in Claude Code:\n\n1. Add the marketplace:\n\n```bash\n\u002Fplugin marketplace add AvdLee\u002FSwiftUI-Agent-Skill\n```\n\n2. Install the Skill:\n\n```bash\n\u002Fplugin install swiftui-expert@swiftui-expert-skill\n```\n\n### Option C: Cursor plugin (coming soon)\nThis repository is now packaged for Cursor plugin submission, but the marketplace listing is not live yet.\n\nOnce approved, you'll be able to install it from the Cursor Marketplace.\n\n#### Project Configuration\nTo automatically provide this Skill to everyone working in a repository, configure the repository's `.claude\u002Fsettings.json`:\n\n```json\n{\n  \"enabledPlugins\": {\n    \"swiftui-expert@swiftui-expert-skill\": true\n  },\n  \"extraKnownMarketplaces\": {\n    \"swiftui-expert-skill\": {\n      \"source\": {\n        \"source\": \"github\",\n        \"repo\": \"AvdLee\u002FSwiftUI-Agent-Skill\"\n      }\n    }\n  }\n}\n```\n\nWhen team members open the project, Claude Code will prompt them to install the Skill.\n\n### Option D: Codex \u002F OpenAI-compatible tools\nThis repository includes an `agents\u002Fopenai.yaml` manifest. Copy or symlink the `swiftui-expert-skill\u002F` folder into your Codex skills directory:\n\n```bash\ncp -R swiftui-expert-skill\u002F \"$CODEX_HOME\u002Fskills\u002Fswiftui-expert-skill\"\n```\n\nSee [Codex skills documentation](https:\u002F\u002Fdevelopers.openai.com\u002Fcodex\u002Fskills\u002F) for details on where to save skills.\n\n### Option E: Using pi package manager\n\nInstall via [pi](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono):\n```bash\npi install https:\u002F\u002Fgithub.com\u002FAvdLee\u002FSwiftUI-Agent-Skill\n```\n\nThe skill will be available automatically in pi sessions.\n\n### Option F: Manual install\n1) **Clone** this repository.\n2) **Install or symlink** the `swiftui-expert-skill\u002F` folder following your tool’s official skills installation docs (see links below).\n3) **Use your AI tool** as usual and ask it to use the “swiftui-expert” skill for SwiftUI tasks.\n\n#### Where to Save Skills\nFollow your tool’s official documentation, here are a few popular ones:\n- **Codex:** [Where to save skills](https:\u002F\u002Fdevelopers.openai.com\u002Fcodex\u002Fskills\u002F#where-to-save-skills)\n- **Claude:** [Using Skills](https:\u002F\u002Fdocs.claude.com\u002Fen\u002Fdocs\u002Fagents-and-tools\u002Fagent-skills\u002Foverview)\n- **Cursor:** [Plugins documentation](https:\u002F\u002Fcursor.com\u002Fdocs\u002Fplugins) or [Enabling Skills](https:\u002F\u002Fcursor.com\u002Fdocs\u002Fcontext\u002Fskills#enabling-skills)\n\n**How to verify**:\n\nYour agent should reference the workflow\u002Fchecklists in `swiftui-expert-skill\u002FSKILL.md` and jump into the relevant reference file for your task.\n\n## What's Inside\n\nThis skill covers the full surface of SwiftUI development -- from state management and view composition to Swift Charts, macOS multi-window scenes, animations, and iOS 26+ Liquid Glass -- without bloating your agent's task context. Reference files load on demand, so your agent gets deep guidance only for the topic at hand.\n\n- **State management** -- property wrapper selection, `@Observable`, data flow patterns\n- **View composition** -- extraction patterns, container views, identity stability\n- **Performance** -- hot-path optimization, lazy loading, `@Observable` granularity\n- **Lists & ForEach** -- stable identity, Table, inline filtering pitfalls\n- **Navigation & sheets** -- NavigationStack, NavigationSplitView, Inspector, enum-based sheets\n- **Swift Charts** -- marks, axes, selection, styling, accessibility, Chart3D\n- **Animations** -- implicit\u002Fexplicit, transitions, phase\u002Fkeyframe, `@Animatable` macro\n- **macOS** -- scenes, window styling, Table, HSplitView, AppKit interop\n- **Liquid Glass** -- iOS 26+ glass effects, containers, fallback patterns\n- **Accessibility** -- VoiceOver, Dynamic Type, grouping, traits\n- **Image optimization** -- AsyncImage, downsampling, caching\n- **Latest APIs** -- deprecated-to-modern migration guide (iOS 15+ through iOS 26+)\n- **Instruments trace recording & analysis** -- bundled `xctrace` toolchain for diagnosing hangs, hitches, and expensive SwiftUI view updates (see below)\n\nNon-opinionated: focuses on correctness and performance, not architecture or code style.\n\n## Recording & Analysing Instruments Traces\n\nUnlike the other reference files — which are text guidance — this part of the skill ships an executable Python toolchain that wraps `xctrace`. It lets the agent **record** a new `.trace` and **analyse** an existing one end-to-end: the parser reads the Time Profiler, Hangs, Animation Hitches, SwiftUI updates, and SwiftUI cause-graph lanes, correlates hangs\u002Fhitches with main-thread samples, and emits JSON + markdown so the agent can reason over structured data instead of the raw `xctrace export` firehose.\n\n**When it triggers:**\n\n- A `.trace` path appears in the prompt (analysis).\n- The user asks to record, profile, or capture a session (recording).\n\n**What the agent can then ask:**\n\n```text\nAnalyse ~\u002FDesktop\u002FMyApp.trace and tell me what's wrong.\n\nFocus analysis on what happens right after the 'feed loaded' log.\n\nWhich of my SwiftUI views is responsible for the hang around 6s?\n\nRecord a new trace: attach to MyApp on my iPhone — I'll tell you when I'm done.\n```\n\n**Under the hood:**\n\n- `scripts\u002Frecord_trace.py` — wraps `xctrace record`. Supports attach \u002F launch \u002F all-processes, stop-file for agent-driven sessions, time-limits, JSON device & template discovery.\n- `scripts\u002Fanalyze_trace.py` — runs the five-lane analysis. Discovery modes `--list-logs`, `--list-signposts`, `--fanin-for` let the agent scope to a time window or trace a specific view back to its invalidation sources. `--window START_MS:END_MS` restricts every lane to a slice.\n- `scripts\u002Finstruments_parser\u002F` — one module per lane (`time_profiler`, `hangs`, `hitches`, `swiftui`, `causes`), plus cross-lane `correlate` and a markdown `summary` renderer. Pure stdlib Python 3; only external dep is `xctrace` (ships with Xcode).\n\n**Key diagnostic:** `main_running_coverage_pct` on each hang\u002Fhitch correlation. \u003C 25 % → main thread was blocked (I\u002FO, lock, sync await); ≥ 75 % → CPU-bound. This single metric separates two radically different fix paths.\n\nFull guidance: [`swiftui-expert-skill\u002Freferences\u002Ftrace-analysis.md`](swiftui-expert-skill\u002Freferences\u002Ftrace-analysis.md) and [`swiftui-expert-skill\u002Freferences\u002Ftrace-recording.md`](swiftui-expert-skill\u002Freferences\u002Ftrace-recording.md).\n\n## Skill Structure\n\u003C!-- BEGIN REFERENCE STRUCTURE -->\n```text\nswiftui-expert-skill\u002F\n  SKILL.md\n  references\u002F\n    accessibility-patterns.md - Accessibility traits, grouping, Dynamic Type, and VoiceOver\n    animation-advanced.md - Performance, interpolation, and complex animation chains\n    animation-basics.md - Core animation concepts, implicit\u002Fexplicit animations, timing\n    animation-transitions.md - View transitions, matchedGeometryEffect, and state changes\n    charts-accessibility.md - Charts accessibility, fallback strategies, and WWDC sessions\n    charts.md - Swift Charts marks, axes, selection, styling, composition, and Chart3D\n    focus-patterns.md\n    image-optimization.md - AsyncImage usage, downsampling, caching\n    latest-apis.md\n    layout-best-practices.md - Layout patterns and GeometryReader alternatives\n    liquid-glass.md - iOS 26+ glass effects and fallback patterns\n    list-patterns.md - ForEach identity and list performance\n    macos-scenes.md - Scene lifecycle, multi-window setups, and menu bar scenes on macOS\n    macos-views.md - macOS-specific SwiftUI views and platform differences from iOS\n    macos-window-styling.md - Window chrome, toolbar, and title bar styling in SwiftUI\n    performance-patterns.md - Hot-path optimizations and update control\n    scroll-patterns.md - ScrollViewReader and programmatic scrolling\n    sheet-navigation-patterns.md - Sheets and type-safe navigation\n    state-management.md - Property wrapper selection and data flow\n    view-structure.md - View extraction and composition patterns\n```\n\u003C!-- END REFERENCE STRUCTURE -->\n\n## Maintenance\n\nThe repository includes a maintenance skill for keeping API guidance current:\n\n```text\n.agents\u002Fskills\u002Fupdate-swiftui-apis\u002F\n  SKILL.md               - Workflow for scanning Apple docs and updating latest-apis.md\n  references\u002F\n    scan-manifest.md     - Categorized API areas, doc paths, and search queries to scan\n```\n\nUse this skill after new iOS or Xcode releases to refresh the deprecated API reference. It requires the [Sosumi MCP](https:\u002F\u002Fgithub.com\u002FNSHipster\u002Fsosumi.ai) to be available. See `AGENTS.md` or `CONTRIBUTING.md` for details.\n\nNote: only `swiftui-expert-skill` is intended to be published in the Cursor plugin. The maintenance skill remains a repository workflow utility.\n\n## Contributing\n\nContributions are welcome! This repository follows the [Agent Skills open format](https:\u002F\u002Fagentskills.io\u002Fhome), which has specific structural requirements.\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for:\n- How to contribute improvements to `SKILL.md` and the reference files\n- Format requirements and quality standards\n- Pull request process\n\n## Acknowledgments\n\nSeveral SwiftUI guidelines in this skill were inspired by or derived from the following works:\n\n- [Skills](https:\u002F\u002Fgithub.com\u002FDimillian\u002FSkills) by [Thomas Ricouard](https:\u002F\u002Fgithub.com\u002FDimillian) — a collection of SwiftUI-focused Codex skills covering UI patterns, performance auditing, and Liquid Glass.\n- [SwiftLee SwiftUI articles](https:\u002F\u002Fwww.avanderlee.com\u002Fcategory\u002Fswiftui\u002F) and [Swift articles](https:\u002F\u002Fwww.avanderlee.com\u002Fcategory\u002Fswift\u002F) by [Antoine van der Lee](https:\u002F\u002Fwww.avanderlee.com) — practical SwiftUI best practices covering state management, accessibility, view composition, performance debugging, image optimization, and more.\n- [Swift Charts Examples](https:\u002F\u002Fgithub.com\u002Fjordibruin\u002FSwift-Charts-Examples) by [Jordi Bruin](https:\u002F\u002Fx.com\u002Fjordibruin) — a comprehensive collection of Swift Charts examples covering line, bar, area, range, heat map, and point charts with accessibility and customization patterns. Used with permission.\n\n## About the authors\n\nCreated by [Antoine van der Lee](https:\u002F\u002Fwww.avanderlee.com) and [Omar Elsayed](https:\u002F\u002Fwww.swiftdifferently.com). With years of experience in Swift & SwiftUI, this skill distills practical knowledge into actionable guidance for AI assistants. Antoine [published tens of articles on SwiftUI](https:\u002F\u002Fwww.avanderlee.com\u002Fcategory\u002Fswiftui\u002F) on his blog called SwiftLee.\n\n## Resources\n- [Story behind this skill](https:\u002F\u002Fwww.swiftdifferently.com\u002Fblog\u002Fswiftui\u002FHow%20I%20stopped-resisting-ai-and-atarted-teaching-it)\n\n## License\n\nThis skill is open-source and available under the MIT License. See [LICENSE](LICENSE) for details.\n","SwiftUI-Agent-Skill 项目为支持 Agent Skills 开放格式的AI编码工具提供了专业的 SwiftUI 最佳实践指导。该项目核心功能包括提供关于状态管理、视图组合、性能优化以及iOS 26+ Liquid Glass采用等方面的实用建议，帮助开发者快速获取正确的默认设置。技术特点在于将复杂的SwiftUI最佳实践提炼成易于理解和执行的参考资料，适用于代码审查和重构流程中。非常适合正在采用现代SwiftUI API的团队，特别是那些需要提高列表渲染、滚动、模态展示及导航性能的应用场景。此外，通过多种方式如skills.sh平台或Claude Code插件等可以轻松集成到现有的开发环境中。","2026-06-11 03:48:49","high_star"]