hearth-collection-map

Create IsCollection and IsMap providers for external collection types in Hearth derivation macros.

68|7|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/kubuszok/kindlings --skill hearth-collection-map
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hearth-collection-map
Source: https://github.com/kubuszok/kindlings/tree/main/docs/contributing/hearth-collection-map
Command: npx skills add https://github.com/kubuszok/kindlings --skill hearth-collection-map

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating IsCollection and IsMap providers for external collection types (e.g. cats NonEmptyList, NonEmptyMap). Helper method pattern, runtime helper pattern, fromUntyped matching, SBT reload.

Core Features & Use Cases

  • Macro-based integration for external collection types treated as collections or maps by derivation macros.
  • Patterns include helper methods to avoid path-dependent types, runtime helpers for newtypes, and fromUntyped wrappers for cross-compiled type matching.
  • Example use: integrating NonEmptyList/NonEmptyMap into Hearth derivation to support encoding/decoding in macros.

Quick Start

Follow the guide to implement a new collection integration by registering IsCollection.Provider implementations and wiring build/runtime helpers.

Frequently Asked Questions about hearth-collection-map

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate external collection types like Cats NonEmptyList into Scala macro derivation?

Integrating external collection types like Cats NonEmptyList into Scala macro derivation requires creating IsCollection and IsMap providers to let the derivation system recognize them as collections or maps.

What is the helper method pattern for avoiding path-dependent types in Scala macro quotes?

The helper method pattern for avoiding path-dependent types in Scala macro quotes involves wrapping type references to ensure the macro-based derivation system can safely resolve external collection types during compilation.

How do I set up IsCollection and IsMap providers for types that don't extend Iterable?

Setting up IsCollection and IsMap providers for types that don't extend Iterable involves registering custom Provider implementations and wiring build and runtime helpers to integrate them into the derivation pipeline.

Can I use fromUntyped matching for cross-compilation between Scala 2 and Scala 3?

Yes, you can use fromUntyped wrappers for cross-compilation between Scala 2 and Scala 3 to ensure consistent type matching for external collection types across both compiler versions.

What's the difference between maps and collections ordering in macro derivation?

The difference between maps and collections ordering in macro derivation dictates whether the provider implementation treats the external type as an indexed sequence or a key-value structure during encoding and decoding.

Why do I need runtime helpers for Newtypes when integrating external collections?

Runtime helpers for Newtypes are needed when integrating external collections to bridge the gap between compile-time macro extraction and actual value manipulation during the derivation process.