Get this and 30,000 other pro prompts for $10/month
Used by thousands of founders and creators who turn AI into a world‑class partner with systematic prompt engineering
I need a comprehensive refactoring strategy for the following code that's suffering from [DESCRIBE ISSUES: e.g., "tight coupling," "poor error handling," "excessive complexity," etc.]: ```[PASTE YOUR CODE]``` Please provide a systematic refactoring approach through these structured steps: 1) Code Quality Assessment: - Architecture and design pattern evaluation - Identification of specific code smells with examples - Cohesion and coupling analysis - Maintainability metrics and concerns - Technical debt inventory 2) Refactoring Priorities: - Critical issues ranked by impact - Quick wins vs. structural improvements - Risk assessment for each change - Dependencies between refactoring tasks - Testing implications 3) Refactoring Plan: - Step-by-step refactoring sequence - Specific refactoring patterns to apply at each step - Incremental approach that preserves functionality - Decision points and alternative approaches - Risk mitigation strategies 4) Refactored Implementation: - Complete refactored code with improvements applied - Clear documentation of changes made - Design pattern implementations - Error handling improvements - Performance considerations 5) Validation Strategy: - Test coverage recommendations - Regression testing approach - Key scenarios to validate - Performance testing considerations - Code review focus areas Include before/after comparisons highlighting key improvements, with specific attention to maintainability, readability, and adherence to software engineering principles.

Works with all AI Chat Assistant tools
ChatGPT, Claude, Grok, Gemini, and other AI assistant

Free to share prompt
Help others with copy this prompt link





