Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

datum-macro

БесплатноБез исполняемых скриптовНе проверен

Three tiers of Rust macro datums: macro_rules! literals (zero new deps), inventory distributed statics (recommended for offline/airgap), proc_macro attributes…

elasticdotventuresот elasticdotventures★ 15 звёзд на GitHub

Об этом скилле

What

The datum-macro skill covers three tiers of using Rust macros as dynamic datums, all operating at compile time. Tier 1 uses macro_rules! to create BootDatum literals at compile time with zero new dependencies — useful for core datums baked into the binary. Tier 2 uses the inventory crate for distributed static collection where any crate registers a datum at link time and inventory::iter::<BootDatum> collects all registered datums without file I/O — this enables offline/airgap binaries with core datums baked in. Tier 3 uses a proc_macro attribute (#[b00t_datum(type = "cli", hint = "...")]) which is the most ergonomic but requires a new crate.

The Chalk Interner pattern connects here: a DatumStore trait would unify all three tiers, with implementations for TomlFileStore, InventoryStore, SqliteStore, and QdrantStore. Macros register into InventoryStore; the TOML scanner registers into TomlFileStore; get_all_datums() merges both with operator-added datums overriding builtins by key.

When to Use

Use Tier 1 (macro_rules!) when you need to define core datums inline without dependencies. Use Tier 2 (inventory) when building offline/airgap binaries with blessed tooling baked in. Use Tier 3 (proc_macro) when ergonomics matter more than dependency footprint.

How

  1. For Tier 1: define a macro_rules! datum { ... } that creates BootDatum literals. Use LazyLock since BootDatum uses String.
  2. For Tier 2: add inventory as an optional feature flag. Use inventory::submit! in any crate and inventory::iter::<BootDatum> in get_all_datums().
  3. For Tier 3: create a proc_macro crate with #[b00t_datum(...)] attribute that generates BootDatum construction + inventory::submit!.
  4. Note: macros are compile-time only. TOML scan remains canonical for operator-extensible datums.

Установить datum-macro в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл datum-macro?

Three tiers of Rust macro datums: macro_rules! literals (zero new deps), inventory distributed statics (recommended for offline/airgap), proc_macro attributes (most ergonomic but needs new crate).

Как установить скилл datum-macro?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл datum-macro запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить datum-macro с