Show HN: AISlop, a CLI for catching AI generated code smells
Hi, I’m Kenny, I’ve been building aislop. I starting working on this after using Claude Code, codex and opencode several times and noticing some slops. They aren’t syntax and passes most tests, they are patterns like empty catch blocks, useless comments, duplicated helpers, dead code and many more. So I built a tool to scan and check for these patterns and wired it into hooks so after each tool call, the agent checks for the slops.You can try it out with npx aislop scan.It’s all local and no code is transferred. Thank you.
57 points by Heavykenny - 45 comments
Everyone should be doing regular code reviews and this helps a lot.
(Not that I think you didn't probably already know that.)
This has bitten me a couple of times, and it’s surprisingly annoying to nudge agents into good/resilient patterns or identify situations that should fail loudly, at least in my experience. The retry mechanisms they come up with on their own are often pretty terrible as well.
I’ll note, though, that I have seen this from human engineers plenty of times, and at least the AI usually adds some logs rather than just totally silently absorbing an exception!
This made me chuckle.
Cool tool, the dead code checks can be very helpful. I’ve seen Claude leave unused functions when iterating which always frustrates me.
> Don't post generated comments or AI-edited comments. HN is for conversation between humans.
One real bug tho:
> [ERROR] Imports "mdast" but it's not declared in package.json
A type-only import like `import type { Blockquote, RootContent } from 'mdast';` is actually acceptable if `"@types/mdast": "^4.0.4"` is included in the package.json.
I'd love for it to have flags for Pi and Crush too :)
One funny thing I see it doing is deleting seemingly random comments lines, for example if a file has a comment that spans multiple lines but doesn’t use a multi line comment syntax. It just chooses one at random transforming the once useful comment into slop.
I wouldn’t say they fixed it. Rather it was an intentional choice to put an anime girl on websites unless you paid for the product.
Concentrate on code quality, and whether it does what it needs to do. Not whether it was written by AI or not.
They certainly do in my experience. Maybe you've been lucky and haven't worked with really messy programmers.