moosestack-clickhouse-best-practices
MooseStack ClickHouse Best Practices
Comprehensive guidance for ClickHouse in MooseStack applications covering data model design, query optimization, and data ingestion. Contains 28 rules across 3 main categories (schema, query, insert), prioritized by impact. Each rule includes MooseStack TypeScript and Python examples.
MooseStack docs: MooseStack Documentation ClickHouse docs: ClickHouse Best Practices
IMPORTANT: How to Apply This Skill
Before answering MooseStack/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..." - Apply MooseStack patterns: Each rule includes TypeScript and Python examples for data models, OlapTables, and APIs
- If no rule exists: Use MooseStack or ClickHouse documentation
- If uncertain: Use web search for current best practices
- Always cite your source: rule name, "general MooseStack 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 guidance with MooseStack-specific patterns for TypeScript and Python.
More from 514-labs/agent-skills
clickhouse-best-practices-ts-py
Use when designing, implementing, reviewing, or optimizing MooseStack data models, ClickHouse schemas, queries, indexes, materialized views, or ingestion configs — including during greenfield authoring when schema-design or performance choices need guidance. When invoked, pick the 1-2 rules directly relevant to the immediate decision and apply them inline while you continue to write code. Do NOT pause to read six rule files and emit a "Rules Checked / Findings" audit template unless the user explicitly asks for a formal review or audit.
19514-cli
>
5514-debug
>
4514-perf-optimize
>
4moose-basics
>
3514-production-rollout-plan
>
1