Files
supabase/.claude
Jordi EnricandClaude Opus 4.8 3674f173a3 docs(skills): add clickhouse-logs-queries skill (#47388)
## What

Adds an agent skill, `clickhouse-logs-queries`, to help teammates write
and migrate logs queries against the ClickHouse-backed `logs` table.

It covers:
- The `logs` table schema, sources, and the `log_attributes` map
- ClickHouse vs BigQuery functions (`count()`, `match`/`ilike`,
`toInt32OrZero`, `mapKeys`)
- Best practices (filter by source, always LIMIT, tight time range)
- A BigQuery-to-ClickHouse migration guide with a full before/after
- How to wire branded analytics SQL in the Studio codebase
(`safeSql`/`analyticsLiteral`, the endpoint/builder pickers, the OTEL
generators)

## Why

The logs backend is moving to a single ClickHouse table behind the
`otelLegacyLogs` flag. This skill gives a single, accurate reference so
query authoring and code migration stay consistent.

## Files

- `.claude/skills/clickhouse-logs-queries/SKILL.md`
-
`.claude/skills/clickhouse-logs-queries/references/bigquery-migration.md`
-
`.claude/skills/clickhouse-logs-queries/references/codebase-integration.md`

Docs only, no runtime code.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added guidance for working with ClickHouse-backed logs queries,
including source filtering, structured field access, function
equivalents, and example queries.
* Added a step-by-step reference for converting existing logs SQL to the
new query format.

* **Documentation**
* Added implementation notes for wiring logs queries correctly in the
app, including safe SQL construction, query routing, and
feature-flag-aware behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 16:49:57 +02:00
..