skills/design-patterns/creationals/abstract-factory/SKILL.md
Teaches and applies the Abstract Factory creational design pattern — producing families of related objects without specifying their concrete classes, ensuring product compatibility. Trigger: When creating families of related objects or enforcing product compatibility constraints.
npx skillsauth add johnnystefan/test-saas-business pattern-abstract-factoryInstall 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.
Allows producing families of related objects without specifying their concrete classes. It ensures that the products you obtain from a factory are compatible with each other.
interface Chair {
hasLegs(): boolean;
}
interface Sofa {
hasCushions(): boolean;
}
// Abstract Factory
interface FurnitureFactory {
createChair(): Chair;
createSofa(): Sofa;
}
// Concrete Family: ArtDeco
class ArtDecoChair implements Chair {
hasLegs() {
return true;
}
}
class ArtDecoSofa implements Sofa {
hasCushions() {
return true;
}
}
class ArtDecoFactory implements FurnitureFactory {
createChair(): Chair {
return new ArtDecoChair();
}
createSofa(): Sofa {
return new ArtDecoSofa();
}
}
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.