Tech News
← Back to articles

Show HN: I've asked Claude to improve codebase quality 200 times

read original related products more articles

Have you seen one of the experiments where people have been re-feeding the same image to the AI agent a bunch of times?

Or Marques Brownlee's youtube videos where the video is reuploaded a 1000 times?

Over the Thanksgiving weekend I had some time on my hands and tasked Claude to write an app that guestimates macronutrients in some foods based on description + photo. There's some interesting setup in getting it right, but that's boring. It has created a great, functional app for me, but then I forced it to do a small, evil experiment for me.

I've written a quick script that looped over my codebase and ran this command.

set -euo pipefail PROMPT= "Ultrathink. You're a principal engineer. Do not ask me any questions. We need to improve the quality of this codebase. Implement improvements to codebase quality." MAX_ITERS= "200" for i in $( seq 1 " $MAX_ITERS " ); do claude --dangerously-skip-permissions -p " $PROMPT " git add -A if git diff --cached --quiet; then echo "No changes this round, skipping commit." else git commit --no-verify -m "yolo run # $i : $PROMPT " fi done

...and havoc it wrecked. Over 200 times of unmitigated madness. I have tweaked the prompt here and there when I've been seeing it overindexing on a single thing, but with enough iterations it started covering a lot of ground.. from full code coverage and more tests than functional code, to rust-style Result types, to.. estimating entropy of hashing function (???).

This was running for around 36 hours and took me some time to grok through, but let's see what it did. The entire repo is here btw. The branch you're looking for is highest-quality .

The app

This app is around 4-5 screens. Take a photo, add description, get AI response. Simple as that.

Pure numbers

... continue reading