Official agent skill

Debugging Failed Data Quality Checks

by PostHog in PostHog/posthog-foss

Finds out why a data quality check failed or errored, looks at the rows it matched, and recommends the fix.

OfficialMITAuto-check passedData & Analytics

Install Debugging Failed Data Quality Checks

skills CLI
$ npx skills add PostHog/posthog-foss --skill debugging-failed-data-quality-checks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PostHog/posthog-foss debugging-failed-data-quality-checks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .claude/skills && cp -r skills-src/products/data_quality/skills/debugging-failed-data-quality-checks .claude/skills/debugging-failed-data-quality-checks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
debugging-failed-data-quality-checks
GitHub stars
721
Token cost
~2.1k tokens
SKILL.md length
902 words
Files
1
Skills in repo
213
Repo updated
First seen
Licence
MIT

At a glance

Finds out why a data quality check failed or errored, looks at the rows it matched, and recommends the fix.

  • Works in 5 steps: Read the run → Look at the failing rows → Read an errored run → …
  • Asked why a check is red
  • SKILL.md covers When to use this skill, Available tools, Workflow and Important notes, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Debugging Failed Data Quality Checks is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. 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…

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Data cleaning. It works with PostHog. The repository describes itself as: PostHog FOSS is a read-only mirror of PostHog, with all proprietary code removed. NOTE: This repo is synced automatically from the main PostHog repo. Please raise any issues and… The licence is MIT.

When your agent uses it

  • Asked why a check is red
  • What rows failed
  • Why a view shows Not published
  • Why a views data is stale after a refresh

Example prompts

  • “Not published”
  • “Use the debugging-failed-data-quality-checks skill to find out why a data quality check failed or errored, looks at the rows it matched, and…”
  • “/debugging-failed-data-quality-checks”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Read the run
  2. Look at the failing rows
  3. Read an errored run
  4. Understand a blocked refresh
  5. Recover

What it can do on your machine

Read from SKILL.md and the folder at commit 2c48221. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Debugging Failed Data Quality Checks loads about 2.1k tokens when it runs. Until then it costs about 141 tokens; SKILL.md has 902 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~141
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PostHog/posthog-foss at commit 2c48221, republished under its MIT licence (© PostHog). 902 words, ~2,052 tokens.

Download SKILL.mdSave it as .claude/skills/debugging-failed-data-quality-checks/SKILL.md (or your agent's skills folder).
name
debugging-failed-data-quality-checks
description
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.

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:

StatusMeaningWhere to look
failedThe query ran and the assertion found bad dataThe data, or the assertion itself
erroredThe query could not run, so nothing was judgedThe error text (never a data problem)
skippedThe subject is goneWhether the table or view still exists
passedThe assertion heldNothing

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 failed or errored and 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-checks or auditing-warehouse-view-health) found a failing check or a blocked view and handed it off

Available tools

ToolPurpose
posthog:data-quality-check-resultsA check's recent runs, with compiled_query, error and the config it ran
posthog:execute-sqlRe-run a run's compiled_query to see the failing rows
posthog:data-quality-check-runRun a check now
posthog:data-quality-check-updateFix an assertion or change its severity
view-getA view's definition and status
view-run-historyA view's materialization runs and their errors
view-runMaterialize 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:

  • status and error
  • check_config and check_severity: what the run asserted, which can differ from the check today
  • compiled_query: HogQL that selects the failing rows. For row_count it returns the count instead, so judge that check by observed_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 read status first.

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.

Show full SKILL.md (411 more words)Show less
Step 3: Read an errored run

An errored run did not judge the data. Match the error text:

Error textCause and fix
The staged files could not be read, so this data was not audited.The gate could not reach the refresh before publish. The refresh publishes without a verdict. Run the view again.
Metric checks cannot audit staged data.A metric check was part of a gated refresh. It runs on its own schedule instead.
The check query returned no rows.The aggregate query returned nothing. Run the check again and report it if it repeats.
A check that reads another subject needs an initiator or author…An automatic run of a custom_sql or relationships check has no user to run as. A manual run works. An edit to the check's assertion makes the editor its author.
A HogQL or ClickHouse errorA column name typo, a type mismatch, or a query that ran out of time. Fix the config, or add lookback_hours.

Two messages come with skipped: The subject was deleted. and The subject no longer resolves. The table or view is gone. Delete the check or point it at the replacement.

Step 4: Understand a blocked refresh

When the team turns on "Block materialization on failing checks", a materialized view's error-severity checks run on each refresh before it is published. If one fails:

  • The view's run shows an error that starts with Not published: (see view-run-history).
  • The previous version of the view keeps serving queries.
  • Downstream views in the same DAG are skipped for this run.
  • The view's schedule is not paused. The next scheduled refresh runs the checks again.

Warn-severity checks never block a refresh.

Step 5: Recover

Fix the cause, then prove it:

  1. Fix the upstream data, or fix the assertion with posthog:data-quality-check-update. If the failure is real but must not block the refresh, change severity to warn.
  2. For a blocked view, call view-run to materialize it again. Otherwise call posthog:data-quality-check-run.
  3. Read posthog:data-quality-check-results again and confirm the newest run passed.

Important notes

  • Do not change a check's severity or assertion only to turn it green. Confirm with the user first.
  • errored is never evidence of bad data, and passed on an empty table is not evidence of good data.
  • A check reports against its subject, but a custom_sql query can read other tables. Read the query before you blame the subject.
  • authoring-data-quality-checks: writing and choosing checks
  • auditing-warehouse-view-health: finding failing materialized views

© PostHog, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in products/data_quality/skills/debugging-failed-data-quality-checks of PostHog/posthog-foss.

Open the folder on GitHubat commit 2c48221

Compare with similar skills

Debugging Failed Data Quality Checks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Debugging Failed Data Quality Checks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Debugging Failed Data Quality Checks this skillPostHog/posthog-foss721—~2.1kAutomated safety check: PassMIT
Question2reportrefraction-ray/xalpha2.7k—~3.2kAutomated safety check: PassMIT
Dingo VerifyMigoXLab/dingo757—~741Automated safety check: NotesApache-2.0
Data Validationplatonai/Browser41.2k—~896Automated safety check: PassApache-2.0
Issues DeduplicationJetBrains/ideavim10k—~1.3kAutomated safety check: PassMIT
Pandas ProJeffallan/claude-skills12k1 repos~1.5kAutomated safety check: PassMIT

Similar skills

  • Question2report

    refraction-ray/xalpha

    Turn a natural-language financial question into a polished, self-contained HTML report.

    2.7k GitHub stars~3.2k tokensUpdated 2 mo ago
    Data & AnalyticsAuto-check passed
  • Dingo Verify

    MigoXLab/dingo

    A skill your agent uses when the user wants to fact-check an article or verify factual claims in a document.

    757 GitHub stars~741 tokensUpdated 9 days ago
    Data & AnalyticsAuto-check: notes
  • Data Validation

    platonai/Browser4

    Validates data against common and custom rules (required fields, formats, ranges).

    1.2k GitHub stars~896 tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Issues Deduplication

    JetBrains/ideavim

    Official

    Handles deduplication of YouTrack issues. An agent skill from JetBrains/ideavim.

    10k GitHub stars~1.3k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Pandas Pro

    Jeffallan/claude-skills

    Handles pandas DataFrame work: cleaning, merging, groupby aggregation, pivots, time-series resampling and memory tuning, with checks on dtypes, shapes and nulls.

    12k GitHub starsUsed in 1 repo~1.5k tokens
    Data & AnalyticsAuto-check passed
  • Openbb Data Fetcher

    monarchjuno/vibe-investing

    Fetch financial, market, economic, fundamental, news, options, crypto, ETF, index, and macro data through the OpenBB Python interface instead of the OpenBB MCP server.

    299 GitHub stars~2.9k tokensUpdated 5 mo ago
    Data & AnalyticsAuto-check: notes

More from PostHog/posthog-foss

All 213 skills in this repo
  • Authoring Log Alerts

    PostHog/posthog-foss

    Official

    Author useful, low-noise log alerts on services in a PostHog project.

    721 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Autoresolving PR Conflicts

    PostHog/posthog-foss

    Official

    Operating procedure for the conflict-autoresolver agent: sweep open PostHog/posthog PRs that conflict with master, resolve the trivial conflicts (generated artifacts deterministically, source…

    721 GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM).

    721 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Exploring Apm Traces

    PostHog/posthog-foss

    Official

    Investigates distributed application performance using PostHog APM (OpenTelemetry span) data via MCP.

    721 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Exploring LLM Traces

    PostHog/posthog-foss

    Official

    Debug and inspect LLM/AI agent traces using PostHog's MCP tools.

    721 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Investigate Metric

    PostHog/posthog-foss

    Official

    Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.

    721 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Works with

Questions about Debugging Failed Data Quality Checks

What does Debugging Failed Data Quality Checks do?

Finds out why a data quality check failed or errored, looks at the rows it matched, and recommends the fix. Debugging Failed Data Quality Checks is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. Finds out why a data quality check failed or errored, looks at the rows it matched, and recommends the fix.

When should I use Debugging Failed Data Quality Checks?

Debugging Failed Data Quality Checks fits situations like: asked why a check is red; what rows failed; why a view shows Not published; why a views data is stale after a refresh.

How do I install Debugging Failed Data Quality Checks in Claude Code?

Run `npx skills add PostHog/posthog-foss --skill debugging-failed-data-quality-checks -a claude-code`. Or copy the skill folder (products/data_quality/skills/debugging-failed-data-quality-checks in PostHog/posthog-foss) into .claude/skills/debugging-failed-data-quality-checks in your project. Claude Code loads it when a task matches its description.

How do I install Debugging Failed Data Quality Checks in Codex?

Run `npx skills add PostHog/posthog-foss --skill debugging-failed-data-quality-checks -a codex`. Or copy the skill folder (products/data_quality/skills/debugging-failed-data-quality-checks in PostHog/posthog-foss) into .agents/skills/debugging-failed-data-quality-checks in your project. Codex loads it when a task matches its description.

Can I use Debugging Failed Data Quality Checks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/posthog-foss --skill debugging-failed-data-quality-checks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/debugging-failed-data-quality-checks, .gemini/skills/debugging-failed-data-quality-checks, .github/skills/debugging-failed-data-quality-checks and .opencode/skills/debugging-failed-data-quality-checks in your project.

What does Debugging Failed Data Quality Checks need to run?

SKILL.md names no scripts, command-line tools or credentials: Debugging Failed Data Quality Checks is instructions for the agent only.

Does Debugging Failed Data Quality Checks access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Debugging Failed Data Quality Checks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Debugging Failed Data Quality Checks use?

Debugging Failed Data Quality Checks is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Debugging Failed Data Quality Checks use?

About 2.1k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Debugging Failed Data Quality Checks?

Skills that share tags, products or a category with Debugging Failed Data Quality Checks: Question2report (refraction-ray/xalpha, 2.7k stars), Dingo Verify (MigoXLab/dingo, 757 stars), Data Validation (platonai/Browser4, 1.2k stars) and Issues Deduplication (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Debugging Failed Data Quality Checks?

PostHog (a GitHub organization, an official publisher) maintains it in PostHog/posthog-foss, which has 721 GitHub stars. The repository holds 213 skills in this directory. The repository was last updated on October 7, 2026.

Source: PostHog/posthog-foss on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.