chdb-sql

chdb-sql is a skill for Claude Code, Codex from chdb-io/chdb. It costs 214 tokens per session (1,293 once invoked), scanned A, original, Apache-2.0.

A way to run ClickHouse SQL inside Python without setting up a database server. It can query files, cloud storage, and several remote databases, including Parquet, CSV, JSON, PostgreSQL, MySQL, and MongoDB sources.

In plain words
What is it for?
Querying local or remote data, joining data from different sources, and working with analytical datasets through Python.
Why use it?
It lets you analyze data with SQL directly from Python instead of moving everything into a separate database system. This is useful for one-off queries and multi-step analysis.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Querying local or remote data, joining data from different sources, and working with analytical datasets through Python.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chdb-io/chdb/chdb-sql
About the project

chDB is an in-process OLAP SQL engine powered by ClickHouse, allowing applications to query analytical data without running a separate database server. Python users and data practitioners use it to work with formats such as Parquet, CSV, JSON, Arrow, and ORC through SQL or a pandas-compatible API. Its catalogue add-ons provide agent instructions, rules, skills, and an agent for working with the project.

chdb-io/chdb · 2,934 stars · on GitHub · clickhouse.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chdb-io/chdb --skill chdb-sql
Clone the repo
git clone --depth 1 https://github.com/chdb-io/chdb

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for chdb-sql

README.md
[![agentmods](https://agentmods.dev/badge/skills/chdb-io/chdb/chdb-sql/github.svg)](https://agentmods.dev/skills/chdb-io/chdb/chdb-sql)
Your own site
<a href="https://agentmods.dev/skills/chdb-io/chdb/chdb-sql"><img src="https://agentmods.dev/badge/skills/chdb-io/chdb/chdb-sql/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for chdb-sql

Your own site · 80×15
<a href="https://agentmods.dev/skills/chdb-io/chdb/chdb-sql"><img src="https://agentmods.dev/badge/skills/chdb-io/chdb/chdb-sql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 214 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00214 $0.01293
Opus 5.5 $0.00086 $0.00517
Sonnet 5.5 $0.00043 $0.00259
Haiku 4.5 $0.00021 $0.00129

Measured 3mo ago against content hash f53cc85e11b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

chdb-sql scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify_install.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • chdb-sql — 88% identical, 4 lines differ
agent/skills/chdb-sql/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

chdb SQL — ClickHouse in Your Python Process

Run ClickHouse SQL directly in Python — no server needed. Query local files, remote databases, and cloud storage with full ClickHouse SQL power.

pip install chdb

Decision Tree: Pick the Right API

1. One-off query on files or databases → chdb.query()
2. Multi-step analysis with tables      → Session
3. DB-API 2.0 connection                → chdb.connect()
4. Pandas-style DataFrame operations    → Use chdb-datastore skill instead

chdb.query() — One Line, Any Data

import chdb

chdb.query("SELECT * FROM file('data.parquet', Parquet) WHERE price > 100 LIMIT 10")       # local files
chdb.query("SELECT * FROM mysql('db:3306', 'shop', 'orders', 'root', 'pass')")              # databases
chdb.query("SELECT * FROM s3('s3://bucket/data.parquet', NOSIGN) LIMIT 10")                 # cloud storage
chdb.query("SELECT * FROM deltaLake('s3://bucket/delta/table', NOSIGN) LIMIT 10")           # data lakes

# Cross-source join
chdb.query("""
    SELECT u.name, o.amount FROM mysql('db:3306', 'crm', 'users', 'root', 'pass') AS u
    JOIN file('orders.parquet', Parquet) AS o ON u.id = o.user_id ORDER BY o.amount DESC
""")

data = {"name": ["Alice", "Bob"], "score": [95, 87]}
chdb.query("SELECT * FROM Python(data) ORDER BY score DESC")                                # Python data
df = chdb.query("SELECT * FROM numbers(10)", "DataFrame")                                   # output formats
chdb.query("SELECT toDate({d:String}) + number FROM numbers({n:UInt64})",
    "DataFrame", params={"d": "2025-01-01", "n": 30})                                      # parametrized

Table functions → table-functions.md | SQL functions → sql-functions.md | Full API → api-reference.md

Session — Stateful Analysis Pipelines

from chdb import session as chs
sess = chs.Session("./analytics_db")   # persistent; Session() for in-memory

sess.query("CREATE TABLE users ENGINE=MergeTree() ORDER BY id AS SELECT * FROM mysql('db:3306','crm','users','root','pass')")
sess.query("CREATE TABLE events ENGINE=MergeTree() ORDER BY (ts,user_id) AS SELECT * FROM s3('s3://logs/events/*.parquet',NOSIGN)")
sess.query("""
    SELECT u.country, count() AS cnt, uniqExact(e.user_id) AS users
    FROM events e JOIN users u ON e.user_id = u.id
    WHERE e.ts >= today() - 7 GROUP BY u.country ORDER BY cnt DESC
""", "Pretty").show()
sess.close()

Read the full file on GitHub · 117 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 117 lines · 214 tokens per session scan A f53cc85e11b0

Subscribe to this mod's changes

chdb-sql is a skill published in the GitHub repository chdb-io/chdb (2,934 stars, last pushed 2d ago), licensed Apache-2.0. It adds 214 tokens to every session and 1,293 once invoked, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

chdb-sql compared with skills from other repositories

chdb-sql next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
chdb-sqlchdb-io/chdbSkill2.9k2d agoApache-2.0A214Claude Code, Codex
duckdbericrisco/rsc-harnessSkill701todayMITC85Claude Code, Codex
knowledge_graph_skillNPC-Worldwide/npcpySkill1.5kyesterdayMITA474Claude Code, Codex
clickhouse-analyticsericrisco/rsc-harnessSkill701todayMITA86Claude Code, Codex
data-science-analytics-engineeringj4flmao/agent-skillsSkill4716d agoMITA95Claude Code, Codex
duckdbalivirgo/Major-AI-SkillsSkill6yesterdayMITA45Claude Code
database-expertsandraschi/database-operations-mcpSkill3yesterdayMITA20Claude Code