factory-function-composition
Installation
SKILL.md
Factory Function Composition
This skill helps you apply factory function patterns for clean dependency injection and function composition in TypeScript.
Related Skills: See
method-shorthand-jsdocfor when to move helpers into the return object. Seerefactoringfor caller counting and inlining single-use extractions.
The Universal Signature
Every factory function follows this signature:
function createSomething(dependencies, options?) {
return {
/* methods */
};
}