
What counts as a code smell
A code smell is a structural pattern that makes code harder to read, change, or trust — without necessarily being a bug. The classic examples: duplicated code (the same logic in more than one place, so a fix has to be made more than once), long methods and files (too much doing too much to hold in your head), dead code (unused functions, unreachable branches, commented-out blocks left "just in case"), deep nesting (four-plus levels of if/for that hide the actual logic), and inconsistent conventions (the codebase disagreeing with itself about naming, formatting, or structure).
What unites them is cost, not correctness. Each one is a small tax on every future change to that area of the code, and they compound: a long file that's also duplicated and inconsistent is far harder to work with than any one of those problems alone. That's why smells are worth finding before they force a painful refactor rather than after.
The most common smells in real repos
When we ran the clean·vibes rules engine over 549 public self-described AI- and vibe-coded repos, the most common smells were remarkably consistent: commented-out code appeared in 59.2% of repos, deep nesting in 53.6%, files past ~600 lines in 56.1%, cross-file duplication in 46.4%, and in-file repetition in 41.2%. More than half the corpus carried at least one duplication finding, and half carried dead code.
The pattern is telling: the most common smells are the ones that accumulate silently. Nobody decides to leave commented-out code or let a file grow past a thousand lines — it just happens, one small addition at a time, because each individual step works. That's exactly why a checker helps: it makes the slow accumulation visible in one pass instead of waiting for it to become a rewrite.
Finding smells across a whole repo
Some smells are visible in a single file — a long method, deep nesting — and a good linter or a careful read will catch those. The expensive ones aren't: cross-file duplication, a module nobody imports anymore, a codebase that's inconsistent between its halves. Those only exist at the repo level, so finding them means reading the whole tree, not one file at a time.
That's what clean·vibes does: paste a GitHub link and it scores the codebase across six categories that map directly onto the common smells — structure and size, readability and complexity, duplication, dead code, consistency, and repo hygiene — then lists each smell with its file, line, and a one-paste fix prompt. You get the whole-repo picture in under a minute, and a clear order to tackle it in.
Common code smells and where clean·vibes catches them
| Smell | Why it costs you | clean·vibes category |
|---|---|---|
| Duplicated code | One fix has to be made in many places | Duplication |
| Long files & methods | Too much to hold in your head at once | Structure & size |
| Dead / commented-out code | Noise that hides the code that matters | Dead code & leftovers |
| Deep nesting | The real logic is buried levels down | Readability & complexity |
| Inconsistent conventions | The codebase disagreeing with itself | Consistency & style |
frequently asked
Is a code smell a bug?
No. A code smell is code that works but signals a maintainability problem — a reason to look closer, not proof something's broken. Bugs make the app wrong; smells make it expensive to change. A checker finds smells; tests find bugs.
What's the most common code smell?
In our scan of 549 vibe-coded repos, commented-out code was the most common (59.2% of repos), closely followed by deep nesting, oversized files, and cross-file duplication. They're the smells that accumulate silently, one small addition at a time.
How do I find code smells in my project?
For per-file smells, a linter helps. For the repo-level ones — cross-file duplication, dead modules, inconsistency — paste your GitHub link into clean·vibes: it scores the whole codebase across six smell categories and pins each finding to a file and line with a fix.
Should I fix every smell?
No — fix the ones that cost you. A smell in code you rarely touch matters less than one in the file you edit weekly. clean·vibes ranks findings by severity and category so you can start where the maintainability tax is highest.
Last updated July 16, 2026