{"id":"920d0328-e99a-41f2-88d6-1515cc071f51","shortId":"9aZUUD","kind":"skill","title":"swiftui-performance-audit","tagline":"Audit SwiftUI performance issues from code review and profiling evidence.","description":"# SwiftUI Performance Audit\n\n## Quick start\n\nUse this skill to diagnose SwiftUI performance issues from code first, then request profiling evidence when code review alone cannot explain the symptoms.\n\n## When to Use\n- When the user reports slow rendering, janky scrolling, layout thrash, or high CPU in SwiftUI.\n- When you need a code-first audit plus Instruments guidance if profiling evidence is required.\n\n## Workflow\n\n1. Classify the symptom: slow rendering, janky scrolling, high CPU, memory growth, hangs, or excessive view updates.\n2. If code is available, start with a code-first review using `references/code-smells.md`.\n3. If code is not available, ask for the smallest useful slice: target view, data flow, reproduction steps, and deployment target.\n4. If code review is inconclusive or runtime evidence is required, guide the user through profiling with `references/profiling-intake.md`.\n5. Summarize likely causes, evidence, remediation, and validation steps using `references/report-template.md`.\n\n## 1. Intake\n\nCollect:\n- Target view or feature code.\n- Symptoms and exact reproduction steps.\n- Data flow: `@State`, `@Binding`, environment dependencies, and observable models.\n- Whether the issue shows up on device or simulator, and whether it was observed in Debug or Release.\n\nAsk the user to classify the issue if possible:\n- CPU spike or battery drain\n- Janky scrolling or dropped frames\n- High memory or image pressure\n- Hangs or unresponsive interactions\n- Excessive or unexpectedly broad view updates\n\nFor the full profiling intake checklist, read `references/profiling-intake.md`.\n\n## 2. Code-First Review\n\nFocus on:\n- Invalidation storms from broad observation or environment reads.\n- Unstable identity in lists and `ForEach`.\n- Heavy derived work in `body` or view builders.\n- Layout thrash from complex hierarchies, `GeometryReader`, or preference chains.\n- Large image decode or resize work on the main thread.\n- Animation or transition work applied too broadly.\n\nUse `references/code-smells.md` for the detailed smell catalog and fix guidance.\n\nProvide:\n- Likely root causes with code references.\n- Suggested fixes and refactors.\n- If needed, a minimal repro or instrumentation suggestion.\n\n## 3. Guide the User to Profile\n\nIf code review does not explain the issue, ask for runtime evidence:\n- A trace export or screenshots of the SwiftUI timeline and Time Profiler call tree.\n- Device/OS/build configuration.\n- The exact interaction being profiled.\n- Before/after metrics if the user is comparing a change.\n\nUse `references/profiling-intake.md` for the exact checklist and collection steps.\n\n## 4. Analyze and Diagnose\n\n- Map the evidence to the most likely category: invalidation, identity churn, layout thrash, main-thread work, image cost, or animation cost.\n- Prioritize problems by impact, not by how easy they are to explain.\n- Distinguish code-level suspicion from trace-backed evidence.\n- Call out when profiling is still insufficient and what additional evidence would reduce uncertainty.\n\n## 5. Remediate\n\nApply targeted fixes:\n- Narrow state scope and reduce broad observation fan-out.\n- Stabilize identities for `ForEach` and lists.\n- Move heavy work out of `body` into derived state updated from inputs, model-layer precomputation, memoized helpers, or background preprocessing. Use `@State` only for view-owned state, not as an ad hoc cache for arbitrary computation.\n- Use `equatable()` only when equality is cheaper than recomputing the subtree and the inputs are truly value-semantic.\n- Downsample images before rendering.\n- Reduce layout complexity or use fixed sizing where possible.\n\nUse `references/code-smells.md` for examples, Observation-specific fan-out guidance, and remediation patterns.\n\n## 6. Verify\n\nAsk the user to re-run the same capture and compare with baseline metrics.\nSummarize the delta (CPU, frame drops, memory peak) if provided.\n\n## Outputs\n\nProvide:\n- A short metrics table (before/after if available).\n- Top issues (ordered by impact).\n- Proposed fixes with estimated effort.\n\nUse `references/report-template.md` when formatting the final audit.\n\n## References\n\n- Profiling intake and collection checklist: `references/profiling-intake.md`\n- Common code smells and remediation patterns: `references/code-smells.md`\n- Audit output template: `references/report-template.md`\n- Add Apple documentation and WWDC resources under `references/` as they are supplied by the user.\n- Optimizing SwiftUI performance with Instruments: `references/optimizing-swiftui-performance-instruments.md`\n- Understanding and improving SwiftUI performance: `references/understanding-improving-swiftui-performance.md`\n- Understanding hangs in your app: `references/understanding-hangs-in-your-app.md`\n- Demystify SwiftUI performance (WWDC23): `references/demystify-swiftui-performance-wwdc23.md`\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["swiftui","performance","audit","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-swiftui-performance-audit","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/swiftui-performance-audit","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34460 github stars · SKILL.md body (5,161 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T06:51:57.615Z","embedding":null,"createdAt":"2026-04-18T21:45:43.872Z","updatedAt":"2026-04-22T06:51:57.615Z","lastSeenAt":"2026-04-22T06:51:57.615Z","tsv":"'1':78,159 '2':95,241 '3':109,325 '4':130,382 '5':148,444 '6':549 'ad':497 'add':620 'addit':439 'alon':38 'analyz':383 'anim':289,406 'app':651 'appl':621 'appli':293,446 'arbitrari':501 'ask':115,199,339,551,691 'audit':4,5,17,68,601,616 'avail':99,114,584 'back':428 'background':484 'baselin':564 'batteri':211 'before/after':364,582 'bind':175 'bodi':266,470 'boundari':699 'broad':230,251,295,454 'builder':269 'cach':499 'call':355,430 'cannot':39 'captur':560 'catalog':302 'categori':393 'caus':151,309 'chain':278 'chang':372 'cheaper':509 'checklist':238,378,607 'churn':396 'clarif':693 'classifi':79,203 'clear':666 'code':10,29,36,66,97,104,111,132,166,243,311,332,422,610 'code-first':65,103,242 'code-level':421 'collect':161,380,606 'common':609 'compar':370,562 'complex':273,528 'comput':502 'configur':358 'cost':404,407 'cpu':58,87,208,569 'criteria':702 'data':123,172 'debug':196 'decod':281 'delta':568 'demystifi':653 'depend':177 'deploy':128 'deriv':263,472 'describ':670 'detail':300 'devic':187 'device/os/build':357 'diagnos':24,385 'distinguish':420 'document':622 'downsampl':522 'drain':212 'drop':216,571 'easi':415 'effort':594 'environ':176,254,682 'environment-specif':681 'equal':507 'equat':504 'estim':593 'evid':14,34,74,138,152,342,388,429,440 'exact':169,360,377 'exampl':538 'excess':92,227 'expert':687 'explain':40,336,419 'export':345 'fan':457,543 'fan-out':456,542 'featur':165 'final':600 'first':30,67,105,244 'fix':304,314,448,531,591 'flow':124,173 'focus':246 'foreach':261,462 'format':598 'frame':217,570 'full':235 'geometryread':275 'growth':89 'guid':141,326 'guidanc':71,305,545 'hang':90,223,648 'heavi':262,466 'helper':482 'hierarchi':274 'high':57,86,218 'hoc':498 'ident':257,395,460 'imag':221,280,403,523 'impact':411,589 'improv':643 'inconclus':135 'input':476,516,696 'instrument':70,323,639 'insuffici':436 'intak':160,237,604 'interact':226,361 'invalid':248,394 'issu':8,27,183,205,338,586 'janki':52,84,213 'larg':279 'layer':479 'layout':54,270,397,527 'level':423 'like':150,307,392 'limit':658 'list':259,464 'main':287,400 'main-thread':399 'map':386 'match':667 'memoiz':481 'memori':88,219,572 'metric':365,565,580 'minim':320 'miss':704 'model':180,478 'model-lay':477 'move':465 'narrow':449 'need':63,318 'observ':179,194,252,455,540 'observation-specif':539 'optim':635 'order':587 'output':576,617,676 'own':492 'pattern':548,614 'peak':573 'perform':3,7,16,26,637,645,655 'permiss':697 'plus':69 'possibl':207,534 'precomput':480 'prefer':277 'preprocess':485 'pressur':222 'priorit':408 'problem':409 'profil':13,33,73,145,236,330,354,363,433,603 'propos':590 'provid':306,575,577 'quick':18 're':556 're-run':555 'read':239,255 'recomput':511 'reduc':442,453,526 'refactor':316 'refer':312,602,627 'references/code-smells.md':108,297,536,615 'references/demystify-swiftui-performance-wwdc23.md':657 'references/optimizing-swiftui-performance-instruments.md':640 'references/profiling-intake.md':147,240,374,608 'references/report-template.md':158,596,619 'references/understanding-hangs-in-your-app.md':652 'references/understanding-improving-swiftui-performance.md':646 'releas':198 'remedi':153,445,547,613 'render':51,83,525 'report':49 'repro':321 'reproduct':125,170 'request':32 'requir':76,140,695 'resiz':283 'resourc':625 'review':11,37,106,133,245,333,688 'root':308 'run':557 'runtim':137,341 'safeti':698 'scope':451,669 'screenshot':347 'scroll':53,85,214 'semant':521 'short':579 'show':184 'simul':189 'size':532 'skill':22,661 'skill-swiftui-performance-audit' 'slice':120 'slow':50,82 'smallest':118 'smell':301,611 'source-sickn33' 'specif':541,683 'spike':209 'stabil':459 'start':19,100 'state':174,450,473,487,493 'step':126,156,171,381 'still':435 'stop':689 'storm':249 'substitut':679 'subtre':513 'success':701 'suggest':313,324 'summar':149,566 'suppli':631 'suspicion':424 'swiftui':2,6,15,25,60,350,636,644,654 'swiftui-performance-audit':1 'symptom':42,81,167 'tabl':581 'target':121,129,162,447 'task':665 'templat':618 'test':685 'thrash':55,271,398 'thread':288,401 'time':353 'timelin':351 'top':585 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'trace':344,427 'trace-back':426 'transit':291 'treat':674 'tree':356 'truli':518 'uncertainti':443 'understand':641,647 'unexpect':229 'unrespons':225 'unstabl':256 'updat':94,232,474 'use':20,45,107,119,157,296,373,486,503,530,535,595,659 'user':48,143,201,328,368,553,634 'valid':155,684 'valu':520 'value-semant':519 'verifi':550 'view':93,122,163,231,268,491 'view-own':490 'whether':181,191 'work':264,284,292,402,467 'workflow':77 'would':441 'wwdc':624 'wwdc23':656","prices":[{"id":"529a5bd4-bbfd-403a-95b8-92821ecedbc5","listingId":"920d0328-e99a-41f2-88d6-1515cc071f51","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:45:43.872Z"}],"sources":[{"listingId":"920d0328-e99a-41f2-88d6-1515cc071f51","source":"github","sourceId":"sickn33/antigravity-awesome-skills/swiftui-performance-audit","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/swiftui-performance-audit","isPrimary":false,"firstSeenAt":"2026-04-18T21:45:43.872Z","lastSeenAt":"2026-04-22T06:51:57.615Z"}],"details":{"listingId":"920d0328-e99a-41f2-88d6-1515cc071f51","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"swiftui-performance-audit","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34460,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-22T06:40:00Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"2aef92e4f4bbd1db0f6d5279c5c2e5726f8d4b67","skill_md_path":"skills/swiftui-performance-audit/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/swiftui-performance-audit"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"swiftui-performance-audit","description":"Audit SwiftUI performance issues from code review and profiling evidence."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/swiftui-performance-audit"},"updatedAt":"2026-04-22T06:51:57.615Z"}}