agentleFS
srimon12srimon12/duckdb-2-skills/skills/duckdb-extensions/SKILL.md

duckdb-extensions

Skill1 starsChanged 15 days agoMITView on GitHub

Install, load, and update DuckDB 2.0 extensions, community extensions, and self-hosted repositories. Covers key signing, platform support, air-gapped manual installs, and version pinning. Use when an extension is missing, the user passes a repository, or when updating DuckDB extensions.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before installing an extension, verify the 2.0 CLI from duckdb.

    line 12
  2. Very specific:

    When autoinstall_known_extensions is true (default), LOAD name installs a known extension before loading.

    line 34
  3. Very specific:

    Only REPOSITORY installs are updated.

    line 48
  4. Very specific:

    If an extension has a pinned version, UPDATE EXTENSIONS overwrites it with the repository's latest build.

    line 49
  5. Very specific:

    When executing CREATE EXTENSION REPOSITORY, DuckDB fetches 2048-bit RSA public keys from the repository, pins them locally, and prints each …

    line 90
  6. Very specific:

    Avoid the singular extension_directory setting.

    line 106
  7. Distinctive:

    If a repository is unreachable or air-gapped, install from a local file:

    line 119

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Extensions

Before installing an extension, verify the 2.0 CLI from duckdb. Extensions installed by 1.5 are the wrong build for 2.0.

Install and load

INSTALL AND LOAD spatial;
INSTALL AND LOAD h3 FROM community;

In DuckDB 2.0, activate extensions with INSTALL AND LOAD. If the extension binary is already cached, DuckDB skips the download. If the extension is already loaded in the session, DuckDB skips loading.

FormEffect
INSTALL nameInstall from the official core repository.
INSTALL name FROM communityInstall from the community repository.
INSTALL name FROM core_nightlyInstall from the nightly core build.
INSTALL name FROM 'https://...'Install directly from a custom repository URL.
INSTALL name VERSION '<version>'Pin a published version for the 2.0 platform. If the version tag or hash is unverified, DuckDB returns HTTP 404. Test version pins in an isolated scratch directory using extension_directories before production use.
FORCE INSTALL nameRe-download and overwrite the cached binary. If omitted, INSTALL is a no-op when an extension already exists, even if the version or repository source changed.
INSTALL '/path/ext.duckdb_extension'Install from a downloaded binary file.
LOAD nameLoad an installed extension into the current session.

When autoinstall_known_extensions is true (default), LOAD name installs a known extension before loading. Loading an extension automatically loads all dependencies.

Update

UPDATE EXTENSIONS;
UPDATE EXTENSIONS (spatial, httpfs);

To update repository extensions to their latest builds, run UPDATE EXTENSIONS. Result columns are extension_name, repository, update_result, previous_version, and current_version.

Because UPDATE EXTENSIONS writes new binaries to disk without reloading running in-memory modules, restart the process before depending on updated extensions.

Update rules:

  • Only REPOSITORY installs are updated. UPDATE EXTENSIONS skips CUSTOM_PATH installs.
  • If an extension has a pinned version, UPDATE EXTENSIONS overwrites it with the repository's latest build. To restore a pinned version after updating, run FORCE INSTALL name VERSION '<version>'.
  • Statically linked extensions (autocomplete, core_functions, icu, json, parquet, and shell) ship inside the DuckDB binary and cannot be updated with UPDATE EXTENSIONS.

Inspect

SELECT extension_name, installed, loaded, extension_version, install_mode, installed_from
FROM duckdb_extensions()
ORDER BY extension_name;

Inspection columns in duckdb_extensions():

  • install_mode: STATICALLY_LINKED, REPOSITORY, CUSTOM_PATH, NOT_INSTALLED, or UNKNOWN.
  • installed_from: repository name for REPOSITORY installs, or source file path for CUSTOM_PATH installs.
  • signature_key_fingerprint: SHA-256 public key fingerprint for signed repository builds.

Repositories

Custom repository syntax is experimental (WIP) and subject to change.

SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY my_repo
    WITH PREFIX 'https://extensions.example.org';

INSTALL AND LOAD my_ext FROM my_repo;

SELECT repository_name, prefix, key_fingerprints
FROM duckdb_extension_repositories();

DROP EXTENSION REPOSITORY my_repo;

Repository permission states in allow_extension_repositories:

  • undecided (default): blocks adding custom repositories.
  • allowed: permits repository registration.
  • forbidden: blocks registration and distrusts custom repositories already stored on disk.
  • Process rule: while running, the setting only moves undecided to allowed or forbidden, or allowed to forbidden. It cannot move back.

Key management and storage:

  • When executing CREATE EXTENSION REPOSITORY, DuckDB fetches 2048-bit RSA public keys from the repository, pins them locally, and prints each SHA-256 fingerprint. Verify this fingerprint against the publisher's out-of-band release.
  • To pin keys offline without network requests, specify USING PUBLIC KEY '...'.
  • Repository prefix paths support local filesystem paths, https, or s3.
  • Repository definitions persist globally under ~/.duckdb/extension_repositories/ across restarts rather than inside database files.
  • extension_repository_directory defines the root trust anchor. While signature verification remains enabled, configure this setting at startup only.
  • For a one-off mirror, run SET custom_extension_repository = 'https://mirror.example.org'. While core and community fall back to backup mirrors automatically on connection failures, custom repositories do not provide automatic fallback.

Platform and security

Community extensions are third-party contributions not maintained by DuckDB Labs. DuckDB 2.0 does not build community extensions for osx_amd64. Core extensions still build for osx_amd64 in 2.0, while 2.1 drops osx_amd64 entirely.

Security settings default to allow_community_extensions = true and allow_unsigned_extensions = false. Never use -unsigned or SET allow_unsigned_extensions = true in production; use signed repositories with pinned RSA keys.

Binary directories:

  • Extensions reside under ~/.duckdb/extensions/<duckdb-version>/<platform>/.
  • To configure multiple search paths, pass a list to extension_directories. DuckDB installs into the first directory and loads from all listed directories.
  • Avoid the singular extension_directory setting. DuckDB 2.0 deprecates it with a warning.

Troubleshoot

SymptomCause and fix
HTTP 404 with candidate listExtension name misspelling or wrong repository. Check spelling or specify FROM core, FROM community, or FROM core_nightly.
HTTP 451CDN geographic access restriction. Use custom_extension_repository with a mirror, a VPN, or a downloaded binary.
Extension ... is not available on dev buildNightly development builds lack stable extensions. Switch to an official release binary.
Version mismatch after CLI upgradeStale binary cached from previous version. Run FORCE INSTALL name or UPDATE EXTENSIONS.
Stale extension loads after updateBinary updated on disk while process retains cached in-memory code. Restart the DuckDB process.
Local build fails to load extensionPlatform architecture or ABI mismatch. Inspect install_path via duckdb_extensions().

If a repository is unreachable or air-gapped, install from a local file:

FORCE INSTALL '/absolute/path/spatial.duckdb_extension';

File installation rules:

  • DuckDB accepts .duckdb_extension.gz and decompresses it automatically during INSTALL. Decompress manually only if the installer rejects the archive.
  • To load an extension directly without copying it into extension_directories, run LOAD '/absolute/path/name.duckdb_extension'. DuckDB derives the extension name from the filename basename.
  • To uninstall an extension, delete the .duckdb_extension file from disk. DuckDB provides no SQL uninstall command.

Verify

INSTALL AND LOAD httpfs;
SELECT extension_name, loaded, install_mode
FROM duckdb_extensions()
WHERE extension_name = 'httpfs';

Confirm loaded returns true. If INSTALL AND LOAD fails, inspect the error output: DuckDB returns the repository URL and target platform string, differentiating unknown extension names from network or SSL transport failures.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.