swift-simplify

Simplifies Swift and iOS code while preserving behavior and concurrency contracts.

2|Updated May 6, 2026
One-click install
npx skills add https://github.com/bpcakes/jig-skills --skill swift-simplify-bpcakes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-simplify
Source: https://github.com/bpcakes/jig-skills/tree/main/plugins/jig-swift/skills/swift-simplify
Command: npx skills add https://github.com/bpcakes/jig-skills --skill swift-simplify-bpcakes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Swift code in active iOS projects often accumulates nesting, duplication, dead code, and outdated patterns that make it harder to read, debug, and maintain. This Skill refactors Swift code for clarity without changing behavior, API shape, or Swift 6 concurrency semantics. ## Core Features & Use Cases - Behavior-preserving refactoring: Simplifies code while keeping outputs, side effects, error semantics, actor isolation, Sendable, and public API contracts intact. - Modern Swift 6 patterns: Applies structured concurrency, SwiftUI data-flow conventions (@State, @Binding, Observation), and Swift API Design Guidelines where appropriate. - Tight scope control: Works only on the files, snippets, or diffs you name, falling back to uncommitted changes when no target is given. - Use Case: After landing a feature branch, ask the agent to simplify the touched SwiftUI view models and services; it removes redundant wrappers and nesting while keeping @MainActor isolation and test intent unchanged. ## Quick Start Ask the agent to simplify the Swift files in your current uncommitted changes while preserving behavior and concurrency annotations.

Frequently Asked Questions about swift-simplify

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

FAQPage Schema
How do I simplify Swift code without changing its behavior?

Name the files, snippet, or diff you want simplified and the Skill refactors only that scope, preserving outputs, side effects, error semantics, and API contracts. If no target is named, it defaults to your uncommitted changes.

Does this refactoring preserve Swift 6 actor isolation and Sendable annotations?

Yes, actor isolation, @MainActor, custom global actors, Sendable, async, throws, and typed throws are explicitly preserved. The Skill never weakens concurrency correctness or silences compiler diagnostics by changing semantics.

Can I use it on mixed SwiftUI and UIKit projects?

Yes, it assumes a SwiftUI-first codebase but remains compatible with mixed SwiftUI/UIKit projects. It respects each framework's data-flow and lifecycle conventions rather than forcing migrations.

Will it migrate my tests from XCTest to Swift Testing?

No, tests stay in the project's existing framework, whether Swift Testing or XCTest, unless you explicitly ask for a migration. Test intent is preserved during simplification.

When should I not use automated Swift simplification?

Avoid it for sweeping renames, architecture rewrites, dependency migrations, or project-wide cleanup, which are out of scope. It also skips generated code, snapshots, localization catalogs, and Xcode project metadata unless explicitly requested.