Agent skill

Clickhouse Common Errors

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

Diagnose and fix the top 15 ClickHouse errors — query failures, insert problems, memory limits, and merge issues.

MITAuto-check passedDatabases

Install Clickhouse Common Errors

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill clickhouse-common-errors -a claude-code

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace clickhouse-common-errors --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-common-errors .claude/skills/clickhouse-common-errors && 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-common-errors
GitHub stars
2.8k
Token cost
~1.5k tokens
SKILL.md length
522 words
Files
2 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Diagnose and fix the top 15 ClickHouse errors — query failures, insert problems, memory limits, and merge issues.

  • Works in 4 steps: Capture the exception name and code.… → Map it to a category. Use the Error… → Apply the inline fix for the three top… → …
  • A ClickHouse query
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Clickhouse Common Errors is an agent skill from jeremylongshore/tons-of-skills-marketplace. Diagnose and fix the top 15 ClickHouse errors — query failures, insert problems, memory limits, and merge issues. Use when a ClickHouse query or insert throws an exception, a server-side error appears in logs, or a failed query needs root-cause analysis. Trigger with "clickhouse error", "fix clickhouse", "clickhouse not working", "debug clickhouse", "clickhouse exception", "clickhouse syntax error".

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

It sits in Databases, covering Data warehousing. It works with ClickHouse. 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

  • A ClickHouse query
  • Insert throws an exception
  • A server-side error appears in logs
  • A failed query needs root-cause analysis

Example prompts

  • “clickhouse error”
  • “fix clickhouse”
  • “clickhouse not working”
  • “/clickhouse-common-errors”

Requirements

  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Grep, Bash(curl:*)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Capture the exception name and code. Read the error string the client
  2. Map it to a category. Use the Error Handling code table
  3. Apply the inline fix for the three top errors (Too Many Parts, Memory
  4. Confirm with a system table. Re-run the relevant system.* query (part

What it can do on your machine

Read from SKILL.md and the folder at commit 80f86df. 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
    • Grep
    • Bash(curl:*)

    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 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 no API keys, tokens, secrets or passwords.

    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 Common Errors loads about 1.5k tokens when it runs, and up to ~2.9k if it reads all its reference files. Until then it costs about 107 tokens; SKILL.md has 522 words of instructions outside code blocks.

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

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 80f86df, republished under its MIT licence (© jeremylongshore). 522 words, ~1,481 tokens.

Download SKILL.mdSave it as .claude/skills/clickhouse-common-errors/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
clickhouse-common-errors
description
Diagnose and fix the top 15 ClickHouse errors — query failures, insert problems, memory limits, and merge issues. Use when a ClickHouse query or insert throws an exception, a server-side error appears in logs, or a failed query needs root-cause analysis. Trigger with "clickhouse error", "fix clickhouse", "clickhouse not working", "debug clickhouse", "clickhouse exception", "clickhouse syntax error".
allowed-tools
Read, Grep, Bash(curl:*)
compatibility
Designed for Claude Code
version
1.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, database, analytics, clickhouse, olap

ClickHouse Common Errors

Overview

Quick reference for the most common ClickHouse errors with real error codes, diagnostic queries, and proven solutions. The three highest-frequency errors are inline below; the full catalog of 10 errors plus system-table diagnostics lives in references/error-reference.md.

Prerequisites

  • Access to a ClickHouse endpoint — either the native clickhouse-client or the HTTP interface (curl against :8123).
  • Permission to read the system.* introspection tables (system.parts, system.processes, system.query_log, system.columns, system.replicas).
  • The failing statement's text and, ideally, the raw exception string — the parenthetical name (e.g. MEMORY_LIMIT_EXCEEDED) and numeric code drive lookup.

Instructions

Follow this loop to turn a raw ClickHouse exception into a verified fix:

  1. Capture the exception name and code. Read the error string the client returned. If you only have a log file, use Grep to pull the matching line — Grep for DB::Exception or a specific token like MEMORY_LIMIT_EXCEEDED across the log to isolate the failure.
  2. Map it to a category. Use the Error Handling code table to classify the error as Schema, Query, Performance, Permissions, Concurrency, Resources, or Insert-pattern.
  3. Apply the inline fix for the three top errors (Too Many Parts, Memory Limit, Syntax) below, or open references/error-reference.md for the other seven plus copy-paste diagnostic queries.
  4. Confirm with a system table. Re-run the relevant system.* query (part count, system.processes, system.query_log) to prove the condition cleared rather than assuming the fix took.
Top 3 errors (inline)

Too Many Parts (Code 252) — hundreds of tiny inserts outpace merges:

sql
-- Check current part count per table
SELECT database, table, count() AS part_count
FROM system.parts WHERE active GROUP BY database, table ORDER BY part_count DESC;

-- Temporary relief; permanent fix is batching (10K+ rows per INSERT)
ALTER TABLE events MODIFY SETTING parts_to_throw_insert = 1000;  -- default 300

Memory Limit Exceeded (Code 241) — query wants more RAM than max_memory_usage:

sql
SET max_memory_usage = 20000000000;             -- 20GB for this query, OR
SET max_bytes_before_external_group_by = 10000000000;  -- spill big GROUP BY to disk

Syntax Error (Code 62) — most often MySQL habits leaking in:

sql
SELECT "user_id" FROM events;          -- double-quote (not `backtick`) identifiers
SELECT * FROM events LIMIT 10 OFFSET 20;  -- OFFSET keyword, not LIMIT 10, 20

See references/error-reference.md for Unknown Table, Timeout, DateTime parsing, Readonly, No Such Column, Type Mismatch, and Distributed-table errors.

Output

Working through this skill produces:

  • A classified diagnosis — the error name, numeric code, and category from the table below.
  • A concrete remediation — the exact SET, ALTER, or corrected SQL to run, plus whether it is a temporary relief valve or a permanent fix.
  • A verification query against a system.* table confirming the condition cleared (e.g. part count back under threshold, no query stuck in system.processes).
Show full SKILL.md (177 more words)Show less

Error Handling

Error CodeNameCategory
16NO_SUCH_COLUMN_IN_TABLESchema
60UNKNOWN_TABLESchema
62SYNTAX_ERRORQuery
159TIMEOUT_EXCEEDEDPerformance
164READONLYPermissions
202TOO_MANY_SIMULTANEOUS_QUERIESConcurrency
241MEMORY_LIMIT_EXCEEDEDResources
252TOO_MANY_PARTSInsert pattern

If the error name is not in this table, search the raw exception text against the Error Codes Reference and inspect system.query_log (WHERE type = 'ExceptionWhileProcessing') for the full server-side context.

Examples

Diagnosing a stalled insert pipeline. Inserts start failing with Too many parts (600). Classify as code 252 (Insert pattern), run the system.parts count query to see which table is affected, raise parts_to_throw_insert for immediate relief, then switch the writer to batched inserts. Full walkthrough and the other nine errors are in references/error-reference.md.

Killing a runaway query. A dashboard query hangs. Query system.processes to find its query_id, then KILL QUERY WHERE query_id = '...'. The complete set of diagnostic queries (running queries, recent errors, disk usage, merge health) lives in the Diagnostic Queries section of references/error-reference.md.

Resources

© 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 1 other file (references) in skills/.curated/clickhouse-common-errors of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/error-reference.md

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Clickhouse Common Errors 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 Common Errors compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clickhouse Common Errors this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.5kAutomated safety check: PassMIT
Keeper Stress AnalysisClickHouse/ClickHouse50k—~4.7kAutomated safety check: PassApache-2.0
Perf ComparisonClickHouse/ClickHouse50k—~3.9kAutomated safety check: NotesApache-2.0
Patch Release CheckClickHouse/ClickHouse50k—~4kAutomated safety check: NotesApache-2.0
Clickhouse Architecture Advisorvemetric/vemetric3952 repos~791Automated safety check: PassApache-2.0
Decompress BinaryClickHouse/ClickHouse50k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Keeper Stress Analysis

    ClickHouse/ClickHouse

    Analyze ClickHouse Keeper stress-test results from play.clickhouse.com / keeperstresstests data warehouse.

    50k GitHub stars~4.7k tokensUpdated today
    DatabasesAuto-check passed
  • Perf Comparison

    ClickHouse/ClickHouse

    Evaluate ClickHouse performance test results from existing CI/dashboard data or local perf.py runs.

    50k GitHub stars~3.9k tokensUpdated today
    DatabasesAuto-check: notes
  • Patch Release Check

    ClickHouse/ClickHouse

    Check whether ClickHouse's supported versions (last 3 majors + latest LTS) have recent stable patch releases, diagnose why the scheduled AutoReleases pipeline failed, and identify which releases…

    50k GitHub stars~4k tokensUpdated today
    DatabasesAuto-check: notes
  • MUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific system designs.

    395 GitHub starsUsed in 2 repos~791 tokens
    DatabasesAuto-check passed
  • Decompress Binary

    ClickHouse/ClickHouse

    Extract the inner ELF from a ClickHouse self-extracting clickhouse binary, including when its architecture differs from the host (e.g.

    50k GitHub stars~1.1k tokensUpdated today
    DatabasesAuto-check passed
  • Good PRs

    ClickHouse/ClickHouse

    Show a report of open ClickHouse PRs whose only non-green CI check is "CH Inc sync" (or that are fully green) — i.e.

    50k GitHub stars~1.8k tokensUpdated today
    DatabasesAuto-check passed

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 Common Errors

What does Clickhouse Common Errors do?

Diagnose and fix the top 15 ClickHouse errors — query failures, insert problems, memory limits, and merge issues. Clickhouse Common Errors is an agent skill from jeremylongshore/tons-of-skills-marketplace. Diagnose and fix the top 15 ClickHouse errors — query failures, insert problems, memory limits, and merge issues.

When should I use Clickhouse Common Errors?

Clickhouse Common Errors fits situations like: A ClickHouse query; insert throws an exception; A server-side error appears in logs; A failed query needs root-cause analysis.

How do I install Clickhouse Common Errors in Claude Code?

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

How do I install Clickhouse Common Errors in Codex?

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

Can I use Clickhouse Common Errors 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-common-errors -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-common-errors, .gemini/skills/clickhouse-common-errors, .github/skills/clickhouse-common-errors and .opencode/skills/clickhouse-common-errors in your project.

What does Clickhouse Common Errors need to run?

SKILL.md names no scripts, command-line tools or credentials: Clickhouse Common Errors is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Grep, Bash(curl:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Clickhouse Common Errors 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 Common Errors 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 Common Errors use?

Clickhouse Common Errors 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 Common Errors use?

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

What are the alternatives to Clickhouse Common Errors?

Skills that share tags, products or a category with Clickhouse Common Errors: Keeper Stress Analysis (ClickHouse/ClickHouse, 50k stars), Perf Comparison (ClickHouse/ClickHouse, 50k stars), Patch Release Check (ClickHouse/ClickHouse, 50k stars) and Clickhouse Architecture Advisor (vemetric/vemetric, 395 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clickhouse Common Errors?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 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.