diagnosing-failed-warehouse-syncs
它能做什么
这项技能教智能体排查 PostHog 数据仓库中某一次失败的数据同步,例如 Stripe 或 Postgres 导入。适合数据停止更新或看起来不对的人。
适用场景
- ✓当某个具体的数据同步(如 Stripe 或 Postgres)失败或显示错误的时候。
- ✓当某张表已经卡在运行状态好几个小时的时候。
- ✓当你的数据仓库数据看起来不对或缺少行的时候。
技能链接
https://github.com/PostHog/posthog/blob/master/products/warehouse_sources/skills/diagnosing-failed-warehouse-syncs/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的 Stripe 同步已经卡住好几个小时了,数据看起来还是旧的。你能查出原因,并告诉我最安全的修复方法吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会自上而下排查问题,先看数据源,再看表,最后看恢复选项。除非确有必要,它会避免完全重置,因为重置会丢弃已经同步的数据。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Diagnosing failed data warehouse syncs
Work top-down when a data warehouse source or table is failing, stuck, or producing bad data: source → schema → recovery action. Do not jump straight to "resync from scratch" — that discards synced data and restarts from zero, which is rarely the right first step.
When to use this skill
- The user reports a specific sync is failing (e.g. "my Stripe source is red")
- A table has been in
Runningstate far longer than expected - Data in a warehouse table is stale, missing rows, or looks corrupt
- Latest rows aren't appearing despite the schema being marked
Completed - The user is choosing between cancel / reload / resync / delete-data and isn't sure which
- Another skill — typically
auditing-warehouse-source-health— has surfaced a failing source or schema and the user wants to dig into it
Both entry points (user-reported and audit-handoff) use the same workflow; the audit just means you already know which item to diagnose and can skip Step 1's discovery search.
Available tools
| Tool | Purpose |
|---|---|
external-data-sources-list |
List all sources with connection status and latest error |
external-data-sources-retrieve |
Full details for one source including all its schemas |
external-data-schemas-list |
All table schemas across all sources, with per-table status + latest_error |
external-data-schemas-retrieve |
Full details for one schema including sync_type_config |
external-data-schemas-cancel |
Cancel a sync currently in Running state |
external-data-schemas-reload |
Trigger a sync using the configured sync method (respects incremental) |
external-data-schemas-resync |
Full resync — wipes synced data and restarts. Destructive |
external-data-schemas-delete-data |
Delete the synced table but keep the schema entry |
external-data-schemas-partial-update |
Change sync_type / incremental_field / cdc_table_mode |
external-data-sources-partial-update |
Update a source's credentials (job_inputs) after rotation |
external-data-sources-reload |
Retrigger syncs for every enabled schema on a source |
external-data-sources-refresh-schemas |
Re-fetch the source's table list to pick up new tables |
external-data-sources-check-cdc-prerequisites-create |
Verify Postgres CDC setup for a source |
external-data-schemas-incremental-fields-create |
Refresh candidate incremental fields when the source schema has changed |
external-data-sources-webhook-info-retrieve |
Check webhook registration state and external service status |
external-data-sources-create-webhook-create |
Re-register a webhook that was lost or never registered |
external-data-sources-update-webhook-inputs-create |
Update the signing secret after rotation on the source side |
external-data-sources-delete-webhook-create |
Remove a broken webhook before re-registering |
Workflow
Step 1 — Locate the failing item
If the user named a source, go straight to external-data-sources-retrieve. Otherwise start with
external-data-sources-list and external-data-schemas-list to find what's red.
Two kinds of failure:
- Source-level (
ExternalDataSource.status = "Error"): the connection itself is broken — credentials expired, host unreachable, account disabled. Affects every table. - Schema-level — the source connects fine but one or more tables are failing. In the serialized API response
from
external-data-schemas-list, look forstatusvalues"Failed","Billing limits", or"Billing limits too low". (The underlying model enum values are `BillingLimitReache
常见问题
这项技能会删除我已同步的数据吗?
不会作为第一步。它会推荐破坏性最小的修复方法,因为完整重新同步会丢弃已经导入的数据。
它涵盖哪些问题?
数据源或表级别的故障、卡在运行状态的表、凭据问题,以及表结构的变化。
它可以从健康检查开始吗?
可以。如果健康检查已经发现某个失败的数据源,这项技能可以从该项继续。
详情
作者的原始描述
Diagnose why a data warehouse sync is failing and recommend the right recovery action. Use when the user asks "why isn't my Stripe/Postgres/Hubspot sync working?", "this table has been stuck for hours", "the data in the warehouse looks wrong", or wants to troubleshoot a specific source or schema. Covers source-level vs schema-level failures, stuck Running states, credential and schema-drift errors, incremental-field misconfig, CDC prerequisite failures, and the cancel / reload / resync / delete-data recovery actions.
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6967
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。