This prompt

Clear Spec to Code
Act as a senior software engineer.
Write clean and maintainable code for this requirement:
[Describe the feature clearly]

Language/Stack: [Specify]
Constraints: [Performance, libraries, style, compatibility]
Requirements:
- Prefer clarity over cleverness
- Handle common edge cases
- Use readable names
- Keep functions focused

Related prompt

Generate code for this task:
[Describe task]

Before writing the code, list your assumptions.
Then write the solution.
If any requirement is ambiguous, say so instead of guessing.

All Coding prompts

Bug Diagnosis Prompt

Give the model the error, the code and what you expected. It ranks likely causes by evidence, tells you how to confirm each, and proposes a minimal fix.

View prompt →

Security Review

Review this code for common security issues. Focus on input validation, injection risks, secrets handling and unsafe defaults.

View prompt →

Unit Test Writing Prompt

Produces a case inventory first, then readable tests that check behavior at the boundaries, with suspected bugs flagged instead of encoded as passing.

View prompt →