A professional tool for refactoring SwiftUI code to enforce consistent structure, proper dependency injection, and modern Observation usage.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install swiftui-view-refactor
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install swiftui-view-refactor using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
The SwiftUI View Refactor skill is designed to automate the technical debt cleanup process within SwiftUI projects. It focuses on transforming cluttered view files into modular, maintainable code by enforcing a strict property ordering and prioritizing Model-View (MV) patterns. This skill is a core part of the Openclaw Skills ecosystem, helping developers maintain idiomatic Swift code while ensuring that business logic is properly decoupled from the UI layer.
By leveraging this skill, teams can ensure that their SwiftUI views remain lightweight expressions of state. It handles complex tasks such as splitting oversized view bodies into composable subviews and standardizing how dependencies and @Observable state are initialized. Whether you are working on a small prototype or a large-scale enterprise application, this skill provides the architectural guardrails necessary for high-quality iOS and macOS development.
To integrate this capability into your workflow, ensure your agent has access to the Openclaw Skills repository. Add the refactor configuration to your local environment:
# Navigate to your skills directory
cd ~/openclaw/skills
# Clone or add the swiftui-view-refactor.md file
# Ensure your AI agent is pointed to this directory in your configuration
Once installed, you can trigger the refactor by asking your AI agent to clean up a specific SwiftUI view using the standards defined in Openclaw Skills.
The skill organizes SwiftUI code based on a strict metadata taxonomy and property lifecycle:
| Section | Description | Key Wrapper |
|---|---|---|
| Properties | Environment, Private/Public Let, @State | @Environment, @State |
| Initialization | Dependency injection and ViewModel setup | init() |
| View Body | The primary UI declaration | var body: some View |
| View Helpers | Computed view properties and sub-structs | private var helper: some View |
| Actions | Helper functions and asynchronous logic | func performAction() |
Loading
A comprehensive diagnostic skill for identifying and remediating runtime performance bottlenecks in SwiftUI applications.

A specialized skill for implementing and optimizing the iOS 26+ Liquid Glass API within SwiftUI applications.

A specialized developer skill for auditing and remediating Swift 6.2+ concurrency issues, ensuring data-race safety and modern actor isolation.

A high-performance CLI utility that uses advanced AI models to generate concise summaries of web pages, local documents, and multimedia content.

A powerful macOS command-line integration for reading, searching, and managing Things 3 tasks and projects via AI agents.

A powerful skill for remote-controlling tmux sessions to manage interactive CLIs and orchestrate parallel AI coding agents.








































