[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6Q4CEM2HTT105H9M8927R8H":3,"skill-same:01M6Q4CEM2HTT105H9M8927R8H":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6Q4CEM2HTT105H9M8927R8H","swiftui-view-refactor",null,"Refactor and review SwiftUI view files for consistent structure, dependency injection, and Observation usage. Use when asked to clean up a SwiftUI view’s layout\u002Fordering, handle view models safely (non-optional when possible), or standardize how dependencies and @Observable state are initialized and passed.","Kernel8901\u002Fai-agent-skills-classification","Kernel8901","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72647553?v=4","01M6KV388J2H5PNC8D8P940BJD","01M6KV38CS5B3AY63RKZB410YM",7,"MIT","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F视觉与设计\u002Fswiftui-view-refactor\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"swiftui view refactor","view refactor","refactor","swiftui","view","up","for","usage","layout","dependency injection","structure","dependencies","clean","models","files","review","dependency","use","how","state","2026-11-10 10:12:30",false,"---\nname: swiftui-view-refactor\ndescription: Refactor and review SwiftUI view files for consistent structure, dependency injection, and Observation usage. Use when asked to clean up a SwiftUI view’s layout\u002Fordering, handle view models safely (non-optional when possible), or standardize how dependencies and @Observable state are initialized and passed.\n---\n\n# SwiftUI View Refactor\n\n_Attribution: copied from @Dimillian’s `Dimillian\u002FSkills` (2025-12-31)._\n\n## Overview\nApply a consistent structure and dependency pattern to SwiftUI views, with a focus on ordering, Model-View (MV) patterns, careful view model handling, and correct Observation usage.\n\n## Core Guidelines\n\n### 1) View ordering (top → bottom)\n- Environment\n- `private`\u002F`public` `let`\n- `@State` \u002F other stored properties\n- computed `var` (non-view)\n- `init`\n- `body`\n- computed view builders \u002F other view helpers\n- helper \u002F async functions\n\n### 2) Prefer MV (Model-View) patterns\n- Default to MV: Views are lightweight state expressions; models\u002Fservices own business logic.\n- Favor `@State`, `@Environment`, `@Query`, and `task`\u002F`onChange` for orchestration.\n- Inject services and shared models via `@Environment`; keep views small and composable.\n- Split large views into subviews rather than introducing a view model.\n\n### 3) Split large bodies and view properties\n- If `body` grows beyond a screen or has multiple logical sections, split it into smaller subviews.\n- Extract large computed view properties (`var header: some View { ... }`) into dedicated `View` types when they carry state or complex branching.\n- It's fine to keep related subviews as computed view properties in the same file; extract to a standalone `View` struct only when it structurally makes sense or when reuse is intended.\n- Prefer passing small inputs (data, bindings, callbacks) over reusing the entire parent view state.\n\nExample (extracting a section):\n\n```swift\nvar body: some View {\n    VStack(alignment: .leading, spacing: 16) {\n        HeaderSection(title: title, isPinned: isPinned)\n        DetailsSection(details: details)\n        ActionsSection(onSave: onSave, onCancel: onCancel)\n    }\n}\n```\n\nExample (long body → shorter body + computed views in the same file):\n\n```swift\nvar body: some View {\n    List {\n        header\n        filters\n        results\n        footer\n    }\n}\n\nprivate var header: some View {\n    VStack(alignment: .leading, spacing: 6) {\n        Text(title).font(.title2)\n        Text(subtitle).font(.subheadline)\n    }\n}\n\nprivate var filters: some View {\n    ScrollView(.horizontal, showsIndicators: false) {\n        HStack {\n            ForEach(filterOptions, id: \\.self) { option in\n                FilterChip(option: option, isSelected: option == selectedFilter)\n                    .onTapGesture { selectedFilter = option }\n            }\n        }\n    }\n}\n```\n\nExample (extracting a complex computed view):\n\n```swift\nprivate var header: some View {\n    HeaderSection(title: title, subtitle: subtitle, status: status)\n}\n\nprivate struct HeaderSection: View {\n    let title: String\n    let subtitle: String?\n    let status: Status\n\n    var body: some View {\n        VStack(alignment: .leading, spacing: 4) {\n            Text(title).font(.headline)\n            if let subtitle { Text(subtitle).font(.subheadline) }\n            StatusBadge(status: status)\n        }\n    }\n}\n```\n\n### 4) View model handling (only if already present)\n- Do not introduce a view model unless the request or existing code clearly calls for one.\n- If a view model exists, make it non-optional when possible.\n- Pass dependencies to the view via `init`, then pass them into the view model in the view's `init`.\n- Avoid `bootstrapIfNeeded` patterns.\n\nExample (Observation-based):\n\n```swift\n@State private var viewModel: SomeViewModel\n\ninit(dependency: Dependency) {\n    _viewModel = State(initialValue: SomeViewModel(dependency: dependency))\n}\n```\n\n### 5) Observation usage\n- For `@Observable` reference types, store them as `@State` in the root view.\n- Pass observables down explicitly as needed; avoid optional state unless required.\n\n## Workflow\n\n1) Reorder the view to match the ordering rules.\n2) Favor MV: move lightweight orchestration into the view using `@State`, `@Environment`, `@Query`, `task`, and `onChange`.\n3) If a view model exists, replace optional view models with a non-optional `@State` view model initialized in `init` by passing dependencies from the view.\n4) Confirm Observation usage: `@State` for root `@Observable` view models, no redundant wrappers.\n5) Keep behavior intact: do not change layout or business logic unless requested.\n\n## Notes\n\n- Prefer small, explicit helpers over large conditional blocks.\n- Keep computed view builders below `body` and non-view computed vars above `init`.\n- For MV-first guidance and rationale, see `references\u002Fmv-patterns.md`.\n","# SwiftUI View Refactor\n\n_Attribution: copied from @Dimillian’s `Dimillian\u002FSkills` (2025-12-31)._\n\n## Overview\nApply a consistent structure and dependency pattern to SwiftUI views, with a focus on ordering, Model-View (MV) patterns, careful view model handling, and correct Observation usage.\n\n## Core Guidelines\n\n### 1) View ordering (top → bottom)\n- Environment\n- `private`\u002F`public` `let`\n- `@State` \u002F other stored properties\n- computed `var` (non-view)\n- `init`\n- `body`\n- computed view builders \u002F other view helpers\n- helper \u002F async functions\n\n### 2) Prefer MV (Model-View) patterns\n- Default to MV: Views are lightweight state expressions; models\u002Fservices own business logic.\n- Favor `@State`, `@Environment`, `@Query`, and `task`\u002F`onChange` for orchestration.\n- Inject services and shared models via `@Environment`; keep views small and composable.\n- Split large views into subviews rather than introducing a view model.\n\n### 3) Split large bodies and view properties\n- If `body` grows beyond a screen or has multiple logical sections, split it into smaller subviews.\n- Extract large computed view properties (`var header: some View { ... }`) into dedicated `View` types when they carry state or complex branching.\n- It's fine to keep related subviews as computed view properties in the same file; extract to a standalone `View` struct only when it structurally makes sense or when reuse is intended.\n- Prefer passing small inputs (data, bindings, callbacks) over reusing the entire parent view state.\n\nExample (extracting a section):\n\n```swift\nvar body: some View {\n    VStack(alignment: .leading, spacing: 16) {\n        HeaderSection(title: title, isPinned: isPinned)\n        DetailsSection(details: details)\n        ActionsSection(onSave: onSave, onCancel: onCancel)\n    }\n}\n```\n\nExample (long body → shorter body + computed views in the same file):\n\n```swift\nvar body: some View {\n    List {\n        header\n        filters\n        results\n        footer\n    }\n}\n\nprivate var header: some View {\n    VStack(alignment: .leading, spacing: 6) {\n        Text(title).font(.title2)\n        Text(subtitle).font(.subheadline)\n    }\n}\n\nprivate var filters: some View {\n    ScrollView(.horizontal, showsIndicators: false) {\n        HStack {\n            ForEach(filterOptions, id: \\.self) { option in\n                FilterChip(option: option, isSelected: option == selectedFilter)\n                    .onTapGesture { selectedFilter = option }\n            }\n        }\n    }\n}\n```\n\nExample (extracting a complex computed view):\n\n```swift\nprivate var header: some View {\n    HeaderSection(title: title, subtitle: subtitle, status: status)\n}\n\nprivate struct HeaderSection: View {\n    let title: String\n    let subtitle: String?\n    let status: Status\n\n    var body: some View {\n        VStack(alignment: .leading, spacing: 4) {\n            Text(title).font(.headline)\n            if let subtitle { Text(subtitle).font(.subheadline) }\n            StatusBadge(status: status)\n        }\n    }\n}\n```\n\n### 4) View model handling (only if already present)\n- Do not introduce a view model unless the request or existing code clearly calls for one.\n- If a view model exists, make it non-optional when possible.\n- Pass dependencies to the view via `init`, then pass them into the view model in the view's `init`.\n- Avoid `bootstrapIfNeeded` patterns.\n\nExample (Observation-based):\n\n```swift\n@State private var viewModel: SomeViewModel\n\ninit(dependency: Dependency) {\n    _viewModel = State(initialValue: SomeViewModel(dependency: dependency))\n}\n```\n\n### 5) Observation usage\n- For `@Observable` reference types, store them as `@State` in the root view.\n- Pass observables down explicitly as needed; avoid optional state unless required.\n\n## Workflow\n\n1) Reorder the view to match the ordering rules.\n2) Favor MV: move lightweight orchestration into the view using `@State`, `@Environment`, `@Query`, `task`, and `onChange`.\n3) If a view model exists, replace optional view models with a non-optional `@State` view model initialized in `init` by passing dependencies from the view.\n4) Confirm Observation usage: `@State` for root `@Observable` view models, no redundant wrappers.\n5) Keep behavior intact: do not change layout or business logic unless requested.\n\n## Notes\n\n- Prefer small, explicit helpers over large conditional blocks.\n- Keep computed view builders below `body` and non-view computed vars above `init`.\n- For MV-first guidance and rationale, see `references\u002Fmv-patterns.md`.\n",{"name":5,"description":7},"main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","视觉与设计\u002Fswiftui-view-refactor",1,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification","https:\u002F\u002Fgithub.com\u002FKernel8901","a little little little dobe in life but science geek","2026-04-05 16:43:56",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill swiftui-view-refactor",{"tool":57,"command":58},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill swiftui-view-refactor",{"tool":60,"command":61},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill swiftui-view-refactor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F视觉与设计\u002Fswiftui-view-refactor\u002FSKILL.md",true,[65,71],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"_meta.json","REFERENCE","参考文档",296,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F视觉与设计\u002Fswiftui-view-refactor\u002F_meta.json",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fmv-patterns.md",7961,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F视觉与设计\u002Fswiftui-view-refactor\u002Freferences\u002Fmv-patterns.md",[76,99,122,130,137,163],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":38},"01M6Q5R6WZ06RRB9RQTW54B34B","zyfai","Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit\u002Fwithdraw anytime.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzyfai-sdk\u002FSKILL.md",[],[78,83,84,85,86,87,35,88,89,90,91,92,93,94,95,96,97,98],"safe","ethereum","defi","Optimization","user","Wallet","base","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":38},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[],[105,106,107,108,109,110,111,85,112,88,113,114,115,116,117,118,119,120,121],"api","zerion api","zerion","MCP","mcp server","server","blockchain","transactions","crypto wallet","crypto","evm","solana","query","across","positions","token","prices",{"skillNo":123,"name":124,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":38},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[],[105,128,129,106,107,108,109,110,111,85,112,88,114,115,116,117,118,119,120,121],"api skill","zerion api skill",{"skillNo":131,"name":132,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":38},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[],[108,105,136,106,107,109,110,85,112,88,113,114,115,116,117,118,119,120,121],"zerion api mcp",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":38},"01M6Q5QQYZB7A501BDEQWKGSJT","yahoo-finance-forex","Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR\u002FUSD, GBP\u002FUSD, USD\u002FJPY, etc.). Analyzes sentiment and provides trading context.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-forex\u002FSKILL.md",[],[144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,24],"finance","yahoo finance","forex","yahoo","yahoo finance forex","github","https","sentiment","real-time","python3","install","Market","usd","news","time","currency","gbp","pip","market data",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":38},"01M6Q5QM6VS84WZVM7BKXXPF32","yahoo-finance","This skill should be used when the user asks to \"get stock prices\", \"check stock quotes\", \"look up earnings\", \"get financial data\", \"find trending stocks\", or needs stock market data from Yahoo Finance.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-cli\u002FSKILL.md",[],[144,145,147,170,171,172,173,174,23,155,175,176,177,178,179,180,181,182,121,162],"cli","homebrew","find","check","brew","local","get","stock","link","trending","sf","quotes","ln"]