At the start of prompt before project requirements I copy paste paragraph about the code I want.
No emojis, no comments, no console log statements, no read me file, no error handling. Act as a senior developer working with other experienced developers.
Otherwise it happily generates bunch of trash that is unreadable. Error handling generated will most of the times just hide errors instead of actually dealing with them.