[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-cline-clickhouse":3,"mdc-xjylpj-key":35,"related-repo-cline-clickhouse":1519,"related-org-cline-clickhouse":1633},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":33,"mdContent":34},"clickhouse","query ClickHouse databases via CLI","Connect to and query ClickHouse (a local server or a ClickHouse Cloud service) from the terminal using the official clickhousectl CLI, including the browser OAuth login flow. Use when the user wants to run SQL against ClickHouse, explore schemas and tables, inspect Cloud services, or authenticate clickhousectl. For building a local dev environment or deploying to Cloud, defer to the official ClickHouse skills (see Scope).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"cline","Cline","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fcline.png",[12,15,18,21],{"name":13,"slug":4,"type":14},"ClickHouse","tag",{"name":16,"slug":17,"type":14},"CLI","cli",{"name":19,"slug":20,"type":14},"Database","database",{"name":22,"slug":23,"type":14},"Analytics","analytics",10,"https:\u002F\u002Fgithub.com\u002Fcline\u002Fskills","2026-07-12T08:14:06.829692",null,4,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":32},[],"A collection of skills used at Cline","https:\u002F\u002Fgithub.com\u002Fcline\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fdata-analyst\u002Fskills\u002Fclickhouse","---\nname: clickhouse\ndescription: Connect to and query ClickHouse (a local server or a ClickHouse Cloud service) from the terminal using the official clickhousectl CLI, including the browser OAuth login flow. Use when the user wants to run SQL against ClickHouse, explore schemas and tables, inspect Cloud services, or authenticate clickhousectl. For building a local dev environment or deploying to Cloud, defer to the official ClickHouse skills (see Scope).\n---\n\n# ClickHouse via clickhousectl\n\nConnect to ClickHouse and run queries using `clickhousectl`, the official ClickHouse CLI. This skill covers the parts a data analyst needs: authenticating, pointing at the right server, and running safe SQL. It does not use the ClickHouse MCP server; everything goes through the CLI.\n\n## Scope\n\nThis skill is for connecting and querying. For these other flows, use the bundled official ClickHouse skills (siblings in this directory) instead of reinventing them:\n\n- Setting up a local dev environment from scratch (install ClickHouse, init a project, start a server, create schema): `..\u002Fclickhousectl-local-dev\u002F`.\n- Deploying to or migrating into ClickHouse Cloud (create a service, migrate schema, provision an app user): `..\u002Fclickhousectl-cloud-deploy\u002F`.\n- Writing or optimizing non-trivial SQL, or the agent schema-discovery and query-safety workflow: `..\u002Fclickhouse-best-practices\u002F`.\n- Running SQL on local files or remote sources without a server: `..\u002Fchdb-sql\u002F`.\n\nThese are vendored from https:\u002F\u002Fgithub.com\u002FClickHouse\u002Fagent-skills (Apache-2.0). They can also be installed standalone with `clickhousectl skills` or `npx skills add clickhouse\u002Fagent-skills`.\n\n## Step 1: Ensure clickhousectl is installed\n\n```bash\nwhich clickhousectl\n```\n\nIf not found, install it (downloads the right build for the OS, installs to `~\u002F.local\u002Fbin\u002Fclickhousectl`, and creates a `chctl` alias):\n\n```bash\ncurl -fsSL https:\u002F\u002Fclickhouse.com\u002Fcli | sh\n```\n\nIf the command is still not found after install, `~\u002F.local\u002Fbin` is not on PATH for this session:\n\n```bash\nexport PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\n```\n\n## Step 2: Identify the target\n\nDecide what you are querying before authenticating. There are three cases:\n\n- A local ClickHouse server managed by `clickhousectl` (started via `clickhousectl local server start`). Query it by name. No cloud auth needed.\n- Any reachable ClickHouse over host\u002Fport (local or remote). No cloud auth needed.\n- A ClickHouse Cloud service. Requires cloud authentication (Step 3).\n\nList local servers and their ports:\n\n```bash\nclickhousectl local server list\n```\n\n## Step 3: Authenticate to ClickHouse Cloud (only for Cloud targets)\n\nSkip this entirely for local or host\u002Fport targets.\n\n`clickhousectl` has two cloud auth modes. The distinction matters:\n\n- OAuth login (browser device flow), read-only. The agent can run this directly; it opens the user's browser. It can list and inspect resources (orgs, services, service details) but cannot create, modify, or delete.\n\n  ```bash\n  clickhousectl cloud auth login\n  ```\n\n- API key login, read and write. Needed for any write, and also for running SQL via `cloud service query` on first use (see the note in Step 4). Keep the secret out of the chat: ask the user to run this in a separate terminal in the same directory, or set the env vars themselves.\n\n  ```bash\n  # Either: run in a separate terminal (keeps the secret out of this session)\n  clickhousectl cloud auth login --api-key \u003CKEY> --api-secret \u003CSECRET>\n\n  # Or: environment variables (good for scripts\u002Fagents)\n  export CLICKHOUSE_CLOUD_API_KEY=\u003CKEY>\n  export CLICKHOUSE_CLOUD_API_SECRET=\u003CSECRET>\n  ```\n\nIf the user has no account yet, `clickhousectl cloud auth signup` opens the sign-up page.\n\nVerify auth and list what you can reach:\n\n```bash\nclickhousectl cloud auth status\nclickhousectl cloud org list\nclickhousectl cloud service list          # get the service name \u002F id you will query\n```\n\nCredential resolution order: CLI flags > OAuth tokens > `.clickhousectl\u002Fcredentials.json` > environment variables. Credentials are stored project-locally under `.clickhousectl\u002F`.\n\n## Step 4: Run queries\n\nPrefer `--format` (e.g. `JSONEachRow`, `CSV`, `TabSeparated`) or `--json` when you need to parse results in a later step. SQL precedence for the query commands is `--query` > `--queries-file` > stdin.\n\nCloud service (over HTTP, no local binary or service password required):\n\n```bash\nclickhousectl cloud service query --name \u003Cservice> -q \"SHOW DATABASES\"\nclickhousectl cloud service query --id \u003Cservice-id> -q \"SELECT count() FROM events\" --format JSONEachRow\nclickhousectl cloud service query --name \u003Cservice> --database analytics --queries-file query.sql\n```\n\nNote on Cloud auth and querying: `cloud service query` uses a per-service query-endpoint API key that is auto-provisioned on first use and stored in `.clickhousectl\u002Fcredentials.json`. Provisioning is a write, so a read-only OAuth login is not sufficient for the first query against a service. Use API key auth (Step 3) to run SQL, or pass `--no-auto-enable` to fail fast instead of attempting to provision. Once provisioned, later queries reuse the stored key.\n\nLocal or host\u002Fport server (uses `clickhouse-client`):\n\n```bash\nclickhousectl local client --name \u003Cserver> -q \"SHOW TABLES\"        # named local server\nclickhousectl local client --host myhost --port 9000 -q \"SELECT 1\"  # any reachable server\nclickhousectl local client --name \u003Cserver> --queries-file query.sql\n```\n\n## Safe query practices\n\nKeep queries safe, explainable, and bounded.\n\n1. Discover schema\u002Ftable shape if unknown: `SHOW DATABASES`, `SHOW TABLES`, `DESCRIBE TABLE \u003Ct>`.\n2. Draft SQL using documented definitions when available (see `..\u002Freading-data-dict\u002F`).\n3. Explain what the SQL does before expensive execution.\n4. Preview first when returning rows: `LIMIT 10` or `LIMIT 100`.\n5. Prefer aggregate queries for metrics; avoid dumping high-cardinality raw data.\n6. Confirm with the user before long-running, broad, or expensive scans.\n7. Return the SQL with results so the user can inspect and reuse it.\n\nSafety checks:\n\n- Avoid accidental cross joins; use explicit join keys and know why the join is valid.\n- Filter by time window whenever possible.\n- Avoid `SELECT *` except tiny schema previews.\n- Check row counts before exporting large result sets.\n- Add `--json` or a `--format` for machine-readable output you intend to parse downstream.\n\n## Bounded queries and large tables\n\nLarge fact tables can time out or exceed memory even for seemingly simple sanity checks. Keep exploratory and validation queries bounded unless there is strong evidence the table is small.\n\n- Avoid unbounded freshness checks such as full-table `count()`, `uniqExact(...)`, or broad `min\u002Fmax` scans on large fact tables. Prefer bounded recent-window checks, partition-aware filters, table metadata, or known date\u002Fkey ranges, for example `WHERE report_date >= today() - 7`.\n- For a quick metric over \"last N days\" from a daily aggregate table, default to completed report dates when appropriate and state that assumption; mention alternatives such as rolling N hours or including today if ambiguous.\n- If an exact aggregate exceeds memory or times out, retry with smaller bounded chunks only when chunking preserves correctness. Daily counts can be queried week-by-week and concatenated because each date belongs to exactly one chunk.\n- Do not chunk-and-sum distinct users across chunks unless the requested grain makes chunks independent. Weekly unique users cannot be produced by summing daily unique users, because a user can appear on multiple days.\n- Document chunk boundaries, why the combined result remains exact, and the original failure mode in the SQL notes or artifact metadata.\n- If no exact bounded fallback is safe, ask whether an approximate aggregate such as `uniq(...)`, a shorter window, or a different grain is acceptable.\n\n## Result package\n\nWhen returning query results, include:\n\n- the SQL executed\n- row count or aggregate count\n- sample output or artifact path\n- data freshness or observed time range\n- caveats and the next query if needed\n\n## Auth and secret handling\n\n- Never print API keys, secrets, or passwords into the conversation or commit them.\n- Prefer the browser OAuth flow for read-only exploration; it puts no secret in the chat.\n- When write access or SQL querying requires an API key, prefer a separate terminal or environment variables over pasting the secret into this session.\n- `clickhousectl cloud auth logout` clears all saved credentials (OAuth tokens and API keys).\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,49,64,71,76,130,160,166,195,216,253,266,318,324,329,362,367,396,402,407,417,624,637,642,715,735,741,801,806,1003,1030,1043,1211,1217,1222,1302,1307,1357,1363,1368,1439,1445,1450,1478,1484,1513],{"type":41,"tag":42,"props":43,"children":45},"element","h1",{"id":44},"clickhouse-via-clickhousectl",[46],{"type":47,"value":48},"text","ClickHouse via clickhousectl",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53,55,62],{"type":47,"value":54},"Connect to ClickHouse and run queries using ",{"type":41,"tag":56,"props":57,"children":59},"code",{"className":58},[],[60],{"type":47,"value":61},"clickhousectl",{"type":47,"value":63},", the official ClickHouse CLI. This skill covers the parts a data analyst needs: authenticating, pointing at the right server, and running safe SQL. It does not use the ClickHouse MCP server; everything goes through the CLI.",{"type":41,"tag":65,"props":66,"children":68},"h2",{"id":67},"scope",[69],{"type":47,"value":70},"Scope",{"type":41,"tag":50,"props":72,"children":73},{},[74],{"type":47,"value":75},"This skill is for connecting and querying. For these other flows, use the bundled official ClickHouse skills (siblings in this directory) instead of reinventing them:",{"type":41,"tag":77,"props":78,"children":79},"ul",{},[80,94,106,118],{"type":41,"tag":81,"props":82,"children":83},"li",{},[84,86,92],{"type":47,"value":85},"Setting up a local dev environment from scratch (install ClickHouse, init a project, start a server, create schema): ",{"type":41,"tag":56,"props":87,"children":89},{"className":88},[],[90],{"type":47,"value":91},"..\u002Fclickhousectl-local-dev\u002F",{"type":47,"value":93},".",{"type":41,"tag":81,"props":95,"children":96},{},[97,99,105],{"type":47,"value":98},"Deploying to or migrating into ClickHouse Cloud (create a service, migrate schema, provision an app user): ",{"type":41,"tag":56,"props":100,"children":102},{"className":101},[],[103],{"type":47,"value":104},"..\u002Fclickhousectl-cloud-deploy\u002F",{"type":47,"value":93},{"type":41,"tag":81,"props":107,"children":108},{},[109,111,117],{"type":47,"value":110},"Writing or optimizing non-trivial SQL, or the agent schema-discovery and query-safety workflow: ",{"type":41,"tag":56,"props":112,"children":114},{"className":113},[],[115],{"type":47,"value":116},"..\u002Fclickhouse-best-practices\u002F",{"type":47,"value":93},{"type":41,"tag":81,"props":119,"children":120},{},[121,123,129],{"type":47,"value":122},"Running SQL on local files or remote sources without a server: ",{"type":41,"tag":56,"props":124,"children":126},{"className":125},[],[127],{"type":47,"value":128},"..\u002Fchdb-sql\u002F",{"type":47,"value":93},{"type":41,"tag":50,"props":131,"children":132},{},[133,135,143,145,151,153,159],{"type":47,"value":134},"These are vendored from ",{"type":41,"tag":136,"props":137,"children":141},"a",{"href":138,"rel":139},"https:\u002F\u002Fgithub.com\u002FClickHouse\u002Fagent-skills",[140],"nofollow",[142],{"type":47,"value":138},{"type":47,"value":144}," (Apache-2.0). They can also be installed standalone with ",{"type":41,"tag":56,"props":146,"children":148},{"className":147},[],[149],{"type":47,"value":150},"clickhousectl skills",{"type":47,"value":152}," or ",{"type":41,"tag":56,"props":154,"children":156},{"className":155},[],[157],{"type":47,"value":158},"npx skills add clickhouse\u002Fagent-skills",{"type":47,"value":93},{"type":41,"tag":65,"props":161,"children":163},{"id":162},"step-1-ensure-clickhousectl-is-installed",[164],{"type":47,"value":165},"Step 1: Ensure clickhousectl is installed",{"type":41,"tag":167,"props":168,"children":173},"pre",{"className":169,"code":170,"language":171,"meta":172,"style":172},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","which clickhousectl\n","bash","",[174],{"type":41,"tag":56,"props":175,"children":176},{"__ignoreMap":172},[177],{"type":41,"tag":178,"props":179,"children":182},"span",{"class":180,"line":181},"line",1,[183,189],{"type":41,"tag":178,"props":184,"children":186},{"style":185},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[187],{"type":47,"value":188},"which",{"type":41,"tag":178,"props":190,"children":192},{"style":191},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[193],{"type":47,"value":194}," clickhousectl\n",{"type":41,"tag":50,"props":196,"children":197},{},[198,200,206,208,214],{"type":47,"value":199},"If not found, install it (downloads the right build for the OS, installs to ",{"type":41,"tag":56,"props":201,"children":203},{"className":202},[],[204],{"type":47,"value":205},"~\u002F.local\u002Fbin\u002Fclickhousectl",{"type":47,"value":207},", and creates a ",{"type":41,"tag":56,"props":209,"children":211},{"className":210},[],[212],{"type":47,"value":213},"chctl",{"type":47,"value":215}," alias):",{"type":41,"tag":167,"props":217,"children":219},{"className":169,"code":218,"language":171,"meta":172,"style":172},"curl -fsSL https:\u002F\u002Fclickhouse.com\u002Fcli | sh\n",[220],{"type":41,"tag":56,"props":221,"children":222},{"__ignoreMap":172},[223],{"type":41,"tag":178,"props":224,"children":225},{"class":180,"line":181},[226,232,237,242,248],{"type":41,"tag":178,"props":227,"children":229},{"style":228},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[230],{"type":47,"value":231},"curl",{"type":41,"tag":178,"props":233,"children":234},{"style":191},[235],{"type":47,"value":236}," -fsSL",{"type":41,"tag":178,"props":238,"children":239},{"style":191},[240],{"type":47,"value":241}," https:\u002F\u002Fclickhouse.com\u002Fcli",{"type":41,"tag":178,"props":243,"children":245},{"style":244},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[246],{"type":47,"value":247}," |",{"type":41,"tag":178,"props":249,"children":250},{"style":228},[251],{"type":47,"value":252}," sh\n",{"type":41,"tag":50,"props":254,"children":255},{},[256,258,264],{"type":47,"value":257},"If the command is still not found after install, ",{"type":41,"tag":56,"props":259,"children":261},{"className":260},[],[262],{"type":47,"value":263},"~\u002F.local\u002Fbin",{"type":47,"value":265}," is not on PATH for this session:",{"type":41,"tag":167,"props":267,"children":269},{"className":169,"code":268,"language":171,"meta":172,"style":172},"export PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\n",[270],{"type":41,"tag":56,"props":271,"children":272},{"__ignoreMap":172},[273],{"type":41,"tag":178,"props":274,"children":275},{"class":180,"line":181},[276,282,288,293,298,303,308,313],{"type":41,"tag":178,"props":277,"children":279},{"style":278},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[280],{"type":47,"value":281},"export",{"type":41,"tag":178,"props":283,"children":285},{"style":284},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[286],{"type":47,"value":287}," PATH",{"type":41,"tag":178,"props":289,"children":290},{"style":244},[291],{"type":47,"value":292},"=",{"type":41,"tag":178,"props":294,"children":295},{"style":244},[296],{"type":47,"value":297},"\"",{"type":41,"tag":178,"props":299,"children":300},{"style":284},[301],{"type":47,"value":302},"$HOME",{"type":41,"tag":178,"props":304,"children":305},{"style":191},[306],{"type":47,"value":307},"\u002F.local\u002Fbin:",{"type":41,"tag":178,"props":309,"children":310},{"style":284},[311],{"type":47,"value":312},"$PATH",{"type":41,"tag":178,"props":314,"children":315},{"style":244},[316],{"type":47,"value":317},"\"\n",{"type":41,"tag":65,"props":319,"children":321},{"id":320},"step-2-identify-the-target",[322],{"type":47,"value":323},"Step 2: Identify the target",{"type":41,"tag":50,"props":325,"children":326},{},[327],{"type":47,"value":328},"Decide what you are querying before authenticating. There are three cases:",{"type":41,"tag":77,"props":330,"children":331},{},[332,352,357],{"type":41,"tag":81,"props":333,"children":334},{},[335,337,342,344,350],{"type":47,"value":336},"A local ClickHouse server managed by ",{"type":41,"tag":56,"props":338,"children":340},{"className":339},[],[341],{"type":47,"value":61},{"type":47,"value":343}," (started via ",{"type":41,"tag":56,"props":345,"children":347},{"className":346},[],[348],{"type":47,"value":349},"clickhousectl local server start",{"type":47,"value":351},"). Query it by name. No cloud auth needed.",{"type":41,"tag":81,"props":353,"children":354},{},[355],{"type":47,"value":356},"Any reachable ClickHouse over host\u002Fport (local or remote). No cloud auth needed.",{"type":41,"tag":81,"props":358,"children":359},{},[360],{"type":47,"value":361},"A ClickHouse Cloud service. Requires cloud authentication (Step 3).",{"type":41,"tag":50,"props":363,"children":364},{},[365],{"type":47,"value":366},"List local servers and their ports:",{"type":41,"tag":167,"props":368,"children":370},{"className":169,"code":369,"language":171,"meta":172,"style":172},"clickhousectl local server list\n",[371],{"type":41,"tag":56,"props":372,"children":373},{"__ignoreMap":172},[374],{"type":41,"tag":178,"props":375,"children":376},{"class":180,"line":181},[377,381,386,391],{"type":41,"tag":178,"props":378,"children":379},{"style":228},[380],{"type":47,"value":61},{"type":41,"tag":178,"props":382,"children":383},{"style":191},[384],{"type":47,"value":385}," local",{"type":41,"tag":178,"props":387,"children":388},{"style":191},[389],{"type":47,"value":390}," server",{"type":41,"tag":178,"props":392,"children":393},{"style":191},[394],{"type":47,"value":395}," list\n",{"type":41,"tag":65,"props":397,"children":399},{"id":398},"step-3-authenticate-to-clickhouse-cloud-only-for-cloud-targets",[400],{"type":47,"value":401},"Step 3: Authenticate to ClickHouse Cloud (only for Cloud targets)",{"type":41,"tag":50,"props":403,"children":404},{},[405],{"type":47,"value":406},"Skip this entirely for local or host\u002Fport targets.",{"type":41,"tag":50,"props":408,"children":409},{},[410,415],{"type":41,"tag":56,"props":411,"children":413},{"className":412},[],[414],{"type":47,"value":61},{"type":47,"value":416}," has two cloud auth modes. The distinction matters:",{"type":41,"tag":77,"props":418,"children":419},{},[420,454],{"type":41,"tag":81,"props":421,"children":422},{},[423,425],{"type":47,"value":424},"OAuth login (browser device flow), read-only. The agent can run this directly; it opens the user's browser. It can list and inspect resources (orgs, services, service details) but cannot create, modify, or delete.",{"type":41,"tag":167,"props":426,"children":428},{"className":169,"code":427,"language":171,"meta":172,"style":172},"clickhousectl cloud auth login\n",[429],{"type":41,"tag":56,"props":430,"children":431},{"__ignoreMap":172},[432],{"type":41,"tag":178,"props":433,"children":434},{"class":180,"line":181},[435,439,444,449],{"type":41,"tag":178,"props":436,"children":437},{"style":228},[438],{"type":47,"value":61},{"type":41,"tag":178,"props":440,"children":441},{"style":191},[442],{"type":47,"value":443}," cloud",{"type":41,"tag":178,"props":445,"children":446},{"style":191},[447],{"type":47,"value":448}," auth",{"type":41,"tag":178,"props":450,"children":451},{"style":191},[452],{"type":47,"value":453}," login\n",{"type":41,"tag":81,"props":455,"children":456},{},[457,459,465,467],{"type":47,"value":458},"API key login, read and write. Needed for any write, and also for running SQL via ",{"type":41,"tag":56,"props":460,"children":462},{"className":461},[],[463],{"type":47,"value":464},"cloud service query",{"type":47,"value":466}," on first use (see the note in Step 4). Keep the secret out of the chat: ask the user to run this in a separate terminal in the same directory, or set the env vars themselves.",{"type":41,"tag":167,"props":468,"children":470},{"className":169,"code":469,"language":171,"meta":172,"style":172},"# Either: run in a separate terminal (keeps the secret out of this session)\nclickhousectl cloud auth login --api-key \u003CKEY> --api-secret \u003CSECRET>\n\n# Or: environment variables (good for scripts\u002Fagents)\nexport CLICKHOUSE_CLOUD_API_KEY=\u003CKEY>\nexport CLICKHOUSE_CLOUD_API_SECRET=\u003CSECRET>\n",[471],{"type":41,"tag":56,"props":472,"children":473},{"__ignoreMap":172},[474,483,553,563,571,598],{"type":41,"tag":178,"props":475,"children":476},{"class":180,"line":181},[477],{"type":41,"tag":178,"props":478,"children":480},{"style":479},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[481],{"type":47,"value":482},"# Either: run in a separate terminal (keeps the secret out of this session)\n",{"type":41,"tag":178,"props":484,"children":486},{"class":180,"line":485},2,[487,491,495,499,504,509,514,519,524,529,534,538,543,548],{"type":41,"tag":178,"props":488,"children":489},{"style":228},[490],{"type":47,"value":61},{"type":41,"tag":178,"props":492,"children":493},{"style":191},[494],{"type":47,"value":443},{"type":41,"tag":178,"props":496,"children":497},{"style":191},[498],{"type":47,"value":448},{"type":41,"tag":178,"props":500,"children":501},{"style":191},[502],{"type":47,"value":503}," login",{"type":41,"tag":178,"props":505,"children":506},{"style":191},[507],{"type":47,"value":508}," --api-key",{"type":41,"tag":178,"props":510,"children":511},{"style":244},[512],{"type":47,"value":513}," \u003C",{"type":41,"tag":178,"props":515,"children":516},{"style":191},[517],{"type":47,"value":518},"KE",{"type":41,"tag":178,"props":520,"children":521},{"style":284},[522],{"type":47,"value":523},"Y",{"type":41,"tag":178,"props":525,"children":526},{"style":244},[527],{"type":47,"value":528},">",{"type":41,"tag":178,"props":530,"children":531},{"style":191},[532],{"type":47,"value":533}," --api-secret",{"type":41,"tag":178,"props":535,"children":536},{"style":244},[537],{"type":47,"value":513},{"type":41,"tag":178,"props":539,"children":540},{"style":191},[541],{"type":47,"value":542},"SECRE",{"type":41,"tag":178,"props":544,"children":545},{"style":284},[546],{"type":47,"value":547},"T",{"type":41,"tag":178,"props":549,"children":550},{"style":244},[551],{"type":47,"value":552},">\n",{"type":41,"tag":178,"props":554,"children":556},{"class":180,"line":555},3,[557],{"type":41,"tag":178,"props":558,"children":560},{"emptyLinePlaceholder":559},true,[561],{"type":47,"value":562},"\n",{"type":41,"tag":178,"props":564,"children":565},{"class":180,"line":28},[566],{"type":41,"tag":178,"props":567,"children":568},{"style":479},[569],{"type":47,"value":570},"# Or: environment variables (good for scripts\u002Fagents)\n",{"type":41,"tag":178,"props":572,"children":574},{"class":180,"line":573},5,[575,579,584,589,594],{"type":41,"tag":178,"props":576,"children":577},{"style":278},[578],{"type":47,"value":281},{"type":41,"tag":178,"props":580,"children":581},{"style":284},[582],{"type":47,"value":583}," CLICKHOUSE_CLOUD_API_KEY",{"type":41,"tag":178,"props":585,"children":586},{"style":244},[587],{"type":47,"value":588},"=\u003C",{"type":41,"tag":178,"props":590,"children":591},{"style":284},[592],{"type":47,"value":593},"KEY",{"type":41,"tag":178,"props":595,"children":596},{"style":244},[597],{"type":47,"value":552},{"type":41,"tag":178,"props":599,"children":601},{"class":180,"line":600},6,[602,606,611,615,620],{"type":41,"tag":178,"props":603,"children":604},{"style":278},[605],{"type":47,"value":281},{"type":41,"tag":178,"props":607,"children":608},{"style":284},[609],{"type":47,"value":610}," CLICKHOUSE_CLOUD_API_SECRET",{"type":41,"tag":178,"props":612,"children":613},{"style":244},[614],{"type":47,"value":588},{"type":41,"tag":178,"props":616,"children":617},{"style":284},[618],{"type":47,"value":619},"SECRET",{"type":41,"tag":178,"props":621,"children":622},{"style":244},[623],{"type":47,"value":552},{"type":41,"tag":50,"props":625,"children":626},{},[627,629,635],{"type":47,"value":628},"If the user has no account yet, ",{"type":41,"tag":56,"props":630,"children":632},{"className":631},[],[633],{"type":47,"value":634},"clickhousectl cloud auth signup",{"type":47,"value":636}," opens the sign-up page.",{"type":41,"tag":50,"props":638,"children":639},{},[640],{"type":47,"value":641},"Verify auth and list what you can reach:",{"type":41,"tag":167,"props":643,"children":645},{"className":169,"code":644,"language":171,"meta":172,"style":172},"clickhousectl cloud auth status\nclickhousectl cloud org list\nclickhousectl cloud service list          # get the service name \u002F id you will query\n",[646],{"type":41,"tag":56,"props":647,"children":648},{"__ignoreMap":172},[649,669,689],{"type":41,"tag":178,"props":650,"children":651},{"class":180,"line":181},[652,656,660,664],{"type":41,"tag":178,"props":653,"children":654},{"style":228},[655],{"type":47,"value":61},{"type":41,"tag":178,"props":657,"children":658},{"style":191},[659],{"type":47,"value":443},{"type":41,"tag":178,"props":661,"children":662},{"style":191},[663],{"type":47,"value":448},{"type":41,"tag":178,"props":665,"children":666},{"style":191},[667],{"type":47,"value":668}," status\n",{"type":41,"tag":178,"props":670,"children":671},{"class":180,"line":485},[672,676,680,685],{"type":41,"tag":178,"props":673,"children":674},{"style":228},[675],{"type":47,"value":61},{"type":41,"tag":178,"props":677,"children":678},{"style":191},[679],{"type":47,"value":443},{"type":41,"tag":178,"props":681,"children":682},{"style":191},[683],{"type":47,"value":684}," org",{"type":41,"tag":178,"props":686,"children":687},{"style":191},[688],{"type":47,"value":395},{"type":41,"tag":178,"props":690,"children":691},{"class":180,"line":555},[692,696,700,705,710],{"type":41,"tag":178,"props":693,"children":694},{"style":228},[695],{"type":47,"value":61},{"type":41,"tag":178,"props":697,"children":698},{"style":191},[699],{"type":47,"value":443},{"type":41,"tag":178,"props":701,"children":702},{"style":191},[703],{"type":47,"value":704}," service",{"type":41,"tag":178,"props":706,"children":707},{"style":191},[708],{"type":47,"value":709}," list",{"type":41,"tag":178,"props":711,"children":712},{"style":479},[713],{"type":47,"value":714},"          # get the service name \u002F id you will query\n",{"type":41,"tag":50,"props":716,"children":717},{},[718,720,726,728,734],{"type":47,"value":719},"Credential resolution order: CLI flags > OAuth tokens > ",{"type":41,"tag":56,"props":721,"children":723},{"className":722},[],[724],{"type":47,"value":725},".clickhousectl\u002Fcredentials.json",{"type":47,"value":727}," > environment variables. Credentials are stored project-locally under ",{"type":41,"tag":56,"props":729,"children":731},{"className":730},[],[732],{"type":47,"value":733},".clickhousectl\u002F",{"type":47,"value":93},{"type":41,"tag":65,"props":736,"children":738},{"id":737},"step-4-run-queries",[739],{"type":47,"value":740},"Step 4: Run queries",{"type":41,"tag":50,"props":742,"children":743},{},[744,746,752,754,760,762,768,769,775,777,783,785,791,793,799],{"type":47,"value":745},"Prefer ",{"type":41,"tag":56,"props":747,"children":749},{"className":748},[],[750],{"type":47,"value":751},"--format",{"type":47,"value":753}," (e.g. ",{"type":41,"tag":56,"props":755,"children":757},{"className":756},[],[758],{"type":47,"value":759},"JSONEachRow",{"type":47,"value":761},", ",{"type":41,"tag":56,"props":763,"children":765},{"className":764},[],[766],{"type":47,"value":767},"CSV",{"type":47,"value":761},{"type":41,"tag":56,"props":770,"children":772},{"className":771},[],[773],{"type":47,"value":774},"TabSeparated",{"type":47,"value":776},") or ",{"type":41,"tag":56,"props":778,"children":780},{"className":779},[],[781],{"type":47,"value":782},"--json",{"type":47,"value":784}," when you need to parse results in a later step. SQL precedence for the query commands is ",{"type":41,"tag":56,"props":786,"children":788},{"className":787},[],[789],{"type":47,"value":790},"--query",{"type":47,"value":792}," > ",{"type":41,"tag":56,"props":794,"children":796},{"className":795},[],[797],{"type":47,"value":798},"--queries-file",{"type":47,"value":800}," > stdin.",{"type":41,"tag":50,"props":802,"children":803},{},[804],{"type":47,"value":805},"Cloud service (over HTTP, no local binary or service password required):",{"type":41,"tag":167,"props":807,"children":809},{"className":169,"code":808,"language":171,"meta":172,"style":172},"clickhousectl cloud service query --name \u003Cservice> -q \"SHOW DATABASES\"\nclickhousectl cloud service query --id \u003Cservice-id> -q \"SELECT count() FROM events\" --format JSONEachRow\nclickhousectl cloud service query --name \u003Cservice> --database analytics --queries-file query.sql\n",[810],{"type":41,"tag":56,"props":811,"children":812},{"__ignoreMap":172},[813,875,944],{"type":41,"tag":178,"props":814,"children":815},{"class":180,"line":181},[816,820,824,828,833,838,842,847,852,856,861,866,871],{"type":41,"tag":178,"props":817,"children":818},{"style":228},[819],{"type":47,"value":61},{"type":41,"tag":178,"props":821,"children":822},{"style":191},[823],{"type":47,"value":443},{"type":41,"tag":178,"props":825,"children":826},{"style":191},[827],{"type":47,"value":704},{"type":41,"tag":178,"props":829,"children":830},{"style":191},[831],{"type":47,"value":832}," query",{"type":41,"tag":178,"props":834,"children":835},{"style":191},[836],{"type":47,"value":837}," --name",{"type":41,"tag":178,"props":839,"children":840},{"style":244},[841],{"type":47,"value":513},{"type":41,"tag":178,"props":843,"children":844},{"style":191},[845],{"type":47,"value":846},"servic",{"type":41,"tag":178,"props":848,"children":849},{"style":284},[850],{"type":47,"value":851},"e",{"type":41,"tag":178,"props":853,"children":854},{"style":244},[855],{"type":47,"value":528},{"type":41,"tag":178,"props":857,"children":858},{"style":191},[859],{"type":47,"value":860}," -q",{"type":41,"tag":178,"props":862,"children":863},{"style":244},[864],{"type":47,"value":865}," \"",{"type":41,"tag":178,"props":867,"children":868},{"style":191},[869],{"type":47,"value":870},"SHOW DATABASES",{"type":41,"tag":178,"props":872,"children":873},{"style":244},[874],{"type":47,"value":317},{"type":41,"tag":178,"props":876,"children":877},{"class":180,"line":485},[878,882,886,890,894,899,903,908,913,917,921,925,930,934,939],{"type":41,"tag":178,"props":879,"children":880},{"style":228},[881],{"type":47,"value":61},{"type":41,"tag":178,"props":883,"children":884},{"style":191},[885],{"type":47,"value":443},{"type":41,"tag":178,"props":887,"children":888},{"style":191},[889],{"type":47,"value":704},{"type":41,"tag":178,"props":891,"children":892},{"style":191},[893],{"type":47,"value":832},{"type":41,"tag":178,"props":895,"children":896},{"style":191},[897],{"type":47,"value":898}," --id",{"type":41,"tag":178,"props":900,"children":901},{"style":244},[902],{"type":47,"value":513},{"type":41,"tag":178,"props":904,"children":905},{"style":191},[906],{"type":47,"value":907},"service-i",{"type":41,"tag":178,"props":909,"children":910},{"style":284},[911],{"type":47,"value":912},"d",{"type":41,"tag":178,"props":914,"children":915},{"style":244},[916],{"type":47,"value":528},{"type":41,"tag":178,"props":918,"children":919},{"style":191},[920],{"type":47,"value":860},{"type":41,"tag":178,"props":922,"children":923},{"style":244},[924],{"type":47,"value":865},{"type":41,"tag":178,"props":926,"children":927},{"style":191},[928],{"type":47,"value":929},"SELECT count() FROM events",{"type":41,"tag":178,"props":931,"children":932},{"style":244},[933],{"type":47,"value":297},{"type":41,"tag":178,"props":935,"children":936},{"style":191},[937],{"type":47,"value":938}," --format",{"type":41,"tag":178,"props":940,"children":941},{"style":191},[942],{"type":47,"value":943}," JSONEachRow\n",{"type":41,"tag":178,"props":945,"children":946},{"class":180,"line":555},[947,951,955,959,963,967,971,975,979,983,988,993,998],{"type":41,"tag":178,"props":948,"children":949},{"style":228},[950],{"type":47,"value":61},{"type":41,"tag":178,"props":952,"children":953},{"style":191},[954],{"type":47,"value":443},{"type":41,"tag":178,"props":956,"children":957},{"style":191},[958],{"type":47,"value":704},{"type":41,"tag":178,"props":960,"children":961},{"style":191},[962],{"type":47,"value":832},{"type":41,"tag":178,"props":964,"children":965},{"style":191},[966],{"type":47,"value":837},{"type":41,"tag":178,"props":968,"children":969},{"style":244},[970],{"type":47,"value":513},{"type":41,"tag":178,"props":972,"children":973},{"style":191},[974],{"type":47,"value":846},{"type":41,"tag":178,"props":976,"children":977},{"style":284},[978],{"type":47,"value":851},{"type":41,"tag":178,"props":980,"children":981},{"style":244},[982],{"type":47,"value":528},{"type":41,"tag":178,"props":984,"children":985},{"style":191},[986],{"type":47,"value":987}," --database",{"type":41,"tag":178,"props":989,"children":990},{"style":191},[991],{"type":47,"value":992}," analytics",{"type":41,"tag":178,"props":994,"children":995},{"style":191},[996],{"type":47,"value":997}," --queries-file",{"type":41,"tag":178,"props":999,"children":1000},{"style":191},[1001],{"type":47,"value":1002}," query.sql\n",{"type":41,"tag":50,"props":1004,"children":1005},{},[1006,1008,1013,1015,1020,1022,1028],{"type":47,"value":1007},"Note on Cloud auth and querying: ",{"type":41,"tag":56,"props":1009,"children":1011},{"className":1010},[],[1012],{"type":47,"value":464},{"type":47,"value":1014}," uses a per-service query-endpoint API key that is auto-provisioned on first use and stored in ",{"type":41,"tag":56,"props":1016,"children":1018},{"className":1017},[],[1019],{"type":47,"value":725},{"type":47,"value":1021},". Provisioning is a write, so a read-only OAuth login is not sufficient for the first query against a service. Use API key auth (Step 3) to run SQL, or pass ",{"type":41,"tag":56,"props":1023,"children":1025},{"className":1024},[],[1026],{"type":47,"value":1027},"--no-auto-enable",{"type":47,"value":1029}," to fail fast instead of attempting to provision. Once provisioned, later queries reuse the stored key.",{"type":41,"tag":50,"props":1031,"children":1032},{},[1033,1035,1041],{"type":47,"value":1034},"Local or host\u002Fport server (uses ",{"type":41,"tag":56,"props":1036,"children":1038},{"className":1037},[],[1039],{"type":47,"value":1040},"clickhouse-client",{"type":47,"value":1042},"):",{"type":41,"tag":167,"props":1044,"children":1046},{"className":169,"code":1045,"language":171,"meta":172,"style":172},"clickhousectl local client --name \u003Cserver> -q \"SHOW TABLES\"        # named local server\nclickhousectl local client --host myhost --port 9000 -q \"SELECT 1\"  # any reachable server\nclickhousectl local client --name \u003Cserver> --queries-file query.sql\n",[1047],{"type":41,"tag":56,"props":1048,"children":1049},{"__ignoreMap":172},[1050,1110,1168],{"type":41,"tag":178,"props":1051,"children":1052},{"class":180,"line":181},[1053,1057,1061,1066,1070,1074,1079,1084,1088,1092,1096,1101,1105],{"type":41,"tag":178,"props":1054,"children":1055},{"style":228},[1056],{"type":47,"value":61},{"type":41,"tag":178,"props":1058,"children":1059},{"style":191},[1060],{"type":47,"value":385},{"type":41,"tag":178,"props":1062,"children":1063},{"style":191},[1064],{"type":47,"value":1065}," client",{"type":41,"tag":178,"props":1067,"children":1068},{"style":191},[1069],{"type":47,"value":837},{"type":41,"tag":178,"props":1071,"children":1072},{"style":244},[1073],{"type":47,"value":513},{"type":41,"tag":178,"props":1075,"children":1076},{"style":191},[1077],{"type":47,"value":1078},"serve",{"type":41,"tag":178,"props":1080,"children":1081},{"style":284},[1082],{"type":47,"value":1083},"r",{"type":41,"tag":178,"props":1085,"children":1086},{"style":244},[1087],{"type":47,"value":528},{"type":41,"tag":178,"props":1089,"children":1090},{"style":191},[1091],{"type":47,"value":860},{"type":41,"tag":178,"props":1093,"children":1094},{"style":244},[1095],{"type":47,"value":865},{"type":41,"tag":178,"props":1097,"children":1098},{"style":191},[1099],{"type":47,"value":1100},"SHOW TABLES",{"type":41,"tag":178,"props":1102,"children":1103},{"style":244},[1104],{"type":47,"value":297},{"type":41,"tag":178,"props":1106,"children":1107},{"style":479},[1108],{"type":47,"value":1109},"        # named local server\n",{"type":41,"tag":178,"props":1111,"children":1112},{"class":180,"line":485},[1113,1117,1121,1125,1130,1135,1140,1146,1150,1154,1159,1163],{"type":41,"tag":178,"props":1114,"children":1115},{"style":228},[1116],{"type":47,"value":61},{"type":41,"tag":178,"props":1118,"children":1119},{"style":191},[1120],{"type":47,"value":385},{"type":41,"tag":178,"props":1122,"children":1123},{"style":191},[1124],{"type":47,"value":1065},{"type":41,"tag":178,"props":1126,"children":1127},{"style":191},[1128],{"type":47,"value":1129}," --host",{"type":41,"tag":178,"props":1131,"children":1132},{"style":191},[1133],{"type":47,"value":1134}," myhost",{"type":41,"tag":178,"props":1136,"children":1137},{"style":191},[1138],{"type":47,"value":1139}," --port",{"type":41,"tag":178,"props":1141,"children":1143},{"style":1142},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1144],{"type":47,"value":1145}," 9000",{"type":41,"tag":178,"props":1147,"children":1148},{"style":191},[1149],{"type":47,"value":860},{"type":41,"tag":178,"props":1151,"children":1152},{"style":244},[1153],{"type":47,"value":865},{"type":41,"tag":178,"props":1155,"children":1156},{"style":191},[1157],{"type":47,"value":1158},"SELECT 1",{"type":41,"tag":178,"props":1160,"children":1161},{"style":244},[1162],{"type":47,"value":297},{"type":41,"tag":178,"props":1164,"children":1165},{"style":479},[1166],{"type":47,"value":1167},"  # any reachable server\n",{"type":41,"tag":178,"props":1169,"children":1170},{"class":180,"line":555},[1171,1175,1179,1183,1187,1191,1195,1199,1203,1207],{"type":41,"tag":178,"props":1172,"children":1173},{"style":228},[1174],{"type":47,"value":61},{"type":41,"tag":178,"props":1176,"children":1177},{"style":191},[1178],{"type":47,"value":385},{"type":41,"tag":178,"props":1180,"children":1181},{"style":191},[1182],{"type":47,"value":1065},{"type":41,"tag":178,"props":1184,"children":1185},{"style":191},[1186],{"type":47,"value":837},{"type":41,"tag":178,"props":1188,"children":1189},{"style":244},[1190],{"type":47,"value":513},{"type":41,"tag":178,"props":1192,"children":1193},{"style":191},[1194],{"type":47,"value":1078},{"type":41,"tag":178,"props":1196,"children":1197},{"style":284},[1198],{"type":47,"value":1083},{"type":41,"tag":178,"props":1200,"children":1201},{"style":244},[1202],{"type":47,"value":528},{"type":41,"tag":178,"props":1204,"children":1205},{"style":191},[1206],{"type":47,"value":997},{"type":41,"tag":178,"props":1208,"children":1209},{"style":191},[1210],{"type":47,"value":1002},{"type":41,"tag":65,"props":1212,"children":1214},{"id":1213},"safe-query-practices",[1215],{"type":47,"value":1216},"Safe query practices",{"type":41,"tag":50,"props":1218,"children":1219},{},[1220],{"type":47,"value":1221},"Keep queries safe, explainable, and bounded.",{"type":41,"tag":1223,"props":1224,"children":1225},"ol",{},[1226,1250,1263,1268,1287,1292,1297],{"type":41,"tag":81,"props":1227,"children":1228},{},[1229,1231,1236,1237,1242,1243,1249],{"type":47,"value":1230},"Discover schema\u002Ftable shape if unknown: ",{"type":41,"tag":56,"props":1232,"children":1234},{"className":1233},[],[1235],{"type":47,"value":870},{"type":47,"value":761},{"type":41,"tag":56,"props":1238,"children":1240},{"className":1239},[],[1241],{"type":47,"value":1100},{"type":47,"value":761},{"type":41,"tag":56,"props":1244,"children":1246},{"className":1245},[],[1247],{"type":47,"value":1248},"DESCRIBE TABLE \u003Ct>",{"type":47,"value":93},{"type":41,"tag":81,"props":1251,"children":1252},{},[1253,1255,1261],{"type":47,"value":1254},"Draft SQL using documented definitions when available (see ",{"type":41,"tag":56,"props":1256,"children":1258},{"className":1257},[],[1259],{"type":47,"value":1260},"..\u002Freading-data-dict\u002F",{"type":47,"value":1262},").",{"type":41,"tag":81,"props":1264,"children":1265},{},[1266],{"type":47,"value":1267},"Explain what the SQL does before expensive execution.",{"type":41,"tag":81,"props":1269,"children":1270},{},[1271,1273,1279,1280,1286],{"type":47,"value":1272},"Preview first when returning rows: ",{"type":41,"tag":56,"props":1274,"children":1276},{"className":1275},[],[1277],{"type":47,"value":1278},"LIMIT 10",{"type":47,"value":152},{"type":41,"tag":56,"props":1281,"children":1283},{"className":1282},[],[1284],{"type":47,"value":1285},"LIMIT 100",{"type":47,"value":93},{"type":41,"tag":81,"props":1288,"children":1289},{},[1290],{"type":47,"value":1291},"Prefer aggregate queries for metrics; avoid dumping high-cardinality raw data.",{"type":41,"tag":81,"props":1293,"children":1294},{},[1295],{"type":47,"value":1296},"Confirm with the user before long-running, broad, or expensive scans.",{"type":41,"tag":81,"props":1298,"children":1299},{},[1300],{"type":47,"value":1301},"Return the SQL with results so the user can inspect and reuse it.",{"type":41,"tag":50,"props":1303,"children":1304},{},[1305],{"type":47,"value":1306},"Safety checks:",{"type":41,"tag":77,"props":1308,"children":1309},{},[1310,1315,1320,1333,1338],{"type":41,"tag":81,"props":1311,"children":1312},{},[1313],{"type":47,"value":1314},"Avoid accidental cross joins; use explicit join keys and know why the join is valid.",{"type":41,"tag":81,"props":1316,"children":1317},{},[1318],{"type":47,"value":1319},"Filter by time window whenever possible.",{"type":41,"tag":81,"props":1321,"children":1322},{},[1323,1325,1331],{"type":47,"value":1324},"Avoid ",{"type":41,"tag":56,"props":1326,"children":1328},{"className":1327},[],[1329],{"type":47,"value":1330},"SELECT *",{"type":47,"value":1332}," except tiny schema previews.",{"type":41,"tag":81,"props":1334,"children":1335},{},[1336],{"type":47,"value":1337},"Check row counts before exporting large result sets.",{"type":41,"tag":81,"props":1339,"children":1340},{},[1341,1343,1348,1350,1355],{"type":47,"value":1342},"Add ",{"type":41,"tag":56,"props":1344,"children":1346},{"className":1345},[],[1347],{"type":47,"value":782},{"type":47,"value":1349}," or a ",{"type":41,"tag":56,"props":1351,"children":1353},{"className":1352},[],[1354],{"type":47,"value":751},{"type":47,"value":1356}," for machine-readable output you intend to parse downstream.",{"type":41,"tag":65,"props":1358,"children":1360},{"id":1359},"bounded-queries-and-large-tables",[1361],{"type":47,"value":1362},"Bounded queries and large tables",{"type":41,"tag":50,"props":1364,"children":1365},{},[1366],{"type":47,"value":1367},"Large fact tables can time out or exceed memory even for seemingly simple sanity checks. Keep exploratory and validation queries bounded unless there is strong evidence the table is small.",{"type":41,"tag":77,"props":1369,"children":1370},{},[1371,1406,1411,1416,1421,1426],{"type":41,"tag":81,"props":1372,"children":1373},{},[1374,1376,1382,1383,1389,1391,1397,1399,1405],{"type":47,"value":1375},"Avoid unbounded freshness checks such as full-table ",{"type":41,"tag":56,"props":1377,"children":1379},{"className":1378},[],[1380],{"type":47,"value":1381},"count()",{"type":47,"value":761},{"type":41,"tag":56,"props":1384,"children":1386},{"className":1385},[],[1387],{"type":47,"value":1388},"uniqExact(...)",{"type":47,"value":1390},", or broad ",{"type":41,"tag":56,"props":1392,"children":1394},{"className":1393},[],[1395],{"type":47,"value":1396},"min\u002Fmax",{"type":47,"value":1398}," scans on large fact tables. Prefer bounded recent-window checks, partition-aware filters, table metadata, or known date\u002Fkey ranges, for example ",{"type":41,"tag":56,"props":1400,"children":1402},{"className":1401},[],[1403],{"type":47,"value":1404},"WHERE report_date >= today() - 7",{"type":47,"value":93},{"type":41,"tag":81,"props":1407,"children":1408},{},[1409],{"type":47,"value":1410},"For a quick metric over \"last N days\" from a daily aggregate table, default to completed report dates when appropriate and state that assumption; mention alternatives such as rolling N hours or including today if ambiguous.",{"type":41,"tag":81,"props":1412,"children":1413},{},[1414],{"type":47,"value":1415},"If an exact aggregate exceeds memory or times out, retry with smaller bounded chunks only when chunking preserves correctness. Daily counts can be queried week-by-week and concatenated because each date belongs to exactly one chunk.",{"type":41,"tag":81,"props":1417,"children":1418},{},[1419],{"type":47,"value":1420},"Do not chunk-and-sum distinct users across chunks unless the requested grain makes chunks independent. Weekly unique users cannot be produced by summing daily unique users, because a user can appear on multiple days.",{"type":41,"tag":81,"props":1422,"children":1423},{},[1424],{"type":47,"value":1425},"Document chunk boundaries, why the combined result remains exact, and the original failure mode in the SQL notes or artifact metadata.",{"type":41,"tag":81,"props":1427,"children":1428},{},[1429,1431,1437],{"type":47,"value":1430},"If no exact bounded fallback is safe, ask whether an approximate aggregate such as ",{"type":41,"tag":56,"props":1432,"children":1434},{"className":1433},[],[1435],{"type":47,"value":1436},"uniq(...)",{"type":47,"value":1438},", a shorter window, or a different grain is acceptable.",{"type":41,"tag":65,"props":1440,"children":1442},{"id":1441},"result-package",[1443],{"type":47,"value":1444},"Result package",{"type":41,"tag":50,"props":1446,"children":1447},{},[1448],{"type":47,"value":1449},"When returning query results, include:",{"type":41,"tag":77,"props":1451,"children":1452},{},[1453,1458,1463,1468,1473],{"type":41,"tag":81,"props":1454,"children":1455},{},[1456],{"type":47,"value":1457},"the SQL executed",{"type":41,"tag":81,"props":1459,"children":1460},{},[1461],{"type":47,"value":1462},"row count or aggregate count",{"type":41,"tag":81,"props":1464,"children":1465},{},[1466],{"type":47,"value":1467},"sample output or artifact path",{"type":41,"tag":81,"props":1469,"children":1470},{},[1471],{"type":47,"value":1472},"data freshness or observed time range",{"type":41,"tag":81,"props":1474,"children":1475},{},[1476],{"type":47,"value":1477},"caveats and the next query if needed",{"type":41,"tag":65,"props":1479,"children":1481},{"id":1480},"auth-and-secret-handling",[1482],{"type":47,"value":1483},"Auth and secret handling",{"type":41,"tag":77,"props":1485,"children":1486},{},[1487,1492,1497,1502],{"type":41,"tag":81,"props":1488,"children":1489},{},[1490],{"type":47,"value":1491},"Never print API keys, secrets, or passwords into the conversation or commit them.",{"type":41,"tag":81,"props":1493,"children":1494},{},[1495],{"type":47,"value":1496},"Prefer the browser OAuth flow for read-only exploration; it puts no secret in the chat.",{"type":41,"tag":81,"props":1498,"children":1499},{},[1500],{"type":47,"value":1501},"When write access or SQL querying requires an API key, prefer a separate terminal or environment variables over pasting the secret into this session.",{"type":41,"tag":81,"props":1503,"children":1504},{},[1505,1511],{"type":41,"tag":56,"props":1506,"children":1508},{"className":1507},[],[1509],{"type":47,"value":1510},"clickhousectl cloud auth logout",{"type":47,"value":1512}," clears all saved credentials (OAuth tokens and API keys).",{"type":41,"tag":1514,"props":1515,"children":1516},"style",{},[1517],{"type":47,"value":1518},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1520,"total":1632},[1521,1540,1558,1573,1590,1606,1625],{"slug":1522,"name":1522,"fn":1523,"description":1524,"org":1525,"tags":1526,"stars":24,"repoUrl":25,"updatedAt":1539},"amazon-location-service","integrate Amazon Location Service APIs","Integrates Amazon Location Service APIs for AWS applications. Use this skill when users want to add maps (interactive MapLibre or static images); geocode addresses to coordinates or reverse geocode coordinates to addresses; calculate routes, travel times, or service areas; find places and businesses through text search, nearby search, or autocomplete suggestions; retrieve detailed place information including hours, contacts, and addresses; monitor geographical boundaries with geofences; or track device locations. Covers authentication, SDK integration, and all Amazon Location Service capabilities.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1527,1530,1533,1536],{"name":1528,"slug":1529,"type":14},"API Development","api-development",{"name":1531,"slug":1532,"type":14},"AWS","aws",{"name":1534,"slug":1535,"type":14},"Maps","maps",{"name":1537,"slug":1538,"type":14},"Navigation","navigation","2026-07-12T08:13:53.294026",{"slug":1541,"name":1541,"fn":1542,"description":1543,"org":1544,"tags":1545,"stars":24,"repoUrl":25,"updatedAt":1557},"amplify-workflow","build full-stack apps with AWS Amplify","Build and deploy full-stack web and mobile apps with AWS Amplify Gen2 (TypeScript code-first). Covers auth (Cognito), data (AppSync\u002FDynamoDB including schema modeling, enum types, relationships, authorization rules), storage (S3), functions, APIs, and AI (Amplify AI Kit with Bedrock). Supports React, Next.js, Vue, Angular, React Native, Flutter, Swift, and Android. Always use this skill for Amplify Gen2 topics — even for questions you think you know — it contains validated, version-specific patterns that prevent common mistakes. TRIGGER when: user mentions Amplify Gen2; project has amplify\u002F directory or amplify_outputs; code imports @aws-amplify packages; user asks about defineBackend, defineAuth, defineData, defineStorage, or npx ampx. SKIP: Amplify Gen1 (amplify CLI v6), standalone SAM\u002FCDK without Amplify (use aws-serverless), direct Bedrock without Amplify AI Kit (use bedrock).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1546,1549,1550,1551,1554],{"name":1547,"slug":1548,"type":14},"Auth","auth",{"name":1531,"slug":1532,"type":14},{"name":19,"slug":20,"type":14},{"name":1552,"slug":1553,"type":14},"Frontend","frontend",{"name":1555,"slug":1556,"type":14},"TypeScript","typescript","2026-07-12T08:13:47.134012",{"slug":1559,"name":1559,"fn":1560,"description":1561,"org":1562,"tags":1563,"stars":24,"repoUrl":25,"updatedAt":1572},"analyzer","analyze queried data for trends","Analyze queried data for trends, week-over-week comparisons, distributions, funnels, cohorts, top-N lists, anomalies, sanity checks, and report-ready findings. Use after or alongside ClickHouse queries when the user wants insight rather than raw rows.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1564,1565,1566,1569],{"name":22,"slug":23,"type":14},{"name":13,"slug":4,"type":14},{"name":1567,"slug":1568,"type":14},"Data Analysis","data-analysis",{"name":1570,"slug":1571,"type":14},"Statistics","statistics","2026-07-12T08:14:05.606036",{"slug":1574,"name":1574,"fn":1575,"description":1576,"org":1577,"tags":1578,"stars":24,"repoUrl":25,"updatedAt":1589},"artifact-management","manage and organize analysis artifacts","Save, organize, and describe reusable analysis artifacts such as SQL, result snapshots, CSV exports, summaries, caveats, plots, and report-ready files. Use when users ask to save, export, share, cite, reproduce, or organize data-analysis outputs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1579,1580,1583,1586],{"name":1567,"slug":1568,"type":14},{"name":1581,"slug":1582,"type":14},"Productivity","productivity",{"name":1584,"slug":1585,"type":14},"Reporting","reporting",{"name":1587,"slug":1588,"type":14},"SQL","sql","2026-07-12T08:14:09.265555",{"slug":1591,"name":1591,"fn":1592,"description":1593,"org":1594,"tags":1595,"stars":24,"repoUrl":25,"updatedAt":1605},"attorney-assist","connect with attorneys for legal consultation","Connects the user with a LegalZoom attorney for legal consultation. Use when a user asks about attorneys, lawyers, or legal help, or when contract review reveals high risks or low-confidence findings.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1596,1599,1602],{"name":1597,"slug":1598,"type":14},"Contracts","contracts",{"name":1600,"slug":1601,"type":14},"Legal","legal",{"name":1603,"slug":1604,"type":14},"Risk Assessment","risk-assessment","2026-07-12T08:13:45.878361",{"slug":1607,"name":1607,"fn":1608,"description":1609,"org":1610,"tags":1611,"stars":24,"repoUrl":25,"updatedAt":1624},"building-pydantic-ai-agents","build AI agents with Pydantic AI","Build AI agents with Pydantic AI — tools, capabilities (including on-demand loading), structured output, streaming, testing, and multi-agent patterns. Use when the user mentions Pydantic AI, imports pydantic_ai, or asks to build an AI agent, add tools\u002Fcapabilities, defer capability loading, stream output, define agents from YAML, or test agent behavior.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1612,1615,1618,1621],{"name":1613,"slug":1614,"type":14},"Agents","agents",{"name":1616,"slug":1617,"type":14},"LLM","llm",{"name":1619,"slug":1620,"type":14},"Multi-Agent","multi-agent",{"name":1622,"slug":1623,"type":14},"Python","python","2026-07-12T08:14:01.893781",{"slug":4,"name":4,"fn":5,"description":6,"org":1626,"tags":1627,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1628,1629,1630,1631],{"name":22,"slug":23,"type":14},{"name":16,"slug":17,"type":14},{"name":13,"slug":4,"type":14},{"name":19,"slug":20,"type":14},43,{"items":1634,"total":1760},[1635,1642,1650,1657,1664,1670,1677,1684,1696,1714,1734,1747],{"slug":1522,"name":1522,"fn":1523,"description":1524,"org":1636,"tags":1637,"stars":24,"repoUrl":25,"updatedAt":1539},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1638,1639,1640,1641],{"name":1528,"slug":1529,"type":14},{"name":1531,"slug":1532,"type":14},{"name":1534,"slug":1535,"type":14},{"name":1537,"slug":1538,"type":14},{"slug":1541,"name":1541,"fn":1542,"description":1543,"org":1643,"tags":1644,"stars":24,"repoUrl":25,"updatedAt":1557},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1645,1646,1647,1648,1649],{"name":1547,"slug":1548,"type":14},{"name":1531,"slug":1532,"type":14},{"name":19,"slug":20,"type":14},{"name":1552,"slug":1553,"type":14},{"name":1555,"slug":1556,"type":14},{"slug":1559,"name":1559,"fn":1560,"description":1561,"org":1651,"tags":1652,"stars":24,"repoUrl":25,"updatedAt":1572},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1653,1654,1655,1656],{"name":22,"slug":23,"type":14},{"name":13,"slug":4,"type":14},{"name":1567,"slug":1568,"type":14},{"name":1570,"slug":1571,"type":14},{"slug":1574,"name":1574,"fn":1575,"description":1576,"org":1658,"tags":1659,"stars":24,"repoUrl":25,"updatedAt":1589},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1660,1661,1662,1663],{"name":1567,"slug":1568,"type":14},{"name":1581,"slug":1582,"type":14},{"name":1584,"slug":1585,"type":14},{"name":1587,"slug":1588,"type":14},{"slug":1591,"name":1591,"fn":1592,"description":1593,"org":1665,"tags":1666,"stars":24,"repoUrl":25,"updatedAt":1605},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1667,1668,1669],{"name":1597,"slug":1598,"type":14},{"name":1600,"slug":1601,"type":14},{"name":1603,"slug":1604,"type":14},{"slug":1607,"name":1607,"fn":1608,"description":1609,"org":1671,"tags":1672,"stars":24,"repoUrl":25,"updatedAt":1624},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1673,1674,1675,1676],{"name":1613,"slug":1614,"type":14},{"name":1616,"slug":1617,"type":14},{"name":1619,"slug":1620,"type":14},{"name":1622,"slug":1623,"type":14},{"slug":4,"name":4,"fn":5,"description":6,"org":1678,"tags":1679,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1680,1681,1682,1683],{"name":22,"slug":23,"type":14},{"name":16,"slug":17,"type":14},{"name":13,"slug":4,"type":14},{"name":19,"slug":20,"type":14},{"slug":1685,"name":1685,"fn":1686,"description":1687,"org":1688,"tags":1689,"stars":24,"repoUrl":25,"updatedAt":1695},"cline-session-history","search and browse Cline session history","Search and browse Cline session history. Use when the user asks to find, list, inspect, or export Cline sessions by time period, prompt content, status, model, provider, source, mode, workspace, or other criteria. Also use when the user wants to read a session transcript or export sessions to a directory. Trigger phrases include \"find my session\", \"search my session history\", \"show me past sessions\", \"what was that session where\", \"find the session that started with\", and any mention of past Cline conversations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1690,1691,1694],{"name":1613,"slug":1614,"type":14},{"name":1692,"slug":1693,"type":14},"History","history",{"name":1581,"slug":1582,"type":14},"2026-07-19T06:03:13.945151",{"slug":1697,"name":1697,"fn":1698,"description":1699,"org":1700,"tags":1701,"stars":24,"repoUrl":25,"updatedAt":1713},"convex-design","build reactive backends with Convex","Design and build reactive, type-safe, production-grade backends on Convex. Covers schema, queries\u002Fmutations\u002Factions, indexes, auth, file storage, scheduling, real-time multiplayer, mobile backends, and LLM\u002Fagent workflows on Convex's one-platform stack.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1702,1703,1706,1707,1710],{"name":1547,"slug":1548,"type":14},{"name":1704,"slug":1705,"type":14},"Backend","backend",{"name":19,"slug":20,"type":14},{"name":1708,"slug":1709,"type":14},"Real-time","real-time",{"name":1711,"slug":1712,"type":14},"Storage","storage","2026-07-12T08:13:37.101253",{"slug":1715,"name":1715,"fn":1716,"description":1717,"org":1718,"tags":1719,"stars":24,"repoUrl":25,"updatedAt":1733},"cosmosdb-best-practices","optimize Azure Cosmos DB performance","Azure Cosmos DB performance optimization and best practices guidelines for NoSQL,\npartitioning, queries, SDK usage, and vector search. Use when writing, reviewing,\nor refactoring code that interacts with Azure Cosmos DB, designing data models,\noptimizing queries, or implementing high-performance database operations.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1720,1723,1726,1727,1730],{"name":1721,"slug":1722,"type":14},"Azure","azure",{"name":1724,"slug":1725,"type":14},"Cosmos DB","cosmos-db",{"name":19,"slug":20,"type":14},{"name":1728,"slug":1729,"type":14},"NoSQL","nosql",{"name":1731,"slug":1732,"type":14},"Performance","performance","2026-07-12T08:13:54.531719",{"slug":1735,"name":1735,"fn":1736,"description":1737,"org":1738,"tags":1739,"stars":24,"repoUrl":25,"updatedAt":1746},"data-analyst","analyze ClickHouse analytics data","Act as an interactive data analyst for ClickHouse-backed analytics. Use when the user asks questions about internal data, metrics, dashboards, telemetry, active users, revenue, funnels, trends, distributions, or wants an analyst-style conversation, ad hoc SQL, charts, or a data export against ClickHouse (local or ClickHouse Cloud).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1740,1741,1742,1745],{"name":22,"slug":23,"type":14},{"name":13,"slug":4,"type":14},{"name":1743,"slug":1744,"type":14},"Dashboards","dashboards",{"name":1567,"slug":1568,"type":14},"2026-07-12T08:13:31.975246",{"slug":1748,"name":1748,"fn":1749,"description":1750,"org":1751,"tags":1752,"stars":24,"repoUrl":25,"updatedAt":1759},"dataproc-skills","manage Dataproc clusters and jobs","Skills to interact with your Dataproc clusters and jobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1753,1756],{"name":1754,"slug":1755,"type":14},"Data Engineering","data-engineering",{"name":1757,"slug":1758,"type":14},"Operations","operations","2026-07-12T08:13:42.179275",45]