Skip to main content
New aislop v0.13.1 patch — calibrates hidden-fallback detection and fixes regex comment-masker false positives. Read the changelog →

AI Slop patterns.

AI coding agents leave specific tells behind: comments that restate the next line, as any casts, swallowed errors, dead imports, todo stubs, generic variable names. We named them. aislop catches them deterministically — across 14 patterns, in 8 language targets, on every edit. Each pattern below links to an evidence-backed page with its rule id and provenance.

$ npx aislop scan
3 of 14 auto-fixable
ai-slop/narrative-comment auto-fixable

Narrative comment

A multi-line comment block that walks through what the function does in prose. The signature already says it; the prose is decorative.

View pattern →
ai-slop/trivial-comment auto-fixable

Trivial comment

A single-line comment that restates exactly what the next line of code does. Removing it changes nothing for the reader.

View pattern →
ai-slop/swallowed-exception manual fix

Swallowed exception

A try/catch where the catch block is empty or only contains a comment — failures vanish silently with no log, no rethrow, no recovery.

View pattern →
ai-slop/unsafe-type-assertion manual fix

Unsafe type assertion

An `as any` cast — bypasses TypeScript's checker entirely. Every guarantee from the type system is gone for that value forward.

View pattern →
ai-slop/double-type-assertion manual fix

Double type assertion

An `as unknown as X` cast — a double-cast escape hatch used when the compiler refuses a direct `as X`. Smuggles types through without validation.

View pattern →
ai-slop/ts-directive manual fix

Unexplained TypeScript directive

A `@ts-ignore`, `@ts-expect-error`, or `@ts-nocheck` directive without a reason comment. Silences the type checker on that line forever.

View pattern →
ai-slop/todo-stub manual fix

Orphan TODO stub

A `// TODO` without an owner, ticket, or completion plan. The kind that survives years.

View pattern →
ai-slop/generic-naming manual fix

Generic naming

Variables and parameters named `data`, `result`, `value`, `temp`, `obj`, `info`, `item`. Names that say "this is a noun" without saying which noun.

View pattern →
ai-slop/unused-import auto-fixable

Unused import

An import that no remaining code references. Usually left over after a refactor or a deletion the agent forgot to follow through on.

View pattern →
ai-slop/console-leftover manual fix

Console leftover

`console.log` (or `print`, in other languages) left in production code after debugging.

View pattern →
ai-slop/empty-function manual fix

Empty function

A function with no body — usually a placeholder the agent stubbed to make a signature compile and forgot to fill in.

View pattern →
ai-slop/unreachable-code manual fix

Unreachable code

Code after a `return`, `throw`, `break`, or `continue` that can never execute.

View pattern →
ai-slop/constant-condition manual fix

Constant condition

An `if` or `while` whose condition is a constant — `if (true)`, `while (false)`, `if (1)` — leaving a dead branch in the source.

View pattern →
ai-slop/thin-wrapper manual fix

Thin wrapper

A function that exists only to call another function with the same arguments — no transformation, no added value, just an extra layer.

View pattern →

Score your repo.

One command. 0–100 score. Every pattern above, every change. Auto-fix what's mechanical, hand off the rest with full context.

npx aislop scan