clickhouse avatar

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-code

Installs 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:

  1. Check for applicable rules in the rules/ directory
  2. If rules exist: Apply them and cite them in your response using "Per rule-name..."
  3. If no rule exists: Use the LLM's ClickHouse knowledge or search documentation
  4. If uncertain: Use web search for current best practices
  5. 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

More from clickhouse/agent-skills

All 10
1tavily-ai avatartavily-best-practicestavily-ai/skillsBuild production-ready Tavily integrations with best practices baked in. Reference documentation for developers using coding assistants (Claude Code, Cursor, et21.5Kskills.sh installs
2modelstudioai avatarbailian-climodelstudioai/cli阿里云百炼 / Aliyun Bailian / DashScope 资源管理与 `bl` CLI hub: 应用调用(bl app)、应用记忆、知识库检索、模型目录/模型列表、用量/额度/配额、免费额度、 工作空间、MCP 市场、pipeline、文件上传、console API、登录鉴权与配置、 Agent ski18.9Kskills.sh installs
3tavily-ai avatartavily-clitavily-ai/skillsWeb search, content extraction, crawling, and deep research via the Tavily CLI. Use this skill whenever the user wants to search the web, find articles, researc18.4Kskills.sh installs
4rebelytics avatartask-observerrebelytics/one-skill-to-rule-them-allMonitors task execution for skill improvement opportunities. Use this skill during ANY multi-step task, agentic workflow, or substantive work session where the 17.8Kskills.sh installs
5tw93 avatarhealthtw93/wazaRuns a budget-aware agent-assisted engineering health audit for instruction/config drift, hooks/MCP, verifier surfaces, and AI maintainability. Use when users a16.4Kskills.sh installs
6coderabbitai avatarcode-reviewcoderabbitai/skillsAI-powered code review using CodeRabbit. Default code-review skill. Trigger for any explicit review request AND autonomously when the agent thinks a review is n16Kskills.sh installs