DuckDB-Extensions

Installation
SKILL.md

DuckDB Extensions

This skill covers building DuckDB loadable extensions (.duckdb_extension files) using CMake and FetchContent. Extensions must include proper metadata to be loaded by DuckDB.

Instructions

When helping users build DuckDB extensions, follow these guidelines:

  1. Version Matching: The extension MUST be built against the exact same DuckDB version that will load it. Use FetchContent with a specific git tag (e.g., v1.2.1).

  2. Metadata is Required: DuckDB extensions need metadata appended via the append_metadata.cmake script. Without this, DuckDB will reject the extension with "not a DuckDB extension" error.

  3. Static Linking: For portable extensions, link against duckdb_static with visibility hidden and exclude-libs flags.

  4. Table Function State: In DuckDB 1.1+, bind_data is const during execution. Use GlobalTableFunctionState for mutable state accessed via input.global_state.

  5. PIC Required: Static libraries linked into the shared extension must be built with POSITION_INDEPENDENT_CODE ON.

Examples

Related skills

More from majiayu000/claude-skill-registry

Installs
1
GitHub Stars
303
First Seen
Feb 5, 2026