CtrlK
BlogDocsLog inGet started
Tessl Logo

fixing-flaky-tests

Guides an agent through reproducing, root-causing, fixing, and validating flaky tests in the PostHog monorepo. Use when a test fails intermittently in CI but passes on rerun or locally, when `hogli ci:insights` or the debugging-ci-failures skill classifies a failure as a flaky test, when given a GitHub Actions URL for a flaky job, or when asked to deflake, stabilize, or fix a flaky Jest, pytest, or Playwright test. Core discipline: reproduce locally before changing anything, fix the root cause (never mask it with sleeps, retries, or bigger timeouts), and prove the fix with an N-run validation loop sized to the observed failure rate.

77

Quality

96%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

92%

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

An excellent, highly actionable flaky-test workflow with executable commands, clear sequencing, and validation feedback loops. Its only weakness is progressive disclosure: everything lives in one long SKILL.md with no external references to offload detail.

Suggestions

Move the PostHog-specific 'Frontend (Jest + kea)' and 'Backend (pytest)' pattern catalogs into a referenced file (e.g. references/posthog-patterns.md) and link to it from section 4 to shorten the core workflow.

Extract the root-cause symptom/cause table and the masking-move table into a reference file so the main steps stay a quick-read overview.

Add a one-line 'Quick start' summary at the top pointing to the most common path (measure → reproduce → fix → validate) before the detailed sections.

DimensionReasoningScore

Conciseness

Lean and dense with actionable specifics (exact commands, file paths, flags); it assumes Claude's competence and avoids explaining basic concepts, with every section earning its place.

3 / 3

Actionability

Fully executable guidance throughout — `gh run list`/`gh api` calls, a copy-paste loop harness, `git bisect run` examples, and concrete `hogli`/`pnpm` commands with specific flags.

3 / 3

Workflow Clarity

A clearly sequenced 7-step process with explicit validation checkpoints and a feedback loop ('Any failure in the loop → back to step 4'), plus reproduction-before-fix and validation-before-report gates.

3 / 3

Progressive Disclosure

Well-organized into clear sections with no nested-reference problem, but it is a single ~200-line monolith with no bundle files and inline content (e.g. the PostHog-specific frontend/backend patterns) that could be split into referenced files.

2 / 3

Total

11

/

12

Passed

Description

100%

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, third-person description that names concrete actions, rich natural trigger terms, and an explicit 'Use when' clause for both what and when. Its PostHog-specific scoping and explicit skill boundaries keep conflict risk low.

DimensionReasoningScore

Specificity

Lists multiple concrete actions — 'reproducing, root-causing, fixing, and validating flaky tests' — rather than vague language, matching the score-3 anchor.

3 / 3

Completeness

Explicitly answers both what (reproduce, root-cause, fix, validate flaky tests) and when via the 'Use when...' clause with concrete trigger conditions.

3 / 3

Trigger Term Quality

Covers natural terms users would actually say — 'flaky test', 'fails intermittently in CI', 'deflake', 'stabilize', and the three frameworks (Jest, pytest, Playwright).

3 / 3

Distinctiveness Conflict Risk

Scoped to flaky tests in the PostHog monorepo with distinct triggers and explicit hand-off to sibling skills (debugging-ci-failures, playwright-test), making conflicts unlikely.

3 / 3

Total

12

/

12

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
PostHog/posthog
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.