PROMPTVAULT — Developer Productivity Pack ============================================ 180+ GPT-4 Prompts for Software Developers ============================================ SECTION 1: CODE GENERATION (40 Prompts) ---------------------------------------- 1.1 Full-Stack Feature Generator Prompt: Act as a senior full-stack developer using [TECH STACK]. Generate complete, production-ready code for: [FEATURE DESCRIPTION]. Include: Backend API endpoint with validation and error handling, Database schema/migration, Frontend component with loading/empty/error states, Type definitions, Unit tests. Use clean architecture patterns. 1.2 Code Refactoring Prompt: Act as a code review expert. Refactor the following [LANGUAGE] code for: Readability, Performance, SOLID principles, Error handling, Testability. Explain each change you made and why. Keep the same external API/interface. 1.3 Regex Generator with Explanation Prompt: Act as a regex expert. Generate a regex pattern for: [REQUIREMENT - e.g., "validate international phone numbers"]. Provide: The complete pattern, Breakdown of each component, 5 test cases that should match, 3 test cases that should not match, Performance considerations. SECTION 2: DEBUGGING (30 Prompts) ---------------------------------- 2.1 Error Diagnosis Prompt: Act as a senior [LANGUAGE] developer. Here is an error: [ERROR MESSAGE + STACK TRACE]. Diagnose: Root cause, Why it happened, 3 possible fixes (ranked by best practice), How to prevent it in the future. 2.2 Performance Profiling Prompt: Act as a performance engineer. Analyze this [LANGUAGE] code for performance bottlenecks: [CODE]. Identify: Time complexity issues, Memory allocation problems, N+1 queries, Unnecessary re-renders, Blocking operations. Provide optimized version with benchmarks. 2.3 Bug Reproduction Script Prompt: Act as a QA engineer. Write a minimal reproduction script for this bug: [BUG DESCRIPTION]. The script should: Isolate the problematic behavior, Include assertions, Be runnable with a single command, Output clear pass/fail results. SECTION 3: SYSTEM DESIGN (30 Prompts) -------------------------------------- 3.1 System Design Interview Prompt: Act as a system design interviewer. Design [SYSTEM - e.g., "a URL shortener like bit.ly"] for 100M daily active users. Cover: Requirements (functional + non-functional), High-level architecture diagram (describe), Database schema, API design (REST endpoints), Scaling strategy, Trade-offs and alternatives. 3.2 Database Schema Design Prompt: Act as a database architect. Design a PostgreSQL schema for: [APPLICATION DESCRIPTION]. Include: All tables with columns and types, Primary and foreign keys, Indexes with justification, Migration strategy, Sample queries for common operations. 3.3 API Design Review Prompt: Act as an API design reviewer. Review this API specification: [API SPEC]. Evaluate: RESTful conventions adherence, Naming consistency, Versioning strategy, Error response format, Rate limiting approach, Authentication flow, Pagination design. Provide specific improvements. SECTION 4: DEVOPS & CI/CD (25 Prompts) --------------------------------------- 4.1 Dockerfile Generator Prompt: Act as a DevOps engineer. Generate a production-ready Dockerfile for a [LANGUAGE/FRAMEWORK] application. Include: Multi-stage build for smaller image, Non-root user, Health check, Proper layer caching, Environment variable handling, .dockerignore file. 4.2 GitHub Actions CI Pipeline Prompt: Act as a CI/CD specialist. Write a complete GitHub Actions workflow for a [TECH STACK] project. Include: Lint, Type check, Unit tests, Integration tests, Build, Security scan (dependency audit), Deploy to [PLATFORM]. Use matrix strategy where applicable. 4.3 Terraform Infrastructure Prompt: Act as a cloud infrastructure engineer. Write Terraform (HCL) to provision: [INFRASTRUCTURE REQUIREMENTS - e.g., "AWS ECS + RDS + S3 + CloudFront"]. Include: Remote state backend, Variables with descriptions, Outputs, Security groups with least privilege, Tags for cost tracking. SECTION 5: CODE REVIEW & DOCS (30 Prompts) ------------------------------------------- 5.1 Pull Request Review Prompt: Act as a thorough code reviewer. Review this PR diff: [CODE DIFF]. Evaluate: Logic correctness, Security vulnerabilities, Performance implications, Test coverage, Documentation needs, Adherence to project conventions. Provide constructive, specific feedback with code suggestions. 5.2 API Documentation Prompt: Act as a technical writer. Generate comprehensive API documentation for this endpoint: [ENDPOINT]. Include: Overview, Authentication required, Request method and URL, Path/query parameters table, Request body schema with example, Response schema with example, Error codes table, cURL example, SDK usage example (2 languages). 5.3 README Generator Prompt: Act as an open-source maintainer. Generate a polished README.md for a [PROJECT NAME] project. Include: Project logo/title, Badges (build, coverage, npm/pypi version), One-line description, Features list, Quick start (3 commands max), Configuration, API reference link, Contributing guide, License. SECTION 6: TESTING (25 Prompts) -------------------------------- 6.1 Test Case Generator Prompt: Act as a test engineer. Generate comprehensive test cases for: [FUNCTION/MODULE]. Cover: Happy path, Edge cases, Error handling, Boundary values, Concurrency/race conditions, Security edge cases. Format as a table: Test ID, Scenario, Input, Expected Output, Priority. 6.2 Mock Data Generator Prompt: Act as a test data specialist. Generate realistic mock data for a [DOMAIN - e.g., "e-commerce orders"] in JSON format. Include: 20 records, Realistic but fake data (names, emails, addresses, prices), Edge case records (empty fields, max values, special characters), Relationships between entities. Exportable as [FORMAT]. [END OF PACK — 180 prompts across 6 sections] (c) 2026 PromptVault. Licensed for individual use.