kindlings-factory-instance
OfficialFactory-based typeclass instances for lean macros
Authorkubuszok
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Factory instance pattern replaces heavy per-type anonymous class emissions in macro-generated type class derivations with single, reusable factory methods. This reduces the number of generated .class files, speeds up compilation, and simplifies the runtime footprint when deriving for many types.
Core Features & Use Cases
- Monomorphic type classes (kind *) use ordinary lambdas to create final instances in a single static factory.
- Polymorphic type classes (kind * -> *) use Witness types to enable erasure-based factories that work across all A and F[_] instances.
- Macro-codegen integration: replace new TypeClass[A] { ... } with CatsDerivationFactories.instanceA calls to emit lambdas instead of per-type classes.
Quick Start
Refactor macro code to replace new TypeClass[A] { ... } with CatsDerivationFactories.instanceA calls.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: kindlings-factory-instance Download link: https://github.com/kubuszok/kindlings/archive/main.zip#kindlings-factory-instance Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.