Answers from the documentation; checking which model is on duty
Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
Imported from posthog/posthog (.agents/skills/authenticating-to-clickhouse/SKILL.md). Install upstream with npx skills add posthog/posthog --skill authenticating-to-clickhouse. Copyright stays with the author.
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.
Use it
Installed into a catalogue, chosen by a router
Install authenticating-to-clickhouse and it becomes one more candidate the router can pick - when it fits.
A listing is a routing target with a manifest: what it does, which domains it covers, what it costs and who publishes it. Once installed it sits beside your own models and tools, is scored like any other candidate for each request, and shows up in the trace when it wins. Ratings come from workspaces that installed it, one per account.
When a provider is down or over quota the request moves on; the trace says it did.
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slotcurl-s-X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
{
"ocm": "1",
"id": "posthog-posthog-authenticating-to-clickhouse",
"kind": "skill",
"name": "authenticating-to-clickhouse",
"description": "Authenticate a new or changed service to ClickHouse with the rotating ch-podauth ServiceAccount token instead of a static password. Use when adding a service, sidecar, or container that reads or writes ClickHouse, adding a new ClickHouseUser, or hand-building a ClickHouse pool or client for a custom timeout or setting. Covers the token-aware default path (sync_execute, get_client), the rule that a custom pool must pass credential_provider or it silently stays on the static password, wiring the username so the user does not fall back to the pod's CLICKHOUSE_USER, and the deploy-side companion in the charts repo. Not for converting an already-deployed user off a static password.",
"publisher": "posthog",
"version": "1.0.0",
"capabilities": {
"domains": [
"general"
],
"tags": [
"skill-md",
"skills-sh"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Authenticate a new or changed service to ClickHouse with the rotating ch-podauth ServiceAccount token instead of a static password. Use when adding a service, sidecar, or container that reads or writes ClickHouse, adding a new ClickHouseUser, or hand-building a ClickHouse pool or client for a custom timeout or setting. Covers the token-aware default path (sync_execute, get_client), the rule that a custom pool must pass credential_provider or it silently stays on the static password, wiring the username so the user does not fall back to the pod's CLICKHOUSE_USER, and the deploy-side companion in the charts repo. Not for converting an already-deployed user off a static password."
],
"primary": false,
"metadata": {
"source": {
"provider": "skills.sh",
"repository": "https://github.com/posthog/posthog",
"path": ".agents/skills/authenticating-to-clickhouse/SKILL.md",
"ref": "HEAD",
"url": "https://github.com/posthog/posthog/blob/HEAD/.agents/skills/authenticating-to-clickhouse/SKILL.md",
"key": "posthog/posthog/.agents/skills/authenticating-to-clickhouse/SKILL.md"
}
},
"instructions": "# Authenticating to ClickHouse\n\nA 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.\n\nUse 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.\n\n## Do\n\n- 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.\n- 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`.\n- Wire the deploy side in the charts repo. The `connect-app-to-clickhouse` skill mounts the token and sets `CLICKHOUSE_<USER>_PASSWORD_FILE`.\n\n## Do not\n\n- 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.\n- Read the credential once at startup, in any language. The token rotates, so read the token file on each connection or request.",
"cost": {
"context_tokens": 408
}
}
Fetch it by URL: GET /api/v1/registry/posthog-posthog-authenticating-to-clickhouse/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.