axiom-modernize

Migrate legacy SwiftUI ObservableObject models to the @Observable macro.

34|2|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/DengNaichen/Stet --skill axiom-modernize
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-modernize
Source: https://github.com/DengNaichen/Stet/tree/main/.agents/skills/axiom-modernize
Command: npx skills add https://github.com/DengNaichen/Stet --skill axiom-modernize

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the technical debt associated with legacy SwiftUI patterns, helping developers transition to modern, performant, and type-safe iOS 17 and 18 APIs.

Core Features & Use Cases

  • Observable Migration: Automatically identifies ObservableObject classes and suggests migration to the @Observable macro.
  • Property Wrapper Cleanup: Replaces legacy wrappers like @StateObject, @ObservedObject, and @EnvironmentObject with modern alternatives like @State, @Bindable, and @Environment.
  • API Modernization: Detects deprecated modifiers and completion handlers, providing paths to modern async/await and updated SwiftUI syntax.

Quick Start

Run the axiom-modernize skill to scan the current repository and generate a migration report for all legacy SwiftUI patterns.

Frequently Asked Questions about axiom-modernize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate ObservableObject to the @Observable macro in SwiftUI?

Migrating ObservableObject to the @Observable macro involves scanning Swift files to update class definitions and replacing legacy view property wrappers like @StateObject and @ObservedObject with modern alternatives like @State and @Bindable to improve view update performance.

What is the best way to modernize legacy iOS codebases to iOS 17 standards?

The best way to modernize legacy iOS codebases is to generate a migration report that identifies deprecated SwiftUI modifiers and suggests updating to modern declarative patterns, replacing completion handlers with async/await syntax.

How do I replace @EnvironmentObject with @Environment in my SwiftUI views?

Replacing @EnvironmentObject with @Environment requires updating view property wrappers to iOS 17+ standards, reducing boilerplate by shifting to the @Observable macro for model management rather than relying on older ObservableObject protocols.

Can I automatically convert completion handlers to async/await in Swift?

You can automatically convert completion handlers to async/await by scanning target Swift files within a repository to detect deprecated patterns and provide modern async/await paths for improved code readability and adherence to Apple best practices.

Does modernizing SwiftUI property wrappers require an iOS 17 deployment target?

Modernizing SwiftUI property wrappers to use @Observable, @State, and @Bindable requires targeting iOS 17 or iOS 18 deployment environments, as these specific macros and property wrapper standards are unavailable in earlier legacy operating system versions.

Why does my migrated @Observable model still trigger view update issues?

Migrated @Observable models may trigger view update issues if legacy property wrappers like @StateObject are not fully cleaned up, requiring a thorough replacement of deprecated modifiers to achieve improved view update performance.