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.

333868

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

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.

21134

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

oracle

openclaw

Best practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).

17126

postgres-patterns

affaan-m

PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.

20119

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

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.

1690

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

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.

1883

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.

2474

simplification-cascades

mrgoonie

Find one insight that eliminates multiple components - "if this is true, we don't need X, Y, or Z"

1582

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.

1969

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.

1666

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.

1855

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.

565

clean-code

davila7

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

1253

php-best-practices

HoangNguyen0403

PHP best practices, PSR standards, and code quality guidelines.

1547

react-patterns

davila7

Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.

948

php-pro

sickn33

Write idiomatic PHP code with generators, iterators, SPL data structures, and modern OOP features. Use PROACTIVELY for high-performance PHP applications.

1335

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.

838

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.

633

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

python-patterns
affaan-m · 6 installs
tdd-workflow
affaan-m · 6 installs
typescript-expert
davila7 · 10 installs
angular-migration
sickn33 · 10 installs
kaizen
davila7 · 3 installs
swift-concurrency
AvdLee · 4 installs
reducing-entropy
davila7 · 3 installs
modular-code
parcadei · 4 installs
laravel-architecture
HoangNguyen0403 · 7 installs
qlty-check
parcadei · 5 installs
modern-python
trailofbits · 4 installs
php-guidelines-from-spatie
freekmurze · 6 installs
code-quality
vm0-ai · 4 installs
obsidian-sdk-patterns
jeremylongshore · 3 installs
ast-grep-find
parcadei · 3 installs
superpowers-tdd
anthonylee991 · 5 installs
when-stuck-problem-solving-dispatch
mrgoonie · 8 installs
angular-modernization
bitwarden · 4 installs
typescript-skills
llama-farm · 3 installs
vue-options-api-best-practices
vuejs-ai · 5 installs
superpowers-workflow
anthonylee991 · 8 installs
typescript-strict
citypaul · 3 installs
solid
ramziddin · 5 installs
agent-coder
ruvnet · 3 installs
pyrefly-type-coverage
pytorch · 6 installs
clean
catlog22 · 4 installs
functional
citypaul · 3 installs
design-patterns
TencentBlueKing · 2 installs
rust-pro
vudovn · 3 installs
bunit-test-migration
FritzAndFriends · 1 installs
fastmod
pydantic · 3 installs
mflux-model-porting
filipstrand · 2 installs
svelte-migrate
temporalio · 2 installs
code-refactor
luongnv89 · 3 installs
port-c-module
RediSearch · 2 installs
tdd-workflows-tdd-green
sickn33 · 2 installs
code-standards
redpanda-data · 2 installs
naming-analyzer
davila7 · 2 installs
organize-modules
r3bl-org · 1 installs
code-transfer
mhattingpete · 1 installs
code-assist
mikeyobrien · 1 installs
dead-code
parcadei · 1 installs
jakarta-namespace
benchflow-ai · 2 installs
modern-javascript-patterns
sickn33 · 2 installs
rendering-hoist-jsx
TheOrcDev · 1 installs
state-management
redpanda-data · 1 installs
upgrade-simple-icons
wei · 1 installs
code-formatter
jeremylongshore · 1 installs
component-common-domain-detection
tech-leads-club · 1 installs
control-flow
EpicenterHQ · 1 installs
file-search
massgen · 3 installs
gesture-handler-3-migration
software-mansion · 1 installs
js-tosorted-immutable
TheOrcDev · 1 installs
migrate-honcho
plastic-labs · 1 installs
rmslop
revokslab · 3 installs
skill-neovim-implementation
benbrastmckie · 1 installs
writing-react-effects
dust-tt · 1 installs
check-bounds-safety
r3bl-org · 1 installs
feature-toggle-developer
anyproto · 1 installs
improvement
tddworks · 1 installs
js-early-exit
TheOrcDev · 1 installs
migrate-honcho-ts
plastic-labs · 1 installs
refactoring
citypaul · 1 installs
simplify
aaddrick · 2 installs
code-quality-fix-all
UKGovernmentBEIS · 1 installs
cursor-composer-workflows
jeremylongshore · 1 installs
domain-identification-grouping
tech-leads-club · 1 installs
effect-patterns-value-handling
PaulJPhilp · 1 installs
extensions-api-migration
JetBrains · 1 installs
factory-function-composition
EpicenterHQ · 1 installs
form-refactorer
redpanda-data · 1 installs
js-set-map-lookups
TheOrcDev · 1 installs
karpathy-guidelines
forrestchang · 1 installs
m06-error-handling
actionbook · 1 installs
managing-cargo-dependencies
hashintel · 1 installs
migrate
alirezarezvani · 1 installs
mlops-industrialization
fmind · 1 installs
plain-upgrade
dropseed · 1 installs
python-scala-oop
benchflow-ai · 1 installs
rerender-functional-setstate
TheOrcDev · 1 installs
agent-analyze-code-quality
ruvnet · 1 installs
building-compound-components
tambo-ai · 1 installs
code-refactoring-context-restore
sickn33 · 0 installs
component-flattening-analysis
tech-leads-club · 0 installs
framework-migration-code-migrate
sickn33 · 1 installs
mistral-migration-deep-dive
jeremylongshore · 0 installs
moonbit-agent-guide
loro-dev · 1 installs
python-scala-idioms
benchflow-ai · 1 installs
ruby-pro
sickn33 · 1 installs
testing-standards
DaveSkender · 1 installs
agent-implementer-sparc-coder
ruvnet · 1 installs
agent-refinement
ruvnet · 1 installs
apollo-upgrade-migration
jeremylongshore · 1 installs
code-deduplication
alinaqi · 2 installs
code-refactoring-tech-debt
sickn33 · 1 installs
codebase-cleanup-tech-debt
sickn33 · 1 installs

+196 more — browse all skills.

Frequently asked

Can I use multiple refactoring skills at the same time?
Yes, you can stack skills to cover different layers of your code. For example, you might use software-architecture to guide the high-level design changes while simultaneously applying solid-principles to manage class responsibilities. However, ensure that the rules defined in your selected skills do not conflict, especially when they touch on overlapping formatting or architectural requirements.
How do these skills affect my existing code style?
These skills prioritize established conventions like those found in the official Go documentation or modern Swift 6+ guidelines. If your current code deviates from these community standards, the agents will likely suggest refactors to align with those best practices. Check the specific documentation for each skill to see if it enforces strict style guides or provides configurable options for your project.

Browse other tags

Search skills

Search the agent skills registry