smith-design

tianjianjiang's avatarfrom tianjianjiang

SOLID principles and architecture design patterns. Use when starting new features, refactoring code, conducting architecture reviews, or applying object-oriented design principles.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 10, 2026

When & Why to Use This Skill

This Claude skill provides a comprehensive framework for applying SOLID principles and architectural design patterns to software development. It assists developers in building scalable, maintainable, and robust systems by guiding them through initial feature design, code refactoring, and rigorous architecture reviews, including automated type design analysis.

Use Cases

  • New Feature Architecture: Design class structures and module boundaries from scratch using SOLID principles to ensure long-term maintainability.
  • Legacy Code Refactoring: Systematically decouple complex modules and improve code quality by applying Dependency Inversion and Interface Segregation.
  • Architecture Reviews: Conduct deep-dive evaluations of existing codebases to identify design smells and ensure adherence to object-oriented best practices.
  • Automated Type Design Analysis: Utilize the integrated type-design-analyzer to quantitatively rate encapsulation, invariants, and enforcement within your domain models.
namesmith-design
descriptionSOLID principles and architecture design patterns. Use when starting new features, refactoring code, conducting architecture reviews, or applying object-oriented design principles.

Design Principles

  • Scope: SOLID principles for OOP/architecture design
  • Load if: Starting new feature, refactoring, architecture review
  • Prerequisites: @smith-principles/SKILL.md (fundamental principles: DRY, KISS, YAGNI, MECE)

SOLID Principles

  • Single Responsibility: One reason to change per class/module
  • Open/Closed: Open for extension, closed for modification
  • Liskov Substitution: Subtypes must be substitutable for base types
  • Interface Segregation: Many specific interfaces over one general
  • Dependency Inversion: Depend on abstractions, not concretions

ACTION (Recency Zone)

When designing or reviewing architecture:

  1. Apply Single Responsibility - each module has one reason to change
  2. Design for extension without modification (Open/Closed)
  3. Ensure subtypes are substitutable (Liskov)
  4. Prefer small, focused interfaces (Interface Segregation)
  5. Depend on abstractions, not implementations (Dependency Inversion)

Claude Code Plugin Integration

When pr-review-toolkit is available:

  • type-design-analyzer agent: Rates type design on 4 dimensions (1-10 each)
    • Encapsulation
    • Invariant expression
    • Usefulness
    • Enforcement
  • Trigger: "Review the [TypeName] type design" or use Task tool
  • @smith-principles/SKILL.md - Fundamental principles (DRY, KISS, YAGNI)
  • @smith-standards/SKILL.md - Universal code standards
  • @smith-dev/SKILL.md - Development workflow
  • @smith-analysis/SKILL.md - Problem decomposition before design