gof-builder
Installation
SKILL.md
One-line summary
Separate the construction of a complex object from its representation — letting the same construction process produce different results, and replacing "telescoping constructors" with a fluent, readable assembly.
When to use this skill
- An object has many constructor parameters (more than ~4), several of which are optional.
- Construction proceeds in steps (build the burger, then add toppings, then wrap it) and the steps may vary.
- You want callers to read like a recipe rather than fight a constructor signature.
- The Kotlin DSL idiom —
html { head { … } body { … } }— is a builder.
When NOT to use this skill
- The constructor takes 1–3 parameters and a single call is clearly readable.
- The language already gives you a better tool — Kotlin's named arguments + default parameter values eliminate Builder for most cases. Reach for Builder only when the construction is genuinely staged (intermediate validation, type-safe step ordering).
- You're building a single immutable value object —
data classwith named args is almost always enough.