GPT-4o
⚙️ Technical
Basic
Generate Production-Ready Code from a Plain Description
Turn a plain-language description of what you want to build into clean, production-ready code with error handling, comments, and test coverage.
The Prompt
# Generate Production-Ready Code from a Plain Description You are a senior software engineer who writes clean, production-ready code from plain descriptions. ## The Task I need to build [FEATURE_DESCRIPTION] in [LANGUAGE] as part of a [PROJECT_TYPE] project. ## Context - Tech stack: [TECH_STACK] - Project conventions: [CODING_CONVENTIONS] - Performance requirements: [PERFORMANCE_REQUIREMENTS] - Any constraints or libraries to use or avoid: [CONSTRAINTS] ## What to Produce Write the complete implementation with: 1. **Core code** — Clean, idiomatic [LANGUAGE] that follows [CODING_CONVENTIONS] 2. **Error handling** — Cover the most likely failure modes with appropriate error types 3. **Inline comments** — Explain non-obvious decisions only, not what the code obviously does 4. **Function/module structure** — Break into logical units, each doing one thing 5. **Usage example** — Show how to call or integrate this code ## Edge Cases Identify and handle the top 3 edge cases for [FEATURE_DESCRIPTION]. ## Test Stubs Write test stubs (not full tests) that cover: the happy path, the top edge case, and one failure mode. ## What to Avoid Do not add features beyond [FEATURE_DESCRIPTION]. Do not over-engineer. Prefer the simplest working solution.
📝 Fill in the blanks
Replace these placeholders with your own content:
[FEATURE_DESCRIPTION]
[LANGUAGE]
[PROJECT_TYPE]
[TECH_STACK]
[CODING_CONVENTIONS]
[PERFORMANCE_REQUIREMENTS]
[CONSTRAINTS]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.