debugging-failed-data-quality-checks
O que ela faz
Esta skill explica por que um check de dados está vermelho, mostra as linhas que causaram o problema e sugere o que mudar. É para quem mantém dados do warehouse e precisa agir sobre um check que falha.
Quando usar
- ✓Quando um check de qualidade de dados mostra failed ou errored e você quer saber a causa.
- ✓Quando você quer ver as linhas específicas que um check encontrou.
- ✓Quando uma view materializada mostra a mensagem Not published ou dados desatualizados depois de uma atualização.
Link da skill
https://github.com/PostHog/posthog/blob/master/products/data_quality/skills/debugging-failed-data-quality-checks/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Por que meu check de unicidade de pedidos está falhando, e quais linhas são as duplicadas?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
Ela lê primeiro o status do check, porque isso mostra se o problema está nos dados, no próprio check ou em uma consulta que não pôde ser executada. Depois observa as linhas correspondentes.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Debugging failed data quality checks
A check run ends in one of four states. Read the state first, because it decides where the problem is:
| Status | Meaning | Where to look |
|---|---|---|
failed |
The query ran and the assertion found bad data | The data, or the assertion itself |
errored |
The query could not run, so nothing was judged | The error text (never a data problem) |
skipped |
The subject is gone | Whether the table or view still exists |
passed |
The assertion held | Nothing |
row_count and freshness checks judge observed_value, not failed_row_count.
A failed row_count means the count fell outside its bounds.
A failed freshness means the newest row is older than the limit.
When to use this skill
- A check or a subject shows
failedorerroredand the user wants to know why - The user wants to see the rows a check matched
- A materialized view's latest run shows an error that starts with
Not published: - A view kept serving old data after a refresh, and the data quality gate is on
- Another skill (
authoring-data-quality-checksorauditing-warehouse-view-health) found a failing check or a blocked view and handed it off
Available tools
| Tool | Purpose |
|---|---|
posthog:data-quality-check-results |
A check's recent runs, with compiled_query, error and the config it ran |
posthog:execute-sql |
Re-run a run's compiled_query to see the failing rows |
posthog:data-quality-check-run |
Run a check now |
posthog:data-quality-check-update |
Fix an assertion or change its severity |
view-get |
A view's definition and status |
view-run-history |
A view's materialization runs and their errors |
view-run |
Materialize a view again |
To find the failing checks, query system.information_schema.data_quality_checks for last_status IN ('failed', 'errored'), or system.information_schema.data_quality_health for a subject's verdict.
Workflow
Step 1: Read the run
Call posthog:data-quality-check-results for the check.
On the newest run, read:
statusanderrorcheck_configandcheck_severity: what the run asserted, which can differ from the check todaycompiled_query: HogQL that selects the failing rows. Forrow_countit returns the count instead, so judge that check byobserved_value.audited_staged_refresh: true when the run was part of a gated audit of a refresh before it was published. An errored run can carry it too, so readstatusfirst.
Retention clears compiled_query after 30 days.
For an older run, run the check again.
Step 2: Look at the failing rows
Run compiled_query with posthog:execute-sql.
An empty compiled_query means there is nothing to replay: retention cleared it, or a gated run could not read the view's definition.
Look at what it matched before you report anything.
A failure means one of two things: the data is bad, or the assertion is wrong.
The rows tell you which.
When audited_staged_refresh is true, the query does not read the published table.
It holds the view's definition in a WITH clause and reads the view's source tables now.
The sources may have changed since the run, so the rows and the count can differ from the run.
A query that now returns zero rows does not prove that the refresh was clean.
Compare with failed_row_count on the run.
Step 3: Read an errored run
An errored run did not judge the data. Match the error text:
| Error text | Cause and fix | | ---
Perguntas frequentes
O que significa errored?
Significa que a consulta do check não pôde ser executada, então nada foi avaliado. O problema geralmente está no texto do erro, e não nos dados.
Por que um check de contagem de linhas não mostra linhas com falha?
Checks de contagem de linhas avaliam a contagem observada contra os limites, então você lê essa contagem em vez de procurar linhas correspondentes.
O que significa Not published em uma view?
Significa que uma atualização foi bloqueada porque o gate de qualidade de dados não passou, então os dados mais novos não foram publicados.
Detalhes
Descrição original do autor
Finds out why a data quality check failed or errored, looks at the rows it matched, and recommends the fix. Also covers a materialized view refresh that the data quality gate did not publish. Use when asked why a check is red, what rows failed, why a view shows "Not published", why a view's data is stale after a refresh, or how to get a blocked refresh published. Trigger terms: failed check, failing rows, errored check, data quality failure, not published, blocked materialization, unpublished refresh, check keeps failing.
repo: PostHog/posthog
Popularidade
- Estrelas no GitHub
- 41 mil
- Posição no ranking
- #6855
- Licença
- —
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
depot-ci
41 milAjuda seu agente a configurar e executar fluxos de trabalho do Depot CI, uma alternativa ao GitHub Actions, incluindo a migração de fluxos existentes e a leitura dos logs de execução.
depot-container-builds
41 milAjuda seu agente a criar imagens Docker nos builders remotos do Depot, incluindo imagens multiplataforma, envio para registros e correção de falhas de build.
depot-github-runners
41 milAjuda seu agente a levar tarefas do GitHub Actions para runners gerenciados pelo Depot, escolhendo os tamanhos e os rótulos dos runners e resolvendo problemas de configuração.
editing-agents-md
41 milAjuda seu agente a decidir se uma regra deve ficar em um arquivo AGENTS.md ou CLAUDE.md, e a escrevê-la de forma que seja seguida sem deixar o arquivo inchado.
Skills parecidas
discrawl
394 milPermite que seu agente pesquise e resuma um arquivo local salvo de mensagens do Discord, verifique quão atualizado ele está e leia mensagens diretas.
clickhouse-io
280 milAjuda seu agente a otimizar consultas e esquemas no ClickHouse com boas práticas de alta performance. Use quando consultas analíticas forem lentas.
scientific-db-pubmed-database
280 milAjuda seu agente a buscar artigos científicos na área biomédica. É útil para pesquisas que precisam de informações médicas específicas.