100 ChatGPT Prompts for Software Developers [Free Templates]
100 ChatGPT Prompts for Software Developers [Free Templates]
You stare at the ChatGPT box. You type "fix my code." You get generic garbage. The problem isn't ChatGPT โ it's your prompts. Great developer prompts are language-specific, context-rich, and problem-focused. I've curated 100 battle-tested prompts across 10 categories. Copy, paste, code smarter.
Code Review Prompts (12)
1. Code Review Checklist
Review this code for [language/framework]:
[paste code]
Include: bugs, security issues, performance, readability, best practices, suggestions.
2. Refactoring Suggestions
Suggest refactoring improvements for this code:
[paste code]
Include: DRY violations, naming, structure, design patterns, maintainability.
3. Security Audit
Audit this code for security vulnerabilities:
[paste code]
Include: OWASP Top 10, input validation, authentication, injection, XSS, CSRF.
4. Code Smell Detection
Identify code smells in this code:
[paste code]
Include: smell type, location, why it's a problem, refactoring approach.
5. Design Pattern Application
Suggest design patterns for this code/feature:
[paste code or describe feature]
Include: pattern name, why it fits, implementation example, trade-offs.
6. Error Handling Review
Review error handling in this code:
[paste code]
Include: unhandled cases, error types, retry logic, logging, user-facing messages.
7. Database Query Optimization
Optimize this database query:
[paste query]
Include: indexing suggestions, query restructuring, N+1 detection, execution plan analysis.
8. API Endpoint Review
Review this API endpoint:
[paste code/route definition]
Include: RESTful practices, validation, status codes, error responses, versioning.
9. Frontend Component Review
Review this frontend component:
[paste component code]
Include: performance (re-renders), accessibility, responsiveness, state management, testing.
10. Test Coverage Analysis
Analyze test coverage for this code:
[paste code]
Include: untested paths, edge cases, mocking needs, test priorities.
11. Dependency Review
Review dependencies for this project:
[paste package.json/requirements/etc]
Include: outdated packages, security advisories, alternatives, bundle size impact.
12. Performance Bottleneck Detection
Identify performance bottlenecks in this code:
[paste code]
Include: time complexity, memory usage, I/O blocking, caching opportunities.
## Debugging Prompts (12)
### 13. Bug Analysis
Analyze this bug: [describe error/behavior] Include: possible causes, debugging steps, likely root cause, fix suggestions. Context: [language/framework/environment].
### 14. Error Message Interpretation
Explain this error message and how to fix it: [paste error message] Include: what it means, common causes, step-by-step fix, prevention.
### 15. Stack Trace Analysis
Analyze this stack trace: [paste stack trace] Include: error origin, call chain explanation, likely cause, debugging approach.
### 16. Reproduction Steps
Help me create reproduction steps for this bug: [describe behavior] Include: minimal reproducible example, environment setup, steps to trigger.
### 17. Debugging Strategy
Create a debugging strategy for this issue: [describe problem] Include: information gathering, hypothesis formation, testing approach, tools to use.
### 18. Race Condition Detection
Identify potential race conditions in this code: [paste code] Include: shared state, timing issues, synchronization needs, test strategies.
### 19. Memory Leak Detection
Identify potential memory leaks in this code: [paste code] Include: leak source, detection tools, fix strategies, monitoring.
### 20. API Debugging
Help debug this API issue: [describe problem] Include: request/response analysis, headers, authentication, CORS, rate limiting.
### 21. Database Debugging
Debug this database issue: [describe problem] Include: query analysis, connection issues, transaction problems, data integrity.
### 22. Environment Issue Resolution
Resolve this environment issue: [describe problem] Include: dependency conflicts, version mismatches, configuration, OS-specific issues.
### 23. Performance Debugging
Debug this performance issue: [describe problem] Include: profiling approach, metric collection, bottleneck identification, optimization.
### 24. Bug Fix Verification
Create a verification plan for this bug fix: [describe fix] Include: test cases, edge cases, regression testing, monitoring, rollback plan.
Architecture Prompts (12)
25. System Design
Design a system architecture for [application type] with [requirements].
Include: components, data flow, scalability, security, technology choices.
26. Microservices vs Monolith
Analyze microservices vs monolith for [project]:
Include: team size, complexity, deployment, scaling, maintenance, recommendation.
27. Database Schema Design
Design a database schema for [application] with [entities/relationships].
Include: tables, columns, relationships, indexes, constraints, migrations.
28. API Architecture
Design an API architecture for [application] with [requirements].
Include: REST/GraphQL/gRPC choice, endpoints, authentication, versioning, rate limiting.
29. Event-Driven Architecture
Design an event-driven architecture for [use case].
Include: event types, message broker, producers, consumers, error handling, idempotency.
30. Caching Strategy
Design a caching strategy for [application] with [performance requirements].
Include: cache layers, invalidation, TTL, eviction, consistency, tools.
31. CI/CD Pipeline Design
Design a CI/CD pipeline for [project] with [deployment targets].
Include: stages, testing, security scanning, deployment strategy, rollback.
32. Scalability Planning
Create a scalability plan for [application] expecting [growth].
Include: horizontal/vertical scaling, database sharding, load balancing, CDN.
33. Technology Stack Selection
Select a technology stack for [project type] with [constraints].
Include: frontend, backend, database, hosting, tools, rationale for each choice.
34. Security Architecture
Design security architecture for [application] in [industry].
Include: authentication, authorization, encryption, audit, compliance, monitoring.
35. Migration Strategy
Create a migration strategy from [current system] to [target system].
Include: phases, risk mitigation, data migration, testing, rollback, timeline.
36. Documentation Architecture
Create an architecture documentation template for [project type].
Include: system overview, component diagrams, data flow, decisions, runbooks.
## Documentation Prompts (12)
### 37. README Generator
Generate a README.md for [project] in [language/framework]. Include: overview, installation, usage, API docs, contributing, license. Tone: clear, developer-friendly, comprehensive.
### 38. API Documentation
Document this API endpoint: [paste code/route] Include: description, parameters, request/response examples, errors, authentication.
### 39. Code Comments
Add meaningful comments to this code: [paste code] Include: why decisions were made, complex logic explanations, TODOs for improvements.
### 40. Changelog Generation
Generate a changelog from these commits/changes: [paste commits or describe changes] Format: Keep a Changelog style (Added, Changed, Fixed, Removed).
### 41. Architecture Decision Record
Write an ADR for this decision: [describe decision] Include: context, decision, alternatives considered, consequences, status.
### 42. Onboarding Documentation
Create onboarding documentation for new developers joining [project]. Include: setup, architecture overview, key concepts, common tasks, troubleshooting.
### 43. Runbook Creation
Create a runbook for [system/process] with [operations team]. Include: procedures, troubleshooting, escalation, monitoring, recovery steps.
### 44. Technical Specification
Write a technical specification for [feature/system]. Include: requirements, design, data model, API changes, testing, rollout plan.
### 45. Incident Report
Write an incident report for [incident description]. Include: timeline, impact, root cause, resolution, prevention, action items.
### 46. Code Documentation Standards
Create code documentation standards for [language/framework] team. Include: inline comments, function docs, module docs, style guide, tools.
### 47. User Guide Creation
Create a user guide for [application feature] for [user type]. Include: overview, step-by-step, screenshots, troubleshooting, FAQ.
### 48. Migration Guide
Write a migration guide for upgrading from [version] to [version]. Include: breaking changes, new features, upgrade steps, rollback, testing.
Testing Prompts (12)
49. Unit Test Generation
Write unit tests for this function/code:
[paste code]
Include: happy path, edge cases, error handling, mocking, assertions.
Framework: [Jest/Pytest/JUnit/etc].
50. Integration Test Plan
Create an integration test plan for [feature/system].
Include: components tested, scenarios, data setup, assertions, environment needs.
51. Test Strategy Document
Create a test strategy for [project/system].
Include: test types, coverage goals, tools, environment, CI integration, responsibilities.
52. Edge Case Identification
Identify edge cases for this feature/function:
[paste code or describe feature]
Include: boundary values, error conditions, concurrency, data variations.
53. Mock/Stub Generation
Generate mocks/stubs for this dependency:
[paste code/interface]
Include: mock setup, behavior definitions, assertion helpers, reset logic.
54. Performance Test Plan
Create a performance test plan for [system/API].
Include: load scenarios, metrics, tools, thresholds, environment, reporting.
55. Security Test Plan
Create a security test plan for [application].
Include: OWASP checks, authentication testing, authorization, input validation, scanning.
56. Regression Test Suite
Create a regression test suite for [feature/system].
Include: critical paths, smoke tests, full regression, maintenance schedule.
57. Test Data Generation
Generate test data for [scenario]:
Include: realistic data, edge cases, volume, privacy considerations, seeding approach.
58. BDD Scenario Writing
Write BDD scenarios for this feature: [describe feature]
Format: Given-When-Then.
Include: happy path, alternative flows, error scenarios.
59. Test Coverage Improvement
Suggest improvements for this test suite:
[paste test code or describe coverage gaps]
Include: untested paths, missing assertions, flaky tests, refactoring needs.
60. E2E Test Plan
Create an end-to-end test plan for [user workflow].
Include: user journeys, browser support, data setup, assertions, reporting.
## DevOps Prompts (12)
### 61. Docker Configuration
Create a Dockerfile for [application] in [language/framework]. Include: base image, dependencies, build steps, runtime, health checks, security.
### 62. Kubernetes Deployment
Create Kubernetes manifests for [application]. Include: deployment, service, ingress, configmap, secrets, HPA, resource limits.
### 63. Terraform Configuration
Write Terraform for [infrastructure] on [cloud provider]. Include: resources, variables, outputs, modules, state management, best practices.
### 64. GitHub Actions Workflow
Create a GitHub Actions workflow for [project]. Include: triggers, jobs, steps, caching, secrets, deployment, notifications.
### 65. Monitoring & Alerting Setup
Design monitoring for [system] with [SLA requirements]. Include: metrics, logs, traces, alerts, dashboards, escalation, tools.
### 66. Incident Response Playbook
Create an incident response playbook for [system/service]. Include: detection, triage, communication, resolution, post-mortem, prevention.
### 67. Infrastructure as Code Review
Review this infrastructure code (Terraform/CloudFormation/etc): [paste code] Include: security, cost, best practices, drift detection, improvements.
### 68. Deployment Strategy
Design a deployment strategy for [application] to [environment]. Include: blue-green/canary/rolling, rollback, feature flags, database migrations.
### 69. Cost Optimization
Suggest cost optimizations for this cloud infrastructure: [describe current setup] Include: instance sizing, reserved capacity, spot instances, storage, networking.
### 70. Backup & Recovery Plan
Create a backup and recovery plan for [system/data]. Include: backup frequency, retention, storage, testing, RTO/RPO, disaster recovery.
### 71. Log Aggregation Strategy
Design a log aggregation strategy for [distributed system]. Include: log format, collection, storage, search, alerting, retention, tools.
### 72. SRE Reliability Plan
Create an SRE reliability plan for [service] with [SLI/SLO targets]. Include: SLIs, error budgets, toil reduction, automation, capacity planning.
API Design Prompts (12)
73. REST API Design
Design a REST API for [resource/entity] with [operations].
Include: endpoints, HTTP methods, request/response schemas, status codes, pagination.
74. GraphQL Schema
Design a GraphQL schema for [application] with [entities].
Include: types, queries, mutations, subscriptions, resolvers, N+1 prevention.
75. API Authentication
Design authentication for this API: [describe requirements].
Include: OAuth2/JWT/API keys, token management, scopes, rate limiting, security.
76. API Versioning Strategy
Design an API versioning strategy for [application].
Include: versioning scheme, deprecation policy, migration path, documentation.
77. Webhook Design
Design a webhook system for [use case].
Include: event types, payload format, retry logic, security, registration, delivery guarantees.
78. API Rate Limiting
Design rate limiting for [API] with [requirements].
Include: algorithm, limits per tier, headers, error responses, bypass mechanisms.
79. API Error Handling
Design error handling for [API] with [error scenarios].
Include: error format, HTTP status codes, error codes, messages, logging, recovery.
80. Real-time API Design
Design a real-time API for [use case โ chat/notifications/etc].
Include: WebSocket/SSE choice, connection management, scaling, fallbacks.
81. File Upload API
Design a file upload API for [application].
Include: multipart handling, size limits, virus scanning, storage, progress, resumable uploads.
82. API Documentation
Create comprehensive API documentation for [API].
Include: overview, authentication, endpoints, examples, errors, SDKs, changelog.
Format: OpenAPI/Swagger.
83. API Testing Strategy
Create an API testing strategy for [API].
Include: contract testing, integration testing, load testing, security testing, monitoring.
84. Migration from Legacy API
Create a migration plan from [legacy API] to [new API].
Include: compatibility layer, phased rollout, client communication, rollback plan.
## Performance Optimization Prompts (16)
### 85. Frontend Performance Audit
Audit this frontend code for performance: [paste code or describe app] Include: bundle size, rendering, lazy loading, caching, Core Web Vitals, tools.
### 86. Backend Performance Optimization
Optimize this backend code/endpoint for performance: [paste code or describe endpoint] Include: query optimization, caching, async processing, connection pooling.
### 87. Database Performance Tuning
Tune this database for performance: [describe database and workload] Include: indexing, query optimization, connection pooling, partitioning, caching.
### 88. Caching Implementation
Implement caching for [application/component]. Include: cache strategy, invalidation, TTL, tools (Redis/Memcached), monitoring.
### 89. CDN Strategy
Design a CDN strategy for [application]. Include: static assets, dynamic content, edge caching, invalidation, performance metrics.
### 90. Image Optimization
Optimize images for [application/website]. Include: format selection, compression, lazy loading, responsive images, CDN delivery.
### 91. Bundle Optimization
Optimize this JavaScript bundle for production: [describe current bundle] Include: tree shaking, code splitting, minification, analysis tools, impact.
### 92. Load Testing Strategy
Create a load testing strategy for [application/API]. Include: scenarios, tools (k6/Locust/etc), metrics, thresholds, environment, reporting.
### 93. Memory Optimization
Optimize memory usage in this code: [paste code] Include: memory profiling, leak detection, garbage collection, object pooling.
### 94. Concurrency Optimization
Optimize this code for concurrency: [paste code] Include: async/await, parallel processing, thread pools, lock contention, race conditions.
### 95. API Response Optimization
Optimize API response times for [endpoint]. Include: pagination, field selection, compression, connection reuse, CDN, caching.
### 96. Performance Monitoring Setup
Set up performance monitoring for [application]. Include: APM tools, metrics collection, dashboards, alerting, baseline, reporting.
### 97. Core Web Vitals Optimization
Optimize Core Web Vitals for [website/application]. Include: LCP, FID/INP, CLS improvements, tools, measurement, priorities.
### 98. Scalability Testing
Design a scalability test for [application]. Include: horizontal scaling tests, database scaling, load balancer, auto-scaling validation.
### 99. Performance Budget
Create a performance budget for [project]. Include: metrics, thresholds, monitoring, CI integration, enforcement, reporting.
### 100. Architecture Performance Review
Review this architecture for performance concerns: [describe architecture] Include: bottlenecks, single points of failure, scaling limits, optimization opportunities.
How to Use These Prompts
- Copy the prompt โ Don't modify the structure
- Fill in the brackets โ Replace [placeholders] with your specifics
- Paste real code โ AI works best with actual code context
- Specify your stack โ Language, framework, and tools matter
- Iterate on solutions โ First suggestion isn't always the best
Pro Tips
- Be specific about your stack โ "React 18 with TypeScript" beats "frontend"
- Include error messages โ Exact errors lead to exact solutions
- Ask for trade-offs โ Every solution has pros and cons
- Request tests โ Always ask for test cases alongside fixes
- Check for security โ Always ask "is this secure?" after any solution
Get more prompts with our 100 ChatGPT Prompts for Students or explore 179 Best Free Online Tools for developer tools.
Related Articles
๐ Reading Stats
Words
2,580
Reading Time
๐ 13 min
Published
Aug 16, 2026