agentsclimarketplace

Solid swift

Skill fusengine/agents/plugins/swift-apple-expert/skills/solid-swift

SOLID principles for Swift 6 and SwiftUI (iOS 26+). Files < 100 lines, protocols separated, @Observable, actors, Preview-driven development. Features Modular MANDATORY.From its SKILL.md

Install
npx -y skills add fusengine/agents --skill solid-swift

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 22 stars22 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.1 KB, 908 tokens by cl100k_base, as published. Nobody here has run it

SOLID Swift - Apple Best Practices 2026

Agent Workflow (MANDATORY)

Before ANY implementation, use TeamCreate to spawn 3 agents:

  1. fuse-ai-pilot:explore-codebase - Analyze existing architecture
  2. fuse-ai-pilot:research-expert - Verify Swift/Apple docs via Apple Docs MCP + Context7
  3. XcodeBuildMCP - Build validation after code changes. Then run fuse-ai-pilot:sniper.

DRY - Reuse Before Creating (MANDATORY)

Before writing ANY new code:

  1. Grep the codebase for similar protocols, services, or logic
  2. Check shared locations: Core/Extensions/, Core/Utilities/, Core/Protocols/
  3. If similar code exists -> extend/reuse instead of duplicate
  4. If code will be used by 2+ features -> create it in Core/ directly

Architecture (Features Modular MANDATORY)

LayerLocationMax Lines
ViewsFeatures/[Feature]/Views/80
ViewModelsFeatures/[Feature]/ViewModels/100
ServicesFeatures/[Feature]/Services/100
ProtocolsFeatures/[Feature]/Protocols/30
SharedCore/{Models,Protocols,Services,Extensions,Utilities}/-

NEVER use flat Sources/ structure - always Features/[Feature]/


Critical Rules (MANDATORY)

RuleValue
File limit100 lines (split at 90)
ViewModels@MainActor @Observable
ProtocolsFeatures/[Feature]/Protocols/ or Core/Protocols/ ONLY
ModelsSendable structs
Documentation/// on all public APIs
PreviewsEvery View MUST have #Preview

Reference Guide

Concepts

TopicReferenceWhen to consult
SOLID Overviewsolid-principles.mdQuick reference all principles
SRPsingle-responsibility.mdFat views/VMs, splitting files
OCPopen-closed.mdAdding providers, extensibility
LSPliskov-substitution.mdProtocol contracts, testing
ISPinterface-segregation.mdFat protocols, splitting
DIPdependency-inversion.mdInjection, testing, mocking
Concurrencyconcurrency-patterns.mdActors, @MainActor, Sendable
Anti-Patternsanti-patterns.mdCode smells detection

Templates

TemplateWhen to use
view.mdSwiftUI View with subviews and #Preview
viewmodel.md@Observable ViewModel with @MainActor
service.mdAPI Service, Mock, Cache actor
protocol.mdService protocol, CQRS, Auth
model.mdModel, DTO, Error, Enum

Forbidden

Anti-PatternFix
Files > 100 linesSplit at 90
Protocols in impl filesMove to Protocols/ directory
ObservableObjectUse @Observable
Completion handlersUse async/await
Missing #PreviewAdd preview for every View
Non-Sendable in asyncUse struct with let
Flat Sources/ structureUse Features/[Feature]/

What ships with it: 13 files

42.0 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.