
Clickhouse Best Practices
This is a structured review framework for ClickHouse work, organized as 31 rules you check against when designing schemas, writing queries, or building data pipelines. It handles the things that trip people up: primary key column ordering (low to high cardinality, which is counterintuitive), when to actually use partitioning (data lifecycle, not query performance), and avoiding mutations in favor of ReplacingMergeTree. The agent connectivity section is solid if you're building LLM tools that query ClickHouse directly. It includes a discovery workflow and safety checks. The output format gives you a checklist structure with compliant/violation status per rule, which makes reviews faster than digging through docs every time.
- skills.sh installs
- 22.7K
- GitHub stars
- 565
- last updated
- Aug 21, 2026
Install
$ npx -y skills add clickhouse/agent-skills --skill clickhouse-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
ClickHouse Best Practices
Comprehensive guidance for ClickHouse covering schema design, query optimization, data ingestion, and AI agent connectivity. Contains 31 rules across 4 main categories (schema, query, insert, agent), prioritized by impact.
Official docs: ClickHouse Best Practices
IMPORTANT: How to Apply This Skill
Before answering ClickHouse questions, follow this priority order:
- Check for applicable rules in the
rules/directory - If rules exist: Apply them and cite them in your response using "Per
rule-name..." - If no rule exists: Use the LLM's ClickHouse knowledge or search documentation
- If uncertain: Use web search for current best practices
- Always cite your source: rule name, "general ClickHouse guidance", or URL
Why rules take priority: ClickHouse has specific behaviors (columnar storage, sparse indexes, merge tree mechanics) where general database intuition can be misleading. The rules encode validated, ClickHouse-specific guidance.
Agent Connectivity & Query Workflow
Sponsors
Details
- Repository
- github.com/clickhouse/agent-skills
- Categories
- AI & Agent Building, Databases