authenticating-to-clickhouse

authenticating-to-clickhouse is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 146 tokens per session (530 once invoked), scanned A, original, MIT.

A procedure for connecting services to ClickHouse, a database designed for analytical queries, using short-lived service-account tokens instead of fixed passwords.

In plain words
What is it for?
It is for adding or changing ClickHouse users, services, sidecars, containers, and custom database clients in a deployment.
Why use it?
It helps services handle rotating credentials correctly and avoids silently using the wrong database user or an outdated connection method.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

Good fit It is for adding or changing ClickHouse users, services, sidecars, containers, and custom database clients in a deployment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/authenticating-to-clickhouse
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/posthog-foss --skill authenticating-to-clickhouse
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for authenticating-to-clickhouse

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/authenticating-to-clickhouse/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/authenticating-to-clickhouse)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/authenticating-to-clickhouse"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/authenticating-to-clickhouse/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for authenticating-to-clickhouse

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/authenticating-to-clickhouse"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/authenticating-to-clickhouse.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 530 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00146 $0.00530
Opus 5.5 $0.00058 $0.00212
Sonnet 5.5 $0.00029 $0.00106
Haiku 4.5 $0.00015 $0.00053

Measured 1mo ago against content hash 4b0ed1a44e0e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

authenticating-to-clickhouse scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/authenticating-to-clickhouse/SKILL.md · 22 lines

What it actually says

Authenticating to ClickHouse

A service authenticates to ClickHouse with a short-lived ServiceAccount token, validated by the ch-podauth bridge, not a static password. The token rotates, so the client reads it on each use. Read posthog/clickhouse/client/AGENTS.md for the full recipe and the traps. This skill is the entry point.

Use it when adding a new service or ClickHouse user, or when building or changing a ClickHouse pool or client by hand. Converting an already-deployed user off a static password is a ClickHouse-team operation and is out of scope.

Do

  • Use the token-aware default paths: sync_execute(..., ch_user=...) for pooled queries, or the async get_client in posthog/temporal/common/clickhouse.py for HTTP. Both read the token on each use.
  • Choose the user shape: deployment-default (the pod's CLICKHOUSE_USER is the service's own user) or a new ClickHouseUser enum member. Wire the username env, or the queries silently authenticate as the pod's CLICKHOUSE_USER.
  • Wire the deploy side in the charts repo. The connect-app-to-clickhouse skill mounts the token and sets CLICKHOUSE_<USER>_PASSWORD_FILE.

Do not

  • Pass your own sync_client to sync_execute, or build a pool or client by hand, without keeping it token-aware. A native pool must carry credential_provider; an HTTP or one-shot client resolves the token per call instead. A pool that skips this silently stays on the static password. posthog/clickhouse/client/AGENTS.md has both shapes.
  • Read the credential once at startup, in any language. The token rotates, so read the token file on each connection or request.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +3 tokens per session 4b0ed1a44e0e
  2. 2mo ago First seen · 22 lines · 143 tokens per session scan A 0650e1d035fa

Subscribe to this mod's changes

authenticating-to-clickhouse is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 146 tokens to every session and 530 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-19.

Related

authenticating-to-clickhouse compared with skills from other repositories

authenticating-to-clickhouse next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
authenticating-to-clickhousePostHog/posthog-fossSkill736todayMITA146Claude Code, Codex
create-prprisma/ormSkill48ktodayApache-2.0A47Claude Code, Codex
schema-explorationlangchain-ai/deepagentsSkill32ktodayMITA57Claude Code, Codex
atlas-mssqlariga/atlasSkill8.9k2d agoApache-2.0A163Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9ktodayMITA115Claude Code, Codex
bex-keyvaluebex-co/bexSkill1.6ktodayApache-2.0A117Claude Code, Codex
pentesting-mysqlxalgorix/xalgorixSkill1.6ktodayApache-2.0A65Claude Code, Codex