Sidequery

duckdb-claude-slack

A Slack bot for querying databases with plain English. Powered by the acp extension.

A Slack bot that uses Claude Code (via the DuckDB ACP extension) to answer data questions in natural language. Results are returned as CSV attachments.

Installation

uvx duckdb-claude-slack

Slack App Setup

  1. Create a new Slack app using the included slack_manifest.json
  2. Enable Socket Mode and generate an app token (xapp-...)
  3. Install to your workspace and get the bot token (xoxb-...)
  4. Set environment variables:
    export SLACK_BOT_TOKEN=xoxb-...
    export SLACK_APP_TOKEN=xapp-...

Running

Basic usage

uvx duckdb-claude-slack

Attach a database file

uvx duckdb-claude-slack --db /path/to/data.duckdb

With custom database name

uvx duckdb-claude-slack --db /path/to/data.duckdb --db-name analytics

Run init SQL on startup

uvx duckdb-claude-slack --init-sql /path/to/setup.sql

Usage

Mention the bot in any channel it's invited to:

@Claude DuckDB show me the top 10 customers by revenue

@Claude DuckDB what were sales by region last month?

@Claude DuckDB which products have the highest return rate?

Security

  • Read-only database access
  • No filesystem or shell access
  • Supports .env and .env.local for credentials