AI Prompts Library

Curated collection of expert prompts for coding, writing, marketing, image generation, and more

Have a great prompt? Submit it to the library →

Coding

Database Migration Script Generator

Optimized for: gpt-4o • TEXT
Generate database migration script for [DATABASE: PostgreSQL/MySQL/MongoDB].

**Migration Type:**
- [ ] Create table
- [ ] Alter table
- [ ] Add column
- [ ] Drop column
- [ ] Add index
- [ ] Data migration

**Details:**
[DESCRIBE SCHEMA CHANGES]

**Generate:**

1. **Up Migration** (apply changes)
2. **Down Migration** (rollback)
3. **Data Migration** (if needed)
4. **Validation Queries**

**Requirements:**
- Idempotent (can run multiple times safely)
- Transaction-wrapped
- Rollback-safe
- Include comments
- Handle edge cases
- Test data examples
- Performance considerations for large tables

**Also provide:**
- Pre-migration checklist
- Post-migration validation
- Backup recommendations

Database migrations, schema changes, data migrations

Coding

Regex Pattern Generator & Explainer

Optimized for: general • TEXT
Create and explain regular expression patterns.

**Task**: [DESCRIBE WHAT YOU WANT TO MATCH]

**Examples of valid inputs:**
- [EXAMPLE 1]
- [EXAMPLE 2]

**Examples of invalid inputs:**
- [EXAMPLE 1]
- [EXAMPLE 2]

**Generate:**

1. **Regex Pattern**
```
/pattern/flags
```

2. **Explanation** (step-by-step breakdown)
- `^` - Start of string
- `[a-z]` - Lowercase letter
- etc.

3. **Flags Explained**
- `g` - Global match
- `i` - Case insensitive
- `m` - Multiline

4. **Test Cases**
```
Should match:
✓ "example1"
✓ "example2"

Should not match:
✗ "invalid1"
✗ "invalid2"
```

5. **Code Examples**
- JavaScript
- Python
- PHP

6. **Performance Tips**
- Optimization suggestions
- Common pitfalls
- Alternative approaches

Input validation, data parsing, text processing

Coding

Chrome Extension Complete Builder

Optimized for: gpt-4o • TEXT
Build Chrome extension [NAME]:

**manifest.json** (v3)
**popup.html/js** (UI & logic)
**content.js** (page interaction)
**background.js** (service worker)
**styles.css**

Include:
- Complete working code
- Permissions setup
- Installation guide
- Testing steps
- Store submission guide
- Security best practices

Production-ready, documented.

Browser extensions, productivity tools

Coding

Webhook Handler with Security

Optimized for: gpt-4o • TEXT
Webhook endpoint for [SERVICE A → SERVICE B]:

**Endpoint** - POST handler
**Signature Verification** - HMAC validation, timestamp check
**Payload Processing** - Validation, transformation, error handling
**Idempotency** - Prevent duplicate processing
**Retry Logic** - Exponential backoff
**Monitoring** - Logging, alerts, metrics

Include: Full code, tests, deployment.

API integrations, automation

Coding

Dockerfile Multi-Stage Optimizer

Optimized for: gpt-4o • TEXT
Optimize Dockerfile:

**Multi-stage Build** - Builder + production stages
**Layer Caching** - Dependencies first, code last
**Security** - Non-root user, minimal base image
**Size Reduction** - Alpine Linux, .dockerignore
**Performance** - Parallel builds, BuildKit

Include: Optimized Dockerfile, .dockerignore, docker-compose.yml, build commands, size comparison.

Containerization, Docker optimization

Coding

Expert Code Reviewer with Security Focus

Optimized for: general • TEXT
You are an expert code reviewer with deep knowledge of security, performance, and best practices across multiple programming languages.

Your task is to review the following code and provide:
1. **Security Analysis**: Identify any security vulnerabilities (SQL injection, XSS, CSRF, authentication issues, etc.)
2. **Performance Review**: Highlight performance bottlenecks and suggest optimizations
3. **Code Quality**: Assess readability, maintainability, and adherence to best practices
4. **Bug Detection**: Point out logical errors, edge cases, and potential runtime issues
5. **Recommendations**: Provide specific, actionable improvements with code examples

For each issue found, specify:
- Severity (Critical, High, Medium, Low)
- Location (file, line number if available)
- Detailed explanation of the problem
- Concrete solution with improved code

Code to review:
[PASTE YOUR CODE HERE]

Pre-deployment code review, security audits, code quality assessment

Coding

Python Debugging Expert Assistant

Optimized for: gpt-4o • TEXT
You are an expert Python debugger with deep knowledge of common pitfalls, edge cases, and debugging strategies.

**Error/Issue:**
[DESCRIBE THE PROBLEM OR PASTE ERROR MESSAGE]

**Code:**
```python
[PASTE YOUR PYTHON CODE HERE]
```

**Environment:**
- Python version: [VERSION]
- Operating System: [OS]
- Dependencies: [LIST KEY PACKAGES]

**Expected Behavior:**
[WHAT SHOULD HAPPEN]

**Actual Behavior:**
[WHAT ACTUALLY HAPPENS]

**Please provide:**

1. **Root Cause Analysis**
   - Identify the exact source of the problem
   - Explain why it occurs
   - Note any misunderstandings of Python concepts

2. **Immediate Fix**
   - Provide corrected code with inline comments
   - Highlight the changes

3. **Best Practices**
   - Suggest improvements beyond just fixing the bug
   - Recommend better patterns or approaches
   - Add error handling if missing

4. **Prevention**
   - How to avoid this issue in the future
   - Testing approach for this scenario
   - Relevant Python idioms or patterns

5. **Additional Context**
   - Related Python gotchas
   - Performance considerations
   - Alternative implementations

Debug Python code, learn from errors, improve code quality, understand Python idioms

Want Custom Prompts?

Get personalized AI prompts tailored to your specific needs and workflow.

Contact Us