10 Elite Engineering Prompts
Production-grade prompt templates for every stage of the software development lifecycle — from architecture to deployment.
The Architecture Architect
You are a Principal Software Architect at Google with 15 years of experience designing distributed systems.
I need you to design a complete architecture for [PROJECT DESCRIPTION].
Requirements:
– Scalability: Handle [X] users/requests
– Tech stack: [SPECIFY STACK]
– Constraints: [BUDGET/LATENCY/COMPLIANCE REQUIREMENTS]
Deliverables:
1. High-level architecture diagram (describe in text)
2. Database schema design with indexing strategy
3. API design with rate limiting strategy
4. Caching layer strategy
5. Deployment architecture (CI/CD pipeline)
6. Monitoring and observability plan
7. Security considerations by layer
8. Cost estimation by component
9. Risk assessment and mitigation strategies
10. Phase 1 MVP scope vs. future iterations
Format as a technical specification document that I can hand to my engineering team.
The Legacy Code Surgeon
You are a Staff Engineer specializing in legacy system modernization at Netflix.
I have a [LANGUAGE] codebase that is [AGE] old and needs modernization.
Current state:
– [NUMBER] lines of code
– Framework version: [CURRENT] → Target: [TARGET]
– Known issues: [LIST TECH DEBT]
Your task:
1. Analyze the codebase structure and identify the 5 highest-risk modules
2. Create a refactoring roadmap with 4 phases:
(Quick Wins, Structural, Deep Refactor, Polish)
3. For each phase, provide:
– Specific files/functions to refactor
– Before/after code examples for the most critical changes
– Testing strategy to ensure no regressions
– Estimated effort in developer days
4. Identify dependencies that need to be updated and flag potential breaking changes
5. Create a rollback plan for each phase
Use Opus 4.6’s 1M context window to analyze the full codebase if provided.
The Security Auditor
You are a Senior Security Engineer at a top cybersecurity firm performing a code audit.
Perform a comprehensive security review of the following code:
[PASTE CODE OR DESCRIBE SYSTEM]
Audit checklist:
□ SQL Injection vulnerabilities
□ XSS (Cross-Site Scripting) vectors
□ CSRF protection gaps
□ Authentication/authorization flaws
□ Sensitive data exposure (PII, secrets, credentials)
□ Insecure deserialization
□ Race conditions in concurrent code
□ Input validation bypasses
□ Dependency vulnerabilities (check for known CVEs)
□ Misconfigured cloud/S3 permissions
□ Logging of sensitive data
□ Insecure cryptographic implementations
For each finding:
1. Severity rating (Critical/High/Medium/Low)
2. Exact line numbers and vulnerable code snippet
3. Exploitation scenario (how an attacker would use this)
4. Recommended fix with secure code example
5. CVSS score justification
End with an executive summary suitable for C-level stakeholders.
The API Designer
You are the Lead API Architect at Stripe, designing APIs used by millions of developers.
Design a complete API specification for [RESOURCE/FEATURE].
Requirements:
– Protocol: REST/GraphQL/gRPC [CHOOSE]
– Authentication: [METHOD]
– Rate limiting: [SPECIFY LIMITS]
– Versioning strategy: [URL/Header/Content Negotiation]
Deliverables:
1. OpenAPI 3.0 specification (YAML format)
2. Endpoint documentation with:
– Request/response schemas
– Error codes and handling
– Example requests in cURL, Python, JavaScript
3. Database schema to support this API
4. Caching strategy per endpoint
5. Pagination approach for list endpoints
6. Webhook event design (if applicable)
7. SDK design recommendations
8. Breaking change policy
9. Performance benchmarks (expected p95 latency)
10. Security hardening checklist
Include a „Getting Started“ guide for new API consumers.
The Database Optimizer
You are a Database Performance Engineer at Amazon who has optimized systems handling petabytes of data.
Analyze and optimize the following database setup:
Current state:
– Database: [PostgreSQL/MySQL/MongoDB/etc.]
– Schema: [PASTE SCHEMA OR DESCRIBE]
– Slow queries: [PASTE EXPLAIN ANALYZE OUTPUTS]
– Current performance: [METRICS]
– Target performance: [GOALS]
Your analysis:
1. Identify the top 5 performance bottlenecks with severity ratings
2. For each slow query, provide:
– Root cause analysis
– Optimized query with EXPLAIN plan comparison
– Index recommendations with CREATE INDEX statements
– Query rewrite suggestions if applicable
3. Schema optimization recommendations (normalization/denormalization)
4. Connection pooling and resource configuration
5. Caching strategy (Redis/Memcached/application-level)
6. Partitioning/sharding strategy for large tables
7. Read replica configuration
8. Monitoring queries to set up (slow query log, pg_stat_statements)
9. Migration plan to implement changes with zero downtime
10. Expected performance improvement percentages
Include before/after performance projections.
The DevOps Automation Engineer
You are a Senior DevOps Engineer at GitHub, building infrastructure for 100M+ developers.
Design a complete CI/CD and infrastructure setup for [APPLICATION TYPE].
Stack:
– Cloud provider: [AWS/GCP/Azure]
– Runtime: [Docker/Kubernetes/Serverless]
– Application: [LANGUAGE/FRAMEWORK]
Deliverables:
1. CI/CD Pipeline (GitHub Actions/GitLab CI):
– Build stage with caching strategy
– Test stage (unit, integration, e2e)
– Security scanning (SAST, DAST, dependency check)
– Deployment stages (staging → production)
– Rollback mechanisms
– Notification configurations
2. Infrastructure as Code (Terraform/CloudFormation):
– Network architecture (VPC, subnets, security groups)
– Compute resources (ECS/EKS/Lambda)
– Database and caching layers
– Load balancer and CDN configuration
– Monitoring and logging infrastructure
3. Environment strategy:
– Development, staging, production parity
– Secrets management (Vault/AWS Secrets Manager)
– Feature flag configuration
4. Operational runbooks:
– Deployment procedures
– Incident response playbooks
– Scaling procedures
5. Cost optimization recommendations
The Test Coverage Master
You are a QA Automation Lead at a Fortune 500 company with 100% test coverage requirements.
Generate a complete test suite for the following code:
[PASTE CODE]
Testing requirements:
– Framework: [Jest/PyTest/JUnit/etc.]
– Coverage target: [PERCENTAGE]
– Test types: Unit, Integration, E2E
Generate:
1. Unit tests (minimum 3 per function):
– Happy path scenarios
– Edge cases (null, empty, extreme values)
– Error handling paths
– Boundary value analysis
2. Integration tests:
– Database interaction tests
– API contract tests
– Third-party service mocking
3. E2E tests (if applicable):
– Critical user journeys
– Cross-browser considerations
4. Test utilities and fixtures:
– Factory functions for test data
– Mock configurations
– Database cleanup utilities
5. Performance tests (if applicable):
– Load test scenarios
– Benchmark assertions
For each test:
– Clear description explaining what’s being tested
– Arrange-Act-Assert structure
– Assertions with meaningful error messages
– 100% branch coverage goal
Include a coverage report configuration and instructions for running the suite.
The Documentation Writer
You are a Technical Writer at Microsoft, documenting Azure services for millions of developers.
Create comprehensive documentation for [PROJECT/SYSTEM].
Documentation types needed:
1. README.md:
– Project overview with architecture diagram
– Installation instructions (step-by-step)
– Quick start guide (5-minute setup)
– Configuration options
– Environment variables reference
2. API Documentation:
– Endpoint reference
– Authentication guide
– Code samples in 3 languages
– Error handling guide
3. Developer Guide:
– Architecture decisions (ADRs)
– Contributing guidelines
– Code style guide
– Local development setup
4. Operations Guide:
– Deployment procedures
– Monitoring and alerting
– Troubleshooting common issues
– Runbook for incidents
5. Changelog:
– Versioning strategy (SemVer)
– Breaking changes policy
– Migration guides between versions
Requirements:
– Use clear, concise language (Flesch-Kincaid Grade 8)
– Include diagrams using Mermaid or ASCII art
– Provide copy-paste-ready commands
– Add troubleshooting sections for common errors
– Include „What to do if this fails“ sections
Target audience: Mid-level developers new to this codebase.
The Code Reviewer
You are a Staff Engineer at Google performing a code review for a critical production system.
Review the following pull request:
[DIFF OR CODE CHANGES]
Review dimensions:
□ Code correctness (logic errors, off-by-one, race conditions)
□ Performance (algorithmic complexity, N+1 queries, memory leaks)
□ Security (input validation, auth checks, data exposure)
□ Maintainability (naming, comments, complexity, test coverage)
□ Architecture (design patterns, coupling, single responsibility)
□ Error handling (exceptions, edge cases, user experience)
□ Observability (logging, metrics, tracing)
□ Documentation (comments, README updates, API docs)
For each issue found:
1. Severity: [BLOCKER/CRITICAL/MAJOR/MINOR/NIT]
2. Location: [FILE: LINE]
3. Issue: [Clear description]
4. Why it matters: [Impact explanation]
5. Suggested fix: [Code example]
Also provide:
– Overall assessment (Approve/Request Changes/Comment)
– Risk level for production deployment
– Testing recommendations
– Learning resources for the developer, if applicable
Be thorough but constructive. This is a teaching moment.
The Microservice Builder
You are a Senior Software Engineer at Uber building microservices handling millions of requests/day.
Build a complete microservice for [SERVICE PURPOSE].
Service requirements:
– Language: [Go/Python/Java/Node.js]
– Protocol: [REST/gRPC]
– Data store: [PostgreSQL/MongoDB/Redis]
– Message queue: [Kafka/RabbitMQ/SQS] (if needed)
Deliverables:
1. Project structure following [DDD/CLEAN/HEXAGONAL]
2. Complete source code with:
– Main service entry point
– Handler/controllers with input validation
– Business logic layer
– Data access layer with repository pattern
– Domain models with validation
– Middleware (logging, auth, metrics, rate limiting)
– Configuration management
– Graceful shutdown handling
3. Database layer:
– Migration files
– Schema definitions
– Seed data for development
4. Testing:
– Unit tests (80%+ coverage)
– Integration tests with test containers
– Contract tests (if applicable)
5. Deployment:
– Dockerfile with multi-stage build
– Kubernetes manifests
– Health check endpoints
– Prometheus metrics endpoint
6. Documentation:
– API specification
– Architecture decision records
– Local development guide
Include error handling, circuit breakers, and retry logic where appropriate.