hearth-standard-extensions

Guard Hearth standard extension loading once per macro bundle.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures Hearth standard extensions are loaded exactly once per macro bundle to avoid repeated initialization and noisy logs, using a per-bundle loading pattern.

Core Features & Use Cases

  • Per-module LoadStandardExtensionsOnce trait to guard extension loading
  • Centralized initialization across Scala 2 and Scala 3 macro bundles
  • Applies to modules following this pattern, such as yaml-derivation, avro-derivation, circe-derivation

Quick Start

Mix LoadStandardExtensionsOnce into your macro bundle to ensure standard extensions load exactly once.

Frequently Asked Questions about hearth-standard-extensions

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

FAQPage Schema
How do I load Scala macro extensions only once per bundle?

To load Scala macro extensions only once per bundle, mix the LoadStandardExtensionsOnce trait into your macro bundle to guard initialization and ensure a single call to Environment.loadStandardExtensions().

Why do my macro bundles repeatedly initialize standard extensions in Scala?

Macro bundles repeatedly initialize standard extensions in Scala because they lack a per-module loading guard, which results in duplicate calls to Environment.loadStandardExtensions() and noisy logs.

What's the best way to prevent duplicate extension loading across Scala 2 and Scala 3 macro bundles?

The best way to prevent duplicate extension loading across Scala 2 and Scala 3 macro bundles is to apply a centralized per-module LoadStandardExtensionsOnce trait that guards initialization.

Can I use a single initialization pattern for yaml-derivation, avro-derivation, and circe-derivation modules?

Yes, you can use a single initialization pattern for yaml-derivation, avro-derivation, and circe-derivation modules by mixing the LoadStandardExtensionsOnce trait into their respective macro bundles.

Do I need a per-module trait to avoid noisy logs during compile-time derivation?

Yes, you need a per-module LoadStandardExtensionsOnce trait to avoid noisy logs during compile-time derivation, as it ensures standard extensions are loaded exactly once per macro bundle.

What problem does the Hearth standard extensions loading pattern solve?

The Hearth standard extensions loading pattern solves the problem of repeated initialization in macro bundles by ensuring standard extensions are loaded exactly once per bundle to eliminate noisy logs.