skills/doyajin174/software-architecture/SKILL.md
Clean Architecture and SOLID principles guide. Use this when designing systems, reviewing architecture, or making structural decisions.
npx skillsauth add aiskillstore/marketplace software-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Clean Architecture와 DDD 원칙 기반 소프트웨어 설계 가이드입니다.
| 원칙 | 설명 | 예시 |
|------|------|------|
| Single Responsibility | 하나의 클래스는 하나의 책임 | UserRepository vs UserService |
| Open/Closed | 확장에 열림, 수정에 닫힘 | 인터페이스 사용 |
| Liskov Substitution | 하위 타입은 상위 타입 대체 가능 | 상속 계약 준수 |
| Interface Segregation | 클라이언트별 인터페이스 분리 | IReader vs IWriter |
| Dependency Inversion | 추상화에 의존 | DI 컨테이너 사용 |
┌─────────────────────────────────────────┐
│ Frameworks & Drivers │ ← DB, Web, UI
├─────────────────────────────────────────┤
│ Interface Adapters │ ← Controllers, Gateways
├─────────────────────────────────────────┤
│ Application Business Rules │ ← Use Cases
├─────────────────────────────────────────┤
│ Enterprise Business Rules │ ← Entities
└─────────────────────────────────────────┘
의존성 규칙: 바깥 → 안쪽 방향으로만 의존
// ❌ 중첩된 조건문
function process(user) {
if (user) {
if (user.isActive) {
if (user.hasPermission) {
// do something
}
}
}
}
// ✅ Early Return
function process(user) {
if (!user) return;
if (!user.isActive) return;
if (!user.hasPermission) return;
// do something
}
| 대상 | 권장 | 최대 | 조치 | |------|------|------|------| | 함수 | 30줄 | 50줄 | 분리 | | 컴포넌트 | 80줄 | 150줄 | 분리 | | 파일 | 200줄 | 300줄 | 모듈화 |
// ❌ 제네릭 네이밍
utils/helpers.ts
common/index.ts
// ✅ 도메인 네이밍
services/OrderCalculator.ts
auth/UserAuthenticator.ts
"모든 커스텀 코드는 유지보수, 테스트, 문서화가 필요한 부채다"
코드 작성 전 확인:
| Anti-Pattern | 문제점 | 해결책 | |--------------|--------|--------| | NIH Syndrome | 바퀴 재발명 | 라이브러리 우선 | | God Class | 너무 많은 책임 | SRP 적용 | | Spaghetti Code | 얽힌 의존성 | 레이어 분리 | | Magic Numbers | 의미 불명확 | 상수 추출 | | Deep Nesting | 가독성 저하 | Early Return |
✅ 올바른 분리
├── domain/ # 비즈니스 로직
├── application/ # Use Cases
├── infrastructure/ # DB, API
└── presentation/ # UI, Controllers
❌ 잘못된 분리
├── components/
│ └── UserCard.tsx # UI + API 호출 + 비즈니스 로직 혼합
새로운 코드 작성 시:
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.