Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

triaging-warehouse-sync-tickets

БесплатноБез исполняемых скриптовНе проверен

Debug a customer's data warehouse source, schema, or table from a support ticket, using PostHog's own production data. Use when a ticket says a warehouse…

PostHogот PostHog★ 41 278 звёзд на GitHub

Об этом скилле

Triaging warehouse sync tickets

A support ticket tells you what a customer sees. This skill tells you what actually happened. The output is a diagnosis plus one recommended action for the support agent.

You are a PostHog employee working a ticket for a different customer's team. That single fact drives everything below.

The one way you read customer data: execute-sql over a direct-connect source

PostHog's own project holds direct-connect warehouse sources pointed at the live production Postgres and ClickHouse databases. Those databases hold every customer's rows. So:

execute-sql  +  connectionId = <a Production direct-connect source>  +  WHERE team_id = <customer>

That is the whole access model. connectionId is what makes the query run against production instead of your own project's catalog. The connections are raw database connections, not team-scoped views, so a team_id filter is the only thing separating one customer from another. This is confirmed: a GROUP BY team_id over log_entries returns hundreds of teams.

  • Production Postgres holds the sync control plane: posthog_externaldatasource, posthog_externaldataschema, posthog_externaldatajob, posthog_datawarehousetable, plus posthog_team / posthog_organization / posthog_user for identifying who filed the ticket.
  • Production ClickHouse holds the runtime evidence: log_entries for per-run pipeline logs, and app_metrics2 for success, failure, and row counters.

Together those answer every question a warehouse sync ticket raises. Step 1 shows how to open both, in either region.

Do not reach for the product tools

external-data-sources-list, external-data-schemas-list, external-data-schemas-retrieve, external-data-sources-retrieve, and every other external-data-* tool read the MCP session's own project. So does execute-sql with no connectionId. None of them can see the customer.

They also do not error when you point them at a ticket. They return PostHog's own sources, with real ids, real statuses, and real error strings. That output is indistinguishable from an answer until someone notices the numbers describe the wrong company. This is the main way this task goes wrong.

These product tools are still correct to call, because they are about reaching production or reading the ticket rather than reading a customer's project:

  • external-data-sources-connections-list — lists the direct-connect connections in your own project. This is how you get the connectionId.
  • integrations-list with kind=posthog — the EU hop in step 1.
  • conversations-tickets-retrieve and conversations-tickets-messages-retrieve — the ticket itself. Support runs on PostHog Conversations, so these read the ticket, not a third-party helpdesk. Tickets arrive from the widget, email, Slack, Teams, and GitHub; channel_source tells you which. conversations-tickets-retrieve returns a fixed field set, so identity_verified and the ticket's resolved organization_id are not available to you even though they exist on the record. Step 0 verifies the requester with the fields the tool does return.

Related skills, and what is still usable from them:

  • diagnosing-failed-warehouse-syncs (MCP skill) — written for a customer debugging their own project. Its tool calls therefore do not apply to you. Its knowledge does: the error-string to root-cause table and the cause to recovery-action mapping are portable, so read those and skip the tool calls.
  • auditing-warehouse-source-health — same limitation, and it is a project-wide sweep, not one ticket.
  • querying-production-databases — query_log_archive performance work, not sync state.

Ground rules

  • Read only. Never write to a customer's project from this skill. Recommend the action; let the support agent or the customer run it.
  • Check the team_id on every result. If a row does not carry the customer's team id, you are reading your own project. Stop and fix the connection before you read further.
  • Never select job_inputs. That column holds source credentials.
  • Cross-customer data stays in the session. Do not put a customer name, table name, error text, row count, or team id into a commit message, PR description, public issue, or screenshot.
  • Bound every query by team_id and by time, never by row count. An unbounded query times out or scans the fleet. A LIMIT on a listing hides the broken source you are looking for. See the pitfalls section, and the row-cap note at the top of the cookbook.
  • Verify the requester before you trust a team identifier. A project URL, token, or team id sitting in ticket text is a claim, not proof of authorization. See the verification step in Step 0 before you run anything against the team it names.
  • Validate every ticket-derived value before it goes into a SQL string. Never substitute raw ticket text into a query. See the placeholder not
Полный SKILL.md на GitHub

Установить triaging-warehouse-sync-tickets в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/query-cookbook.md

FAQ

Что делает скилл triaging-warehouse-sync-tickets?

Debug a customer's data warehouse source, schema, or table from a support ticket, using PostHog's own production data. Use when a ticket says a warehouse table is stale, empty, stuck, duplicated, missing rows, or failing to sync, and you need the real state of the sync rather than the customer's description. The customer is on a team your MCP session cannot reach, so every answer comes from execute-sql with a connectionId set to a direct-connect source over PostHog's live production databases, which hold all customers' data. Covers region detection (US vs EU), the Production Postgres connection (externaldatasource / externaldataschema / externaldatajob / datawarehousetable), the Production ClickHouse connection (log_entries, app_metrics2), cross-region access through posthog-connection-call, why the external-data-* product tools silently answer from your own project instead, and how to end with one recommended action plus who can run it. Internal only: every query returns another customer's data.

Как установить скилл triaging-warehouse-sync-tickets?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл triaging-warehouse-sync-tickets запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить triaging-warehouse-sync-tickets с