Loading...
Loading...
Found 21 Skills
Apply named refactoring transformations to improve code structure without changing behavior. Use when the user mentions "refactor this", "code smells", "extract method", "replace conditional", or "technical debt". Covers smell-driven refactoring, safe transformation sequences, and testing guards. For code quality foundations, see clean-code. For managing complexity, see software-design-philosophy.
Master core refactoring operations: Extract Method, Extract Class, Replace Conditional with Polymorphism, Introduce Variable, Simplify Conditionals, Move Method, and Rename. Organized by operation type with before/after examples. Use when refactoring code structure, improving clarity, reducing duplication, or dealing with complex conditionals.
Apply safe refactoring patterns to improve code structure without changing behavior. Use when cleaning up code, reducing technical debt, or improving maintainability.
Use this skill when refactoring code to improve readability, reduce duplication, or simplify complex logic. Triggers on extract method, inline variable, replace conditional with polymorphism, introduce parameter object, decompose conditional, replace magic numbers, pull up/push down method, and any task requiring systematic code transformation without changing behavior.
Expert TypeScript refactoring patterns for cleaner, type-safe code
Write readable, maintainable code through disciplined naming, small functions, and clean error handling. Use when the user mentions "code review", "naming conventions", "function too long", "code smells", or "readable code". Covers SRP, comment discipline, formatting, and unit testing. For refactoring techniques, see refactoring-patterns. For architecture, see clean-architecture.
Apply meta-principles of software craftsmanship: DRY, orthogonality, tracer bullets, and design by contract. Use when the user mentions "best practices", "pragmatic approach", "broken windows", "tracer bullet", or "software craftsmanship". Covers estimation, domain languages, and reversibility. For code-level quality, see clean-code. For refactoring techniques, see refactoring-patterns.
Safely change and test untested codebases using Feathers' "Working Effectively with Legacy Code". Use when the user mentions "legacy code", "no tests", "untested codebase", "how do I test this", "seams", "characterization tests", "golden master", "sprout method", "afraid to change this code", "monster method", "dependency breaking", or "inherited a messy codebase". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout/wrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.
Modernize and improve legacy codebases while maintaining functionality. Use when you need to refactor old code, reduce technical debt, modernize deprecated patterns, or improve code maintainability without breaking existing behavior.
Suggest refactoring opportunities to improve code structure and maintainability. Use when improving code design or reducing complexity.
TDD-based code simplification that preserves behavior through tests. Use Red-Green-Refactor cycles to simplify code one test-verified change at a time. **DISTINCT FROM**: General code review or AI rewriting—this skill requires existing tests and only proceeds when tests confirm behavior is preserved. **PROACTIVE**: Auto-invoke when test-covered code has complexity (functions >50 lines, high cyclomatic complexity, duplication) and user wants to simplify it safely. Trigger phrases: 'clean up code', 'make code simpler', 'reduce complexity', 'refactoring help'. **NOT FOR**: Adding features or fixing bugs—use /tdd skill instead.
Safe, phase-gated refactoring: CHARACTERIZE with tests, PLAN incremental steps, EXECUTE one change at a time, VALIDATE no regressions. Use when renaming functions/variables, extracting modules, changing signatures, restructuring directories, or consolidating duplicate code. Use for "refactor", "rename", "extract", "restructure", or "migrate pattern". Do NOT use for bug fixes or new feature implementation.