agentsclimarketplace

Simplicity audit

Skill Vix0007/vixero-skills/skills/simplicity-audit

Token-efficient Agent Skills for Claude — Pillar 1: meta-skills ≤650t, Pillar 1.5: coding discipline

Install
npx -y skills add Vix0007/vixero-skills --skill simplicity-audit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Review code for premature abstraction, speculative features, and over-engineering. Use when the user asks "is this overcomplicated", "simplify this", "does this need all these layers", "review for over-engineering", "flatten this", or pastes a file asking for a complexity review. Returns a complexity ratio, flagged patterns, and a flattened rewrite for the worst offender.

SKILL.md

4.3 KB, as published. Nobody here has run it

simplicity-audit

Flag complexity not earned by a stated requirement.

Trigger on

  • "is this overcomplicated"
  • "simplify this"
  • "does this need X"
  • "review for over-engineering"
  • "flatten this"
  • "too many layers"

Universal patterns to flag

patternflag when
single-use abstractionABC / Protocol / Strategy used in exactly one place
speculative parametersflags / options never called from anywhere
defensive error handlingtry/except for conditions that cannot occur
premature generalizationgeneric machinery serving one concrete case
config theatresettings file holding values that never change
wrapper theatrewrapper whose only method calls the underlying
dataclass theatreclass with 2 fields, no methods, used once
builder theatrebuilder pattern when a constructor has 3 args
factory theatrefactory returning one concrete type 100% of the time
manager theatreXManager / XHandler wrapping a function that could be the function
enum-for-twoEnum with exactly two values used as bool
indirection for mockabilityinterface existing only to let tests mock
premature asyncasync/await on code that never actually awaits anything
generic-for-onegeneric type parameter only ever instantiated with one concrete type

Language-specific patterns

languagepattern
PythonUnion[X, X], bare Any on parameters, unused TypeVar, __init__ that only assigns, ABC with one implementation
TypeScriptany spreading through signatures, interface I { x: T } + class C implements I (used once), enum when literal union works
Javagetter/setter on every field with no logic, factory class returning one concrete type, XxxService + XxxServiceImpl pair with no second impl
Gointerface satisfied by one struct, empty struct wrapping one field, constructor returning &T{} with no logic
Rusttrait with one impl, wrapping Arc<Mutex<T>> when Arc<T> works, Builder for 2-field structs

Process

  1. Scan file for each pattern.
  2. For each hit, estimate lines saved by flattening.
  3. Compute complexity ratio: (lines serving stated purpose) / (total lines).
  4. Pick the worst offender by savings. Write its minimal equivalent.
  5. Rank all flags by absolute line savings.

Output

file: {name}
language: {lang}
total lines: {n}
lines serving stated purpose: {n}
complexity ratio: {pct}

flagged patterns (ranked by savings):
1. {pattern} at line {n}: {description} — save ~{n} lines
2. {pattern} at line {n}: {description} — save ~{n} lines
3. ...

worst offender — minimal rewrite:
```{lang}
{the flattened version}

verdict: {lean | minor overbuild | significant overbuild | rewrite from scratch} reasoning: {one line}


## Verdict thresholds

| complexity ratio | verdict |
|------------------|---------|
| ≥ 70% | lean (may still have minor flags) |
| 50–69% | minor overbuild (apply top 2 flags) |
| 30–49% | significant overbuild (apply all flags) |
| < 30% | rewrite from scratch (bones are wrong) |

## Hard rules
- Complexity is suspect, not forbidden. If user states a requirement needing it, accept.
- Tests and fixtures never flag — test scaffolding is not production complexity.
- Type hints do not flag unless they are theatre (Union[X,X], unused TypeVar, bare Any on parameters).
- Never simplify code whose purpose you cannot read. Ask first.
- If complexity ratio > 70%, return "lean" and stop. Do not invent flags to fill output.
- If the file is a library / framework / SDK, apply looser thresholds — generalization there may be earned.
- Abstractions explicitly marked as extension points (`# extension point` comments, plugin interfaces) do not flag.
- If the file is under 30 lines, skip and say "too small to overbuild".
- When proposing a rewrite, preserve public signatures. The caller's code must not change.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.