Prompts
Useful prompts for AI-assisted development.
Code Review
Review this code for:
1. Security vulnerabilities
2. Performance issues
3. Code style consistency
4. Potential bugs
5. Suggestions for improvement
[paste code here]
Component Creation
Create a React component with the following requirements:
- Name: [ComponentName]
- Props: [list props]
- Features: [list features]
- Use TypeScript
- Use Tailwind CSS for styling
- Include proper accessibility attributes
Documentation
Write documentation for this function/component:
- Brief description
- Parameters/Props
- Return value
- Usage examples
- Edge cases
[paste code here]
Refactoring
Refactor this code to:
- Improve readability
- Follow [language] best practices
- Reduce complexity
- Add proper error handling
- Maintain the same functionality
[paste code here]
Bug Fix
I'm experiencing this bug:
- Expected behavior: [what should happen]
- Actual behavior: [what happens instead]
- Steps to reproduce: [list steps]
- Error message: [if any]
Here's the relevant code:
[paste code here]
Help me identify and fix the issue.
Best Practices
- Be specific - Clear requirements get better results
- Provide context - Include relevant code and constraints
- Iterate - Refine the output with follow-up prompts
- Verify - Always review AI-generated code