[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71STF5SB6VWCBDBGR492GVG":3,"skill-same:01M71STF5SB6VWCBDBGR492GVG":109},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M71STF5SB6VWCBDBGR492GVG","swiftui-best-practices",null,"Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance","HigorAlves\u002Forc","HigorAlves","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11262976?v=4","01M71S79EZEMHZ8PQSV0XQJHYY","Higor Alves","01M71S79FKKTCHCN1EDR8DSTWQ",7,"MIT","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37],"swiftui","best practices","swiftui best practices","projects","reviews","for","performance","writing","use","modern","when","code","maintainability","reading","2026-11-10 13:02:02",false,"---\nname: swiftui-best-practices\ndescription: Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance\nwhen_to_use: Use when reading, writing, or reviewing SwiftUI projects.\nlicense: MIT\nmetadata:\n  author: Paul Hudson\n  version: \"1.1\"\n---\n\nReview Swift and SwiftUI code for correctness, modern API usage, and adherence to project conventions. Report only genuine problems - do not nitpick or invent issues.\n\nReview process:\n\n1. Check for deprecated API using `references\u002Fapi.md`.\n1. Check that views, modifiers, and animations have been written optimally using `references\u002Fviews.md`.\n1. Validate that data flow is configured correctly using `references\u002Fdata.md`.\n1. Verify navigation is updated and performant using `references\u002Fnavigation.md`.\n1. Verify the code uses designs that are accessible and compliant with Apple’s Human Interface Guidelines using `references\u002Fdesign.md`.\n1. Validate accessibility compliance including Dynamic Type, VoiceOver, and Reduce Motion using `references\u002Faccessibility.md`.\n1. Verify the code runs efficiently using `references\u002Fperformance.md`.\n1. Quick validation of Swift code using `references\u002Fswift.md`.\n1. Final code hygiene check using `references\u002Fhygiene.md`.\n\nIf doing a partial review, load only the relevant reference files.\n\n\n## Core Instructions\n\n- iOS 26 exists, and is the default deployment target for new apps.\n- Target Swift 6.2 or later, using modern Swift concurrency.\n- As a SwiftUI developer, the user will want to avoid UIKit unless requested.\n- Do not introduce third-party frameworks without asking first.\n- Break different types up into different Swift files rather than placing multiple structs, classes, or enums into a single file.\n- Use a consistent project structure, with folder layout determined by app features.\n\n\n## Output Format\n\nOrganize findings by file. For each issue:\n\n1. State the file and relevant line(s).\n2. Name the rule being violated (e.g., \"Use `foregroundStyle()` instead of `foregroundColor()`\").\n3. Show a brief before\u002Fafter code fix.\n\nSkip files with no issues. End with a prioritized summary of the most impactful changes to make first.\n\nExample output:\n\n### ContentView.swift\n\n**Line 12: Use `foregroundStyle()` instead of `foregroundColor()`.**\n\n```swift\n\u002F\u002F Before\nText(\"Hello\").foregroundColor(.red)\n\n\u002F\u002F After\nText(\"Hello\").foregroundStyle(.red)\n```\n\n**Line 24: Icon-only button is bad for VoiceOver - add a text label.**\n\n```swift\n\u002F\u002F Before\nButton(action: addUser) {\n    Image(systemName: \"plus\")\n}\n\n\u002F\u002F After\nButton(\"Add User\", systemImage: \"plus\", action: addUser)\n```\n\n**Line 31: Avoid `Binding(get:set:)` in view body - use `@State` with `onChange()` instead.**\n\n```swift\n\u002F\u002F Before\nTextField(\"Username\", text: Binding(\n    get: { model.username },\n    set: { model.username = $0; model.save() }\n))\n\n\u002F\u002F After\nTextField(\"Username\", text: $model.username)\n    .onChange(of: model.username) {\n        model.save()\n    }\n```\n\n### Summary\n\n1. **Accessibility (high):** The add button on line 24 is invisible to VoiceOver.\n2. **Deprecated API (medium):** `foregroundColor()` on line 12 must be `foregroundStyle()`.\n3. **Data flow (medium):** The manual binding on line 31 is fragile and harder to maintain.\n\nEnd of example.\n\n\n## References\n\n- `references\u002Faccessibility.md` - Dynamic Type, VoiceOver, Reduce Motion, and other accessibility requirements.\n- `references\u002Fapi.md` - updating code for modern API, and the deprecated code it replaces.\n- `references\u002Fdesign.md` - guidance for building accessible apps that meet Apple’s Human Interface Guidelines.\n- `references\u002Fhygiene.md` - making code compile cleanly and be maintainable in the long term.\n- `references\u002Fnavigation.md` - navigation using `NavigationStack`\u002F`NavigationSplitView`, plus alerts, confirmation dialogs, and sheets.\n- `references\u002Fperformance.md` - optimizing SwiftUI code for maximum performance.\n- `references\u002Fdata.md` - data flow, shared state, and property wrappers.\n- `references\u002Fswift.md` - tips on writing modern Swift code, including using Swift Concurrency effectively.\n- `references\u002Fviews.md` - view structure, composition, and animation.\n","Review Swift and SwiftUI code for correctness, modern API usage, and adherence to project conventions. Report only genuine problems - do not nitpick or invent issues.\n\nReview process:\n\n1. Check for deprecated API using `references\u002Fapi.md`.\n1. Check that views, modifiers, and animations have been written optimally using `references\u002Fviews.md`.\n1. Validate that data flow is configured correctly using `references\u002Fdata.md`.\n1. Verify navigation is updated and performant using `references\u002Fnavigation.md`.\n1. Verify the code uses designs that are accessible and compliant with Apple’s Human Interface Guidelines using `references\u002Fdesign.md`.\n1. Validate accessibility compliance including Dynamic Type, VoiceOver, and Reduce Motion using `references\u002Faccessibility.md`.\n1. Verify the code runs efficiently using `references\u002Fperformance.md`.\n1. Quick validation of Swift code using `references\u002Fswift.md`.\n1. Final code hygiene check using `references\u002Fhygiene.md`.\n\nIf doing a partial review, load only the relevant reference files.\n\n\n## Core Instructions\n\n- iOS 26 exists, and is the default deployment target for new apps.\n- Target Swift 6.2 or later, using modern Swift concurrency.\n- As a SwiftUI developer, the user will want to avoid UIKit unless requested.\n- Do not introduce third-party frameworks without asking first.\n- Break different types up into different Swift files rather than placing multiple structs, classes, or enums into a single file.\n- Use a consistent project structure, with folder layout determined by app features.\n\n\n## Output Format\n\nOrganize findings by file. For each issue:\n\n1. State the file and relevant line(s).\n2. Name the rule being violated (e.g., \"Use `foregroundStyle()` instead of `foregroundColor()`\").\n3. Show a brief before\u002Fafter code fix.\n\nSkip files with no issues. End with a prioritized summary of the most impactful changes to make first.\n\nExample output:\n\n### ContentView.swift\n\n**Line 12: Use `foregroundStyle()` instead of `foregroundColor()`.**\n\n```swift\n\u002F\u002F Before\nText(\"Hello\").foregroundColor(.red)\n\n\u002F\u002F After\nText(\"Hello\").foregroundStyle(.red)\n```\n\n**Line 24: Icon-only button is bad for VoiceOver - add a text label.**\n\n```swift\n\u002F\u002F Before\nButton(action: addUser) {\n    Image(systemName: \"plus\")\n}\n\n\u002F\u002F After\nButton(\"Add User\", systemImage: \"plus\", action: addUser)\n```\n\n**Line 31: Avoid `Binding(get:set:)` in view body - use `@State` with `onChange()` instead.**\n\n```swift\n\u002F\u002F Before\nTextField(\"Username\", text: Binding(\n    get: { model.username },\n    set: { model.username = $0; model.save() }\n))\n\n\u002F\u002F After\nTextField(\"Username\", text: $model.username)\n    .onChange(of: model.username) {\n        model.save()\n    }\n```\n\n### Summary\n\n1. **Accessibility (high):** The add button on line 24 is invisible to VoiceOver.\n2. **Deprecated API (medium):** `foregroundColor()` on line 12 must be `foregroundStyle()`.\n3. **Data flow (medium):** The manual binding on line 31 is fragile and harder to maintain.\n\nEnd of example.\n\n\n## References\n\n- `references\u002Faccessibility.md` - Dynamic Type, VoiceOver, Reduce Motion, and other accessibility requirements.\n- `references\u002Fapi.md` - updating code for modern API, and the deprecated code it replaces.\n- `references\u002Fdesign.md` - guidance for building accessible apps that meet Apple’s Human Interface Guidelines.\n- `references\u002Fhygiene.md` - making code compile cleanly and be maintainable in the long term.\n- `references\u002Fnavigation.md` - navigation using `NavigationStack`\u002F`NavigationSplitView`, plus alerts, confirmation dialogs, and sheets.\n- `references\u002Fperformance.md` - optimizing SwiftUI code for maximum performance.\n- `references\u002Fdata.md` - data flow, shared state, and property wrappers.\n- `references\u002Fswift.md` - tips on writing modern Swift code, including using Swift Concurrency effectively.\n- `references\u002Fviews.md` - view structure, composition, and animation.\n",{"name":5,"license":15,"metadata":43,"description":7,"when_to_use":46},{"author":44,"version":45},"Paul Hudson","1.1","Use when reading, writing, or reviewing SwiftUI projects.","main","7522fd7266944e30052204c2f6df287d8b5516be","orc\u002Fskills\u002Fswiftui-best-practices",0,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc","https:\u002F\u002Forc.novacstack.com\u002F","https:\u002F\u002Fgithub.com\u002FHigorAlves","higoralves.dev","Software Engineering","2026-11-07 07:26:38",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add HigorAlves\u002Forc --skill swiftui-best-practices",{"tool":63,"command":64},"bunx","bunx skills add HigorAlves\u002Forc --skill swiftui-best-practices",{"tool":66,"command":67},"pnpm","pnpm dlx skills add HigorAlves\u002Forc --skill swiftui-best-practices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002FSKILL.md",true,[71,77,81,85,89,93,97,101,105],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Faccessibility.md","REFERENCE","参考文档",2377,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002Freferences\u002Faccessibility.md",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fapi.md",3090,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002Freferences\u002Fapi.md",{"path":82,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fdata.md",2987,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002Freferences\u002Fdata.md",{"path":86,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fdesign.md",2683,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002Freferences\u002Fdesign.md",{"path":90,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fhygiene.md",1082,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002Freferences\u002Fhygiene.md",{"path":94,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fnavigation.md",1300,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002Freferences\u002Fnavigation.md",{"path":98,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fperformance.md",2781,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002Freferences\u002Fperformance.md",{"path":102,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fswift.md",4138,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002Freferences\u002Fswift.md",{"path":106,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fviews.md",3240,"https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fswiftui-best-practices\u002Freferences\u002Fviews.md",[110,141,167,188,210,230],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":125,"publishedAt":38},"01M71SW40F9TAAEDKBYYBCM814","writing-plans","Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[116,121,122],{"categoryNo":117,"categoryName":118,"taxonomyType":119,"taxonomyTypeDesc":120},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":123,"categoryName":124,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000036","内容创作者",[31,126,127,128,129,130,131,34,132,35,133,134,135,136,137,138,139,29,140,32],"writing plans","plans","engineer","superpowers","implementation plan","files","you","tasks","verification","plan","write","steps","context","ZeRO","tests",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":152,"publishedAt":38},"01M71SW15KHE4MHJW9NEXV65X2","writing-for-agents","orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md\u002FCLAUDE.md, reference docs","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[147,148,151],{"categoryNo":117,"categoryName":118,"taxonomyType":119,"taxonomyTypeDesc":120},{"categoryNo":149,"categoryName":150,"taxonomyType":119,"taxonomyTypeDesc":120},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":123,"categoryName":124,"taxonomyType":21,"taxonomyTypeDesc":22},[153,31,29,154,34,155,156,157,158,159,160,161,32,162,163,164,165,166],"writing for agents","matt pocock","inline","tuning","a skill","layer","doctrine","push","editing","document","github","https","reference","docs",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":174,"publishedAt":38},"01M71SVYQKXT743HHHWGHT3G13","workspace-mode","Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos\u002F--repo\u002F--all-repos\u002F--this-repo precedence, per-repo dispatch, and linked-PR mechanics.","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fworkspace-mode\u002FSKILL.md",[173],{"categoryNo":149,"categoryName":150,"taxonomyType":119,"taxonomyTypeDesc":120},[175,176,177,178,179,34,180,181,182,183,32,184,185,186,187],"workspace mode","mode","workspace","mechanics","auto","repos","git","pr","repo","dispatch","auto-detection","detection","parent",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":195,"publishedAt":38},"01M71SVVP3BXS06G9395P2K0RH","wizard","Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwizard\u002FSKILL.md",[194],{"categoryNo":149,"categoryName":150,"taxonomyType":119,"taxonomyTypeDesc":120},[190,196,197,198,199,154,34,200,201,202,203,204,205,137,206,207,29,32,208,209],"condition","never","provisioning infrastructure","only","Bash","work","credentials","generate","human","secrets","infrastructure","do","one","interactive",{"skillNo":211,"name":212,"nameZh":6,"description":213,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":214,"categories":215,"keywords":216,"publishedAt":38},"01M71SVT4AR6NKAM5B077E7QSJ","wait-what","Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fwait-what\u002FSKILL.md",[],[217,218,219,220,221,154,222,223,224,225,163,164,226,227,228,229],"wait what","wait","project","re","true","pitch","last","say","message","land","it","stop","vocabulary",{"skillNo":231,"name":232,"nameZh":6,"description":233,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":234,"categories":235,"keywords":240,"publishedAt":38},"01M71SVQVYRA9QBQ6G8MWR8G6F","vitest","Vitest fast unit testing framework powered by Vite with Jest-compatible API","https:\u002F\u002Fgithub.com\u002FHigorAlves\u002Forc\u002Fblob\u002Fmain\u002Forc\u002Fskills\u002Fvitest\u002FSKILL.md",[236,239],{"categoryNo":237,"categoryName":238,"taxonomyType":119,"taxonomyTypeDesc":120},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[232,241,242,243,244,245,31,34,246,247,248,249,250,251,252,253,254,255,140,256],"coverage","unit","testing","testing framework","generated","api","jest","2026","at","scripts","unit testing","antfu","framework","vite","mocking","dev"]