翻篇收录说明
翻篇网页快照

swiftui-view-refactor - Claude Skill - Awesome Skills - Agent Skills Marketplace for Claude, Codex & ChatGPT

https://awesomeskill.ai/skill/agent-scripts-swiftui-view-refactor

最近抓取:2026-12-04 04:54:12(北京时间)

最近内容变化:2026-12-04 04:54:12(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

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/ordering, handle view models safely (non-optional when possible), or standardize how dependencies and @Observable state are initialized and passed.

正文摘录

Back to Skillsswiftui-view-refactorRefactor and review SwiftUI view files for consistent structure, dependency injection, and Observation usage. Use when asked to clean up a SwiftUI view’s layout/ordering, handle view models safely (non-optional when possible), or standardize how dependencies and @Observable state are initialized and passed.1,738stars165forksUpdated 2/10/2026Developer Tools#coding-standards#view-model#refactoring#dependency-injection#swiftuiDetailsSKILL.mdSecurity AssessmentSafe(100/100)Security Score100/100About swiftui-view-refactorThe 'swiftui-view-refactor' skill is designed to help developers standardize and improve the structure of SwiftUI views, ensuring consistency in layout, dependency injection, and Observation usage. It addresses common issues in SwiftUI development, such as disorganized view bodies, improper handling of view models, and incorrect dependency injection patterns. By applying consistent coding practices and patterns, this skill streamlines the development process and results in cleaner, more maintainable SwiftUI code.FAQWhen should I use this skill?This skill should be used when you need to clean up SwiftUI views, refactor large or messy view bodies, or handle view models and dependencies more safely and consistently. It's particularly useful for enforcing MV (Model-View) patterns and organizing view layouts.Can this skill be used with existing view models?Yes, this skill helps to refactor existing view models by making them non-optional and ensuring that dependencies are properly passed through the view's `init` method. It avoids introducing new view models unless explicitly required.Is this skill compatible with all SwiftUI projects?The skill is applicable to any SwiftUI project, particularly those where views need to be refactored for better readability, maintainability, and structure. However, it assumes some basic understanding of SwiftUI patterns and does not create new APIs or functions beyond standard SwiftUI practices.Are there any limitations to using this skill?The skill does not introduce any new view models or complex patterns unless required. It mainly focuses on refactoring existing views and ensuring they adhere to consistent, best practices. It assumes a certain level of familiarity with SwiftUI concepts like `@State`, `@Environment`, and `@Observable`.Install swiftui-view-refactorDownload ZIPGit CloneDownload and extract the skill files to your .claude/skills/ directory.Download ZIPQuick Setup:Copy the skill folder to .claude/skills/Claude will automatically detect and use the skillRepositorysteipete/agent-scriptsRelated Skillsplannotator-last15,879subagent-driven-development1,865marketing-ideas713qt-qml577