How to Make Claude Code Test Its Own Code Before You Merge
The Claude Code best practice most people skip: make it test its own code. Add a definition-of-done rule to CLAUDE.md so no feature counts as done until Kane CLI verifies it in a real browser. Claude builds, Kane CLI tests, and you get proof before you merge. 👉 Get Kane CLI: https://www.testmuai.com/kane-cli/?utm_source=youtube&utm_medium=video&utm_campaign=claude-code-kane-cli-test-every-feature How to use Claude Code effectively when you build an app with it: ✅ CLAUDE.md "definition of done": Claude Code has to pass a Kane CLI run in a real browser before calling a feature done ✅ Tricky math: a $100 three-way split checked to the cent ($33.34 + $33.33 + $33.33) ✅ Bad inputs: empty, negative and non-numeric amounts each show the right error, and nothing gets saved ✅ State that survives a page reload (localStorage) ✅ Page health: console errors, failed network requests, LCP / CLS / INP ✅ Email-code sign-in: Kane CLI reads the 6-digit code from the inbox ✅ Dark theme visibility check ✅ Saving the flows as reusable tests and running them all ✅ A PR with Kane CLI evidence links for every run, merged with proof ⚡ Install: npm i -g @testmuai/kane-cli 📘 Kane CLI quickstart: https://www.testmuai.com/docs/kane-cli-quickstart ⏱️ Chapters 00:00 Does Claude Code's code actually work? 00:10 The workflow: Claude Code builds, Kane CLI tests 00:18 Claude Code builds the app + CLAUDE.md definition of done 00:44 Test the tricky math: three-way split to the cent 01:40 Bad inputs: validation errors caught 02:10 Does state survive a page reload? 02:34 Page health: console, network & Core Web Vitals 02:52 Sign in with an email code (OTP) 03:04 Dark theme check 03:20 Save tests & run them all with Kane CLI 03:54 Open the PR with evidence links & merge 04:18 Claude Code best practice: add a definition of done #ClaudeCode #KaneCLI #AITesting #TestAutomation #AgenticCoding




Join the discussion
Have something to add?
Sign in to reply, follow this thread, and earn XP when your answer helps someone.