codebase-cleanup-refactor-clean
Refactoring assistant focused on clean code, modularity, and technical debt reduction.
Install
mkdir -p .claude/skills/codebase-cleanup-refactor-clean && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2073" && unzip -o skill.zip -d .claude/skills/codebase-cleanup-refactor-clean && rm skill.zipInstalls to .claude/skills/codebase-cleanup-refactor-clean
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Analyze code for SOLID principle compliance
- →Identify code duplication patterns
- →Structure complex modules for readability
- →Generate prioritized cleanup checklists
- →Validate refactors via test regression
How it works
It evaluates code structure against design patterns and clean code metrics to generate a step-by-step modification guide.
Inputs & outputs
When to use codebase-cleanup-refactor-clean
- →Reducing technical debt
- →Simplifying complex code modules
- →Applying SOLID principles
- →Removing code duplication
About this skill
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
- Cleaning up large codebases with accumulated debt
- Removing duplication and simplifying modules
- Preparing a codebase for new feature work
- Aligning implementation with clean code standards
Do not use this skill when
- You only need a tiny targeted fix
- Refactoring is blocked by policy or deadlines
- The request is 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
- Identify high-impact refactor candidates and risks.
- Break work into small, testable steps.
- Apply changes with a focus on readability and stability.
- Validate with tests and targeted regression checks.
- If detailed patterns are required, open
resources/implementation-playbook.md.
Safety
- Avoid large rewrites without agreement on scope.
- Keep changes reviewable and reversible.
Output Format
- Cleanup plan with prioritized steps
- Key refactor targets and rationale
- Expected impact and risk notes
- Test/verification plan
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.
When not to use it
- →Tiny, single-line bug fixes
- →Deadline-critical tasks forbidding structural changes
Limitations
- →Requires manual validation of suggestions
- →Cannot substitute for deep domain expertise
- →Not a replacement for full suite testing
How it compares
It prioritizes maintainability and architectural alignment rather than just functional output.
Compared to similar skills
codebase-cleanup-refactor-clean side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| codebase-cleanup-refactor-clean (this skill) | 16 | 4mo | No flags | Intermediate |
| effective-go | 323 | 9mo | No flags | Beginner |
| solid-principles | 57 | 9mo | No flags | Intermediate |
| typescript-review | 39 | 2mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by sickn33
View all by sickn33 →You might also like
effective-go
openshift
Apply Go best practices, idioms, and conventions from golang.org/doc/effective_go. Use when writing, reviewing, or refactoring Go code to ensure idiomatic, clean, and efficient implementations.
solid-principles
SmidigStorm
Enforce SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) in object-oriented design. Use when writing or reviewing classes and modules.
typescript-review
metabase
Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.
ast-grep
ast-grep
Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for code patterns, find specific language constructs, or locate code with particular structural characteristics.
serena
massgen
This skill provides symbol-level code understanding and navigation using Language Server Protocol (LSP). Enables IDE-like capabilities for finding symbols, tracking references, and making precise code edits at the symbol level.
typescript
lobehub
TypeScript code style and optimization guidelines. Use when writing TypeScript code (.ts, .tsx, .mts files), reviewing code quality, or implementing type-safe patterns. Triggers on TypeScript development, type safety questions, or code style discussions.