[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EMJ8W2VATAAE9ZHMK2W7EP":3,"skill-same:01M7EMJ8W2VATAAE9ZHMK2W7EP":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EMJ8W2VATAAE9ZHMK2W7EP","clickhouse-pro",null,"ClickHouse columnar analytics — schema design, MergeTree tuning, and fast queries — use for OLAP and high-volume event data.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-clickhouse-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: clickhouse-pro\ndescription: ClickHouse columnar analytics — schema design, MergeTree tuning, and fast queries — use for OLAP and high-volume event data.\ncategory: database\n---\n\n## Overview\n\nClickHouse is a columnar OLAP database built for sub-second analytics over\nbillions of rows. Its speed comes from a storage layout (MergeTree family) and\nquery engine designed for scans and aggregations — which means schema and query\npatterns differ sharply from row-oriented databases. This skill covers designing\nfor ClickHouse's strengths.\n\n## When to use\n\n- Designing tables (`MergeTree`, `ReplacingMergeTree`, `AggregatingMergeTree`)\n- Choosing `ORDER BY` \u002F partition keys for time-series or event data\n- Writing aggregation queries (`GROUP BY`, `uniq`, `quantiles`, window functions)\n- Tuning inserts (batches vs trickle), mutations, and background merges\n- Operating clusters: replication, sharding, backups\n\n## Core concepts\n\n**ORDER BY is the primary index.** The `ORDER BY` key (sorting key) determines\ndata layout on disk and which queries skip granules. Put the most-filtered\ncolumns first — typically `(tenant_id, event_time, ...)` — because ClickHouse\nprunes using this key. Choose wrong and every query scans everything.\n\n**Columnar means wide tables are cheap.** Unlike row stores, selecting 5 columns\nfrom a 200-column table reads only those 5. Denormalize aggressively — joins\nare supported but the engine rewards flat, pre-joined event tables.\n\n**Inserts: batch, don't trickle.** Each insert creates a part; thousands of\ntiny inserts create thousands of parts and merge storms. Batch to ~1k–100k rows\nper insert (or use async inserts \u002F a buffer table). Aim for parts in the\nhundreds, not millions.\n\n**Engines encode update semantics.** `ReplacingMergeTree` keeps the latest row\nper key (deduplication at merge time — queries should still use `FINAL` or\n`argMax` for exactness). `AggregatingMergeTree` stores partial aggregate states\nfor incremental rollups. `SummingMergeTree`\u002F`CollapsingMergeTree` handle\nspecific accounting patterns. Pick the engine that matches how data changes.\n\n**Approximation is a feature.** `uniq()`, `quantiles()`, and sampling (`TABLESAMPLE`,\n`SAMPLE BY`) trade tiny accuracy losses for 10–100x speedups — perfect for\ndashboards over billions of rows.\n\n## Practical workflow\n\n1. **Start from the queries:** list the filters and group-bys your dashboards\n   need; these dictate the `ORDER BY` key and partitioning (usually by month on\n   the timestamp).\n2. **Define the table** with the right engine, `PARTITION BY toYYYYMM(ts)`,\n   `ORDER BY (tenant_id, ts)`, and low-cardinality types (`LowCardinality(String)`,\n   `DateTime`, appropriate integer widths) to cut storage.\n3. **Load with batches:** buffer upstream, insert in chunks, monitor\n   `system.parts` count per table — sustained growth signals an insert problem.\n4. **Write queries that prune:** filter on the sorting key prefix, avoid\n   `SELECT *`, use `PREWHERE` for highly selective filters on non-key columns,\n   and prefer approximate functions for exploratory work.\n5. **Handle mutations carefully:** `ALTER UPDATE\u002FDELETE` are heavyweight\n   background operations — fine occasionally, not a workload pattern. Design\n   around append-mostly data.\n6. **Operate:** replicate with `ReplicatedMergeTree` + ZooKeeper\u002FClickHouse\n   Keeper, shard by a hash key for scale-out, back up with filesystem snapshots\n   or `BACKUP TABLE`, and monitor merge\u002Fmutation queues.\n\n## Common pitfalls\n\n- **Row-by-row inserts** — the #1 ClickHouse anti-pattern; causes part\n  explosion, merge backlog, and degraded queries. Batch always.\n- **High-cardinality first in ORDER BY** (e.g. a UUID) — destroys compression\n  and pruning; order by commonly filtered low\u002Fmedium-cardinality columns first.\n- **Using `FINAL` on huge tables routinely** — forces full merges at query\n  time; use it sparingly or design deduplication into the pipeline.\n- **Treating it like Postgres** — frequent small updates, heavy joins, and\n  transactional expectations fight the architecture. ClickHouse is append-mostly\n  analytics.\n- **Ignoring data types:** `String` for everything wastes 5–10x storage vs\n  `LowCardinality(String)` and right-sized numerics; storage is query speed in\n  a columnar engine.\n- **No TTL \u002F retention policy** on ever-growing event tables — disk fills,\n  merges slow, queries degrade. Set `TTL` or drop old partitions on a schedule.\n","## Overview\n\nClickHouse is a columnar OLAP database built for sub-second analytics over\nbillions of rows. Its speed comes from a storage layout (MergeTree family) and\nquery engine designed for scans and aggregations — which means schema and query\npatterns differ sharply from row-oriented databases. This skill covers designing\nfor ClickHouse's strengths.\n\n## When to use\n\n- Designing tables (`MergeTree`, `ReplacingMergeTree`, `AggregatingMergeTree`)\n- Choosing `ORDER BY` \u002F partition keys for time-series or event data\n- Writing aggregation queries (`GROUP BY`, `uniq`, `quantiles`, window functions)\n- Tuning inserts (batches vs trickle), mutations, and background merges\n- Operating clusters: replication, sharding, backups\n\n## Core concepts\n\n**ORDER BY is the primary index.** The `ORDER BY` key (sorting key) determines\ndata layout on disk and which queries skip granules. Put the most-filtered\ncolumns first — typically `(tenant_id, event_time, ...)` — because ClickHouse\nprunes using this key. Choose wrong and every query scans everything.\n\n**Columnar means wide tables are cheap.** Unlike row stores, selecting 5 columns\nfrom a 200-column table reads only those 5. Denormalize aggressively — joins\nare supported but the engine rewards flat, pre-joined event tables.\n\n**Inserts: batch, don't trickle.** Each insert creates a part; thousands of\ntiny inserts create thousands of parts and merge storms. Batch to ~1k–100k rows\nper insert (or use async inserts \u002F a buffer table). Aim for parts in the\nhundreds, not millions.\n\n**Engines encode update semantics.** `ReplacingMergeTree` keeps the latest row\nper key (deduplication at merge time — queries should still use `FINAL` or\n`argMax` for exactness). `AggregatingMergeTree` stores partial aggregate states\nfor incremental rollups. `SummingMergeTree`\u002F`CollapsingMergeTree` handle\nspecific accounting patterns. Pick the engine that matches how data changes.\n\n**Approximation is a feature.** `uniq()`, `quantiles()`, and sampling (`TABLESAMPLE`,\n`SAMPLE BY`) trade tiny accuracy losses for 10–100x speedups — perfect for\ndashboards over billions of rows.\n\n## Practical workflow\n\n1. **Start from the queries:** list the filters and group-bys your dashboards\n   need; these dictate the `ORDER BY` key and partitioning (usually by month on\n   the timestamp).\n2. **Define the table** with the right engine, `PARTITION BY toYYYYMM(ts)`,\n   `ORDER BY (tenant_id, ts)`, and low-cardinality types (`LowCardinality(String)`,\n   `DateTime`, appropriate integer widths) to cut storage.\n3. **Load with batches:** buffer upstream, insert in chunks, monitor\n   `system.parts` count per table — sustained growth signals an insert problem.\n4. **Write queries that prune:** filter on the sorting key prefix, avoid\n   `SELECT *`, use `PREWHERE` for highly selective filters on non-key columns,\n   and prefer approximate functions for exploratory work.\n5. **Handle mutations carefully:** `ALTER UPDATE\u002FDELETE` are heavyweight\n   background operations — fine occasionally, not a workload pattern. Design\n   around append-mostly data.\n6. **Operate:** replicate with `ReplicatedMergeTree` + ZooKeeper\u002FClickHouse\n   Keeper, shard by a hash key for scale-out, back up with filesystem snapshots\n   or `BACKUP TABLE`, and monitor merge\u002Fmutation queues.\n\n## Common pitfalls\n\n- **Row-by-row inserts** — the #1 ClickHouse anti-pattern; causes part\n  explosion, merge backlog, and degraded queries. Batch always.\n- **High-cardinality first in ORDER BY** (e.g. a UUID) — destroys compression\n  and pruning; order by commonly filtered low\u002Fmedium-cardinality columns first.\n- **Using `FINAL` on huge tables routinely** — forces full merges at query\n  time; use it sparingly or design deduplication into the pipeline.\n- **Treating it like Postgres** — frequent small updates, heavy joins, and\n  transactional expectations fight the architecture. ClickHouse is append-mostly\n  analytics.\n- **Ignoring data types:** `String` for everything wastes 5–10x storage vs\n  `LowCardinality(String)` and right-sized numerics; storage is query speed in\n  a columnar engine.\n- **No TTL \u002F retention policy** on ever-growing event tables — disk fills,\n  merges slow, queries degrade. Set `TTL` or drop old partitions on a schedule.\n",{"name":5,"category":24,"description":7},"database","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-clickhouse-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill clickhouse-pro",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill clickhouse-pro",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill clickhouse-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-clickhouse-pro\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]