$npx -y skills add clickhouse/agent-skills --skill clickhouse-architecture-advisorMUST USE when designing ClickHouse architectures, selecting between ingestion or modeling patterns, or translating best practices into workload-specific system designs. Complements clickhouse-best-practices with decision frameworks and explicit provenance labels.
| 1 | # ClickHouse Architecture Advisor |
| 2 | |
| 3 | This skill adds workload-aware architecture decisioning on top of `clickhouse-best-practices`. |
| 4 | |
| 5 | > **Official docs remain the source of truth.** |
| 6 | > This skill must always prefer official ClickHouse documentation when available. |
| 7 | |
| 8 | ## Required behavior |
| 9 | |
| 10 | Before producing recommendations: |
| 11 | |
| 12 | 1. Identify the workload shape |
| 13 | - observability |
| 14 | - security / SIEM |
| 15 | - product analytics |
| 16 | - IoT / telemetry |
| 17 | - market data / financial services |
| 18 | - mixed OLAP with point-lookups |
| 19 | 2. Read the relevant decision rule files in `rules/` |
| 20 | 3. Use `mappings/doc_links.yaml` to attach official documentation |
| 21 | 4. Classify every recommendation as: |
| 22 | - `official` |
| 23 | - `derived` |
| 24 | - `field` |
| 25 | 5. Never present field guidance as official guidance |
| 26 | 6. If a recommendation is uncertain, say so explicitly |
| 27 | |
| 28 | ## Provenance rules |
| 29 | |
| 30 | ### `official` |
| 31 | Use this when the recommendation is directly backed by official docs. |
| 32 | |
| 33 | ### `derived` |
| 34 | Use this when the recommendation is not stated verbatim in docs but follows logically from documented ClickHouse behavior. |
| 35 | |
| 36 | ### `field` |
| 37 | Use this only for experience-based guidance that may be situational. |
| 38 | When using `field`, include: |
| 39 | - a disclaimer that the advice is heuristic |
| 40 | - a relevant official doc if one partially applies |
| 41 | - the reason the advice depends on workload context |
| 42 | |
| 43 | ## Read these rule files by scenario |
| 44 | |
| 45 | ### Real-time ingestion design |
| 46 | 1. `rules/decision-ingestion-strategy.md` |
| 47 | 2. `rules/decision-real-time-preaggregation.md` |
| 48 | 3. Relevant best-practices insert rules |
| 49 | |
| 50 | ### Time-series and retention design |
| 51 | 1. `rules/decision-partitioning-timeseries.md` |
| 52 | 2. Relevant best-practices schema partition rules |
| 53 | |
| 54 | ### Enrichment and dimension lookups |
| 55 | 1. `rules/decision-join-enrichment.md` |
| 56 | 2. Relevant best-practices query join rules |
| 57 | |
| 58 | ### Mutable state / late-arriving events |
| 59 | 1. `rules/decision-late-arriving-upserts.md` |
| 60 | 2. Relevant best-practices mutation avoidance rules |
| 61 | |
| 62 | ## Output format |
| 63 | |
| 64 | Structure responses like this: |
| 65 | |
| 66 | ```markdown |
| 67 | ## Workload Summary |
| 68 | - workload: |
| 69 | - latency target: |
| 70 | - data shape: |
| 71 | - primary query patterns: |
| 72 | - operational constraints: |
| 73 | |
| 74 | ## Key Decisions |
| 75 | - ... |
| 76 | - ... |
| 77 | |
| 78 | ## Recommendations |
| 79 | |
| 80 | ### <Recommendation title> |
| 81 | |
| 82 | **What** |
| 83 | ... |
| 84 | |
| 85 | **Why** |
| 86 | ... |
| 87 | |
| 88 | **How** |
| 89 | ... |
| 90 | |
| 91 | **Category** |
| 92 | official | derived | field |
| 93 | |
| 94 | **Confidence** |
| 95 | high | medium | heuristic |
| 96 | |
| 97 | **Source** |
| 98 | - doc link(s) |
| 99 | |
| 100 | **Validation** |
| 101 | - concrete SQL, metric, or smoke test |
| 102 | ``` |
| 103 | |
| 104 | ## Architecture-specific guidance |
| 105 | |
| 106 | Prefer decision frameworks over generic advice. Good responses should: |
| 107 | - explain tradeoffs |
| 108 | - identify the likely operating bottleneck |
| 109 | - separate immediate actions from structural redesign |
| 110 | - provide target architecture patterns, not just isolated settings |
| 111 | |
| 112 | ## Full reference |
| 113 | |
| 114 | See `AGENTS.md` for the compiled version and `examples/` for sample outputs. |