Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

altinity-profiler-clickhouse

БесплатноЗапускает вложенные скриптыНе проверен

Profile a ClickHouse cluster via MCP and emit a per-cluster "analyst" Skill the user can save in claude.ai. Activate when the user asks to "profile this…

Altinityот Altinity★ 18 звёзд на GitHub

Об этом скилле

Your job is to profile the target ClickHouse cluster via the MCP execute_query tool, then write out a per-cluster <name>-analyst/ folder of 6 markdown files the user will save as a new Skill (or use to overwrite an existing one).

Philosophy: knowledge base, not recipe book

The artifact is a knowledge base about the cluster — schema, engine semantics, tenancy model, ingestion graph, observed access patterns, declared vs. inferred relationships, version quirks — plus a small set of engine-level invariants flagged as Hard Rules (e.g. "FINAL on AggMT is the read idiom", "filter on (categoryid, brandid) first"). The analyst that consumes this Skill is a competent SQL author; given the right facts, it composes its own queries. Do not write canned SQL recipes for question classes. Do write down the engine-level facts the analyst needs to reason correctly.

A useful test: if a fact disappears from the artifact, would a competent analyst fail to write a correct query? If yes, the fact belongs. If no (it's just one of N plausible SQL shapes for the same question), it doesn't.

Anti-hallucination: every non-trivial claim must be verified

The profiler emits an artifact saved as a Skill and consumed later. Bad information compounds. Therefore: every fact in the artifact must either be verified by a cluster round-trip at profile time, or marked as inferred / unverified. No exceptions. Three claim types, three verification mechanics:

  1. Existence claims — table X exists; column Y exists on table X; MV Z feeds table X. Verified by system.tables / system.columns / system.tables.create_table_query. Cheap. Hard precondition: a table or column name does not appear in the artifact unless it was just queried back from system. A fact that fails existence verification is dropped, not demoted.

  2. Behavior claims — this predicate prunes the primary index; FINAL on this table amplifies reads ~Nx; this skip index is used; this query shape is cheap on the captured tenant. Verified by EXPLAIN indexes=1 and a representative SELECT … SETTINGS log_queries=1 followed by a system.query_log lookup keyed on a unique comment token. Behavior claims include the captured numbers (read_rows, granule prune ratio, latency) inline. A behavior claim with no captured measurement must be demoted to "inferred from schema".

  3. Relationship claims — table X joins to table Y on key K. Almost always inferred on a CH cluster (no real FKs). Profiler verifies (a) columns exist on both sides, (b) cardinality on a real tenant slice (matched, distinct_left/right, avg_fanout), and records the probe artifact alongside the claim. Every relationship claim is marked [inferred] regardless of probe outcome — the probe answers "does this join behave 1:1 on the captured tenant", not "is this an FK". The analyst is told to re-probe on its own tenant slice.

Demote, do not hard-fail. If a behavior or relationship claim cannot be verified (parser quirk, no representative tenant available, MCP timeout), keep the claim in the artifact under an explicit inferred: / unverified: <reason> marker. The exception is existence claims for non-existent tables/columns: those are dropped — a non-existent referent in the KB is never useful.

What this Skill produces

A folder <cluster-name>-analyst/ containing:

SKILL.md       — always-loaded entry; at-a-glance, top-15 tables, join map,
                 engine idioms, staleness. ~2-3k words.
catalog.md     — per-table cards for ~15-25 analyst-hot tables. ~2-4k words.
patterns.md    — query-writing priors per hot fact (knowledge, not recipes).
                 ~1-2k words.
pipeline.md    — demoted infra tables, ingestion shape, service users. ~1-2k words.
glossary.md    — naming, users, CH quirks, term decoder. ~0.8-1.5k words.
README.md      — meta: source, decisions, limitations, how to regenerate,
                 verification log (what was checked vs. inferred).

Target: ~5k–10k words total (user may pick "concise" or "full" via questionnaire). The user saves this folder as a Skill (claude.ai Settings → Capabilities, or their agent's skills directory).

What this Skill is NOT

  • Not an ad-hoc query assistant. You are writing a persistent artifact.
  • Not a live debugger. You don't run OPTIMIZE, ALTER, ATTACH, etc.
  • Not a general ClickHouse tutorial, and not a SQL recipe generator. The artifact carries only cluster-specific knowledge — generic engine docs are omitted (the consumer already knows them), and it teaches engine-level facts rather than prescribing query shapes for question classes (see Philosophy).

Hard rules (apply always)

  1. Read-only. Only SELECT, SHOW, DESCRIBE, EXPLAIN. Never CREATE, ALTER, DROP, INSERT, TRUNCATE, OPTIMIZE, or any statement that writes. If the MCP tool allows writes, refuse to use that path for t
Полный SKILL.md на GitHub

Установить altinity-profiler-clickhouse в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.gitignorearchetypes/A-plain-mt.mdarchetypes/B-sharded-olap.mdarchetypes/C-cube-mv.mdarchetypes/D-star-dict.mdarchetypes/E-streaming-fed.mdarchetypes/README.mdedge-cases.mdpipeline.mdtemplates.mdtools/pareto_cut.pytools/synthesize_conventions.py

FAQ

Что делает скилл altinity-profiler-clickhouse?

Profile a ClickHouse cluster via MCP and emit a per-cluster "analyst" Skill the user can save in claude.ai. Activate when the user asks to "profile this ClickHouse", "generate an analyst skill", "build a schema guide", "map the data in this cluster", or regenerate an existing cluster-analyst Skill after schema changes. Works against any ClickHouse with read-only SELECT/SHOW/DESCRIBE access via an `execute_query` MCP tool (e.g. the Altinity MCP server). Outputs a 5-file markdown bundle plus a README.

Как установить скилл altinity-profiler-clickhouse?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл altinity-profiler-clickhouse запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить altinity-profiler-clickhouse с