code-refactoring-assistant

Solid

Suggest and apply code refactorings to improve readability, maintainability, and code quality. Use this skill when improving existing code structure, eliminating code smells, applying design patterns, simplifying complex logic, extracting duplicated code, renaming for clarity, or preparing code for new features. Provides specific before/after examples, explains benefits, identifies risks, and ensures behavior preservation through tests.

AI & Automation 160 stars 17 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Code Refactoring Assistant Systematically improve code structure and quality through targeted refactorings. Identifies opportunities, suggests improvements, and applies changes while preserving behavior. ## Core Capabilities ### 1. Code Smell Detection Identify refactoring opportunities: - **Long methods/functions** - Functions doing too much - **Large classes** - Classes with too many responsibilities - **Duplicate code** - Repeated logic across codebase - **Long parameter lists** - Functions with many parameters - **Primitive obsession** - Using primitives instead of objects - **Feature envy** - Methods using other classes more than their own - **Data clumps** - Same group of data appearing together - **Switch statements** - Complex conditionals that could be polymorphic ### 2. Structural Refactorings Improve code organization: - **Extract Method** - Pull out code into new function - **Extract Class** - Split class responsibilities - **Inline Method/Variable** - Remove unnecessary indirection - **Move Method/Field** - Relocate to appropriate class - **Rename** - Improve naming clarity - **Change Function Signature** - Update parameters - **Introduce Parameter Object** - Group parameters into object - **Replace Conditional with Polymorphism** - Use inheritance/interfaces ### 3. Simplification Refactorings Reduce complexity: - **Decompose Conditional** - Simplify complex if/else - **Consolidate Conditional** - Combine related conditions - **Remove Dead Code** - Dele...

Details

Author
ArabelaTso
Repository
ArabelaTso/Skills-4-SE
Created
6 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category