Adaptable structures.
FOR EXPLAINING CODE
"Explain what this code does, line by line, for someone who knows [language] but not this codebase."
FOR DEBUGGING
"Here is the code and the error. What are the likely causes? How would I distinguish between them?"
FOR WRITING CODE
"Write [what] in [language]. Requirements: [list]. Include error handling. Comment anything non-obvious. Flag anything I should review for security."
That last instruction is worth including always.
FOR REVIEW
"Review this code. Identify: security issues, missing error handling, and anything that would fail on unexpected input. Do not rewrite it."
FOR DOCUMENTATION
"Write documentation for this. Reader: [who]. Include what it does, how to use it, and what can go wrong."
FOR A SCRIPT
"Write a script that [does what]. Include a dry-run option that shows what it would do without doing it."
THE ALWAYS-VERIFY RULE
Test everything. Never run generated code against anything that matters without understanding it.