Claude Code Testing Tools: 5 Free GitHub Repos That Catch Bugs

By Beau Johnson··9 min read

Quick answer

The five repos are ast-grep, Probity, fast-check, StrykerJS, and Playwright CLI. Each one gives Claude Code a way to check its own work, and if you only add one, I'd add Playwright CLI on anything with a screen.

In this video I count down five free GitHub repos that make Claude Code check its own work before it tells you it's done. It's for anyone building with Claude who has seen green tests and still ended up with a bug. We planted bugs in a small pricing app and ran each tool in a sandbox, using the commands Claude would run, so nothing touched my real accounts.

What I cover in this video

  • 0:00 Why Anthropic still makes Claude check its own work, and why green tests still miss bugs
  • 0:45 ast-grep: turning a correction you keep repeating into a rule
  • 3:02 Probity: a hook that denies the commit when the tests never ran
  • 5:20 fast-check: property tests that make up the inputs for you
  • 6:53 StrykerJS: planting tiny bugs to see if your tests notice
  • 9:10 Playwright CLI: a real browser Claude can click through
  • 10:42 The yearly price bug the unit tests missed
  • 11:27 The order I'd install them in

A rule and a gate: ast-grep and Probity

Anthropic says Claude writes and reviews about 90% of the Claude Code team's code, and they still make it check its own work. Their post on verification has a name for one fix: turning misses into rules. ast-grep (16,628 stars as of Nov 19, 2026, MIT license) is one way to do that.

Normal grep reads text. ast-grep turns every file into a syntax tree, so spacing and line breaks don't matter. You write a pattern that looks like normal code with a hole in it, like parseFloat($X), and save it as a short YAML rule with a message and a severity. Then the scan runs every rule over the whole project and fails when one hits:

ast-grep scan

On our pricing app we wrote two rules: no parseFloat, because prices are whole cents, and no leftover console.log. The scan found 3 errors in 68 milliseconds, including a console.log spread across three lines, and exited with an error code. The downside is it matches the shape of code, not what the code means, so it only catches mistakes you already know about. Its separate Claude Code skill repo has no license file, so I'd use the tool itself.

Claude can still skip a check completely, and that's what Probity is for. It has about 250 stars, an MIT license, and comes from Nizar Selander, who also made TDD Guard. It plugs into Claude Code as a hook that fires before every file write and every shell command. When Claude is about to run git commit, Probity reads the session to see whether the tests ran after the last change. If they didn't, Claude gets told no with a reason it can act on.

We fed it a fake session where the agent edited a file and went straight to commit. It was denied with the reason run npm test after your last change before committing. The same session with the tests run after the edit went through, and rm -rf got denied too. Two things to know: the install is almost 800 MB, and its main test-first rule uses an AI check through your own Claude login, so it spends usage. We didn't run that one. The pattern rules we used cost nothing. And a hook can force the order, but it can't make the tests any good.

Tests that are harder to fool: fast-check and StrykerJS

When Claude writes a test, it picks the examples, and those are only the cases it already thought of. fast-check (5,290 stars, MIT) flips that around. You write a rule that should always be true, like turn a price into text and back again and you get the same price. fast-check makes up the inputs, 100 runs by default, and leans toward weird values like zero and huge numbers. When one breaks, it shrinks the input to a simpler case and prints a seed so you can replay the exact failure.

On our app, all five normal unit tests passed and the property failed on the first run. $4,096.86 came back one cent short, after 7 shrinks. The cause was floating point math, the same parseFloat problem from the ast-grep rule. We replayed the seed, got the same failure, fixed the parser, and all six passed. fast-check is for JavaScript and TypeScript. For Python the library is Hypothesis, and Anthropic's post names both.

StrykerJS (3,398 stars, Apache 2.0) tests the tests. Coverage tells you a line ran. It doesn't tell you a test would notice if that line was wrong. Stryker makes tiny bugs on purpose, called mutants, like a plus becoming a minus, then runs your tests against each one. If a test fails, the mutant is killed. If every test still passes, it survived, and that's a bug your tests would let through.

On our pricing app it made 26 mutants. Our five tests, a little weak on purpose, killed 15, a score of about 58%. One survivor turned the yearly price from times 12 into divided by 12 and every test still passed. One more file with three edge case tests got us to about 77%. Two of the six left can never be killed because the change gives the exact same answer, so don't let Claude chase 100%. It gets slow on a real project, so point it at the files you changed and run it before a pull request, not on every save.

Playwright CLI: check the app while it's running

Every check so far works on the code and the tests. None of them looks at your app running. Anthropic's post says if you have to focus on one test type, pick end to end, because either the whole feature works or it doesn't. The post never names Playwright, so treat this as one more way to do it.

Playwright CLI from Microsoft (15,309 stars, Apache 2.0) is the command line version built for coding AI agents. Running playwright-cli open starts a real browser that stays open between commands. Instead of dumping the whole page into Claude's context, it saves a snapshot to a file with a short ref for every button and field, like e9. Claude acts on those refs and reads only the part it needs, which is why Microsoft says it's lighter on tokens than their MCP server. It also collects screenshots, console errors, and a video with the actions labeled.

Our pricing page says save 20% with yearly billing. We ran three seats on yearly and the page said $684. It should be $547.20. The discount never got applied, and the unit tests were all green because the bug was in the page, not the pricing code. We highlighted the wrong total and saved the screenshot as the receipt.

Two warnings. There's an attach mode that hands the agent your real logged-in Chrome, and I would never test with that. Keep it on the throwaway browser it opens by default. It's also not version 1 yet and changes fast, so pin the version.

Key takeaways

  • If you add one, add Playwright CLI, on anything with a screen.
  • Add ast-grep the second you catch yourself typing the same correction twice.
  • Use fast-check on anything with money or dates, and StrykerJS before a big pull request.
  • Add Probity if you want no commit without tests to be a rule. Just know the test-first rule spends usage.
  • One rule from Anthropic's post I'm stealing: if a check is still failing after three rounds, Claude stops and brings in a human.

FAQ

Which testing tool should I add to Claude Code first?

I'd add Playwright CLI first on anything with a screen. Anthropic's post says if you have to focus on one test type, pick end to end, and in our test Playwright CLI found a wrong yearly price that the unit tests missed.

What is mutation testing with StrykerJS?

StrykerJS makes tiny bugs on purpose, called mutants, and runs your tests against each one. If every test still passes, that mutant survived, which means your tests would let that bug through. On our pricing app the first score was about 58%, and three more edge case tests got it to about 77%.

Does Probity use my Claude usage?

Its main test-first rule uses an AI check through your own Claude login, so that one spends usage. The pattern rules we used, like denying a commit when the session never ran the tests, cost nothing.

Are these five GitHub repos free for commercial use?

Yes. ast-grep, Probity, and fast-check are MIT licensed, and StrykerJS and Playwright CLI are Apache 2.0. The one exception to watch is ast-grep's separate Claude Code skill repo, which has no license file.

Chapters

  1. 0:00Claude still checks its own work
  2. 0:33Number 5: ast-grep
  3. 2:28Night Crew Studio
  4. 2:51Number 4: Probity
  5. 5:05Number 3: fast-check
  6. 6:56Number 2: StrykerJS
  7. 9:15Number 1: Playwright CLI
  8. 11:15Which ones I'd actually install

Transcript

Read the full transcript

0:00Anthropic says Claude writes and reviews about 90% of the Claude code team's code, and they still make it check its own work. These five free repos give you that kind of check. One denies the commit until the tests run. One plants bugs to test your tests, and one clicks through your app like a real user. No, the fix isn't more tests. Green tests still miss bugs. So in this video, I'm counting down all five, ending on the one test type Anthropic says to pick. We bugged a pricing app and ran the commands Claude would run. Let's jump right into it. So number five is AST Grep with over 16,000 stars and an MIT license. It's basically one developer, Harrington Dark home, and lately he's been shipping a

0:45new version every week or two. You know how you tell Claude the same thing over and over? Don't use parse float on money. Take out your console. logs. And two sessions later, it does it again. Anthropic's post has a name for fixing that, turning misses into rules. This is one way to actually do it. So normal grep just reads text. AST grep reads code. Step one, it turns every file into a syntax tree, basically the shape of the code. So spacing and line breaks don't matter, only the structure. Step two, you write a pattern that looks like normal code with a hole in it, like parse float of dollar sign X, and that X matches anything. Step three, you save it as a rule, a short YAML file with a message and a severity. And step four,

1:32AST grep scan runs every rule over the whole project and fails when one hits. So Claude can run it before it says done, or a hook or your CI runs it for you. So on our little pricing app, we wrote two rules. Prices are whole cents, so no parse float and no leftover console. log. The scan found three errors, including a console. log that was spread across three lines, and the same simple pattern still caught it. It took 68 milliseconds and exited with an error code, which is exactly what you want from a gate. The downside is it matches the shape of code, not what the code means. It only catches mistakes you already know about. And AST Grep's own Claude Code skill doesn't have a license file. So I'd just use the tool itself,

2:17which is MIT. So that's a rule that catches the same miss every single time. But Claude can still skip the check completely unless something stops it at the door. Blueprint, Clay Studio, [music] Chalk Talk, Neon Noir, Retro Arcade. Every one of these came out of the same app. Night Crew Studio has 14 looks built in. And if none of them fit your brand, you describe your own in plain words, and it builds it. So you pick a look, you give it a topic, and it makes the whole short on your Mac, on your own Claude plan. Night Crew Studio. Join at nightcrew.studio. So number four is Probity with about 250 stars, the smallest one here. It's from one engineer in Sweden, Nizar Salander. He also made TDD Guard, which has over

3:022,300 stars. And he says TDD Guard grew into Probity. So you can ask Claude to run the tests before it commits. And in my experience, most of the time it will. Probity is for the times it doesn't. So it plugs into Claude Code as a hook, a little script that fires before every file write and every shell command. So step one, Claude is about to run git commit, and Claude Code hands that action to Probity first. Step two, Probity reads the session itself so it can see whether the tests actually ran after the last change. Step three, it checks your rules. And if a rule crashes, it blocks instead of letting it slide. And step four, if the action breaks a rule, Claude gets told no with a reason it can act on, like run the

3:48tests first. If it passes, Probity just gets out of the way and your normal permission prompts take over. It never approves anything on its own. And it only checks what the agent does. So a commit you type yourself goes straight through. And Anthropic's post says their own team built a commit gate that can block a commit if the session never ran a code review or a verify step. That's their in-house version. Probity is one you can install today. So we fed it exactly what Claude code would hand it, a fake session where the agent edited a file and went straight to git commit, denied with the reason run npm test after your last change before committing. Then the same session with the tests run after the edit let through. And rm -rf got denied too.

4:33After the first cold start, each decision took about a fifth of a second. So its main rule is test first, and that one uses an AI check through your own Claude login, so it spends usage. We didn't run that one. The pattern rules we used cost nothing. The install is heavy, almost 800 megabytes, because it ships the agent programs for Claude, Codex, and Copilot. And the last release was back in September. To be fair, a hook can force the order. It can't make the tests any good. So what does a test look like that's a lot harder for Claude to game? So number three is fast check with over 5,000 stars. It's nine years old, still mostly one developer, Nicholas Doubian, and he shipped a new version this week. And it's the one repo in this video that Anthropic's post names directly. When

5:20Claude writes a test, it picks the examples, $12.50, $1,000. And those are only the cases it already thought of. Fast check flips that around. Step one, instead of examples, you write a rule that should always be true, like turn a price into text and back again and you get the same price. Step two, fast check makes up the inputs, 100 runs by default, and it leans toward weird values on purpose, zero, huge numbers, edge cases. Step three, when one breaks, it shrinks it, simplifying the input over and over while it still fails so you get a simpler case you can actually read. And step four, it prints a seed so you can replay that exact failure every time. So we gave it that exact rule on pricing app. All five normal unit tests

6:07passed. The property failed on the first run. $4,096.86 came back 1 cent short, and it shrank it seven times to get there. And remember that parse float rule from number five? That's the bug, floating point math. Then we replayed the seed, got the same failure, fixed the parser, and all six passed. So Claude can still pick the easy examples. It just doesn't get to pick these ones. So the downside is a property is only as good as the rule you write. A weak rule passes weak code, and it's random, so a different run can find a different example. Save the seed. It's for JavaScript and TypeScript. For Python, the library for this is Hypothesis, and Anthropic's post names that one, too. So now Claude writes tests that are harder to fool. But how

6:53do you know any of those tests would catch a bug at all? So number two is Stryker JS with nearly 3,400 stars, Apache 2. It's 10 years old from a team in the Netherlands, and on NPM it went from about 5 and 1/2 million downloads a week to over 7 million in four weeks. That's up 32%. So coverage tells you a line ran during your tests. It doesn't tell you a test would notice if that line was wrong. One developer posted that their agent wrote 48 tests with 99.4% coverage, and in production they still got double charges. So Stryker basically tests the tests. Step one, it makes tiny bugs on purpose called mutants. A plus becomes a minus, greater than or equal

7:39becomes greater than, an if statement becomes always true. Step two, it puts every mutant into one build and switches them on one at a time, so it doesn't rebuild your project for each one. Step three, it runs your tests against each mutant. If a test fails, that mutant is killed. If every test still passes, it survived, and that's a bug your tests would let right through. And step four, you get a score and a report that shows every survivor right in your code. So for Claude, that list of survivors is a to-do list. Write a test that kills this one. Run it again. On our pricing app, Stryker made 26 mutants. The five tests we wrote, a little weak on purpose, killed 15. 11 survived, a score of about 58%. And one survivor turned the yearly

8:25price from times 12 into divided by 12, and every test still passed. Come on now. So, we added one file with three edge case tests, ran it again, and it went up to about 77%. Two of the six left can never be killed because the change gives the exact same answer. So, don't let Claude chase 100%. Can you agree? So, the downside is speed. Our tiny app took two seconds, but on a real project, it reruns your tests over and over on almost every core you have. One developer on X said Claude's love of lots of wordy tests turns it into a real drag. So, point it at the files you changed and run it before a pull request, not on every save. And so far, every check in this video works on the

9:10code and the tests. None of them has ever looked at your app actually running. So, number one is Playwright CLI from Microsoft with over 15,000 stars and an Apache 2 license. Its top contributor is Pavel Feldman, and his own GitHub bio says he created Chrome DevTools and then Playwright. Now, I showed Playwright's MCP server in my 100X Claude code video. This is the command line version Microsoft built for coding agents. So, Anthropic's post says it's straight. If you have to focus on one test type, pick end-to-end because either the whole feature works or it doesn't. The post never names Playwright. For web changes, it points to the Claude Chrome extension. Playwright CLI is just one more way to do it. Step one, Playwright

9:55CLI open starts a real browser that stays open between commands. Step two, instead of dumping the whole page into Claude's context, it saves a snapshot to a file, a list of every button and field with a short tag like E9. Step three, Claude acts those Fill E9 with three. Check E14. Claude only reads the part it needs, which is why Microsoft says it's lighter on tokens than their MCP. And step four, it collects receipts, screenshots, console errors, and even a video of every click with the actions labeled. So, remember our pricing app? The page says save 20% with yearly billing. We ran the same commands Claude would run. Three seats, yearly. The page said $684. It should be $547.20.

10:42We searched the page for the right price. No matches found. The yearly discount never got applied, and the unit tests were all green because the bug was in the page, not the pricing code. Then we highlighted the wrong total and saved the screenshot. That's the receipt. So, there's also an attach mode that hands the agent your real logged-in Chrome, and I would never test with that. Keep it on the throwaway browser it opens by default. It's not even version one yet, and it changes fast, so pin the version. And every command Claude runs still uses some of your usage, just less. So, which ones would I actually install? Playwright CLI first on anything with a screen. If you add one, add that one. Then AST grep, the second you catch yourself typing the same correction

11:27twice. Fast check on anything with money or dates. Striker before a big pull request. And Probity if you want no commit without tests to be a rule. Just know the test first rule spends usage. Every repo is linked down below. And one more rule from Anthropic's post I'm stealing. If a check is still failing after three rounds, Claude stops and brings in a human. So, what's the worst time Claude told you it was done and it wasn't? Drop your story down below. I read everyone. And a like on the way out helps more builders find these five. Have a blessed day.

Ready to start building with AI?

Join the Shipping Skool community free. Paid members get live bootcamp calls every week and weekly-updated courses.

Join Shipping Skool

Keep reading