altinity-expert-clickhouse/skills/altinity-expert-clickhouse-connection/SKILL.md
Establishes the ClickHouse connection mode, cluster macro, and default log timeframe for diagnostics. Use first, before any other altinity-expert-clickhouse skill, to verify connectivity and set shared analysis rules.
npx skillsauth add altinity/skills altinity-expert-clickhouse-connectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Decide connection mode first and verify connectivity then:
select
hostName() as hostname,
version() as version,
getMacro('cluster') as cluster_name,
formatReadableTimeDelta(uptime()) as uptime_human,
getSetting('max_memory_usage') as max_memory_usage,
(select value from system.asynchronous_metrics where metric = 'OSMemoryTotal') as os_memory_total
Try to use MCP server with clickhouse in the name. If multiple ClickHouse MCP servers are available, ask the user which one to use. When executing queries by the MCP server, push a single SQL statement to the MCP server (no multi-query!)
clickhouse-client. Don't rely on env vars. On failure, ask how to run it properly..sql file with --queries-file and forcing JSON output (-f JSON) when capturing results to files.clusterAllReplicas('{cluster}', ...)SELECT DISTINCT cluster FROM system.clusters where not is_local and replace '{cluster}' placeholders in the queries in all .sql files.clusterAllReplicas('{cluster}', system.<table>) → system.<table> before execution.-- Use this pattern for system.*_log tables and system.errors time filters:
-- WHERE event_time >= now() - INTERVAL 24 HOUR
UNKNOWN_IDENTIFIER, run DESCRIBE TABLE system.<table> and drop/adjust only the missing columns.UNKNOWN_TABLE, skip that query and note the table is disabled or unavailable (e.g., system.part_log, system.detached_parts).In all reports, always provide a header with information:
tools
Read-only ClickHouse security audit expert for live or exported systems. Use when assessing ClickHouse security posture, reviewing users, roles, grants, settings profiles, row policies, table functions, external sources, table engines, executable UDFs, audit logs, named collections, password hash hygiene, SQL SECURITY DEFINER, impersonation, TLS/network exposure, Keeper/interserver security, encryption at rest, backups, the HTTP interface surface, cluster security, or version-specific ClickHouse security behavior. Diagnoses from SQL/system tables, supplied configuration files, query logs, access metadata, and ClickHouse/Altinity documentation.
tools
Diagnose and resolve ClickHouse grant and authentication errors, especially after upgrades. Use when queries fail with ACCESS_DENIED/NOT_ENOUGH_PRIVILEGES, AUTHENTICATION_FAILED/WRONG_PASSWORD/REQUIRED_PASSWORD, or ON CLUSTER privilege errors; when system.* or INFORMATION_SCHEMA access is denied; or when grant behavior changes after version upgrades.
tools
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.
tools
Diagnose ClickHouse disk usage, compression efficiency, part sizes, and storage bottlenecks. Use for disk space issues and slow IO.