Tags
Best Refactoring Skills for AI Agents
316 Refactoring skills for AI coding assistants — ranked by popularity.
Refactoring is often where code quality goes to die if done without strict guardrails. This collection of curated AI-agent skills provides the technical oversight needed to transform messy legacy code into clean, maintainable systems. These skills act as specialized assistants for Claude Code, Codex, and Cursor, helping you apply language-specific idioms and design patterns systematically. Whether you are migrating class components in React, enforcing SOLID principles in object-oriented projects, or optimizing Go and Python codebases, these tools ensure your changes follow established standards rather than arbitrary intuition. By integrating these skills, you move from guesswork to automated consistency. This resource is built for developers who need to modernize legacy applications, fix architectural debt, or upgrade language-specific conventions without breaking existing functionality. You will find targeted support for Swift, TypeScript, and architectural oversight, ensuring every refactoring session results in cleaner, more efficient code.
Top Refactoring skills
software-architecture
davila7
Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.
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.
react-modernization
wshobson
Upgrade React applications to latest versions, migrate from class components to hooks, and adopt concurrent features. Use when modernizing React codebases, migrating to React Hooks, or upgrading to latest React versions.
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.
oracle
openclaw
Best practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
postgres-patterns
affaan-m
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
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.
clojure-write
metabase
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.
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.
add-uint-support
pytorch
Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.
code-refactoring-refactor-clean
sickn33
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.
simplification-cascades
mrgoonie
Find one insight that eliminates multiple components - "if this is true, we don't need X, Y, or Z"
python-design-patterns
wshobson
Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance. Use when making architecture decisions, refactoring code structure, or evaluating when abstractions are appropriate.
codebase-cleanup-refactor-clean
sickn33
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.
cpp-pro
sickn33
Write idiomatic C++ code with modern features, RAII, smart pointers, and STL algorithms. Handles templates, move semantics, and performance optimization. Use PROACTIVELY for C++ refactoring, memory safety, or complex C++ patterns.
ruby-coder
majesticlabs-dev
This skill guides writing of new Ruby code following modern Ruby 3.x syntax, Sandi Metz's 4 Rules for Developers, and idiomatic Ruby best practices. Use when creating new Ruby files, writing Ruby methods, or refactoring Ruby code to ensure adherence to clarity, simplicity, and maintainability standards.
clean-code
davila7
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
php-best-practices
HoangNguyen0403
PHP best practices, PSR standards, and code quality guidelines.
react-patterns
davila7
Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.
php-pro
sickn33
Write idiomatic PHP code with generators, iterators, SPL data structures, and modern OOP features. Use PROACTIVELY for high-performance PHP applications.
refactor
github
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
antfu
antfu
Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier alternatives, monorepos, library publishing, or when the user mentions Anthony Fu's preferences.
How to choose a Refactoring skill
Select a skill based on the specific bottleneck in your refactoring workflow. First, check if your primary language or framework has a dedicated skill, such as react-modernization for UI upgrades or effective-go for backend improvements. Evaluate the scope: some skills focus on broad architectural design, like software-architecture, while others enforce granular syntax conventions, like typescript-review. Look for active maintenance and clear documentation regarding which paradigms the skill enforces. Choose the skill that addresses your immediate pain point, whether that is technical debt, structural flaws, or the need to adopt modern language features.
More Refactoring skills
+196 more — browse all skills.