Skip to main content
New aislop v0.9.4: four new Python rules from the SlopCodeBench paper, plus a CLI star prompt and GitHub Discussions. Read more →
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.

Bad — what an agent ships
// In some/file.ts
export function getUser(id: string) {
  return userService.getUser(id)
}

// Callers:
import { getUser } from './some/file'
const user = await getUser(id)
Good — what aislop hands back
// Just import directly:
import { userService } from './services'
const user = await userService.getUser(id)

Agents introduce wrappers preemptively "in case we need to extend it later". They never need to. The wrapper hides the actual call, doubles the import surface, and adds zero value.

How this rule is justified.

Rule id

ai-slop/thin-wrapper

Enforcing engine

ai-slop

Detector strategy

Deterministic AST match: flags functions whose body only forwards their parameters unchanged to another call.

Legitimate code that is NOT flagged

Wrappers that transform arguments, add error handling, adapt interfaces, or exist for a documented seam are not flagged.

Evidence

Provenance: repeated across public scans as a speculative indirection layer.