code-refactoring-refactor-clean
sickn33/agentic-awesome-skills
Expert code refactoring using clean code principles and SOLID design patterns.
What is code-refactoring-refactor-clean?
A code refactoring specialist that analyzes and improves code quality, maintainability, and performance. Use it when you need to reduce duplication, eliminate code smells, improve testability, or prepare code for new features while maintaining behavioral stability.
- Identifies code smells, dependencies, and risky hotspots
- Proposes incremental refactor plans with ordered steps
- Applies changes in small slices to keep behavior stable
- Updates tests and verifies regressions
- Provides reviewable diffs and ensures test coverage
How to install code-refactoring-refactor-clean
npx skills add https://github.com/sickn33/agentic-awesome-skills --skill code-refactoring-refactor-cleanHow to use code-refactoring-refactor-clean
- 1.Provide the code you want refactored along with context about pain points or goals
- 2.Review the proposed refactor plan and approve the approach
- 3.Execute the refactoring in incremental steps as suggested
- 4.Run existing tests to verify no behavioral regressions
- 5.Review the diffs and updated test coverage before merging
Use cases
- Refactoring tangled or hard-to-maintain legacy code
- Reducing duplication and complexity across modules
- Improving testability and design consistency before feature work
- Preparing code for architectural changes or scaling
- Applying SOLID principles to existing codebases
- Backend developers
- Software engineers maintaining legacy systems
- Teams preparing for major refactoring initiatives
- Code reviewers seeking systematic improvement strategies
code-refactoring-refactor-clean FAQ
No. The skill focuses on internal improvements while keeping behavior stable. Any behavior changes require explicit approval first.
As a refactor plan with ordered steps, proposed changes with expected impact, and test/verification notes to keep diffs reviewable.
Skip it for one-line fixes, during change freezes, or when only documentation is needed.
SOLID principles, clean code practices, and modern software engineering best practices. Detailed patterns are available in the implementation playbook.
Yes. The skill updates tests and verifies regressions to ensure stability throughout the refactoring process.
Full instructions (SKILL.md)
Source of truth, from sickn33/agentic-awesome-skills.
name: code-refactoring-refactor-clean description: "You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance." risk: critical source: community date_added: "2026-02-27"
Refactor and Clean Code
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
Use this skill when
- Refactoring tangled or hard-to-maintain code
- Reducing duplication, complexity, or code smells
- Improving testability and design consistency
- Preparing modules for new features safely
Do not use this skill when
- You only need a small one-line fix
- Refactoring is prohibited due to change freeze
- The request is for documentation only
Context
The user needs help refactoring code to make it cleaner, more maintainable, and aligned with best practices. Focus on practical improvements that enhance code quality without over-engineering.
Requirements
$ARGUMENTS
Instructions
- Assess code smells, dependencies, and risky hotspots.
- Propose a refactor plan with incremental steps.
- Apply changes in small slices and keep behavior stable.
- Update tests and verify regressions.
- If detailed patterns are required, open
resources/implementation-playbook.md.
Safety
- Avoid changing external behavior without explicit approval.
- Keep diffs reviewable and ensure tests pass.
Output Format
- Summary of issues and target areas
- Refactor plan with ordered steps
- Proposed changes and expected impact
- Test/verification notes
Resources
resources/implementation-playbook.mdfor detailed patterns and examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Related skills
More from sickn33/agentic-awesome-skills and the wider catalog.

code-review-checklist
Systematic checklist for thorough code reviews covering functionality, security, performance, and maintainability.

context-compression
Compress agent conversation history while preserving task-critical information like file paths and decisions.

context-window-management
Optimize LLM context windows through summarization, trimming, routing, and token budgeting strategies.

conversation-memory
Persistent memory systems for LLM conversations with short-term, long-term, and entity-based storage.

copywriting
Write conversion-focused marketing copy with mandatory audience research and strict no-fabrication rules.

database-design
Design databases thoughtfully—choose the right database, schema, and ORM for your context.