solid-principles

Analyze source code for SOLID principle violations with severity ratings and refactoring suggestions.

Updated Dec 3, 2023
One-click install
npx skills add https://github.com/ealvar3z/dotfiles --skill solid-principles-ealvar3z
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-principles
Source: https://github.com/ealvar3z/dotfiles/tree/main/prompts/skills/solid-principles
Command: npx skills add https://github.com/ealvar3z/dotfiles --skill solid-principles-ealvar3z

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers identify and fix design flaws in object-oriented code, leading to more maintainable, flexible, and robust software.

Core Features & Use Cases

  • Comprehensive Audits: Analyzes code against all five SOLID principles (SRP, OCP, LSP, ISP, DIP).
  • Targeted Checks: Focuses on specific principles when requested (e.g., "check SRP").
  • Actionable Findings: Provides clear explanations, severity ratings, and refactoring suggestions.
  • Use Case: A team is struggling with a legacy system that's hard to extend. They use this Skill to pinpoint design smells and get concrete advice on how to refactor it for better maintainability.

Quick Start

Analyze the attached file 'user_service.py' for SOLID violations.

Frequently Asked Questions about solid-principles

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit my source code for SOLID design violations?

You can audit source code for SOLID violations by analyzing the files against all five object-oriented design principles. The Skill reviews the provided code, identifies architectural flaws, and outputs actionable findings with severity ratings and refactoring suggestions.

What is the best way to check a specific SOLID principle like SRP in my codebase?

To check a specific SOLID principle like SRP, you can request a targeted analysis of your source code. The audit focuses solely on the Single Responsibility Principle, pinpointing design smells and providing concrete refactoring advice for your object-oriented classes.

Can I use this to find refactoring suggestions for legacy object-oriented code?

Yes, you can use this to find refactoring suggestions for legacy object-oriented code. It analyzes existing source files to pinpoint design flaws violating SOLID principles, then provides clear explanations and actionable steps to improve maintainability.

Does the SOLID principles audit support multiple object-oriented languages?

The SOLID principles audit supports various object-oriented languages. It analyzes source code structure and design patterns regardless of the specific OO language, providing severity ratings and refactoring suggestions for identified violations.

Why does my code fail the Liskov Substitution Principle check during refactoring?

Your code fails the Liskov Substitution Principle check when derived classes alter the expected behavior of their base classes. The audit detects these structural inconsistencies, explains the violation severity, and suggests appropriate refactoring patterns.