Loading...
Loading...
Found 64 Skills
Refactor, simplify, or clean up code for improved maintainability without changing business logic
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.
A guide for writing self-documenting code
Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles (formerly refactoring). This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.
Use when tempted to write clever code. Use when solution feels complex. Use when showing off skills instead of solving problems.
Use when component does too many things. Use when mixing data fetching, logic, and presentation. Use when code is hard to test.
Describes PHP and Laravel guidelines provided by Spatie. These rules result in more maintainable, and readable code.
Refactor Spring Boot and Java code to improve maintainability, readability, and adherence to enterprise best practices. This skill transforms messy Spring Boot applications into clean, well-structured solutions following SOLID principles and Spring Boot 3.x conventions. It addresses fat controllers, improper transaction boundaries, field injection anti-patterns, and scattered configuration. Leverages Java 21+ features including record patterns, pattern matching for switch, virtual threads, and sequenced collections.
Refactor Next.js code to improve maintainability, readability, and adherence to App Router best practices. Identifies and fixes God Components, prop drilling, inappropriate 'use client' usage, outdated Pages Router patterns, missing Suspense boundaries, incorrect caching strategies, and useEffect data fetching anti-patterns. Applies modern Next.js 15 patterns including Server Components, Client Components, Server Actions, streaming with Suspense, proper caching strategies, Container-Presentational pattern, layout composition, parallel routes, and intercepting routes.
Refactor PHP/Laravel code to improve maintainability, readability, and adherence to best practices. This skill transforms code using modern PHP 8.3+/8.4+ features like property hooks and typed constants, Laravel 11+ patterns including Actions and simplified structure, and SOLID principles. It addresses fat controllers, code duplication, N+1 queries, and missing type declarations. Apply when you notice business logic in controllers or legacy PHP patterns.
Refactor Flask code to improve maintainability, readability, and adherence to best practices. This skill transforms Flask applications using the application factory pattern, Blueprint organization, and service layer separation. It addresses fat route handlers, missing error handling, improper context local usage, and security issues. Apply when you notice global app instances, routes without Blueprints, business logic in handlers, or missing CSRF protection.
Refactor PyTorch code to improve maintainability, readability, and adherence to best practices. Identifies and fixes DRY violations, long functions, deep nesting, SRP violations, and opportunities for modular components. Applies PyTorch 2.x patterns including torch.compile optimization, Automatic Mixed Precision (AMP), optimized DataLoader configuration, modular nn.Module design, gradient checkpointing, CUDA memory management, PyTorch Lightning integration, custom Dataset classes, model factory patterns, weight initialization, and reproducibility patterns.