swift-patterns for Openclaw

A comprehensive framework for building, reviewing, and refactoring SwiftUI applications using Apple-native best practices and modern API standards.

efremidze
v1.0.1
Feb 17, 2026
0
624
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install swift-patterns

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install swift-patterns using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is swift-patterns?

swift-patterns is a specialized toolkit designed for Openclaw Skills that empowers AI agents to handle complex SwiftUI development tasks. It prioritizes official Apple design guidance and native API usage to ensure codebases are performant, testable, and maintainable. Rather than enforcing a specific architectural dogmas like MVVM or VIPER, this skill focuses on fundamental technical truths such as correct state ownership and optimal view composition.

By leveraging this skill, developers can automate the audit of legacy code and migrate seamlessly to modern SwiftUI features. It provides a structured methodology for identifying performance bottlenecks, stabilizing view identity in collections, and implementing type-safe navigation flows, making it an essential asset for any Apple platform developer using AI-assisted workflows.

swift-patterns Use Cases

  • Auditing existing SwiftUI codebases for deprecated APIs like foregroundColor or NavigationView.
  • Refactoring complex views into smaller, high-performance subviews with stable identity.
  • Designing robust data flows by correctly selecting property wrappers like @State, @Binding, and @Bindable.
  • Implementing modern concurrency patterns using the .task modifier for automatic lifecycle management.
  • Optimizing List and ScrollView performance for dynamic data sets using Openclaw Skills.

How swift-patterns Works

  1. Context Analysis: The agent evaluates the existing SwiftUI code or feature request against the workflow decision tree to determine if the task is a review, refactor, or new implementation.
  2. Reference Selection: Based on the intent, the skill loads specific domain documentation from the references directory, such as state management or navigation patterns.
  3. Pattern Matching: The agent applies the property wrapper selection logic and modern API replacement tables to identify necessary code transformations.
  4. Execution & Validation: The agent performs the code changes or generates a review response using standardized templates to ensure clarity and risk assessment.
  5. Verification: The final output is cross-referenced with the Review Checklist to ensure adherence to performance and identity stability rules.

swift-patterns Setup

To integrate swift-patterns into your environment, ensure your AI agent has access to the Openclaw Skills directory structure:

# Clone the skills repository
git clone https://github.com/openclaw/skills.git

# Navigate to the swift-patterns directory
cd skills/swift-patterns

# Ensure the references directory is indexed by your AI agent
ls ./references/

swift-patterns Data Schema & Taxonomy

The swift-patterns skill utilizes a modular reference system to organize SwiftUI domain knowledge:

Component Purpose
workflows/ Logic for Review, Refactor, and Implementation tracks.
references/state.md Taxonomy of property wrappers and state ownership rules.
references/modern-apis.md Mapping of deprecated modifiers to modern alternatives.
templates/ Standardized structures for Review and Refactor responses.
checklists/ Final validation criteria for performance and composition.

swift-patterns Advanced Features

  • Automated Migration Playbooks: Step-by-step guides for moving from legacy navigation and state objects to NavigationStack and @Observable.
  • Performance Hot-Path Auditing: Specialized checks for unnecessary object creation within view bodies and layout-neutral identity stability.
  • Context-Aware Concurrency: Intelligent mapping of async work to the .task(id:) modifier for reactive, value-dependent execution.
  • Architecture Agnostic Integration: Designed to work within any project structure without forcing specific design patterns, focusing purely on SwiftUI correctness.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*