clickhouse-migrations
ClickHouse migration patterns and rules. Use when creating or modifying ClickHouse migrations.
Install
Install this Claude and Codex skill with the command below. The command stays visible even when copy support is unavailable.
git clone https://github.com/PostHog/posthog /tmp/posthog && ln -s /tmp/posthog/.agents/skills/clickhouse-migrations ~/.claude/skills/clickhouse-migrations
From README
ClickHouse Migrations Read posthog/clickhouse/migrations/AGENTS.md for comprehensive patterns, cluster , examples, and ingestion layer details. Quick reference Migration structure Node roles (choose based on table type) [NodeRole.DATA]: Sharded tables (data nodes only) [NodeRole.DATA, NodeRole.COORDINATOR]: Non-sharded data tables, distributed read tables, replicated tables, views, dictionaries [NodeRole.INGESTIONSMALL]: Writable tables, Kafka tables, materialized views on ingestion layer Table engines quick reference MergeTree engines: AggregatingMergeTree(table, replicationscheme=ReplicationScheme.SHARDED) for sharded tables ReplacingMergeTree(table, replicationscheme=ReplicationScheme.REPLICATED) for non-sharded Other variants: CollapsingMergeTree, ReplacingMergeTreeDeleted Distributed engine: Sharded: Distributed(datatable="shardedevents", shardingkey="sipHash64(personid)") Non-sharded: Distributed(datatable="mytable", cluster=settings.CLICKHOUSESINGLESHARDCLUSTER) Critical rule...
More from this repo
implementing-agent-modes
Guidelines to create/update a new mode for PostHog AI agent.
adding-personhog-rpc
Guide for adding a new RPC to personhog-replica and personhog-router.
adopting-generated-api-types
Used when migrating frontend code from manual API client calls (`api.get`, `api.create`, `api.surveys.get`,...