InstructionsForAI

Prompts

Community-curated prompts for completing tasks with AI assistants. Copy and use these reusable prompts to streamline common development workflows.

3 prompts
generate-react-component-storybook.txt
52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Generate React Component with Storybook Stories
 
Create a production-ready React component with comprehensive documentation and testing.
 
## Requirements
 
### 1. Component Implementation
 
**File Structure:**
```
components/
ui/
component-name.tsx → Component implementation
component-name.stories.tsx → Storybook stories
component-name.test.tsx → Unit tests
```
 
**Component Features:**
PromptPlain Text
generate-nextjs-api-route-tests.txt
45
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Generate Next.js API Route with Tests
 
Create a new API route in Next.js 15 App Router with the following requirements:
 
## Requirements
 
### 1. File Structure
- Create the API route in `app/api/[endpoint]/route.ts`
- Include TypeScript types in `types/api.ts`
- Create tests in `__tests__/api/[endpoint].test.ts`
 
### 2. Implementation Details
 
**Route Handler:**
- Implement GET, POST, PUT, DELETE methods as needed
- Use Zod for request validation
- Include proper error handling with appropriate HTTP status codes
- Add request logging
PromptPlain Text
generate-database-migration-rls.txt
38
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Generate Database Migration with RLS
 
Create a comprehensive PostgreSQL migration for Supabase with the following requirements:
 
## Requirements
 
### 1. Table Schema
 
**Create tables with:**
- UUID primary keys using `gen_random_uuid()`
- Foreign key constraints with appropriate ON DELETE actions
- NOT NULL constraints where appropriate
- Default values for common fields
- CHECK constraints for data validation
- UNIQUE constraints for unique fields
 
**Standard columns to include:**
```sql
PromptPlain Text