debugging-failed-data-quality-checks
Qué hace
Esta skill explica por qué una comprobación de datos está en rojo, muestra las filas que la causaron y sugiere qué cambiar. Está pensada para quien mantiene datos del almacén y necesita actuar sobre una comprobación que falla.
Cuándo usarla
- ✓Cuando una comprobación de calidad de datos muestra fallo o error y quieres conocer la causa.
- ✓Cuando quieres ver las filas concretas que detectó una comprobación.
- ✓Cuando una vista materializada muestra un mensaje de No publicada o datos desactualizados tras una actualización.
Link de la skill
https://github.com/PostHog/posthog/blob/master/products/data_quality/skills/debugging-failed-data-quality-checks/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Por qué falla mi comprobación de unicidad de pedidos y cuáles son las filas duplicadas?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Primero lee el estado de la comprobación, porque eso indica si el problema está en los datos, en la propia comprobación o en una consulta que no pudo ejecutarse. Después revisa las filas coincidentes.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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 | | ---
Preguntas frecuentes
¿Qué significa error?
Significa que la consulta de la comprobación no pudo ejecutarse, así que no se juzgó nada. El problema suele estar en el texto del error, no en los datos.
¿Por qué una comprobación de recuento de filas no muestra filas que fallan?
Las comprobaciones de recuento de filas juzgan el recuento observado frente a sus límites, así que debes leer ese recuento en lugar de buscar filas coincidentes.
¿Qué significa No publicada en una vista?
Significa que una actualización se bloqueó porque la puerta de calidad de datos no se superó, así que los datos nuevos no se publicaron.
Detalles
Descripción original del 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
Popularidad
- Estrellas en GitHub
- 41 mil
- Posición en el ranking
- #6855
- Licencia
- —
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
depot-ci
41 milAyuda a tu agente a configurar y ejecutar flujos de Depot CI, una alternativa a GitHub Actions, y a leer los registros de ejecución.
depot-container-builds
41 milAyuda a tu agente a crear imágenes de Docker en los constructores remotos de Depot, incluidas las multiplataforma, y a corregir fallos.
depot-github-runners
41 milAyuda a tu agente a pasar los trabajos de GitHub Actions a runners gestionados por Depot, elegir su tamaño y etiquetas y resolver problemas de configuración.
editing-agents-md
41 milAyuda a tu agente a decidir si una regla debe ir en un archivo AGENTS.md o CLAUDE.md, y a escribirla para que se cumpla sin sobrecargar el archivo.
Skills parecidas
discrawl
394 milPermite que tu agente busque y resuma un archivo local guardado de mensajes de Discord, revise qué tan actual es y lea mensajes directos.
clickhouse-io
280 milAyuda a tu agente a optimizar consultas y esquemas en ClickHouse con buenas prácticas para cargas analíticas de alto rendimiento. Úsalo si las consultas son muy lentas.
scientific-db-pubmed-database
280 milAyuda a tu agente a buscar artículos científicos del ámbito biomédico. Es útil para investigaciones que necesitan información médica específica.