Run it on a throwaway system, pick a codebase you’ve always wanted to fix something about but didn’t have the time. Like you wanted to do a major refactoring or do a library migration to a better maintained library. Or you want to rewrite part of a program in rust for performance/security improvements.
The hardest part for me is sometimes it is hard to write what I want in a prompt; but you don’t have to put everything into the prompt, you can make a code edit as an example and then say; look at this diff, it is doing X; look for and apply this some transformation across codebase Y
If you have a good codebase, AI will have good patterns to follow and will produce pretty good code; and you can quickly iterate on the results (maybe over new context windows) and get high quality code that looks very close, if not indistinguishable from the pre-existing code.