So I've added unit tests, e2e tests, formatting checks to help Claude to self-correct as much as possible. And I make him do a TON of self-review, after each feature I say something like:
> You are a master reviewer, lots of practical experience. Read Clean Code. Great at architecture. Read Effective Typescript as well. What would you comment in a PR review? Type checking MUST PASS, unit tests must PASS, formatting must PASS.
With each review, Claude catches a lot of sub-optimal choices it made which gives me more confidence in the code I get in the end.