refactorlisted
Install: claude install-skill andresnator/agents-orchestrator
# Refactoring Catalog (Multi-Language)
A comprehensive, technique-by-technique catalog of refactoring best practices for any language, sourced from Martin Fowler's *Refactoring: Improving the Design of Existing Code* (2nd Edition) and Alexander Shvets' *Refactoring in Java* (Refactoring Guru). Adapted for Python, TypeScript, Go, and Rust with idiomatic examples.
## Step 0: Detect Language
Before applying any technique, detect the project's stack:
| Project File | Language | Idiom Style |
|---|---|---|
| `pom.xml` / `build.gradle` | Java | OOP, Stream API |
| `pyproject.toml` / `requirements.txt` / `setup.py` | Python | Duck typing, comprehensions |
| `package.json` + `tsconfig.json` | TypeScript | Functional-OOP hybrid |
| `package.json` (no tsconfig) | JavaScript | Prototype-based, functional |
| `*.csproj` | C# | OOP, LINQ |
| `go.mod` | Go | Composition, implicit interfaces |
| `build.gradle.kts` | Kotlin | OOP + functional |
| `Gemfile` | Ruby | Duck typing, open classes |
| `composer.json` | PHP | OOP |
| `Cargo.toml` | Rust | Ownership, traits, no inheritance |
| `Package.swift` | Swift | Protocol-oriented |
If the language is **Java**, apply techniques with Java OOP, Stream API where appropriate, and the project's detected Java version constraints.
## Language Support Matrix
| Concept | Python | TypeScript | Go | Rust |
|---|---|---|---|---|
| Class / struct | `class` | `class` | `struct` + methods | `struct` + `impl` |
| Inheritance | `class Child(Parent)` | `e