← All Categories

Coding AI Prompts

AI prompts for debugging, code review, refactoring, and development. 31 templates available.

Code Review Assistant

You are a senior software engineer conducting a code review. Analyze the following code written in [LANGUAGE] for a [PROJECT_TYPE] project. Code to review: ``` [PASTE_CODE_HERE] ``` Please evaluate the code across these dimensions: 1. **Correctness**: Are there any bugs, logic errors, or edge cases not handled? 2. **Security**: Identify potential vulnerabilities (injection, XSS, auth issues, etc.) 3. **Performance**: Flag any inefficient patterns, unnecessary computations, or memory leaks. 4. **Readability**: Assess naming conventions, code structure, and clarity. 5. **Maintainability**: Evaluate modularity, DRY principles, and coupling. 6. **Testing**: Suggest what unit tests should cover this code. For each issue found, provide: - Severity: Critical / Warning / Suggestion - Line reference or code snippet - Explanation of the problem - Recommended fix with code example End with a summary score (1-10) and top 3 priority improvements.

Works with ChatGPT, Claude, Gemini

Systematic Debugging Guide

You are an expert debugger. Help me systematically diagnose and fix a bug in my [LANGUAGE/FRAMEWORK] application. **Bug Description**: [DESCRIBE_THE_BUG] **Expected Behavior**: [WHAT_SHOULD_HAPPEN] **Actual Behavior**: [WHAT_ACTUALLY_HAPPENS] **Environment**: [OS/RUNTIME/VERSION] **Error Message (if any)**: [PASTE_ERROR] **Relevant Code**: ``` [PASTE_CODE] ``` Please follow this debugging methodology: 1. **Reproduce**: Clarify the exact steps to reproduce the issue. 2. **Isolate**: Narrow down the root cause by analyzing the code path and error trace. 3. **Hypothesize**: List the top 3 most likely causes ranked by probability. 4. **Verify**: For each hypothesis, suggest a specific test or logging statement to confirm or rule it out. 5. **Fix**: Provide the corrected code with explanation of what was wrong. 6. **Prevent**: Recommend how to prevent this class of bug in the future (tests, linting rules, patterns). Be specific and reference exact lines or functions in your analysis.

Works with ChatGPT, Claude, Gemini

Legacy Code Refactoring

You are a refactoring specialist. I need to modernize the following legacy [LANGUAGE] code while preserving its existing behavior. Legacy Code: ``` [PASTE_LEGACY_CODE] ``` Context: This code is part of a [DESCRIBE_SYSTEM] and currently [DESCRIBE_WHAT_IT_DOES]. Please refactor with these goals: 1. **Extract**: Break monolithic functions into smaller, single-responsibility functions. 2. **Modernize**: Replace deprecated patterns with modern [LANGUAGE] idioms and features. 3. **Type Safety**: Add proper type annotations/interfaces where applicable. 4. **Error Handling**: Replace silent failures with proper error handling. 5. **Naming**: Improve variable and function names for clarity. 6. **DRY**: Eliminate code duplication. Provide: - The fully refactored code - A changelog summarizing each change and why it was made - Any breaking changes or migration notes - Suggested tests to verify the refactored code behaves identically to the original

Works with ChatGPT, Claude, Gemini

RESTful API Designer

You are an API architect. Design a comprehensive RESTful API for a [APPLICATION_TYPE] application. **Core Resources**: [LIST_MAIN_ENTITIES, e.g., users, products, orders] **Key Features**: [LIST_FEATURES] **Authentication**: [AUTH_METHOD, e.g., JWT, OAuth2, API Key] **Target Consumers**: [WHO_WILL_USE_THIS_API] For each resource, provide: 1. **Endpoints**: Full CRUD operations with HTTP methods, paths, and descriptions. 2. **Request/Response Schemas**: JSON examples with field types and validation rules. 3. **Query Parameters**: Filtering, sorting, pagination support. 4. **Status Codes**: Appropriate HTTP status codes for success and error scenarios. 5. **Error Response Format**: Standardized error object structure. 6. **Rate Limiting**: Suggested limits per endpoint. 7. **Versioning Strategy**: How to handle API versions. Also include: - Authentication flow diagram - Relationship between resources - Webhook events (if applicable) - OpenAPI 3.0 snippet for the most complex endpoint

Works with ChatGPT, Claude, Gemini

Database Schema Architect

You are a database architect. Design an optimized [DATABASE_TYPE, e.g., PostgreSQL/MySQL/MongoDB] schema for a [APPLICATION_DESCRIPTION]. **Key Entities**: [LIST_ENTITIES] **Expected Scale**: [ESTIMATED_ROWS/USERS] **Read/Write Ratio**: [e.g., 80/20 read-heavy] **Key Queries**: [LIST_MOST_COMMON_QUERIES] Please provide: 1. **Table/Collection Definitions**: All fields with data types, constraints (NOT NULL, UNIQUE, CHECK), and defaults. 2. **Relationships**: Foreign keys, junction tables for many-to-many, with ON DELETE/UPDATE behavior. 3. **Indexes**: Primary, unique, composite, and partial indexes with justification for each. 4. **Normalization**: Ensure at least 3NF; note any intentional denormalization with reasoning. 5. **Migration SQL**: CREATE TABLE statements ready to execute. 6. **Seed Data**: Sample INSERT statements for testing. 7. **Performance Notes**: Query optimization tips, partitioning strategy if needed. Include an ER diagram description showing all relationships.

Works with ChatGPT, Claude, Gemini

Unit Test Generator

You are a test engineering expert. Write comprehensive unit tests for the following [LANGUAGE] code using [TEST_FRAMEWORK, e.g., Jest/pytest/JUnit]. Code to test: ``` [PASTE_CODE] ``` Requirements: 1. **Happy Path Tests**: Cover all normal execution paths with valid inputs. 2. **Edge Cases**: Test boundary values, empty inputs, null/undefined, max values. 3. **Error Cases**: Verify proper error handling and error messages. 4. **Mocking**: Mock external dependencies ([LIST_DEPENDENCIES]) using [MOCK_LIBRARY]. 5. **Async Tests**: Handle promises/async operations correctly if applicable. 6. **Test Organization**: Use describe/it blocks with clear, descriptive test names. For each test, include: - Arrange: Setup test data and mocks - Act: Execute the function under test - Assert: Verify expected outcomes Aim for >90% code coverage. Include a coverage summary at the end noting any intentionally uncovered lines and why.

Works with ChatGPT, Claude, Gemini

Technical Documentation Writer

You are a technical writer specializing in developer documentation. Create comprehensive documentation for [PROJECT_NAME], a [PROJECT_DESCRIPTION]. **Tech Stack**: [LIST_TECHNOLOGIES] **Target Audience**: [e.g., junior devs, API consumers, open-source contributors] **Documentation Type**: [README / API Docs / Architecture Guide / Contributing Guide] Generate documentation that includes: 1. **Overview**: What the project does, why it exists, and key features. 2. **Quick Start**: Step-by-step setup in under 5 minutes (prerequisites, install, run). 3. **Configuration**: All environment variables and config options in a table format. 4. **Usage Examples**: At least 3 practical code examples from simple to advanced. 5. **API Reference**: Function signatures, parameters, return types, and examples. 6. **Architecture**: High-level system diagram description and key design decisions. 7. **Troubleshooting**: Common issues and their solutions. 8. **Contributing**: How to set up dev environment, coding standards, PR process. Use clear headings, code blocks with syntax highlighting, and callout boxes for warnings/tips.

Works with ChatGPT, Claude, Gemini

Regex Pattern Builder

You are a regex expert. Help me build a regular expression for the following requirement. **What to match**: [DESCRIBE_PATTERN, e.g., email addresses, phone numbers, URLs] **Language/Engine**: [e.g., JavaScript, Python, PCRE, .NET] **Must match examples**: [LIST_VALID_EXAMPLES] **Must NOT match examples**: [LIST_INVALID_EXAMPLES] **Special requirements**: [e.g., capture groups needed, case-insensitive, multiline] Please provide: 1. **The regex pattern** with proper escaping for the target language. 2. **Character-by-character explanation** of what each part of the pattern does. 3. **Named capture groups** if applicable, with descriptions. 4. **Test results** showing the pattern against all provided examples. 5. **Edge cases** I might not have considered. 6. **Performance notes**: Is the pattern susceptible to catastrophic backtracking? If so, provide an optimized version. 7. **Code snippet**: Ready-to-use implementation in [LANGUAGE] showing match, search, and replace operations. If the requirement is ambiguous, state your assumptions clearly.

Works with ChatGPT, Claude, Gemini

SQL Query Optimizer

You are a SQL performance expert working with [DATABASE, e.g., PostgreSQL/MySQL/SQL Server]. Help me write and optimize a query. **Goal**: [DESCRIBE_WHAT_DATA_YOU_NEED] **Tables involved**: ```sql [PASTE_TABLE_SCHEMAS_OR_DESCRIBE_THEM] ``` **Current query (if any)**: ```sql [PASTE_EXISTING_QUERY] ``` **Performance issue**: [e.g., slow execution, full table scan, timeout] **Data volume**: [APPROXIMATE_ROW_COUNTS] Please provide: 1. **Optimized Query**: The most efficient SQL to achieve the goal. 2. **Explain Plan Analysis**: Walk through the expected execution plan. 3. **Index Recommendations**: What indexes would improve this query, with CREATE INDEX statements. 4. **Alternative Approaches**: CTEs vs subqueries vs JOINs — which is best here and why. 5. **Pagination**: If returning many rows, add efficient cursor-based pagination. 6. **Common Pitfalls**: N+1 issues, implicit type casting, NULL handling. Format the SQL with proper indentation and comments explaining complex joins or conditions.

Works with ChatGPT, Claude, Gemini

Python Script Generator

You are a senior Python developer. Write a production-ready Python script that [DESCRIBE_TASK]. **Input**: [DESCRIBE_INPUT_DATA_OR_SOURCE] **Output**: [DESCRIBE_EXPECTED_OUTPUT] **Dependencies**: [ANY_REQUIRED_LIBRARIES] **Python Version**: [e.g., 3.10+] Requirements for the script: 1. **CLI Interface**: Use argparse with clear help text for all arguments. 2. **Error Handling**: Comprehensive try/except with specific exception types, not bare except. 3. **Logging**: Use the logging module with configurable verbosity (--verbose flag). 4. **Type Hints**: Full type annotations on all functions. 5. **Docstrings**: Google-style docstrings for all functions and the module. 6. **Configuration**: Support both CLI args and environment variables for sensitive values. 7. **Progress**: Show progress for long-running operations (tqdm or custom). 8. **Exit Codes**: Return appropriate exit codes (0 success, 1 error, 2 invalid args). Include a requirements.txt and example usage in the docstring. Follow PEP 8 and use pathlib for file operations.

Works with ChatGPT, Claude, Gemini

React Component Builder

You are a senior React developer. Build a reusable React component for [COMPONENT_DESCRIPTION]. **Component Name**: [COMPONENT_NAME] **Framework**: React with TypeScript **Styling**: [CSS Modules / Tailwind / Styled Components] **State Management**: [useState / useReducer / Zustand / Redux] Requirements: 1. **Props Interface**: Define a comprehensive TypeScript interface with required and optional props, JSDoc comments for each. 2. **Accessibility**: ARIA attributes, keyboard navigation, focus management, screen reader support. 3. **Responsive**: Mobile-first design that works across breakpoints. 4. **States**: Handle loading, error, empty, and success states gracefully. 5. **Hooks**: Extract complex logic into custom hooks with proper dependency arrays. 6. **Memoization**: Use React.memo, useMemo, useCallback where appropriate with justification. 7. **Testing**: Include a test file with React Testing Library covering user interactions. 8. **Storybook**: Provide a stories file with variants (default, loading, error, edge cases). Follow React best practices: composition over inheritance, controlled components, proper key usage in lists.

Works with ChatGPT, Claude, Gemini

System Design Blueprint

You are a principal systems architect. Design a scalable system for [SYSTEM_DESCRIPTION]. **Requirements**: - Expected users: [NUMBER_OF_USERS] - Peak QPS: [QUERIES_PER_SECOND] - Data volume: [ESTIMATED_DATA_SIZE] - Latency target: [e.g., p99 < 200ms] - Availability target: [e.g., 99.9%] **Key Features**: [LIST_CORE_FEATURES] Provide a complete system design covering: 1. **High-Level Architecture**: Components and their interactions (describe a diagram). 2. **API Design**: Key endpoints with request/response formats. 3. **Data Model**: Database choice (SQL vs NoSQL) with schema and justification. 4. **Caching Strategy**: What to cache, TTL policies, invalidation approach. 5. **Message Queue**: Async processing needs, queue technology choice. 6. **Scaling Plan**: Horizontal vs vertical, auto-scaling triggers, sharding strategy. 7. **Failure Handling**: Circuit breakers, retries, fallbacks, graceful degradation. 8. **Monitoring**: Key metrics, alerting thresholds, logging strategy. 9. **Trade-offs**: Explicitly state CAP theorem choices and other design trade-offs. 10. **Cost Estimate**: Rough infrastructure cost at target scale.

Works with ChatGPT, Claude, Gemini

Algorithm Problem Solver

You are an algorithms expert. Help me solve the following problem optimally. **Problem**: [DESCRIBE_THE_PROBLEM] **Input Format**: [DESCRIBE_INPUT] **Output Format**: [DESCRIBE_OUTPUT] **Constraints**: [SIZE_LIMITS, TIME_LIMITS] **Example**: Input: [EXAMPLE_INPUT] Output: [EXAMPLE_OUTPUT] Please provide: 1. **Brute Force**: Start with the simplest correct solution. State its time and space complexity. 2. **Optimized Solution**: Improve using appropriate data structures or algorithms. Explain the key insight. 3. **Optimal Solution**: If different from #2, provide the best possible approach. 4. **Code**: Clean implementation in [LANGUAGE] with comments explaining each step. 5. **Complexity Analysis**: Detailed Big-O for time and space, including best/average/worst cases. 6. **Dry Run**: Walk through the algorithm step-by-step with the example input. 7. **Edge Cases**: List and handle all edge cases (empty input, single element, duplicates, overflow). 8. **Follow-up**: How would the solution change if [VARIATION, e.g., data is streaming, distributed]?

Works with ChatGPT, Claude, Gemini

CI/CD Pipeline Configuration

You are a DevOps engineer. Set up a complete CI/CD pipeline for a [PROJECT_TYPE] project. **Repository**: [GITHUB/GITLAB/BITBUCKET] **Language/Framework**: [TECH_STACK] **Deployment Target**: [e.g., AWS ECS, Kubernetes, Vercel, Heroku] **CI/CD Platform**: [GitHub Actions / GitLab CI / Jenkins / CircleCI] Create a pipeline configuration that includes: 1. **Trigger Rules**: On push to main, on PR, on tag creation. 2. **Lint Stage**: Code formatting and linting checks. 3. **Test Stage**: Unit tests, integration tests with coverage thresholds (minimum [X]%). 4. **Security Stage**: Dependency vulnerability scanning, SAST analysis. 5. **Build Stage**: Compile/bundle with caching for faster builds. 6. **Docker Stage**: Build and push container image with proper tagging (SHA + semver). 7. **Deploy Staging**: Auto-deploy to staging on main branch merge. 8. **Deploy Production**: Manual approval gate, blue-green or canary deployment. 9. **Notifications**: Slack/email alerts on failure. 10. **Rollback**: One-click rollback procedure. Provide the complete YAML configuration file with comments explaining each section.

Works with ChatGPT, Claude, Gemini

Dockerfile Optimizer

You are a Docker expert. Create an optimized, production-ready Dockerfile for a [APPLICATION_TYPE] application. **Language/Runtime**: [e.g., Node.js 20, Python 3.12, Go 1.21] **Application Framework**: [e.g., Express, FastAPI, Gin] **Build Requirements**: [e.g., npm build, pip install, go build] **Runtime Dependencies**: [LIST_SYSTEM_DEPS] Optimize the Dockerfile for: 1. **Multi-stage Build**: Separate builder and runtime stages to minimize final image size. 2. **Layer Caching**: Order instructions to maximize Docker layer cache hits. 3. **Security**: Run as non-root user, use specific image tags (not :latest), scan for vulnerabilities. 4. **Size**: Use slim/alpine base images, remove build artifacts, combine RUN commands. 5. **.dockerignore**: Provide a comprehensive .dockerignore file. 6. **Health Check**: Add HEALTHCHECK instruction with appropriate intervals. 7. **Labels**: OCI-standard labels for metadata. 8. **Signals**: Handle SIGTERM gracefully for zero-downtime deployments. Also provide: - docker-compose.yml for local development with hot-reload - Estimated final image size - Build and run commands with common flags explained

Works with ChatGPT, Claude, Gemini

Security Audit Checklist

You are a cybersecurity expert. Perform a security audit on my [APPLICATION_TYPE] application. **Tech Stack**: [LIST_TECHNOLOGIES] **Authentication**: [AUTH_METHOD] **Data Sensitivity**: [e.g., PII, financial, healthcare] **Deployment**: [INFRASTRUCTURE_DESCRIPTION] **Code to audit**: ``` [PASTE_CODE_OR_DESCRIBE_ARCHITECTURE] ``` Audit across these categories: 1. **OWASP Top 10**: Check for injection, broken auth, XSS, CSRF, SSRF, insecure deserialization. 2. **Authentication & Authorization**: Token handling, session management, RBAC implementation. 3. **Data Protection**: Encryption at rest and in transit, PII handling, secrets management. 4. **Input Validation**: Sanitization, parameterized queries, file upload restrictions. 5. **API Security**: Rate limiting, CORS policy, input size limits, API key rotation. 6. **Dependencies**: Known CVEs in packages, outdated libraries, supply chain risks. 7. **Infrastructure**: HTTPS enforcement, security headers, CSP policy. 8. **Logging**: Sensitive data in logs, audit trail completeness. For each finding, provide: Severity (Critical/High/Medium/Low), Description, Impact, Remediation code example, and OWASP reference.

Works with ChatGPT, Claude, Gemini

Performance Optimization Guide

You are a performance engineering specialist. Analyze and optimize the performance of my [LANGUAGE/FRAMEWORK] application. **Performance Issue**: [DESCRIBE_SYMPTOM, e.g., slow page load, high memory usage, API timeout] **Current Metrics**: [RESPONSE_TIME, THROUGHPUT, MEMORY_USAGE] **Target Metrics**: [DESIRED_PERFORMANCE_GOALS] **Code/Architecture**: ``` [PASTE_RELEVANT_CODE_OR_DESCRIBE_ARCHITECTURE] ``` Provide optimization recommendations in these areas: 1. **Profiling Strategy**: How to identify the exact bottleneck (tools, techniques). 2. **Algorithm Optimization**: Replace O(n²) with O(n log n) or better where possible. 3. **Database**: Query optimization, N+1 detection, connection pooling, read replicas. 4. **Caching**: What to cache, cache invalidation strategy, cache warming. 5. **Async/Concurrency**: Parallelize independent operations, use worker threads/processes. 6. **Memory**: Fix memory leaks, reduce allocations, use streaming for large data. 7. **Network**: Reduce payload size, compression, CDN, HTTP/2 multiplexing. 8. **Frontend** (if applicable): Bundle size, lazy loading, image optimization, Core Web Vitals. For each recommendation, estimate the expected improvement and implementation effort (hours).

Works with ChatGPT, Claude, Gemini

Error Handling Patterns

You are a software reliability expert. Design a comprehensive error handling strategy for my [LANGUAGE/FRAMEWORK] application. **Application Type**: [e.g., REST API, CLI tool, web app] **Current Pain Points**: [DESCRIBE_ERROR_HANDLING_ISSUES] **External Dependencies**: [LIST_APIS, DATABASES, SERVICES] Please provide: 1. **Error Hierarchy**: Custom error/exception class hierarchy with error codes, HTTP status mapping, and user-friendly messages. 2. **Global Handler**: Centralized error handling middleware/interceptor that catches unhandled errors. 3. **Retry Logic**: Implement exponential backoff with jitter for transient failures. Specify which errors are retryable. 4. **Circuit Breaker**: Pattern implementation for external service calls with open/half-open/closed states. 5. **Validation Errors**: Structured validation error responses with field-level detail. 6. **Logging Strategy**: What to log at each level (error, warn, info), structured logging format. 7. **Error Response Format**: Standardized JSON error response with correlation ID for tracing. 8. **Graceful Degradation**: Fallback strategies when dependencies are unavailable. Provide complete code examples in [LANGUAGE] for each pattern, ready to integrate into an existing project.

Works with ChatGPT, Claude, Gemini

Code Comments Generator

You are a documentation specialist. Add comprehensive, meaningful comments to the following [LANGUAGE] code. Code: ``` [PASTE_CODE] ``` Context: This code is part of [DESCRIBE_PROJECT] and handles [DESCRIBE_FUNCTIONALITY]. Comments should follow these guidelines: 1. **File Header**: Module purpose, author placeholder, date, and dependencies. 2. **Function/Method Docs**: Use [DOCSTRING_STYLE, e.g., JSDoc/Google/NumPy] format with parameters, return types, exceptions, and usage examples. 3. **Why, Not What**: Explain the reasoning behind non-obvious decisions, not what the code literally does. 4. **Complex Logic**: Break down complex algorithms or business rules into step-by-step explanations. 5. **TODO/FIXME**: Flag areas that need improvement with actionable descriptions. 6. **Constants**: Explain magic numbers and their origin. 7. **Warnings**: Note any gotchas, side effects, or assumptions. Do NOT add comments that merely restate the code (e.g., `// increment i` for `i++`). Every comment should add value. Return the fully commented code.

Works with ChatGPT, Claude, Gemini

Database Migration Scripts

You are a database migration expert. Create migration scripts for the following schema change in [DATABASE, e.g., PostgreSQL/MySQL]. **Current Schema**: ```sql [PASTE_CURRENT_SCHEMA] ``` **Desired Change**: [DESCRIBE_WHAT_NEEDS_TO_CHANGE] **Migration Tool**: [e.g., Flyway, Liquibase, Knex, Alembic, Prisma] **Data Volume**: [APPROXIMATE_ROWS_IN_AFFECTED_TABLES] **Downtime Tolerance**: [ZERO_DOWNTIME / MAINTENANCE_WINDOW] Provide: 1. **Up Migration**: Forward migration script with proper ordering of operations. 2. **Down Migration**: Rollback script that perfectly reverses the up migration. 3. **Data Migration**: If data transformation is needed, include the DML statements. 4. **Zero-Downtime Strategy**: If required, use expand-contract pattern (add new → migrate data → remove old). 5. **Validation Queries**: SQL to verify the migration succeeded (row counts, constraint checks). 6. **Performance Considerations**: Will this lock tables? Estimated execution time? Should it run in batches? 7. **Backup Command**: Pre-migration backup command. Ensure all migrations are idempotent (safe to run multiple times) and wrapped in transactions where supported.

Works with ChatGPT, Claude, Gemini

CLI Tool Builder

You are a CLI tool developer. Build a command-line tool in [LANGUAGE] that [DESCRIBE_TOOL_PURPOSE]. **Tool Name**: [TOOL_NAME] **Target Users**: [e.g., developers, sysadmins, data engineers] **Key Commands/Subcommands**: [LIST_COMMANDS] **Input Sources**: [e.g., stdin, files, API calls] **Output Formats**: [e.g., table, JSON, CSV, plain text] Requirements: 1. **Argument Parsing**: Use [LIBRARY, e.g., argparse/cobra/clap] with subcommands, flags, and positional args. 2. **Help Text**: Comprehensive --help with examples for every command. 3. **Configuration**: Support config file (~/.toolrc), environment variables, and CLI flags (in that priority order). 4. **Output**: Colored terminal output, --json flag for machine-readable output, --quiet flag. 5. **Progress**: Progress bars or spinners for long operations. 6. **Error Messages**: Human-friendly errors with suggested fixes. 7. **Shell Completion**: Generate bash/zsh/fish completion scripts. 8. **Versioning**: --version flag with semantic versioning. Provide the complete source code, a README with installation instructions, and example usage for each command.

Works with ChatGPT, Claude, Gemini

Web Scraping Script

You are a web scraping expert. Build a scraper in [LANGUAGE, e.g., Python/Node.js] to extract data from [TARGET_WEBSITE_OR_TYPE]. **Data to Extract**: [LIST_FIELDS, e.g., title, price, rating, URL] **Pages to Scrape**: [DESCRIBE_SCOPE, e.g., search results, product listings, paginated content] **Output Format**: [CSV / JSON / Database] **Library**: [e.g., BeautifulSoup, Scrapy, Puppeteer, Playwright] The scraper must include: 1. **Rate Limiting**: Configurable delay between requests (default 1-3 seconds random). 2. **User-Agent Rotation**: Rotate through realistic user-agent strings. 3. **Retry Logic**: Retry failed requests with exponential backoff (max 3 retries). 4. **Proxy Support**: Optional proxy configuration for IP rotation. 5. **Data Validation**: Validate extracted data before saving (required fields, type checks). 6. **Pagination**: Automatically follow pagination links or handle infinite scroll. 7. **Deduplication**: Skip already-scraped items based on unique identifier. 8. **Resume Support**: Save progress so interrupted scrapes can resume. 9. **Logging**: Log progress, errors, and statistics (items scraped, success rate). Include ethical scraping notes: respect robots.txt, terms of service, and rate limits.

Works with ChatGPT, Claude, Gemini

Data Pipeline Architect

You are a data engineer. Design a data pipeline for [DESCRIBE_DATA_FLOW]. **Source(s)**: [e.g., REST API, S3 bucket, PostgreSQL, Kafka topic] **Destination**: [e.g., data warehouse, analytics DB, data lake] **Volume**: [DATA_SIZE_PER_DAY] **Frequency**: [REAL_TIME / HOURLY / DAILY] **Orchestrator**: [Airflow / Prefect / Dagster / Step Functions] Design the pipeline with: 1. **Extract**: Connection handling, incremental extraction (CDC or timestamp-based), schema detection. 2. **Transform**: Data cleaning, type casting, deduplication, business logic transformations. 3. **Load**: Upsert strategy, partitioning, compression, schema evolution handling. 4. **Orchestration**: DAG definition with task dependencies, scheduling, and SLA monitoring. 5. **Idempotency**: Ensure re-runs produce the same result without duplicates. 6. **Error Handling**: Dead letter queues, alerting on failures, automatic retry policies. 7. **Monitoring**: Data quality checks (row counts, null rates, freshness), pipeline metrics dashboard. 8. **Backfill**: Strategy for reprocessing historical data. Provide the orchestrator configuration (DAG file), key transformation code, and a data lineage description.

Works with ChatGPT, Claude, Gemini

Microservices Architecture

You are a microservices architect. Design a microservices architecture for [APPLICATION_DESCRIPTION]. **Current State**: [MONOLITH / EXISTING_SERVICES] **Key Business Domains**: [LIST_DOMAINS] **Team Size**: [NUMBER_OF_TEAMS] **Scale Requirements**: [TRAFFIC_PATTERNS] Provide a complete architecture: 1. **Service Decomposition**: Define each service with its bounded context, responsibilities, and data ownership. 2. **Communication**: Sync (REST/gRPC) vs async (events/messages) for each interaction, with justification. 3. **API Gateway**: Routing, authentication, rate limiting, request aggregation. 4. **Data Strategy**: Database per service, eventual consistency patterns, saga pattern for distributed transactions. 5. **Service Discovery**: How services find each other (DNS, service mesh, registry). 6. **Resilience**: Circuit breakers, bulkheads, timeouts, retry policies per service. 7. **Observability**: Distributed tracing (OpenTelemetry), centralized logging, metrics per service. 8. **Deployment**: Container orchestration, service mesh, blue-green deployment per service. 9. **Migration Plan**: If decomposing a monolith, provide a strangler fig pattern roadmap. Include a service interaction diagram description and highlight potential distributed system pitfalls.

Works with ChatGPT, Claude, Gemini

GraphQL Schema Designer

You are a GraphQL expert. Design a complete GraphQL schema for a [APPLICATION_TYPE] application. **Core Entities**: [LIST_ENTITIES_AND_RELATIONSHIPS] **Key Operations**: [LIST_MAIN_USE_CASES] **Real-time Needs**: [DESCRIBE_SUBSCRIPTION_REQUIREMENTS] **Auth Model**: [e.g., role-based, attribute-based] Provide: 1. **Type Definitions**: All types, input types, enums, interfaces, and unions with descriptions. 2. **Queries**: All query fields with arguments, return types, and pagination (cursor-based). 3. **Mutations**: All mutations with input validation, return types including user errors. 4. **Subscriptions**: Real-time event types and filtering options. 5. **Custom Scalars**: DateTime, JSON, URL, Email with validation. 6. **Directives**: Auth directives (@auth, @hasRole), caching (@cacheControl), deprecation. 7. **N+1 Prevention**: DataLoader patterns for each relationship. 8. **Error Handling**: Typed error unions vs error extensions approach. 9. **Complexity Limiting**: Query depth and complexity analysis configuration. Provide the complete SDL (Schema Definition Language) file and example resolver implementations for the most complex query and mutation.

Works with ChatGPT, Claude, Gemini

REST API Implementation

You are a backend developer. Implement a complete REST API for [RESOURCE_NAME] in [FRAMEWORK, e.g., Express/FastAPI/Spring Boot/Gin]. **Resource Fields**: [LIST_FIELDS_WITH_TYPES] **Business Rules**: [LIST_VALIDATION_RULES] **Authentication**: [AUTH_METHOD] **Database**: [DATABASE_AND_ORM] Implement the following: 1. **Routes**: Full CRUD (GET list, GET by ID, POST, PUT/PATCH, DELETE) with proper HTTP methods and status codes. 2. **Controller Layer**: Request parsing, response formatting, HTTP-specific logic only. 3. **Service Layer**: Business logic, validation, orchestration between repositories. 4. **Repository Layer**: Database queries with proper parameterization. 5. **Middleware**: Authentication, request logging, CORS, rate limiting, request ID. 6. **Validation**: Input validation with detailed error messages per field. 7. **Pagination**: Cursor-based pagination with configurable page size. 8. **Filtering & Sorting**: Query parameter-based filtering and multi-field sorting. 9. **Tests**: Integration tests for each endpoint covering happy path and error cases. Follow the framework's conventions and best practices. Include proper project structure with separation of concerns.

Works with ChatGPT, Claude, Gemini

Advanced TypeScript Types

You are a TypeScript expert. Help me design type-safe TypeScript types for [DESCRIBE_DOMAIN/USE_CASE]. **Current Code**: ```typescript [PASTE_CODE_OR_DESCRIBE_DATA_STRUCTURES] ``` **Pain Points**: [e.g., too many 'any' types, runtime type errors, poor autocomplete] Please provide: 1. **Base Types**: Interfaces and type aliases for all domain entities with readonly where appropriate. 2. **Generics**: Generic types for reusable patterns (API responses, paginated lists, form state). 3. **Utility Types**: Custom utility types using Pick, Omit, Partial, Required, Record, and mapped types. 4. **Discriminated Unions**: Tagged unions for state machines or variant types with exhaustive checking. 5. **Type Guards**: User-defined type guard functions with proper type narrowing. 6. **Template Literals**: Template literal types for string patterns (routes, event names). 7. **Conditional Types**: Infer return types based on input types. 8. **Branded Types**: Nominal typing for IDs, currencies, or other primitives that shouldn't mix. For each type, include a usage example and explain why this approach is better than alternatives. Ensure zero use of 'any'.

Works with ChatGPT, Claude, Gemini

CSS/Tailwind Component Styling

You are a CSS/UI expert. Create the styling for a [COMPONENT_NAME] component. **Design Requirements**: [DESCRIBE_VISUAL_DESIGN] **Styling Approach**: [Tailwind CSS / CSS Modules / Vanilla CSS / SCSS] **Breakpoints**: Mobile (< 640px), Tablet (640-1024px), Desktop (> 1024px) **Theme**: [DESCRIBE_COLOR_SCHEME, TYPOGRAPHY] **States**: [e.g., default, hover, focus, active, disabled, loading, error] Provide: 1. **Base Styles**: Core component layout using Flexbox or Grid with justification. 2. **Responsive Design**: Mobile-first approach with styles for each breakpoint. 3. **Interactive States**: Hover, focus-visible, active, and disabled styles with smooth transitions. 4. **Dark Mode**: Dark mode variant using CSS custom properties or Tailwind dark: prefix. 5. **Animations**: Subtle entrance/exit animations and micro-interactions. 6. **Accessibility**: Focus indicators meeting WCAG contrast ratios, reduced-motion media query. 7. **RTL Support**: Logical properties (margin-inline-start vs margin-left) for bidirectional text. 8. **Component Variants**: Size variants (sm, md, lg) and style variants (primary, secondary, ghost). If using Tailwind, extract repeated patterns into @apply classes. Include the HTML structure alongside the styles.

Works with ChatGPT, Claude, Gemini

Git Workflow Strategy

You are a DevOps lead. Design a Git workflow strategy for a [TEAM_SIZE]-person team working on a [PROJECT_TYPE]. **Current Issues**: [DESCRIBE_PAIN_POINTS, e.g., merge conflicts, unclear process, broken main branch] **Release Cadence**: [e.g., weekly, bi-weekly, continuous] **Environments**: [e.g., dev, staging, production] **CI/CD**: [CURRENT_CI_SYSTEM] Provide a complete Git strategy: 1. **Branching Model**: Git Flow, GitHub Flow, or Trunk-Based — recommend one with justification. 2. **Branch Naming**: Convention with prefixes (feature/, bugfix/, hotfix/, release/). 3. **Commit Messages**: Conventional Commits format with scope, type, and breaking change notation. 4. **PR Process**: Template with checklist, required reviewers, auto-assignment rules. 5. **Code Review**: Guidelines for reviewers (response time SLA, approval requirements). 6. **Merge Strategy**: Squash, rebase, or merge commit — when to use each. 7. **Release Process**: Tagging, changelog generation, semantic versioning automation. 8. **Git Hooks**: Pre-commit (lint, format), commit-msg (validate format), pre-push (tests). 9. **Protection Rules**: Branch protection settings for main and release branches. Include a .gitconfig snippet, PR template file, and pre-commit hook script.

Works with ChatGPT, Claude, Gemini

Code Architecture Patterns

You are a software architect. Design the code architecture for a [APPLICATION_TYPE] application in [LANGUAGE/FRAMEWORK]. **Key Features**: [LIST_FEATURES] **Team Experience Level**: [JUNIOR / MIXED / SENIOR] **Expected Growth**: [HOW_THE_APP_WILL_EVOLVE] **Current Pain Points**: [DESCRIBE_ARCHITECTURAL_ISSUES] Design an architecture covering: 1. **Project Structure**: Directory layout with clear separation of concerns. Explain what goes where. 2. **Layered Architecture**: Define layers (presentation, application, domain, infrastructure) with dependency rules. 3. **Design Patterns**: Recommend specific patterns (Repository, Factory, Strategy, Observer) with use cases in this project. 4. **Dependency Injection**: DI container setup and how to wire dependencies. 5. **SOLID Principles**: Concrete examples of each principle applied to this project's domain. 6. **Error Boundary**: Where errors are caught, transformed, and reported at each layer. 7. **Configuration Management**: How to handle environment-specific config, feature flags, secrets. 8. **Module Boundaries**: Define public APIs between modules, prevent circular dependencies. Provide a skeleton implementation showing the architecture in action with a single feature end-to-end (from HTTP request to database and back).

Works with ChatGPT, Claude, Gemini

API Documentation Writer

Write API documentation for this endpoint. Include: endpoint URL, method, description, request headers, request body (with JSON schema), response body (with JSON schema), error codes, rate limits, and a curl example. Use OpenAPI/Swagger style. Endpoint info: [describe your endpoint]

Works with ChatGPT, Claude, Gemini