skills/smithery.ai/refactor:srp

refactor:srp

SKILL.md

Refactor the class provided in $ARGUMENTS to adhere to the Single Responsibility Principle by extracting classes and simplifying the design.

Instructions:

  1. Identify all responsibilities within the given class
  2. Group related methods and properties by their cohesive purpose
  3. Extract each responsibility into its own focused class
  4. Consider alternative, simpler designs that make future changes easier
  5. Ensure each resulting class has only one reason to change

Analysis approach:

  • Identify responsibilities by:
    • Methods that serve different actors/users
    • Distinct areas of functionality
    • Different reasons for change
    • Unrelated data and behavior groupings
    • Infrastructure vs domain logic separation
    • I/O operations vs business logic
Installs
2
First Seen
Mar 20, 2026
refactor:srp from smithery.ai