CO

code-refactoring-refactor-clean

Refactors code to improve quality, simplify logic, and follow clean code principles.

Install

mkdir -p .claude/skills/code-refactoring-refactor-clean && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1622" && unzip -o skill.zip -d .claude/skills/code-refactoring-refactor-clean && rm skill.zip

Installs to .claude/skills/code-refactoring-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.
240 charsno explicit “when” trigger
Advanced

Key capabilities

  • Identify code smells in complex functions
  • Apply SOLID design principles incrementally
  • Prepare modules for future feature integration
  • Execute small-slice refactoring
  • Verify regression stability via testing

How it works

Follows a defined implementation playbook to assess hotspots and apply small, isolated changes to improve architecture.

Inputs & outputs

You give it
Target source code and context
You get back
Refactoring plan and incremental code updates

When to use code-refactoring-refactor-clean

  • Reduce technical debt
  • Simplify complex functions
  • Apply SOLID design principles
  • Prepare modules for new features

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

  • 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.md for 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

  • Simple one-line bug fixes
  • Projects where code refactoring is prohibited

Limitations

  • Does not substitute for human expert review
  • Refactoring plan requires manual verification

How it compares

It enforces incremental, step-by-step verification instead of large-scale, risky code restructuring.

Compared to similar skills

code-refactoring-refactor-clean side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
code-refactoring-refactor-clean (this skill)244moNo flagsAdvanced
effective-go3239moNo flagsBeginner
solid-principles579moNo flagsIntermediate
typescript-review392moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

mobile-design

sickn33

Mobile-first design and engineering doctrine for iOS and Android apps. Covers touch interaction, performance, platform conventions, offline behavior, and mobile-specific decision-making. Teaches principles and constraints, not fixed layouts. Use for React Native, Flutter, or native mobile apps.

149231

unity-developer

sickn33

Build Unity games with optimized C# scripts, efficient rendering, and proper asset management. Masters Unity 6 LTS, URP/HDRP pipelines, and cross-platform deployment. Handles gameplay systems, UI implementation, and platform optimization. Use PROACTIVELY for Unity performance issues, game mechanics, or cross-platform builds.

142357

architect-review

sickn33

Master software architect specializing in modern architecture patterns, clean architecture, microservices, event-driven systems, and DDD. Reviews system designs and code changes for architectural integrity, scalability, and maintainability. Use PROACTIVELY for architectural decisions.

109320

angular

sickn33

Modern Angular (v20+) expert with deep knowledge of Signals, Standalone Components, Zoneless applications, SSR/Hydration, and reactive patterns. Use PROACTIVELY for Angular development, component architecture, state management, performance optimization, and migration to modern patterns.

100129

frontend-slides

sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

95195

minecraft-bukkit-pro

sickn33

Master Minecraft server plugin development with Bukkit, Spigot, and Paper APIs. Specializes in event-driven architecture, command systems, world manipulation, player management, and performance optimization. Use PROACTIVELY for plugin architecture, gameplay mechanics, server-side features, or cross-version compatibility.

9078

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.

323536

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.

57236

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.

39178

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.

17135

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.

1597

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.

2877

Search skills

Search the agent skills registry