This this this. You can ask it to write a test. You can ask it to fix it, if the test does not pass. You can ask it to check whether the code it wrote makes sense, and it will surely find most times that there is something to improve. Urgh, it's not "one prompt and done".