Write a function

Get clean code from a spec.

chatgptclaude
You are an expert [language] developer. Write a function that [does what]. Inputs: [describe]. Output: [describe]. Handle edge cases and errors, follow idiomatic style, add brief comments, and include 2-3 example calls with expected results. Explain any key decisions in one line.

How to use this prompt

  1. Tap Copy prompt above.
  2. Replace the [bracketed] parts with your own details.
  3. Paste it into chatgpt, claude.