A small repo ships with a failing test. Use Claude Code to find the bug, fix it, and confirm the test goes green. This is the everyday debugging loop: reproduce, understand, fix, verify.
Run this to drop the broken repo at /root/brokenrepo/:
curl -fsSL https://raw.githubusercontent.com/Esc-Bash/project-init-scripts/main/claude-code/project-2/init.sh | bash
The folder holds stats.sh (a script that is supposed to sum the numbers in a
file) and test.sh (a self-contained test). The test is failing right now.
Always confirm the failure before you change anything:
bash /root/brokenrepo/test.sh
You will see it report a wrong sum and exit non-zero.
Let Claude read the code and the test, then reason about the mismatch. Start the console in the repo:
cd /root/brokenrepo
claude
A good prompt hands it the evidence and asks for a diagnosis first:
test.sh fails against stats.sh. Read both, explain why the sum is wrong, then fix stats.sh. Do not change test.sh.
Review the change, then run the test yourself again to verify:
bash /root/brokenrepo/test.sh
stats.sh reports the correct sum, so test.sh prints PASS and exits 0. Only
stats.sh should change: the test defines correct behavior and stays as is.
Press Submit once bash /root/brokenrepo/test.sh passes.
Your lab setup
This VM comes with Claude Code preinstalled and signed in - just run claude to start.
Start the lab on the right to run checks.