View Refactor
robinebers/openusage
Refactor macOS SwiftUI views and scenes with strong defaults for small dedicated subviews, stable sidebar and selection structure, explicit command and toolbar ownership, scene-aware state, and…
Swift and SwiftUI refactoring patterns aligned with the iOS 26 / Swift 6.2 clinic modular MVVM-C architecture (Airbnb + OLX SPM layout).
$ npx skills add pproenca/dot-skills --skill swift-refactor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pproenca/dot-skills swift-refactor --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.experimental/swift-refactor .claude/skills/swift-refactor && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "swift-refactor" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/swift-refactor into .claude/skills/swift-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-refactor", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/swift-refactorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add pproenca/dot-skills --skill swift-refactor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pproenca/dot-skills swift-refactor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.experimental/swift-refactor .agents/skills/swift-refactor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "swift-refactor" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/swift-refactor into .agents/skills/swift-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-refactor", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pproenca/dot-skills --skill swift-refactor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pproenca/dot-skills swift-refactor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.experimental/swift-refactor .cursor/skills/swift-refactor && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "swift-refactor" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/swift-refactor into .cursor/skills/swift-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-refactor", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/pproenca/dot-skills.git --path skills/.experimental/swift-refactor--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add pproenca/dot-skills --skill swift-refactor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pproenca/dot-skills swift-refactor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.experimental/swift-refactor .gemini/skills/swift-refactor && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "swift-refactor" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/swift-refactor into .gemini/skills/swift-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-refactor", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install pproenca/dot-skills swift-refactorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add pproenca/dot-skills --skill swift-refactor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.experimental/swift-refactor .github/skills/swift-refactor && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "swift-refactor" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/swift-refactor into .github/skills/swift-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-refactor", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pproenca/dot-skills --skill swift-refactor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pproenca/dot-skills swift-refactor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.experimental/swift-refactor .opencode/skills/swift-refactor && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "swift-refactor" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/swift-refactor into .opencode/skills/swift-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-refactor", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
swift-refactorSwift and SwiftUI refactoring patterns aligned with the iOS 26 / Swift 6.2 clinic modular MVVM-C architecture (Airbnb + OLX SPM layout).
Swift Refactor is an agent skill from pproenca/dot-skills. Swift and SwiftUI refactoring patterns aligned with the iOS 26 / Swift 6.2 clinic modular MVVM-C architecture (Airbnb + OLX SPM layout). Enforces @Observable ViewModels/coordinators, App-target DependencyContainer + route shells, Domain repository/coordinator/error-routing protocols, and Data-owned I/O with stale-while-revalidate plus optimistic queued sync boundaries. Use when refactoring existing SwiftUI code into the clinic architecture.
Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 66 other files, including reference files and assets (for example `assets/templates/_template.md`, `metadata.json` and `references/_sections.md`).
It sits in Mobile, covering iOS development and Refactoring. It works with SwiftUI, Swift and iOS. The repository describes itself as: A collection of AI agent skills following the Agent Skills open format. The licence is MIT.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit cf93c57. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Swift Refactor loads about 3k tokens when it runs, and up to ~42k if it reads all its reference files. Until then it costs about 115 tokens; SKILL.md has 851 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from pproenca/dot-skills at commit cf93c57, republished under its MIT licence (© pproenca). 851 words, ~3,030 tokens.
.claude/skills/swift-refactor/SKILL.md (or your agent's skills folder). This skill also uses 63 other files; get the full folder from GitHub.Comprehensive refactoring guide for migrating Swift/SwiftUI code to modular MVVM-C with local SPM package boundaries and App-target composition root wiring.
┌───────────────────────────────────────────────────────────────┐
│ App target: DependencyContainer, Coordinators, Route Shells │
├───────────────────────────────────────────────────────────────┤
│ Feature modules: View + ViewModel (Domain + DesignSystem deps)│
├───────────────────────────────────────────────────────────────┤
│ Data package: repositories, remote/local stores, sync, retry │
├───────────────────────────────────────────────────────────────┤
│ Domain package: models, repository/coordinator/error protocols │
└───────────────────────────────────────────────────────────────┘Dependency Rule: Feature modules never import Data and never import sibling features.
All guidance in this skill assumes the clinic modular MVVM-C architecture:
Domain + DesignSystem only (never Data, never sibling features)DependencyContainer, concrete coordinators, and Route Shell wiringDomain stays pure Swift and defines models plus repository, *Coordinating, ErrorRouting, and AppError contractsData owns SwiftData/network/sync/retry/background I/O and implements Domain protocolsReference these guidelines when:
DependencyContainer.task(id:) and cancellable loading@Observable ViewModels/coordinators, ObservableObject / @Published neverNavigationStack is owned by App-target route shells and coordinators@Equatable macro on every view, AnyView never| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | View Identity & Diffing | CRITICAL | diff- | 4 |
| 2 | API Modernization | CRITICAL | api- | 7 |
| 3 | State Architecture | CRITICAL | state- | 6 |
| 4 | View Composition | HIGH | view- | 7 |
| 5 | Navigation & Coordination | HIGH | nav- | 5 |
| 6 | Layer Architecture | HIGH | layer- | 5 |
| 7 | Architecture Patterns | HIGH | arch- | 5 |
| 8 | Dependency Injection | MEDIUM-HIGH | di- | 2 |
| 9 | Type Safety & Protocols | MEDIUM-HIGH | type- | 4 |
| 10 | List & Collection Performance | MEDIUM | list- | 4 |
| 11 | Async & Data Flow | MEDIUM | data- | 3 |
| 12 | Swift Language Fundamentals | MEDIUM | swift- | 8 |
diff-equatable-views - Add @Equatable macro to every SwiftUI viewdiff-closure-skip - Use @EquatableIgnored for closure propertiesdiff-identity-stability - Use stable O(1) identifiers in ForEachdiff-printchanges-debug - Use _printChanges() to diagnose re-rendersapi-observable-macro - Migrate ObservableObject to @Observable macroapi-navigationstack-migration - Replace NavigationView with NavigationStackapi-onchange-signature - Migrate to new onChange signatureapi-environment-object-removal - Replace @EnvironmentObject with @Environmentapi-alert-confirmation-dialog - Migrate Alert to confirmationDialog APIapi-list-foreach-identifiable - Replace id: .self with Identifiable conformanceapi-toolbar-migration - Replace navigationBarItems with toolbar modifierstate-scope-minimization - Minimize state scope to nearest consumerstate-derived-over-stored - Use computed properties over redundant @Statestate-binding-extraction - Extract @Binding to isolate child re-rendersstate-remove-observation - Migrate @ObservedObject to @Observable trackingstate-onappear-to-task - Replace onAppear closures with .task modifierstate-stateobject-placement - Migrate @StateObject to @State with @Observableview-extract-subviews - Extract subviews for diffing checkpointsview-eliminate-anyview - Replace AnyView with @ViewBuilder or genericsview-computed-to-struct - Convert computed view properties to struct viewsview-modifier-extraction - Extract repeated modifiers into custom ViewModifiersview-conditional-content - Use Group or conditional modifiers over conditional viewsview-preference-keys - Replace callback closures with PreferenceKeyview-body-complexity - Reduce view body to maximum 10 nodesnav-centralize-destinations - Refactor navigation to coordinator patternnav-value-based-links - Replace NavigationLink with coordinator routesnav-path-state-management - Use NavigationPath for programmatic navigationnav-split-view-adoption - Use NavigationSplitView for multi-column layoutsnav-sheet-item-pattern - Replace boolean sheet triggers with item bindinglayer-dependency-rule - Extract domain layer with zero framework importslayer-usecase-protocol - Remove use-case/interactor layer; keep orchestration in ViewModel + repository protocolslayer-repository-protocol - Repository protocols in Domain, implementations in Datalayer-no-view-repository - Remove direct repository access from viewslayer-viewmodel-boundary - Refactor ViewModels to expose display-ready state onlyarch-viewmodel-elimination - Restructure inline state into @Observable ViewModelarch-protocol-dependencies - Extract protocol dependencies through ViewModel layerarch-environment-key-injection - Use Environment keys for service injectionarch-feature-module-extraction - Extract features into independent modulesarch-model-view-separation - Extract business logic into Domain models and repository-backed ViewModelsdi-container-composition - Compose dependency container at app rootdi-mock-testing - Add mock implementation for every protocol dependencytype-tagged-identifiers - Replace String IDs with tagged typestype-result-over-optionals - Use Result type over optional with error flagtype-phantom-types - Use phantom types for compile-time state machinestype-force-unwrap-elimination - Eliminate force unwraps with safe alternativeslist-constant-viewcount - Ensure ForEach produces constant view count per elementlist-filter-in-model - Move filter/sort logic from ForEach into ViewModellist-lazy-stacks - Replace VStack/HStack with Lazy variants for unbounded contentlist-id-keypath - Provide explicit id keyPath — never rely on implicit identitydata-task-modifier - Replace onAppear async work with .task modifierdata-error-loadable - Model loading states as enum instead of boolean flagsdata-cancellation - Use .task automatic cancellation — never manage Tasks manuallyswift-let-vs-var - Use let for constants, var for variablesswift-structs-vs-classes - Prefer structs over classesswift-camel-case-naming - Use camelCase naming conventionswift-string-interpolation - Use string interpolation for dynamic textswift-functions-clear-names - Name functions and parameters for clarityswift-for-in-loops - Use for-in loops for collectionsswift-optionals - Handle optionals safely with unwrappingswift-closures - Use closures for inline functionsRead individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
© pproenca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 63 other files (references, assets) in skills/.experimental/swift-refactor of pproenca/dot-skills.
Open the folder on GitHubat commit cf93c57
Swift Refactor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Swift Refactor this skillpproenca/dot-skills | 215 | — | ~3k | Automated safety check: Pass | MIT | |
| View Refactorrobinebers/openusage | 4.3k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Swiftui Expert SkillAFK-surf/OpenBridge | 430 | 2 repos | ~3.9k | Automated safety check: Pass | MIT | |
| Swiftui AnimationAstraFoundry/KumoApp | 290 | — | ~4.1k | Automated safety check: Pass | AGPL-3.0 | |
| Snapshot Testsmicrosoft/SwiftStreamingMarkdown | 378 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Bootstrap iOSRayFernando1337/rayfernando-skills | 130 | — | ~1.1k | Automated safety check: Pass | Apache-2.0 |
robinebers/openusage
Refactor macOS SwiftUI views and scenes with strong defaults for small dedicated subviews, stable sidebar and selection structure, explicit command and toolbar ownership, scene-aware state, and…
AFK-surf/OpenBridge
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, modern APIs, Swift concurrency, and iOS 26+ Liquid Glass adoption.
AstraFoundry/KumoApp
Implement, review, or improve SwiftUI animations and transitions.
microsoft/SwiftStreamingMarkdown
Record and validate swift-snapshot-testing snapshots in the SwiftStreamingMarkdown package: regenerate reference PNGs, run snapshot tests, and diff failed snapshots.
RayFernando1337/rayfernando-skills
Bootstrap agents for iOS, iPadOS, macOS, Swift, SwiftUI, SwiftData/Core Data, Swift Testing, Xcode build/test/debug, Simulator, App Intents, or XcodeBuildMCP work.
dpearson2699/swift-ios-skills
Implement, diagnose, or review SwiftUI motion using explicit and scoped implicit animations, springs, transitions, PhaseAnimator, KeyframeAnimator, matched geometry or navigation zoom, SF Symbol…
pproenca/dot-skills
Audio forensics and voice recovery guidelines for CSI-level audio analysis.
pproenca/dot-skills
Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases.
pproenca/dot-skills
Create well-structured RFCs and technical proposals for software projects.
pproenca/dot-skills
Developer-experience friction auditing and fixing — slow onboarding, repeated manual setup steps, missing bootstrap/reset/seed scripts, undiscoverable conventions.
pproenca/dot-skills
Turn a rough idea for a language into a complete, implementable specification — a DSL, query, config/data, template, or protocol language — by interviewing the author dimension by dimension until…
pproenca/dot-skills
Drafting Python Enhancement Proposals (PEPs) — proposing a Python language feature, a standard library change, an interoperability standard, or an informational/process document for the Python…
Categories
Swift and SwiftUI refactoring patterns aligned with the iOS 26 / Swift 6.2 clinic modular MVVM-C architecture (Airbnb + OLX SPM layout). Swift Refactor is an agent skill from pproenca/dot-skills.2 clinic modular MVVM-C architecture (Airbnb + OLX SPM layout).
Swift Refactor fits situations like: refactoring existing SwiftUI code into the clinic architecture; tasks that involve iOS development; tasks that involve Refactoring.
Run `npx skills add pproenca/dot-skills --skill swift-refactor -a claude-code`. Or copy the skill folder (skills/.experimental/swift-refactor in pproenca/dot-skills) into .claude/skills/swift-refactor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pproenca/dot-skills --skill swift-refactor -a codex`. Or copy the skill folder (skills/.experimental/swift-refactor in pproenca/dot-skills) into .agents/skills/swift-refactor in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pproenca/dot-skills --skill swift-refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swift-refactor, .gemini/skills/swift-refactor, .github/skills/swift-refactor and .opencode/skills/swift-refactor in your project.
SKILL.md names no scripts, command-line tools or credentials: Swift Refactor is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Swift Refactor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 39k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Swift Refactor: View Refactor (robinebers/openusage, 4.3k stars), Swiftui Expert Skill (AFK-surf/OpenBridge, 430 stars), Swiftui Animation (AstraFoundry/KumoApp, 290 stars) and Snapshot Tests (microsoft/SwiftStreamingMarkdown, 378 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pproenca (a GitHub user) maintains it in pproenca/dot-skills, which has 215 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on August 15, 2026.
Source: pproenca/dot-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.