Switch language to العربية

Prompts

Ready-to-use prompts for AI pair programming. Copy and customize for your tasks.

Component Creation

Create new components following project patterns.

Create Componentmarkdown
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.

Page Creation

Create new pages with mirror-pattern structure.

Create Pagemarkdown
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.

Debugging

Get help debugging errors effectively.

Debug Errormarkdown
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.

Refactoring

Improve existing code quality.

Refactor Codemarkdown
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.

Code Review

Get thorough code reviews.

Review Codemarkdown
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.

Testing

Generate comprehensive tests.

Write Testsmarkdown
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.

Prompt Tips

Be Specific

Include file paths, expected behavior, and constraints.

Provide Context

Reference existing patterns and conventions.

Use Checklists

Break complex tasks into checkable items.

Iterate

Refine prompts based on results you get.