Show HN: AISlop, a CLI for catching AI generated code smells (github.com)
47 points by Heavykenny an hour ago
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.
fishgoesblub 8 minutes ago
Apparently I need to check in with a Doctor because code written by myself is seen as AI, and the lazy AI bits aren't. More Human than Human?
ronbenton 4 minutes ago
Petition to rename this “SlopCop”
bigfishrunning 39 minutes ago
A linter with rules for AI-specific weirdness is absolutely a great idea, thank you! Are there any plans to support other languages besides javascript?
Heavykenny 33 minutes ago
Thank you. I currently support up to 8 languages: php, go, rust, python, js and ts
MonstraG 17 minutes ago
thats 6?
ryandrake 10 minutes ago
xnorswap 2 minutes ago
genghisjahn 16 minutes ago
Retr0id 12 minutes ago
ryandrake 5 minutes ago
I think a lot of the telltale signs of AI can be found in the comments. Besides the slop writing style, I've found AI comments to 1. be overly verbose, 2. unnecessarily describe before/after code state (# This function used to do foo, but now it does bar), and 3. reference its own internal "plan" (# This function is part of Stage 3 of the implementation of Use Case X from the requirements doc) WTF is Stage 3? - says code reader 2 years from now. Although I bet you can probably prompt these behaviors away.
macNchz 4 minutes ago
I don’t see if this is one of the covered cases, but one of the more common and nefarious patterns I run into is what you might call "sweeping exceptions under the rug." I think the agent’s motivation to get things running encourages these antipatterns of designing routines that are fault tolerant in a sort of maladaptive way: e.g. catching an error, logging a warning that something didn’t work, and continuing, but with now potentially missing/broken state.
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!
vinnymac 10 minutes ago
I tried it but see a lot of false positives.
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.
sync 17 minutes ago
I tried it on my codebase. There's a lot of overlap with tools like Oxlint / ESLint, I'm not sure that's too valuable vs. a more focused tool that actually focuses solely on 'slop' signals. These lint rules tend to get very opinionated which is why those tools expose so many configuration options.
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.
Heavykenny 10 minutes ago
thanks for this catch, really appreciate. Can you create an issue on GitHub so you can easily track when I resolve this?
eithed 21 minutes ago
Can you explain the benefits of running this over rector / eslint? (and to certain degree phpstan / deptrac)
throw03172019 28 minutes ago
> I’ve been building aislop.
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.
Heavykenny 15 minutes ago
haha. I love the name - aislop
Retr0id 10 minutes ago
Forgot to switch accounts?
beart 6 minutes ago
hootz an hour ago
Ran it in my codebase, detected some good stuff, was able to pass the issues to my agent so they can be validated and fixed. Good job!
I'd love for it to have flags for Pi and Crush too :)
Heavykenny 32 minutes ago
Thank you, really appreciate.
maddhruvhn 16 minutes ago
awesome work, someone is caring about using less token :clap:
Der_Einzige 35 minutes ago
Related, we made "Antislop", a framework for removing repetitive phraseology from LLMs: https://arxiv.org/abs/2510.15061
elpocko 15 minutes ago
>They aren’t syntax and passes most tests
What?
pixel_popping 36 minutes ago
The intent is good, but frankly, credibility is lost by using "slop" words imo, OP you might seriously want to re-evaluate who is the target market, probably users that leverage high automation 24/7, startups and so-on, they don't want to incorporate products that talks about the modern way (and somehow only way to compete) of development as "slop" imo because soon enough, it's not true anymore (it's already not true with the right tooling).
trollbridge 16 minutes ago
Imagine an operating system company making a product called “quick and dirty”.
hootz 33 minutes ago
Yeah, to be honest, it really is a bit weird to incorporate a tool called slop into a corporate CICD flow. Anubis fixed a similar problem by creating a corp-safe version without the anime mascot.
Aurornis 27 minutes ago
> Anubis fixed a similar problem by creating a corp-safe version without the anime mascot.
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.
hootz 2 minutes ago
axod 40 minutes ago
I don't think this approach is wise.
Concentrate on code quality, and whether it does what it needs to do. Not whether it was written by AI or not.
Heavykenny 35 minutes ago
Thanks, I actually concentrated on improving code quality, the patterns I flagged are poor design choices that humans wouldn’t write. Examples are duplicated functions doing same thing, dead or redundant codes etc. These builds up and degrade the codebase over time.
axod 33 minutes ago
> ...are poor design choices that humans wouldn’t write.
They certainly do in my experience. Maybe you've been lucky and haven't worked with really messy programmers.
Heavykenny 25 minutes ago
bigfishrunning 36 minutes ago
I'm interpreting this not as a "catch ai submissions gotcha" tool, but as a "last pass in review catch mistakes AI made that i may have missed" tool. Having more linters is a good thing IMO (I say this as someone who doesn't use AI to generate code, but works with people who do and has to review a lot of AI generated code)