/fuse-swift-apple-expert:solid-swiftfrom fuse-swift-apple-expert
Enforces SOLID and DRY principles for Swift 6/SwiftUI projects with a feature-modular directory structure, protocol separation, @Observable ViewModels, actors, and mandatory #Preview on every View.
Ships in fuse-swift-apple-expert. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Covers all five SOLID principles with dedicated references (SRP, OCP, LSP, ISP, DIP), concurrency patterns (actors, @MainActor, Sendable), an anti-pattern catalog, and code templates for views, view models, services, protocols, and models.
Requires grepping the codebase for reusable protocols/services before writing new code, and checking shared locations (Core/Extensions/, Core/Utilities/, Core/Protocols/) before duplicating logic used by 2+ features.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
Before writing ANY new code:
Core/Extensions/, Core/Utilities/, Core/Protocols/Core/ directly| Layer | Location |
|---|---|
| Views | Features/[Feature]/Views/ |
| ViewModels | Features/[Feature]/ViewModels/ |
| Services | Features/[Feature]/Services/ |
| Protocols | Features/[Feature]/Protocols/ |
| Shared | Core/{Models,Protocols,Services,Extensions,Utilities}/ |
File size: the only line limit is the hook ceiling (FUSE_SOLID_MAX_LINES). Split by responsibility well before it; if a legitimate fix cannot fit, report it - never bypass the hook.
NEVER use flat Sources/ structure - always Features/[Feature]/
| Rule | Value |
|---|---|
| File limit | Hook ceiling FUSE_SOLID_MAX_LINES only; one responsibility per file |
| ViewModels | @MainActor @Observable |
| Protocols | Features/[Feature]/Protocols/ or Core/Protocols/ ONLY |
| Models | Sendable structs |
| Documentation | /// on all public APIs |
| Previews | Every View MUST have #Preview |
| Topic | Reference | When to consult |
|---|---|---|
| SOLID Overview | solid-principles.md | Quick reference all principles |
| SRP | single-responsibility.md | Fat views/VMs, splitting files |
| OCP | open-closed.md | Adding providers, extensibility |
| LSP | liskov-substitution.md | Protocol contracts, testing |
| ISP | interface-segregation.md | Fat protocols, splitting |
| DIP | dependency-inversion.md | Injection, testing, mocking |
| Concurrency | concurrency-patterns.md | Actors, @MainActor, Sendable |
| State modeling | state-machines.md | Boolean soup, LoadState, transitions |
| Anti-Patterns | anti-patterns.md | Code smells detection |
| Template | When to use |
|---|---|
| view.md | SwiftUI View with subviews and #Preview |
| viewmodel.md | @Observable ViewModel with @MainActor |
| service.md | API Service, Mock, Cache actor |
| protocol.md | Service protocol, CQRS, Auth |
| model.md | Model, DTO, Error, Enum |
| Anti-Pattern | Fix |
|---|---|
| File with several responsibilities, or blocked by the hook ceiling | Split by responsibility |
| Protocols in impl files | Move to Protocols/ directory |
ObservableObject | Use @Observable |
| Completion handlers | Use async/await |
Missing #Preview | Add preview for every View |
| Non-Sendable in async | Use struct with let |
Flat Sources/ structure | Use Features/[Feature]/ |
references/anti-patterns.md (opens in a new tab)references/concurrency-patterns.md (opens in a new tab)references/dependency-inversion.md (opens in a new tab)references/interface-segregation.md (opens in a new tab)references/liskov-substitution.md (opens in a new tab)references/open-closed.md (opens in a new tab)references/single-responsibility.md (opens in a new tab)references/solid-principles.md (opens in a new tab)references/state-machines.md (opens in a new tab)references/templates/model.md (opens in a new tab)references/templates/protocol.md (opens in a new tab)references/templates/service.md (opens in a new tab)references/templates/view.md (opens in a new tab)references/templates/viewmodel.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fusengine/claude-plugins --plugin fuse-swift-apple-expert15 skills in this plugin
/apple-frameworksUse when adding an Apple system framework to an app - passkeys and credential exchange, MapKit geocoding, CloudKit, Core Data, TipKit, local notifications, continued background tasks, MetricKit state reporting, App Attest, HealthKit workout zones, CarPlay map panels, or Chart3D./apple-intelligenceUse when adding Apple Intelligence features to an Apple-platform app — Foundation Models framework (on-device and Private Cloud Compute language models, guided generation, tools), Writing Tools, Genmoji, Image Playground, Visual Intelligence — or when choosing between them and App Intents / Siri AI./build-distributionUse when preparing an Apple release — code signing, TestFlight upload, App Store submission, or app icons/CI across all platforms./graphics-gamesUse when building GPU rendering or games on Apple platforms — Metal 4 (command model, ML command encoder, tensors), MetalFX upscaling and frame interpolation, GameKit activities and challenges, Game Controller input, Game Porting Toolkit 4 — or when choosing between Metal, RealityKit, SpriteKit and SceneKit./iosUse when building iPhone apps — simulator/device testing, UI automation, or debugging — with XcodeBuildMCP tools./ipadosUse when building iPad apps — split views, external keyboard support, multitasking, or Stage Manager — adaptive layouts.Other plugins' skills for the same job