KS
Killer-Skills

solid — SOLID principles iOS SOLID principles iOS, how to use SOLID in iOS development, SOLID vs MVC, SOLID setup guide for iOS, what is SOLID in object-oriented design, SOLID alternative for iOS development, SRP OCP LSP ISP DIP examples

v1.0.0
GitHub

About this Skill

Perfect for iOS Development Agents needing maintainable and scalable code through object-oriented design principles. SOLID is a set of object-oriented design principles for iOS development, including SRP, OCP, LSP, ISP, and DIP, aiming to improve code maintainability and scalability.

Features

Applies Single Responsibility Principle (SRP) for modular design
Supports Open-Closed Principle (OCP) for extensibility
Ensures Liskov Substitution Principle (LSP) for subtype compatibility
Implements Interface Segregation Principle (ISP) for minimal interfaces
Follows Dependency Inversion Principle (DIP) for high-level module independence

# Core Topics

Jimmy-Jung Jimmy-Jung
[0]
[0]
Updated: 2/16/2026

Quality Score

Top 5%
33
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add Jimmy-Jung/claude_symbiote/solid

Agent Capability Analysis

The solid MCP Server by Jimmy-Jung is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for SOLID principles iOS, how to use SOLID in iOS development, SOLID vs MVC.

Ideal Agent Persona

Perfect for iOS Development Agents needing maintainable and scalable code through object-oriented design principles.

Core Value

Empowers agents to apply SOLID principles, including dependency management and responsibility separation, for writing maintainable and scalable iOS code, leveraging SRP, OCP, LSP, ISP, and DIP design patterns.

Capabilities Granted for solid MCP Server

Applying Single Responsibility Principle (SRP) for modular code
Implementing Open-Closed Principle (OCP) for extensible designs
Ensuring Liskov Substitution Principle (LSP) for subtype polymorphism
Applying Interface Segregation Principle (ISP) for client-specific interfaces
Following Dependency Inversion Principle (DIP) for high-level module independence

! Prerequisites & Limits

  • Requires knowledge of object-oriented programming
  • Specific to iOS development
  • Needs understanding of SOLID principles
Project
SKILL.md
4.9 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

SOLID 원칙 - iOS 객체지향 설계 가이드

SOLID 원칙을 적용하여 유지보수 가능하고 확장 가능한 iOS 코드를 작성한다. 의존성 관리, 책임 분리, 확장성을 고려한 설계를 지원한다.

상세 원칙 참조

각 원칙의 상세 내용, iOS 예제, 안티패턴, 리팩토링 방법은 references 디렉토리를 참고한다:

원칙참조 파일핵심
SRPreferences/srp.md모듈은 하나의 Actor에게만 책임
OCPreferences/ocp.md확장에 열리고 수정에 닫힘
LSPreferences/lsp.md하위 타입은 상위 타입 대체 가능
ISPreferences/isp.md사용하지 않는 인터페이스에 의존 금지
DIPreferences/dip.md고수준이 저수준에 의존하지 않음

객체지향의 본질

핵심은 의존성 역전(Dependency Inversion)이다.

  • Runtime 흐름: 고수준 → 저수준
  • Source Code 의존성: 저수준 → 고수준 (역전!)
  • 고수준 정책을 저수준 세부사항으로부터 보호한다.

적용 워크플로우

1단계: 설계 전 체크리스트

□ Actor를 식별했는가? (SRP)
□ 변경 가능한 지점을 파악했는가? (OCP)
□ 추상화가 필요한 곳을 찾았는가? (DIP)
□ 인터페이스가 비대한가? (ISP)
□ 상속 관계가 적절한가? (LSP)

2단계: 코드 작성 중 체크리스트

□ 클래스가 여러 Actor를 섬기고 있는가? (SRP 위반)
□ 새 기능 추가 시 기존 코드를 수정하는가? (OCP 위반)
□ protocol에 구체 클래스를 직접 의존하는가? (DIP 위반)
□ protocol에 사용하지 않는 메서드가 있는가? (ISP 위반)
□ 하위 타입이 상위 타입의 계약을 위반하는가? (LSP 위반)

3단계: 리팩토링 우선순위

우선순위 1: DIP 위반 → protocol 도입으로 의존성 역전
우선순위 2: SRP 위반 → Actor별로 책임 분리
우선순위 3: OCP 위반 → protocol + 구현체로 확장
우선순위 4: ISP 위반 → protocol 분리
우선순위 5: LSP 위반 → 상속 대신 composition 고려

iOS에서 SOLID 적용 요약

Repository 패턴 (DIP + SRP + OCP)

swift
1// DIP: 추상화에 의존 2protocol UserRepository { 3 func fetchUser(id: String) async throws -> User 4 func saveUser(_ user: User) async throws 5} 6 7// SRP: 네트워크 데이터 소스는 네트워크만 책임 8class NetworkUserRepository: UserRepository { 9 private let apiClient: APIClient 10 11 init(apiClient: APIClient) { 12 self.apiClient = apiClient 13 } 14 15 func fetchUser(id: String) async throws -> User { 16 try await apiClient.request(.getUser(id)) 17 } 18 19 func saveUser(_ user: User) async throws { 20 try await apiClient.request(.updateUser(user)) 21 } 22} 23 24// OCP: 새로운 저장소 추가 시 기존 코드 수정 불필요 25class CachedUserRepository: UserRepository { 26 private let cache: Cache 27 28 func fetchUser(id: String) async throws -> User { 29 try cache.get(id) 30 } 31 32 func saveUser(_ user: User) async throws { 33 try cache.set(user, key: user.id) 34 } 35} 36 37// UseCase는 추상화에만 의존 (DIP) 38class FetchUserUseCase { 39 private let repository: UserRepository 40 41 init(repository: UserRepository) { 42 self.repository = repository 43 } 44 45 func execute(id: String) async throws -> User { 46 try await repository.fetchUser(id: id) 47 } 48}

안티패턴 감지

Massive View Controller (SRP + DIP 위반)

swift
1// ❌ 나쁜 예 2class ProductListViewController: UIViewController { 3 func fetchProducts() { 4 URLSession.shared.dataTask(with: url) { data, _, _ in 5 // JSON 파싱, 할인 계산, UI 업데이트 모두 여기서 6 } 7 } 8} 9 10// ✅ 좋은 예 11class ProductListViewController: UIViewController { 12 private let viewModel: ProductListViewModel 13 // UI만 담당 14}

구체 클래스 직접 의존 (DIP 위반)

swift
1// ❌ 나쁜 예 2class OrderService { 3 let database = MySQLDatabase() 4} 5 6// ✅ 좋은 예 7class OrderService { 8 private let repository: OrderRepository // protocol 의존 9 10 init(repository: OrderRepository) { 11 self.repository = repository 12 } 13}

Fat Interface (ISP 위반)

swift
1// ❌ 나쁜 예 2protocol DataSource { 3 func fetch() -> [Item] 4 func save(_ item: Item) 5 func delete(_ item: Item) 6 func search(_ query: String) -> [Item] 7} 8 9// ✅ 좋은 예 10protocol Fetchable { func fetch() -> [Item] } 11protocol Savable { func save(_ item: Item) } 12protocol Deletable { func delete(_ item: Item) } 13protocol Searchable { func search(_ query: String) -> [Item] }

실전 팁

  1. DIP부터 시작: 의존성 방향이 가장 중요
  2. Actor 찾기: SRP 적용의 시작점
  3. protocol 먼저: Swift는 protocol-oriented
  4. 점진적 적용: 한 번에 모두 적용하려 하지 말 것
  5. 테스트로 검증: SOLID 준수 여부는 테스트 용이성으로 확인

Related Skills

Looking for an alternative to solid or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication