This Coding Tool Kills AI Code Slop

Syntax| 00:08:56|Apr 29, 2026
Chapters6
Introduces the CLI tool and its goal of reducing code slop by identifying dead code, duplicates, and architectural issues.

A fast Rust-based CLI called OW helps kill AI-generated code slop by finding dead code, duplicates, and boundary violations, with easy autofix and CI/VS Code integrations.

Summary

Syntax’s editor walks through a practical workflow for taming AI-generated code growth with the OW CLI. Gently poking at the nuisance of AI refactors that accumulate unused exports, types, and dead code, the video demonstrates how OW’s dead code, dupes, and health commands surface concrete cleanup targets. It’s built in Rust for speed, and you can run it with npx ow followed by subcommands like dead code, dupes, and health, even enabling autofix. The demo shows a real project where unused exports, unused TypeScript types, and an unused dependency are revealed, with a clear file-and-line report that makes automated cleanup feasible. Boundary-violation checks let you encode UI-to-database or cross-folder rules in a JSON preset, letting AI agents flag violations before code reviews. The dupes feature uncovers cross-file and cross-folder duplications, with modes such as as-bashed, weak, and semantic for flexible matching. Health provides refactoring targets based on code complexity and potential impact, while autofix shows the exact plan before applying changes. The video also highlights rich ecosystem support: SCSS, Tailwind analysis, agent skills, Cloud Code hooks, a VS Code extension, CI hooks, health badges, and 90+ built-in plugins for popular stacks like NextJS, NestJS, Gatsby, and more. The takeaway is clear: OW is a practical ally for maintaining lean code in AI-assisted workflows, and it’s fast enough to run continuously in CI or local development.

Key Takeaways

  • OW is a Rust-based CLI that runs with npx ow and delivers fast static analysis for codebases targeted by AI-generated changes.
  • Dead code reports show unused exports, unused TypeScript types, and unused dependencies with exact file and line references to enable precise cleanup.
  • Boundary violations can be encoded using globs in a JSON file, helping enforce architectural boundaries before AI refactors land in code.
  • Dupes uses as-based tokenization (and options like weak and semantic modes) to detect cross-file or cross-folder cloned code, helping AI reuse and refactor more effectively.
  • Health targets propose concrete refactor opportunities (e.g., removing five exports to shrink a module’s surface area) based on measurable metrics like complexity and potential impact.
  • Autofix can be previewed with dry-run mode, showing exactly what will change before applying changes to the codebase.
  • OW supports a broad ecosystem with 90 built-in plugins and integrations for tools like SCSS, Tailwind, VS Code, and popular frameworks (Next.js, NestJS, Gatsby, etc.).

Who Is This For?

Frontend and backend developers who work with AI-assisted code generation, teams aiming to trim bloat from refactors, and CI/CD engineers seeking fast, actionable cleanup feedback without waiting on lengthy code reviews.

Notable Quotes

"AI loves to just create endlessly, never deleting code. And if it does, you may get 10 lines deleted, 2,000 lines added."
Sets up the problem of AI-generated bloat that OW addresses.
"This tool is a CLI that finds all kinds of things like dead code, code duplication, architectural boundary issues, and tons of things that AI loves to do."
Describes the core capabilities of OW.
"The best part is is that because it's a definitive here's the file, here's the line, here's the thing that is wrong. It makes it absolutely trivial for AI to go clean it up."
Highlights the precise, actionable nature of OW reports.
"If we run npx ow and then dead code... it’s going to generate a report."
Demonstrates how the dead code subcommand works in practice.
"There’s also the ability to autofix stuff... you can see exactly what the plan is going to be here."
Shows autofix preview and the safety net before applying changes.

Questions This Video Answers

  • How does OW identify dead code and unused exports in a TypeScript project?
  • Can OW enforce architectural boundaries with boundary violation checks in CI?
  • What are the differences between as-based, weak, and semantic modes for the dupes command in OW?
  • How can I use OW with a VS Code extension and 90+ plugins for my stack?
  • Is autofix in OW safe to use in a production codebase, and how do I preview changes before applying them?
AI code slopdead codecode duplicationboundary violationscode healthautofixVS Code extensionCI integrationOW CLITailwind analysis
Full Transcript
AI loves to just create endlessly, never deleting code. And if it does, you may get 10 lines deleted, 2,000 lines added. And so what many Vibe coders see is that even when asking the AI to refactor something, it actually usually ends up in a net ad of code rather than removal. What the heck is this thing doing? I most recently talked about this massive amount of code as being an issue in my 37,000 lines of slop video. So, that video was quite a bit of critique. This video, I want to take an opportunity to talk about a tool that can help fight that slop. And that tool is check this thing out. is a CLI that finds all kinds of things like dead code, code duplication, architectural boundary issues, and tons of things that AI loves to do. So, I'm going to show you this thing in action, and we're going to talk all about it. First and foremost, the biggest question on your mind, is it fast? Well, it's built in Rust, so that means you know it's fast. It actually is very fast all things uh considered. The benchmarks do be benchmarking. Now, using FOW is dead simple. You just run npxow and then there's a number of different tools like dead code, dupes, health and you can even have it autofix. Let's talk about the first one which is dead code. So I have a codebase here and this codebase was not totally vibe coded but mostly vibecoded and we can run npxow and then dead code. When I run this what it's going to do is it's going to generate a report. This is going to find anything from unused files to duplicated exports or TypeScript uh unused TypeScript types. And it says in their docs that most projects find 50 plus unused exports on the first run. So what are my results? 15 exports, 19 types, and one unused dependency and one testonly dependency. Apparently I have D3 array in here and I've never used it. I don't know why I have D3 and array in here, but it is. And if we check this out, it's going to give you a detailed report. Unused type exports. Now, this is really great because every single time that AI writes something, changes course, and doesn't clean up after itself, that dead code is just sitting there. It's polluting your context. It's making the results worse over time because there's this stuff that's unnecessary just sitting in your codebase, but the agents might as well think these things still exist. Now from here we have a detailed report and you can have an AI skill that goes ahead and runs this after each commit and then cleans up after itself. But the best part is is that because it's a definitive here's the file, here's the line, here's the thing that is wrong. It makes it absolutely trivial for AI to go clean it up. Now, another neat feature of the dead code tool is the boundary violations. You can actually write your fellow JSON file to determine what the boundaries are as in never should the UI code import something from the database folder or never should it import from these folders and it uses globs to do that. There's a number of built-in presets here that you can use. Uh or you can easily write your own with your individually tuned preset or just folder structure. So that way when AI is working, it can run your boundary violations code and it can report back to the agent, hey, there's been a boundary violation. And and I say this about in the context of AI, but like we've all had team members who just willy-nilly do stuff. I mean, importing a server something to somewhere should be a problem. And it's really cool that you can put this into your CI and warn everybody that something wrong is going down. Therefore, giving the user the chance to fix it without it getting caught in a code review because we know that code reviews can take a long time and if the tools find the errors before a user does, then it's easier to fix. And honestly, it's probably better for personalities, too, if the robot is telling you your sucks. Now another really cool tool in here is the dupes command. Now dupes is really interesting because again another thing AI loves to do is write something once and then oh it needs that same kind of function in another folder. Let me just write it here too. Oh and let me just write it here too even though it's already in this codebase. It's not going to scan your whole codebase every single time unless you're really strict with it. So let's go ahead and run npxow and then it's dupes. And by default, what it is is an abbased tokenization to find clones. You can see here that it has found some serious issues. Now, not all of these are things you'll want to always fix, and that's a good thing because this tool is highly configurable in how exactly it is finding duplications. Because sometimes those duplications like oh hey it's found this line of code that is duplicated from 231 to 244 on the aggregation file. It's also in the same file as uh 328 to 338. That's a prime target for something that is going to be refactored. And this is one of those tools that you will want to when you're first getting used to it, verify and validate that the things that you are seeing are in fact actual issues, but also how you like to code. I have found this tool as being really helpful for an AI that refuses to reuse functions. What's interesting here too is that there's even cross language support across Typescript and JavaScript files. By default, it does use asbased tokenization in finding clones. However, the other modes like weak, which is a straight up string value differ or a semantic one that tries to uh find duplicated code that was copied and then adapted with new variable names, right? So, you can use this thing and try it out in different types of ways. Really cool stuff. Now, there's also a health command. And when we run this, it's going to give you some refactoring targets. You can see, check this thing out. Again, this is not an AI just going off and making these judgments. This is based on both dead code complexity, how much the effort is going to be, and how high of a confidence it has in that the fact that this will improve this code. For instance, in this date normalization file, it says remove five used exports to reduce its surface area. Wow. Now, if that's clear instructions that an AI could handle, a junior developer could handle those instructions. And I think it's really super cool that these tools exist in this way. And the one thing I absolutely love about this tool is how fast it is. Meaning that you can just keep running it. You can have agents run it. You can run it personally, put in your CI, any of that sort of stuff. Now, there's also the ability to autofix stuff. So, if we run npx fowix hyphen dry hyphen run, it's going to show us what it's going to do. Now, autofix tools kind of freak me out a little bit for some reason, but you can see exactly what the plan is going to be here. So, if I then run this without the dry run, hit enter, I can go ahead and check my codebase, and it's going to clean this thing up. I can check my code. And if we look at the actual changes here, you can see it's not that it removed this entirely, it's that we don't need to export this. So, of course, it just removed the export. So, really cool stuff. I'm going to use this tool regardless if I'm working with AI or not. Now, other neat things in here are SCSS and Tailwind Analysis. They recently added agent skills as well, so you can go ahead and add yourow skills directly to your AI agent, meaning that you don't have to write them yourself, and your agent will just know how to run. There's also Cloud Code hooks, which are super handy if you want this stuff to run on a hook when things changed, as well as a VS Code extension, CI integration, and even health badges. Now, another thing I really appreciate about here is that there's 90 builtin plugins. That means that most of the things that you use will just work. And I'm talking about spelt kit, Gatsby, Astro, Angular, Expo, NextJS, NestJS, Nitro, Capacitor, Sel, uh, Vess, and the bundlers. V, Webpack, RS pack, RS build, roll up, roll down, TS up, TS down, uh, linting. It works with all the llinters. My gosh, it works with all the darn stuff. So, check this thing out. This tool fights slob.

Get daily recaps from
Syntax

AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.