๐Ÿงน Refactor for Maintainability

Refactor this code to be modular, readable, and easy to maintain. Add clear function names and comments where necessary.

Maintainability & Refactoring

โœจ Clean Code Simplification

Clean this code to remove unnecessary complexity, nested conditions, or repeated logic. Make it easier to read.

Maintainability & Refactoring

๐Ÿš€ Optimize Function

Optimize this function for better performance. Avoid unnecessary re-renders, loops, or memory usage where possible.

Performance Optimization

๐Ÿ” Convert Callback Hell

This code uses deeply nested callbacks. Refactor it to use async/await for better readability and error handling.

Maintainability & Refactoring

๐Ÿงฑ Clean Component Structure

Refactor this UI component to follow best practices for structure, naming, and separation of concerns. Ensure state, effects, and render logic are cleanly organized.

Maintainability & Refactoring

๐Ÿงฐ Extract Business Logic

Extract business logic from this UI code into separate helper functions or services. Make the component lean and focused on rendering only.

Maintainability & Refactoring

๐Ÿงช Make Code Testable

Refactor this code to make it more testable. Break large functions into smaller units and reduce tight coupling.

Testing & Debugging

๐Ÿ“š Add Docs & Comments

Add helpful inline comments and JSDoc-style documentation to this function or file so future developers can understand it quickly.

Code Understanding & Documentation

๐Ÿ” Detect Code Smells

Analyze this code for any code smells (e.g. long methods, deep nesting, large classes). Suggest how to fix them.

Maintainability & Refactoring

๐Ÿ”„ Modernize Legacy Code

Update this legacy code to follow modern best practices and syntax (e.g. ES6+, async/await, arrow functions).

Maintainability & Refactoring

๐Ÿ” Implement User Authentication

Generate code for a secure user authentication system including signup, login, and password reset functionalities.

New Feature/Function Development

โž• Create REST API Endpoint

Design and implement a new REST API endpoint for a specific resource with CRUD operations and proper error handling.

New Feature/Function Development

๐Ÿ“ฑ Build Responsive UI Component

Develop a responsive UI component using modern React/HTML and Tailwind CSS, ensuring it adapts well to different screen sizes.

New Feature/Function Development

โœ… Write a Data Validation Function

Create a robust data validation function including edge cases and error messages.

New Feature/Function Development

โœ‚๏ธ Decompose Large Function

This function is too long. Decompose it into smaller, more focused functions, each with a single responsibility.

Maintainability & Refactoring

๐Ÿ“ Introduce Design Pattern

Refactor this code to apply a specific design pattern (e.g., Strategy, Observer, Factory) to improve its flexibility and extensibility.

Maintainability & Refactoring

โšก Optimize Database Query

Analyze this database query and suggest optimizations for better performance, including indexing strategies.

Performance Optimization

๐Ÿ“ Write Unit Tests

Write comprehensive unit tests for this function/component using a testing framework (e.g., Jest, React Testing Library) covering all major scenarios and edge cases.

Testing & Debugging

๐Ÿ› Debug Error/Bug

Analyze this error message and the provided code snippet. Identify the root cause of the bug and suggest a fix.

Testing & Debugging

๐Ÿ’ก Explain Code Logic

Explain the step-by-step logic of this code snippet in simple terms.

Code Understanding & Documentation

๐Ÿ“„ Generate API Documentation

Based on this code, generate API documentation for the exposed functions/endpoints, including parameters, return types, and examples.

Code Understanding & Documentation

๐Ÿ›๏ธ Design Database Schema

Design a normalized database schema for an application (e.g., e-commerce, social media) considering scalability and relationships.

Architecture & Design

โš™๏ธ Propose Microservice Architecture

Propose a microservice architecture for this monolithic application, identifying potential service boundaries and communication patterns.

Architecture & Design

๐Ÿง™ Ultimate Code Transformation

Perform a comprehensive refactoring and optimization of this legacy function. Ensure the resulting code is clean, highly readable, easily testable, and adheres to modern best practices in [language/framework]. Focus on improving performance, modularity, and maintainability, and provide explanations for key changes.

Multi-purpose

๐Ÿ”„ Full Stack Feature Development

Develop a complete full-stack feature, including database schema design, API endpoint implementation, and responsive UI components for [feature name].

Multi-purpose

๐Ÿ“ˆ Performance & Security Audit

Conduct a thorough audit of this application for performance bottlenecks and security vulnerabilities. Provide detailed recommendations and code examples for improvements.

Multi-purpose

๐Ÿ“š Codebase Onboarding & Documentation

Generate a comprehensive onboarding guide for new developers joining this codebase. Include architecture overview, key modules, setup instructions, and essential documentation.

Multi-purpose

๐Ÿ“– Code Summary & Explanation

Analyze the provided code snippet and summarize its purpose, main logic, and any key conditions or flows in simple, easy-to-understand terms. Focus on what the code does and how it achieves its goal.

Code Understanding & Documentation