Ready-to-use prompts for AI pair programming. Copy and customize for your tasks.
Create new components following project patterns.
Create a [component name] component that:
- Uses shadcn/ui primitives (Card, Button, etc.)
- Follows our atom pattern (2+ primitives)
- Includes TypeScript interface for props
- Has responsive design (mobile-first)
- Supports RTL layout
Location: src/components/atom/[name].tsx
Reference existing atoms in src/components/atom/ for patterns.Create new pages with mirror-pattern structure.
Create a new page at /[route] that:
- Follows mirror-pattern (app + components directories)
- Uses async params: `const { lang } = await params`
- Delegates to content.tsx component
- Includes proper TypeScript types
Files to create:
1. app/[lang]/(root)/[route]/page.tsx
2. components/root/[feature]/content.tsx
Reference existing pages in app/[lang]/(root)/ for patterns.Get help debugging errors effectively.
I have an error:
[paste error message]
Context:
- File: [file path]
- Action: [what I was doing]
- Expected: [what should happen]
- Actual: [what happened]
Please help me debug this.Improve existing code quality.
Refactor [file/component] to:
- [ ] Improve TypeScript types
- [ ] Extract reusable logic
- [ ] Add error handling
- [ ] Improve performance
- [ ] Follow project patterns
Keep the same functionality but improve code quality.Get thorough code reviews.
Review this code for:
1. TypeScript errors or improvements
2. React best practices (hooks, renders)
3. Security vulnerabilities
4. Performance issues
5. Accessibility concerns
Be specific about issues and provide fixes.Generate comprehensive tests.
Write tests for [file/component]:
- Unit tests for individual functions
- Integration tests for component behavior
- Edge cases and error scenarios
- Mock external dependencies
Use Vitest and React Testing Library.
Target 95%+ coverage.Include file paths, expected behavior, and constraints.
Reference existing patterns and conventions.
Break complex tasks into checkable items.
Refine prompts based on results you get.