clickhouse-logs-queries
Skill by supabase
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Install clickhouse-logs-queries
Built from the published package, never by AI.
git clone --depth 1 https://github.com/supabase/supabase /tmp/supabase && mkdir -p ~/.claude/skills && cp -r /tmp/supabase/.agents/skills/clickhouse-logs-queries ~/.claude/skills/clickhouse-logs-queriesRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install clickhouse-logs-queries in Claude Code
git clone --depth 1 https://github.com/supabase/supabase /tmp/supabase && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/supabase/.agents/skills/clickhouse-logs-queries ~/.gemini/antigravity-cli/skills/clickhouse-logs-queriesAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install clickhouse-logs-queries in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill covers querying Supabase logs stored in a single ClickHouse logs table. Each log line is one row, tagged by a source column such as edge_logs, postgres_logs or auth_logs. Service-specific fields sit in a log_attributes map, read with bracket access instead of the older BigQuery cross join unnest(metadata) pattern.
The skill is for developers and agents writing or reviewing queries in the Logs Explorer, or converting an existing BigQuery logs query to ClickHouse. It also includes a translation table of BigQuery-to-ClickHouse functions and a reference for wiring log SQL into the Studio codebase under apps/studio.
Written from the project's SKILL.md and checked against it.
What it can do
- Write logs queriesWrites ClickHouse SQL against the logs table, scoped by the source column.
- Read log_attributes fieldsReads structured fields with bracket access on the log_attributes map.
- Convert BigQuery logs queriesTranslates cross join unnest(metadata) queries into ClickHouse SQL.
- Discover log keysLists the log_attributes keys a source sets, using mapKeys and arrayJoin.
- Review logs queriesChecks queries against stated practices such as adding a LIMIT and filtering by source.
- Wire Studio log SQLPoints to reference notes for branded analytics SQL and endpoint code in apps/studio.
Try asking
- Convert this BigQuery logs query to ClickHouse SQL for the logs table
- Write a Logs Explorer query for 5xx errors from edge_logs
- Show me which log_attributes keys postgres_logs sets
Good to know
- The logs.all.otel endpoint rejects count(*) and select *, so use count() and list columns.
- Map values are always strings, so numeric fields must be converted with toInt32OrZero.
- There is no per-service table, so queries must filter on the source column.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/clickhouse-logs-queries/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB -
references/bigquery-migration.md4 KB -
references/codebase-integration.md5 KB
Alternatives to clickhouse-logs-queries
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Provides a PostgreSQL table design reference covering data types, indexing, constraints, partitioning and performance patterns. Built for developers who design or review PostgreSQL schemas.
Compare with hugging-face-datasets, db-repair or alloydb-basics
clickhouse-logs-queries: common questions
Which table do Supabase logs use?
Supabase logs live in a single ClickHouse logs table, served by the logs.all.otel analytics endpoint. Each row is tagged by a source column.
How do I read a field from a log row?
Use bracket access on log_attributes, such as log_attributes['request.method']. The source says no unnesting joins are needed.
Can this skill migrate BigQuery logs queries?
Yes. It describes the steps and a translation table for converting cross join unnest(metadata) queries to ClickHouse.
How do I install clickhouse-logs-queries?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is clickhouse-logs-queries free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is clickhouse-logs-queries safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to clickhouse-logs-queries?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, fix-slow-queries.
