AI-SLOP-Detector: A Linter for AI-Generated Code
A young Python repo flags empty functions, fake docs, and inflated comments in AI-generated code. Here's how to use it, and where it falls short.
What you will learn
- What "AI slop" looks like in code and why existing linters miss it
- How to install and run flamehaven01/AI-SLOP-Detector on a repo
- The three signals it checks: empty functions, fake documentation, inflated comments
- Where the tool falls short and what it can't catch
- How to wire it into a pre-commit or CI step
Why do normal linters miss AI-generated slop?
You have seen it. A coding agent returns a 200-line pull request, the tests pass, the CI badge stays green, and three days later you find a function named process_data with a docstring that says "Processes the data" and a body that says pass. Or a helper that returns None with a comment explaining that the real implementation is "left as an exercise."
ESLint, Ruff, Pylint, and friends are built to catch style violations, unused imports, and type mismatches. They are not built to catch intent-shaped noise — code that looks complete because it has all the syntactic furniture of a finished function but no actual behavior. AI-SLOP-Detector is a small Python project that tries to fill exactly that gap. According to its GitHub description, it "detects empty functions, fake documentation, and inflated comments in AI-generated code" and is labeled "production-ready."
That is the pitch. The reality is a young repo — GitHub Trending surfaced it with 101 stars and Python as the language — so treat "production-ready" as a claim to verify, not a guarantee. But the problem it points at is real, and the approach is worth understanding even if you decide to write your own checks.

How do you install and run AI-SLOP-Detector?
The repo is at flamehaven01/AI-SLOP-Detector. Because it is a Python project, the usual path applies. Clone it and install in editable mode, or install from the source tree:
git clone https://github.com/flamehaven01/AI-SLOP-Detector.git
cd AI-SLOP-Detector
pip install -e .Then point it at a directory. The exact CLI flags are worth checking against the README before you wire it into anything automated — the project is young and interfaces can shift. A typical invocation looks like:
ai-slop-detector ./srcIf the entry point differs, the README is the source of truth. The important thing is what the tool is looking for. Based on the repo description, it runs three families of checks:
- Empty functions. Functions whose bodies are
pass,...,raise NotImplementedError, or a barereturnwith no logic, especially when the signature and docstring suggest real work. - Fake documentation. Docstrings that restate the function name, describe parameters that do not exist, or promise behavior the body does not implement.
- Inflated comments. Comments that narrate obvious code, claim complexity that is not there, or explain why in ways that do not match what the code does.
That is a heuristic linter, not a proof. It will produce false positives on legitimate stubs and interface definitions, and false negatives on slop that is syntactically busy but semantically empty. Use it as a review aid, not a gate you trust blindly.
What does a real slop finding look like?
Consider this function, which is the kind of output agents produce when they are asked to "add a caching layer" and hedge:
def get_cached_user(user_id: int) -> dict:
"""
Retrieve a user from the cache.
This function implements a high-performance caching
strategy to minimize database load.
"""
# TODO: implement actual caching
passA normal linter sees a valid function with a docstring. AI-SLOP-Detector sees an empty body, a docstring claiming performance work that does not exist, and a comment that admits the gap. That is the exact pattern the tool is built to surface.
The fix is not to silence the warning. It is to delete the function or implement it. The value of the tool is that it forces that decision during review instead of six weeks later in production.
Where does it fall short?
Three honest limitations. First, it is new. A repo with roughly a hundred stars and a single contributor is not the same as a mature linter with years of edge-case fixes. Expect the rule set to be coarse. Second, it is Python-only in its current form, which limits it in polyglot repos where the worst slop often lives in TypeScript or Go. Third, it cannot catch the most dangerous slop: code that is syntactically complete, passes tests, and is logically wrong. A function that returns the wrong value confidently will sail through.
That last gap matters because the tooling around AI agents is maturing fast. If you are running agents in parallel, you already know review bandwidth is the bottleneck — see agentbox: Run Dozens of Claude Code Agents in Parallel and Cezar Runs Claude Code, Codex and More in Parallel. A slop detector is a cheap triage layer before human eyes. It is not a substitute for them.
For teams thinking harder about what "good" AI-assisted code looks like, the broader argument in AI Codes Better Than Most Devs. That Was Never the Job. is the right frame: the job is judgment, and tools like this one only help if you use them to sharpen it.
Should you add it to your workflow?
Yes, with caveats. Run it as a non-blocking check in CI first. Collect a week of findings, look at the false-positive rate on your own codebase, and only then decide whether to make it a pre-commit hook. If you are generating a lot of code with agents, the signal-to-noise ratio will likely be good enough to justify the friction.
If you want a more mature review stack, pair it with the kind of safety and provenance thinking covered in Vestige: A Safety Kernel That Makes AI Agents Show Their Work. Slop detection catches the embarrassing stuff. Provenance and review catch the rest. Neither is enough on its own, and anyone telling you otherwise is selling something.
Discussion
Add a comment