← ClaudeAtlas

interface-pollution-checklistlisted

Use when writing, reviewing, or refactoring Go types and interfaces in stapler-squad to catch Java/Spring-shaped leaky abstractions before they merge — speculative interfaces, interfaces defined next to their implementation, no-op getters/setters, forwarding-only wrappers, unjustified generics, and struct-wraps-struct-wraps-struct.
tstapler/stapler-squad · ★ 1 · Code & Development · score 64
Install: claude install-skill tstapler/stapler-squad
# Interface Pollution — Catch Leaky Abstractions Before They Merge This repo is written almost entirely with Claude Code. LLMs default to Java/Spring-shaped abstractions — interfaces-first, Repository/Manager/Service layering, getter/setter pairs — which don't mesh with Go's data model and make code harder to maintain, not easier. Review every new type/interface an LLM introduces against this checklist before merging. ## When to Use This Skill - Reviewing a PR or diff that adds a new Go interface, `Manager`/`Handler`/`Processor`/ `Service` type, or generic function/type - Writing new Go code yourself and deciding whether a concept needs an interface at all - Doing a `quality:architecture-review` or `code:review` pass over Go changes ## The 6 Smells to Detect 1. **Speculative interface** — an interface with exactly one implementation and no near-term second one. 2. **Interface defined next to its implementation** — declared in the same package as the concrete type that satisfies it, rather than in the package that consumes it. 3. **No-op getter/setter** — an accessor method that only reads or writes a field with no validation, computation, or invariant enforcement. 4. **Forwarding-only wrapper** — a `Manager`/`Handler`/`Processor`/`Service` type whose methods each call straight through to another type with no added behavior. 5. **Unjustified generic** — a generic function or type used at a single call site that a concrete type or a plain loop would expres