skills/design-patterns/creationals/pattern-builder/SKILL.md
Teaches and applies the Builder creational design pattern — constructing complex objects step by step, allowing different representations using the same construction process. Trigger: When building complex objects with many optional parameters or multi-step construction.
npx skillsauth add johnnystefan/test-saas-business pattern-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Constructs complex objects step by step. It allows producing different types and representations of an object using the same construction code.
class Car {
public seats: number = 0;
public engine: string = '';
public gps: boolean = false;
}
interface Builder {
reset(): void;
setSeats(n: number): void;
setEngine(e: string): void;
setGPS(g: boolean): void;
}
class CarBuilder implements Builder {
private car: Car = new Car();
reset() {
this.car = new Car();
}
setSeats(n: number) {
this.car.seats = n;
}
setEngine(e: string) {
this.car.engine = e;
}
setGPS(g: boolean) {
this.car.gps = g;
}
getProduct(): Car {
return this.car;
}
}
tools
Zustand 5 state management patterns. Trigger: When implementing client-side state with Zustand (stores, selectors, persist middleware, slices).
databases
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
development
Vitest unit testing patterns with React Testing Library. Trigger: When writing unit tests for React components, hooks, or utilities.
tools
Vite 8 (Rolldown-powered) build tool configuration, plugin API, SSR, and migration guide. Trigger: When working with vite.config.ts, Vite plugins, building libraries, or SSR apps with Vite.