๐งน Refactor for Maintainability
Refactor this code to be modular, readable, and easy to maintain. Add clear function names and comments where necessary.
โจ Clean Code Simplification
Clean this code to remove unnecessary complexity, nested conditions, or repeated logic. Make it easier to read.
๐ Optimize Function
Optimize this function for better performance. Avoid unnecessary re-renders, loops, or memory usage where possible.
๐ Convert Callback Hell
This code uses deeply nested callbacks. Refactor it to use async/await for better readability and error handling.
๐งฑ 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.
๐งฐ 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.
๐งช Make Code Testable
Refactor this code to make it more testable. Break large functions into smaller units and reduce tight coupling.
๐ Add Docs & Comments
Add helpful inline comments and JSDoc-style documentation to this function or file so future developers can understand it quickly.
๐ Detect Code Smells
Analyze this code for any code smells (e.g. long methods, deep nesting, large classes). Suggest how to fix them.
๐ Modernize Legacy Code
Update this legacy code to follow modern best practices and syntax (e.g. ES6+, async/await, arrow functions).
๐ Implement User Authentication
Generate code for a secure user authentication system including signup, login, and password reset functionalities.
โ Create REST API Endpoint
Design and implement a new REST API endpoint for a specific resource with CRUD operations and proper error handling.
๐ฑ Build Responsive UI Component
Develop a responsive UI component using modern React/HTML and Tailwind CSS, ensuring it adapts well to different screen sizes.
โ Write a Data Validation Function
Create a robust data validation function including edge cases and error messages.
โ๏ธ Decompose Large Function
This function is too long. Decompose it into smaller, more focused functions, each with a single responsibility.
๐ Introduce Design Pattern
Refactor this code to apply a specific design pattern (e.g., Strategy, Observer, Factory) to improve its flexibility and extensibility.
โก Optimize Database Query
Analyze this database query and suggest optimizations for better performance, including indexing strategies.
๐ 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.
๐ Debug Error/Bug
Analyze this error message and the provided code snippet. Identify the root cause of the bug and suggest a fix.
๐ก Explain Code Logic
Explain the step-by-step logic of this code snippet in simple terms.
๐ Generate API Documentation
Based on this code, generate API documentation for the exposed functions/endpoints, including parameters, return types, and examples.
๐๏ธ Design Database Schema
Design a normalized database schema for an application (e.g., e-commerce, social media) considering scalability and relationships.
โ๏ธ Propose Microservice Architecture
Propose a microservice architecture for this monolithic application, identifying potential service boundaries and communication patterns.
๐ง 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.
๐ Full Stack Feature Development
Develop a complete full-stack feature, including database schema design, API endpoint implementation, and responsive UI components for [feature name].
๐ Performance & Security Audit
Conduct a thorough audit of this application for performance bottlenecks and security vulnerabilities. Provide detailed recommendations and code examples for improvements.
๐ Codebase Onboarding & Documentation
Generate a comprehensive onboarding guide for new developers joining this codebase. Include architecture overview, key modules, setup instructions, and essential documentation.
๐ 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.