diagnosing-failed-warehouse-syncs
Skill này làm gì
Skill này dạy agent khắc phục sự cố một lần đồng bộ dữ liệu bị lỗi trong kho dữ liệu PostHog, chẳng hạn một nhập từ Stripe hoặc Postgres. Skill dành cho người có dữ liệu ngừng cập nhật hoặc trông sai.
Khi nào nên dùng
- ✓Khi một lần đồng bộ dữ liệu cụ thể, chẳng hạn Stripe hoặc Postgres, bị lỗi hoặc hiển thị một thông báo lỗi.
- ✓Khi một bảng bị kẹt ở trạng thái đang chạy suốt nhiều giờ.
- ✓Khi dữ liệu trong kho của bạn có vẻ sai hoặc thiếu hàng.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/warehouse_sources/skills/diagnosing-failed-warehouse-syncs/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Đồng bộ Stripe của tôi đã bị kẹt suốt nhiều giờ và dữ liệu có vẻ cũ. Bạn có thể tìm vì sao và cho tôi cách sửa an toàn nhất không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent kiểm tra vấn đề từ trên xuống, bắt đầu từ nguồn, rồi đến bảng, và cuối cùng là các tùy chọn khôi phục. Nó tránh đặt lại toàn bộ trừ khi thật sự cần, vì đặt lại sẽ bỏ dữ liệu đã đồng bộ.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Skill này có xóa dữ liệu đã đồng bộ của tôi không?
Không ở bước đầu tiên. Nó đề xuất cách sửa ít phá hủy nhất, vì đồng bộ lại toàn bộ sẽ bỏ dữ liệu đã nhập.
Nó bao quát những vấn đề nào?
Lỗi ở cấp nguồn hoặc bảng, bảng bị kẹt ở trạng thái đang chạy, lỗi thông tin xác thực, và thay đổi cấu trúc bảng.
Nó có thể bắt đầu từ một kiểm tra sức khỏe không?
Có. Nếu một kiểm tra sức khỏe đã tìm thấy một nguồn bị lỗi, skill này có thể tiếp tục từ mục đó.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6967
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
depot-ci
41kGiúp agent của bạn thiết lập và chạy quy trình Depot CI, một lựa chọn thay thế GitHub Actions, gồm chuyển các quy trình hiện có và đọc nhật ký chạy.
depot-container-builds
41kGiúp agent của bạn build image Docker trên các builder từ xa của Depot, gồm image đa nền tảng, đẩy lên registry và sửa lỗi build.
depot-github-runners
41kGiúp agent của bạn chuyển các job GitHub Actions sang runner do Depot quản lý, chọn kích thước và nhãn runner, và xử lý lỗi thiết lập runner.
editing-agents-md
41kGiúp agent của bạn quyết định một quy tắc nên nằm trong file AGENTS.md hay CLAUDE.md, và viết sao cho quy tắc được tuân thủ mà file không bị phình to.
Skill tương tự
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
clickhouse-io
280kGiúp agent của bạn tối ưu truy vấn và schema trong ClickHouse theo thực hành tốt nhất cho phân tích dữ liệu hiệu năng cao khi truy vấn chậm.
scientific-db-pubmed-database
280kGiúp agent của bạn tìm bài báo khoa học trong lĩnh vực y sinh. Hữu ích cho nghiên cứu cần thông tin y khoa cụ thể.