Agent skill

Chdb SQL

by vemetric in vemetric/vemetric

A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

Apache-2.0Auto-check passedDatabases

Install Chdb SQL

skills CLI
$ npx skills add vemetric/vemetric --skill chdb-sql -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vemetric/vemetric chdb-sql --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vemetric/vemetric.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/chdb-sql .claude/skills/chdb-sql && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
chdb-sql
GitHub stars
394
Used in
1 other repo
Token cost
~1.2k tokens
SKILL.md length
166 words
Files
7 (incl. scripts, references)
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

  • The user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json)
  • SKILL.md covers Decision Tree: Pick the Right…, chdb.query() — One Line, Any…, Session — Stateful Analysis… and Connection API (DB-API 2.0), plus 2 more sections
  • Runs Python scripts from its folder; calls pip and python
  • Remote databases (Postgres

What it does

Chdb SQL is an agent skill from vemetric/vemetric. Use when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake) without setting up a server. Provides chDB — embedded ClickHouse SQL in Python with 1000+ functions, Session for stateful multi-step pipelines, parametrized queries, and cross-source joins via s3(), mysql(), postgresql(), iceberg(), deltaLake(), remoteSecure() table functions. TRIGGER when: user wants SQL on…

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and reference files (for example `README.md`, `examples/examples.md` and `references/api-reference.md`). Compatibility notes: Requires Python 3.9+, macOS or Linux. pip install chdb.

It sits in Databases, covering SQL, DataFrames and Data warehousing. It works with SQL, ClickHouse, PostgreSQL and Python. The repository describes itself as: Simple, yet powerful Web- & Product Analytics. The licence is Apache-2.0.

When your agent uses it

  • The user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json)
  • Remote databases (Postgres
  • ClickHouse Cloud
  • Delta Lake) without setting up a server

Example prompts

  • “/chdb-sql”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Requires Python 3.9+, macOS or Linux. pip install chdb.

What it can do on your machine

Read from SKILL.md and the folder at commit 6b7b01a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • clickhouse.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Python 3.9+, macOS or Linux. pip install chdb.

    From compatibility in the SKILL.md frontmatter.

Context cost

Chdb SQL loads about 1.2k tokens when it runs, and up to ~6.7k if it reads all its reference files. Until then it costs about 218 tokens; SKILL.md has 166 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~218
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from vemetric/vemetric at commit 6b7b01a, republished under its Apache-2.0 licence (© vemetric). 166 words, ~1,237 tokens.

Download SKILL.mdSave it as .claude/skills/chdb-sql/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
chdb-sql
description
Use when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake) without setting up a server. Provides chDB — embedded ClickHouse SQL in Python with 1000+ functions, Session for stateful multi-step pipelines, parametrized queries, and cross-source joins via `s3()`, `mysql()`, `postgresql()`, `iceberg()`, `deltaLake()`, `remoteSecure()` table functions. TRIGGER when: user wants SQL on parquet/csv/files or across remote analytical sources; uses ClickHouse SQL features (window functions, windowFunnel, geoToH3, JSON path ops, Session, parametrized queries); imports `chdb` or calls `chdb.query()`. SKIP this skill for pandas-style DataFrame method-chaining (use chdb-datastore instead) or ClickHouse server administration.
compatibility
Requires Python 3.9+, macOS or Linux. pip install chdb.
license
Apache-2.0
metadata.author
chdb-io
metadata.version
4.1
metadata.homepage
https://clickhouse.com/docs/chdb

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.

bash
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

python
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

python
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()

Connection API (DB-API 2.0)

python
from chdb import dbapi
conn = dbapi.connect()
cur = conn.cursor()
cur.execute("SELECT * FROM file('data.parquet', Parquet) WHERE value > 100")
print(cur.fetchall())
cur.close()
conn.close()

Troubleshooting

ProblemFix
ImportError: No module named 'chdb'pip install chdb
DB::Exception: FILE_NOT_FOUNDCheck file path; use absolute path or verify cwd
DB::Exception: Unknown table functionCheck function name spelling (e.g., deltaLake not deltalake)
Connection refused to remote DBCheck host:port format; ensure remote DB allows connections
Environment checkRun python scripts/verify_install.py (from skill directory)

References

Note: This skill teaches how to use chdb SQL. For pandas-style operations, use the chdb-datastore skill. For contributing to chdb source code, see CLAUDE.md in the project root.

© vemetric, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in .agents/skills/chdb-sql of vemetric/vemetric.

  • SKILL.md
  • README.md
  • examples/examples.md
  • references/api-reference.md
  • references/sql-functions.md
  • references/table-functions.md
  • scripts/verify_install.py

Open the folder on GitHubat commit 6b7b01a

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in vemetric/vemetric, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Chdb SQL next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Chdb SQL compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Chdb SQL this skillvemetric/vemetric3941 repos~1.2kAutomated safety check: PassApache-2.0
Ops Telemetry Queryboundless-xyz/boundless193—~3.8kAutomated safety check: PassApache-2.0
Analyzing Dataastronomer/agents450—~1.3kAutomated safety check: PassApache-2.0
Modelersidequery/sidemantic129—~4.2kAutomated safety check: PassApache-2.0
Querying Tempotempoxyz/tidx107—~3.1kAutomated safety check: PassMIT
Semantic Analystsidequery/sidemantic129—~982Automated safety check: PassAGPL-3.0

Similar skills

  • Ops Telemetry Query

    boundless-xyz/boundless

    Internal — for Boundless team members only. An agent skill from boundless-xyz/boundless.

    193 GitHub stars~3.8k tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • Analyzing Data

    astronomer/agents

    Queries the data warehouse with SQL and answers business questions about data.

    450 GitHub stars~1.3k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Modeler

    sidequery/sidemantic

    Build, validate, and manage semantic models using Sidemantic.

    129 GitHub stars~4.2k tokensUpdated today
    DatabasesAuto-check passed
  • Querying Tempo

    tempoxyz/tidx

    Query indexed Tempo chain data via tidx HTTP API and CLI. An agent skill from tempoxyz/tidx.

    107 GitHub stars~3.1k tokensUpdated today
    DatabasesAuto-check passed
  • Semantic Analyst

    sidequery/sidemantic

    Answer analytical, KPI, metric, trend, cohort, and business-performance questions through a Sidemantic semantic layer.

    129 GitHub stars~982 tokensUpdated today
    DatabasesAuto-check passed
  • Database Migration

    Rain-kl/OpenFlare

    Wavelet 项目专用:当新增或修改数据库表结构、索引、初始化数据、系统配置 seed、模板 seed、默认管理员、goose SQL 迁移、internal/infra/persistence/migrator、ClickHouse 分析库 DDL 或数据库升级流程时必须使用。本技能指导在 internal/infra/persistence/migrator/goose 下编写…

    288 GitHub stars~1.3k tokensUpdated today
    DatabasesAuto-check passed

More from vemetric/vemetric

  • Chdb Datastore

    vemetric/vemetric

    A skill your agent uses when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas.

    394 GitHub starsUsed in 2 repos~1.4k tokens
    Auto-check passed
  • MUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific system designs.

    394 GitHub starsUsed in 2 repos~791 tokens
    Auto-check passed
  • Clickhouse Best Practices

    vemetric/vemetric

    MUST USE when reviewing ClickHouse schemas, queries, or configurations.

    394 GitHub starsUsed in 2 repos~2.6k tokens
    Auto-check passed
  • Clickhouse JS Node Coding

    vemetric/vemetric

    Write idiomatic application code with the ClickHouse Node.js client (@clickhouse/client).

    394 GitHub starsUsed in 1 repo~2.8k tokens
    Auto-check passed
  • Troubleshoot and resolve common issues with the ClickHouse Node.js client (@clickhouse/client).

    394 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed

Categories

Questions about Chdb SQL

What does Chdb SQL do?

A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…. Chdb SQL is an agent skill from vemetric/vemetric. Use when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake) without setting up a server.

When should I use Chdb SQL?

Chdb SQL fits situations like: the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json); remote databases (Postgres; clickHouse Cloud; delta Lake) without setting up a server.

How do I install Chdb SQL in Claude Code?

Run `npx skills add vemetric/vemetric --skill chdb-sql -a claude-code`. Or copy the skill folder (.agents/skills/chdb-sql in vemetric/vemetric) into .claude/skills/chdb-sql in your project. Claude Code loads it when a task matches its description.

How do I install Chdb SQL in Codex?

Run `npx skills add vemetric/vemetric --skill chdb-sql -a codex`. Or copy the skill folder (.agents/skills/chdb-sql in vemetric/vemetric) into .agents/skills/chdb-sql in your project. Codex loads it when a task matches its description.

Can I use Chdb SQL in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vemetric/vemetric --skill chdb-sql -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/chdb-sql, .gemini/skills/chdb-sql, .github/skills/chdb-sql and .opencode/skills/chdb-sql in your project.

What does Chdb SQL need to run?

Going by SKILL.md and its folder, Chdb SQL needs Python for the scripts in its folder and the command-line tools its instructions call (pip and python). Our summary lists: Python 3. Compatibility (from SKILL.md): Requires Python 3.9+, macOS or Linux. pip install chdb..

Does Chdb SQL access the network?

SKILL.md names 1 domain. As links in the text: clickhouse.com. This is read from the text; nothing was executed.

Is Chdb SQL safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Chdb SQL use?

Chdb SQL is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Chdb SQL use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.5k tokens, read only when the agent opens those files.

What are the alternatives to Chdb SQL?

Skills that share tags, products or a category with Chdb SQL: Ops Telemetry Query (boundless-xyz/boundless, 193 stars), Analyzing Data (astronomer/agents, 450 stars), Modeler (sidequery/sidemantic, 129 stars) and Querying Tempo (tempoxyz/tidx, 107 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Chdb SQL?

vemetric (a GitHub organization) maintains it in vemetric/vemetric, which has 394 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 7, 2026.

Source: vemetric/vemetric on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.