Agent skill

Clickhouse Core Workflow B

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Insert, query, and aggregate data in ClickHouse with real SQL patterns.

MITAuto-check passedDatabases

Install Clickhouse Core Workflow B

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill clickhouse-core-workflow-b -a claude-code

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace clickhouse-core-workflow-b --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/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/clickhouse-core-workflow-b .claude/skills/clickhouse-core-workflow-b && 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
clickhouse-core-workflow-b
GitHub stars
2.8k
Token cost
~1.3k tokens
SKILL.md length
441 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Insert, query, and aggregate data in ClickHouse with real SQL patterns.

  • Works in 3 steps: Bulk insert (the fast path) → Analytical queries → Pre-aggregation and windowing
  • Writing analytical queries
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Needs CLICKHOUSE_PASSWORD

What it does

Clickhouse Core Workflow B is an agent skill from jeremylongshore/tons-of-skills-marketplace. Insert, query, and aggregate data in ClickHouse with real SQL patterns. Use when writing analytical queries, inserting data at scale, building dashboards, or implementing materialized views for pre-aggregation. Trigger with "clickhouse query", "clickhouse insert", "clickhouse aggregate", "clickhouse materialized view", "clickhouse SQL".

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/advanced.md` and `references/queries.md`). Compatibility notes: Designed for Claude Code

It sits in Databases, covering Data warehousing. It works with ClickHouse and SQL. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Writing analytical queries
  • Inserting data at scale
  • Building dashboards
  • Implementing materialized views for pre-aggregation

Example prompts

  • “clickhouse query”
  • “clickhouse insert”
  • “clickhouse aggregate”
  • “/clickhouse-core-workflow-b”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npm:*)

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Bulk insert (the fast path)
  2. Analytical queries
  3. Pre-aggregation and windowing

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(npm:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and sql).

    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 these keys or tokens, usually read from environment variables:

    • CLICKHOUSE_PASSWORD

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

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Clickhouse Core Workflow B loads about 1.3k tokens when it runs, and up to ~2.5k if it reads all its reference files. Until then it costs about 91 tokens; SKILL.md has 441 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 441 words, ~1,278 tokens.

Download SKILL.mdSave it as .claude/skills/clickhouse-core-workflow-b/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
clickhouse-core-workflow-b
description
Insert, query, and aggregate data in ClickHouse with real SQL patterns. Use when writing analytical queries, inserting data at scale, building dashboards, or implementing materialized views for pre-aggregation. Trigger with "clickhouse query", "clickhouse insert", "clickhouse aggregate", "clickhouse materialized view", "clickhouse SQL".
allowed-tools
Read, Write, Edit, Bash(npm:*)
compatibility
Designed for Claude Code
version
1.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, database, analytics, clickhouse, olap

ClickHouse Insert & Query (Core Workflow B)

Overview

Move data into ClickHouse efficiently, then answer analytical questions with aggregations, funnels, retention, window functions, and materialized views. This skill covers the read/write half of the core workflow: the fast-path insert patterns that avoid "too many parts", the parameterized query API for Node.js, and pre-aggregation via materialized views. The high-frequency patterns live inline below; the deep query library and advanced engine patterns are broken out into references/ so you can drill in only when you need them.

Prerequisites

  • Tables already created — run clickhouse-core-workflow-a first if not.
  • @clickhouse/client installed and connected (CLICKHOUSE_HOST, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD in the environment).
  • A target database/table (examples use analytics.events).

Instructions

Step 1: Bulk insert (the fast path)

Batch rows and let the client buffer. ClickHouse writes a new "part" per INSERT, so many tiny inserts are the number-one performance mistake.

typescript
import { createClient } from '@clickhouse/client';

const client = createClient({
  url: process.env.CLICKHOUSE_HOST!,
  username: process.env.CLICKHOUSE_USER ?? 'default',
  password: process.env.CLICKHOUSE_PASSWORD ?? '',
});

// Insert many rows efficiently — @clickhouse/client buffers internally
await client.insert({
  table: 'analytics.events',
  values: events,   // Array of objects matching table columns
  format: 'JSONEachRow',
});

Streaming a file (CSV, Parquet, etc.) uses the same call with a read stream and the matching format (e.g. CSVWithNames).

Insert best practices:

  • Batch rows: aim for 10K-100K rows per INSERT (not one at a time).
  • ClickHouse creates a new "part" per INSERT — too many small inserts cause "too many parts".
  • For real-time streams, buffer 1-5 seconds then flush.
Step 2: Analytical queries

Aggregate with count(), uniqExact(), and time filters. The canonical "top events by tenant" shape:

sql
SELECT tenant_id, event_type, count() AS event_count, uniqExact(user_id) AS unique_users
FROM analytics.events
WHERE created_at >= now() - INTERVAL 7 DAY
GROUP BY tenant_id, event_type
ORDER BY event_count DESC
LIMIT 100;

Funnel, retention, and safe parameterized-query patterns are in references/queries.md.

Step 3: Pre-aggregation and windowing

For dashboards, pre-aggregate on INSERT with a materialized view backed by an AggregatingMergeTree target, then merge states at read time. Window functions (row_number(), running totals via OVER (PARTITION BY ...)) and the full function reference table are in references/advanced.md.

Show full SKILL.md (172 more words)Show less

Output

Applying this skill produces:

  • Insert code — a batched client.insert(...) call (or file stream) that loads rows without triggering "too many parts".
  • Query results — aggregation rows returned as JSON via rs.json(), ready to feed a dashboard or API response.
  • Materialized view + target table — DDL that keeps a small pre-rolled table updated automatically on every source INSERT.

Error Handling

ErrorCauseSolution
Too many parts (300)Frequent small insertsBatch inserts, increase parts_to_throw_insert
Memory limit exceededLarge GROUP BY / JOINAdd WHERE filters, increase max_memory_usage
UNKNOWN_FUNCTIONWrong ClickHouse versionCheck SELECT version()
Cannot parse datetimeWrong formatUse YYYY-MM-DD HH:MM:SS format

Examples

  • Insert a batch of events — Step 1 above; adapt values to your row shape.
  • Top events / funnel / retention / parameterized queries — full runnable SQL and Node.js in references/queries.md.
  • Materialized view, window functions, function reference — the pre-aggregation and windowing patterns plus the common-function cheat sheet in references/advanced.md.

Resources

Next Steps

For error troubleshooting once queries are running, see clickhouse-common-errors. For table and schema design, revisit clickhouse-core-workflow-a.

© jeremylongshore, MIT. 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 2 other files (references) in skills/.curated/clickhouse-core-workflow-b of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/advanced.md
  • references/queries.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Clickhouse Core Workflow B 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.

Clickhouse Core Workflow B compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clickhouse Core Workflow B this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT
Clickhouse Logs Queriessupabase/supabase111k—~2.4kAutomated safety check: PassApache-2.0
Chdb SQLvemetric/vemetric3951 repos~1.2kAutomated safety check: PassApache-2.0
BisectClickHouse/ClickHouse50k—~1.4kAutomated safety check: PassApache-2.0
Clickhouse System QueriesFrankChen021/datastoria327—~731Automated safety check: PassCustom licence
Webapp Buildersidequery/sidemantic129—~5.5kAutomated safety check: PassAGPL-3.0

Similar skills

  • Clickhouse Logs Queries

    supabase/supabase

    Official

    Write, review, and migrate Supabase logs queries against the ClickHouse-backed logs table (the logs.all.otel analytics endpoint).

    111k GitHub stars~2.4k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Chdb SQL

    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…

    395 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Bisect

    ClickHouse/ClickHouse

    Bisect a ClickHouse regression using pre-built master binaries from CI.

    50k GitHub stars~1.4k tokensUpdated today
    DatabasesAuto-check passed
  • Clickhouse System Queries

    FrankChen021/datastoria

    Query ClickHouse system tables to inspect query logs, monitor cluster health, check replication status, and analyze slow queries.

    327 GitHub stars~731 tokensUpdated 2 mo ago
    DatabasesAuto-check passed
  • Webapp Builder

    sidequery/sidemantic

    Build interactive analytics webapps, demos, dashboards, or embedded app surfaces from Sidemantic semantic models using copyable component primitives and deterministic query inspection.

    129 GitHub stars~5.5k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Cpu Profile

    ClickHouse/ClickHouse

    Profile a ClickHouse query using the sampling query profiler and system.tracelog.

    50k GitHub stars~1.9k tokensUpdated today
    DatabasesAuto-check: notes

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Clickhouse Core Workflow B

What does Clickhouse Core Workflow B do?

Insert, query, and aggregate data in ClickHouse with real SQL patterns. Clickhouse Core Workflow B is an agent skill from jeremylongshore/tons-of-skills-marketplace. Insert, query, and aggregate data in ClickHouse with real SQL patterns.

When should I use Clickhouse Core Workflow B?

Clickhouse Core Workflow B fits situations like: writing analytical queries; inserting data at scale; building dashboards; implementing materialized views for pre-aggregation.

How do I install Clickhouse Core Workflow B in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clickhouse-core-workflow-b -a claude-code`. Or copy the skill folder (skills/.curated/clickhouse-core-workflow-b in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/clickhouse-core-workflow-b in your project. Claude Code loads it when a task matches its description.

How do I install Clickhouse Core Workflow B in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clickhouse-core-workflow-b -a codex`. Or copy the skill folder (skills/.curated/clickhouse-core-workflow-b in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/clickhouse-core-workflow-b in your project. Codex loads it when a task matches its description.

Can I use Clickhouse Core Workflow B 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 jeremylongshore/tons-of-skills-marketplace --skill clickhouse-core-workflow-b -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clickhouse-core-workflow-b, .gemini/skills/clickhouse-core-workflow-b, .github/skills/clickhouse-core-workflow-b and .opencode/skills/clickhouse-core-workflow-b in your project.

What does Clickhouse Core Workflow B need to run?

Going by SKILL.md and its folder, Clickhouse Core Workflow B needs credentials named CLICKHOUSE_PASSWORD. Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Clickhouse Core Workflow B 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 Clickhouse Core Workflow B 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. Review the folder before installing.

What licence does Clickhouse Core Workflow B use?

Clickhouse Core Workflow B is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clickhouse Core Workflow B use?

About 1.3k tokens (SKILL.md is roughly 5.1k 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 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Clickhouse Core Workflow B?

Skills that share tags, products or a category with Clickhouse Core Workflow B: Clickhouse Logs Queries (supabase/supabase, 111k stars), Chdb SQL (vemetric/vemetric, 395 stars), Bisect (ClickHouse/ClickHouse, 50k stars) and Clickhouse System Queries (FrankChen021/datastoria, 327 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clickhouse Core Workflow B?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.