Official agent skill

Dd Triage Flaky Test

by DataDog in DataDog/pup

Load when investigating a specific flaky test. An agent skill from DataDog/pup.

OfficialApache-2.0Auto-check passedTesting & QA

Install Dd Triage Flaky Test

skills CLI
$ npx skills add DataDog/pup --skill dd-triage-flaky-test -a claude-code

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

GitHub CLI
$ gh skill install DataDog/pup dd-triage-flaky-test --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/DataDog/pup.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dd-triage-flaky-test .claude/skills/dd-triage-flaky-test && 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
dd-triage-flaky-test
GitHub stars
1k
Used in
1 other repo
Token cost
~2.3k tokens
SKILL.md length
961 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Load when investigating a specific flaky test. An agent skill from DataDog/pup.

  • Works in 6 steps: Parse Input → Get Flaky Test Details → Get Recent Failure History → …
  • Tasks that involve Failing and flaky tests
  • SKILL.md covers Input and Workflow
  • Calls git; reaches github.com

What it does

Dd Triage Flaky Test is an agent skill from DataDog/pup, published by the product's own GitHub organization. Load when investigating a specific flaky test. Gets history, failure pattern, and category, then recommends fix, quarantine, or escalate.

Its SKILL.md is about 2.3k 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 Testing & QA, covering Failing and flaky tests. It works with Datadog and Git. The repository describes itself as: Give your AI agent a Pup — a CLI companion with 200+ commands across 33+ Datadog products. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Failing and flaky tests

Example prompts

  • “/dd-triage-flaky-test”

Requirements

  • Docker

Workflow steps

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

  1. Parse Input
  2. Get Flaky Test Details
  3. Get Recent Failure History
  4. Check Blast Radius
  5. Recommend Fix or Quarantine
  6. Produce Triage Brief and Act

What it can do on your machine

Read from SKILL.md and the folder at commit c075375. 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

    Shell commands in SKILL.md call:

    • git

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    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

Dd Triage Flaky Test loads about 2.3k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 961 words of instructions outside code blocks.

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

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 DataDog/pup at commit c075375, republished under its Apache-2.0 licence (© DataDog). 961 words, ~2,333 tokens.

Download SKILL.mdSave it as .claude/skills/dd-triage-flaky-test/SKILL.md (or your agent's skills folder).
name
dd-triage-flaky-test
description
Load when investigating a specific flaky test. Gets history, failure pattern, and category, then recommends fix, quarantine, or escalate.
metadata.version
1.0.0
metadata.author
datadog-labs
metadata.repository
https://github.com/datadog-labs/agent-skills
metadata.tags
datadog,ci,cicd,flaky,flaky-tests,test-optimization
metadata.alwaysApply
false

Triage Flaky Test

One-line summary: Investigate a specific flaky test — get history, failure pattern, and category, then recommend fix, quarantine, or escalate.

Requires: dd-pup skill (pup CLI installed and authenticated).


Input

ParameterDescription
Test nameFully qualified test name (e.g. TestMyFunc or com.example.MyTest)
RepositoryLowercase, no-schema URL (e.g. github.com/org/repo). Derive from git remote get-url origin if not provided.

Workflow

STEP 0 — Parse Input

Derive repository ID from git if not provided:

bash
git remote get-url origin
# Strip protocol and trailing .git, then lowercase the result
# e.g. https://github.com/DataDog/my-repo.git → github.com/datadog/my-repo

Validation fallback: If STEP 1 returns no results, confirm the correct repository by searching without a repo filter:

bash
pup cicd tests search \
  --query "@test.name:\"<test-name>\"" \
  --from 30d \
  --limit 5

Extract @git.repository.id_v2 from results and retry STEP 1 with the confirmed value.

STEP 1 — Get Flaky Test Details

Preferred — use fingerprint_fqn if known (fingerprint_fqn is a valid CI Visibility search facet, distinct from flaky_state):

bash
pup cicd flaky-tests search \
  --query "fingerprint_fqn:<fqn>" \
  --sort="-last_flaked" \
  --limit 5

Fallback — use name + suite + repo:

bash
pup cicd flaky-tests search \
  --query "@test.name:\"<test-name>\" @test.suite:\"<suite>\" @git.repository.id_v2:\"<repo>\"" \
  --sort="-last_flaked" \
  --limit 10

Omit @test.suite if unknown; if the same test name appears in multiple suites, pick the entry whose suite matches the failing test.

Do not filter by flaky_test_state — return the test regardless of state.

Note: the query filter facet is flaky_test_state; the returned response attribute is flaky_state — these are different names for the same concept; do not use flaky_state:active as a query filter.

Extract from results:

  • fingerprint_fqn — unique test identifier; used as the id in STEP 5 write call. If absent, do not proceed to quarantine — see STEP 5.
  • flaky_state — current state (active / quarantined / disabled / fixed)
  • test_stats.failure_rate_pct — percentage of runs that fail
  • flaky_category — root cause category
  • codeowners — owning team
  • pipeline_stats.total_lost_time_ms — total CI time lost
STEP 2 — Get Recent Failure History
bash
pup cicd tests search \
  --query "@test.name:\"<test-name>\" @test.suite:\"<suite>\" @test.status:fail @git.repository.id_v2:\"<repo>\"" \
  --from 7d \
  --limit 20

Extract:

  • Error messages and stack traces (@error.message, @error.stack)
  • Failing branches (@git.branch) — branch-specific vs. widespread
  • Frequency pattern — random timing or specific conditions
  • Unique @ci.pipeline.id values for blast radius (STEP 3)
STEP 3 — Check Blast Radius

Count distinct pipelines impacted using pipeline IDs from STEP 2:

bash
pup cicd events aggregate \
  --query "@ci.status:error @ci.pipeline.id:(<id1> OR <id2> OR ...) @git.repository.id_v2:\"<repo>\"" \
  --compute count \
  --group-by "@ci.pipeline.name" \
  --from 7d

Use the first 10 pipeline IDs from STEP 2 (cap at 10; if more are available, run a second batch and merge results by summing counts per @ci.pipeline.name across batches). Report blast radius as: total number of unique pipelines impacted and whether failures are branch-specific or widespread.

Note: a pipeline failure is not necessarily caused solely by this flaky test — treat blast radius as a signal, not a definitive count.

STEP 4 — Recommend Fix or Quarantine

Use flaky_category from STEP 1 and error messages from STEP 2.

Root cause first:

  • Read the full error trace from bottom to top — chained errors hide the real cause; the innermost error is the root cause, not the first line.
  • Identify the exact source of nondeterminism (race, ordering, stale state, timing).
  • If the root cause is a CI infrastructure problem (runner unavailable, Docker daemon failure, network outage) → do NOT propose a code fix; classify as infra and recommend retry instead.
  • If root cause is uncertain and cannot be confirmed from the stack trace → skip fix, go to quarantine.

Fix at the correct layer:

  • Test issue → fix in test or test helper only.
  • Production bug exposed by the test → fix in production code.
  • Shared helper used by multiple tests → fix the helper AND update all call sites; never patch a single test when the root cause is in shared code.

Forbidden — do not propose these:

  • Timing hacks: increasing timeouts, adding sleeps, widening time windows, adding retries. A fix that only reduces flake probability without eliminating the root cause is invalid.
  • Masking: relaxing assertions (e.g., exact match → at least 1), dropping validations.
  • Partial fixes: touching one call site when multiple share the root cause.

Fix patterns by category:

CategoryApproach
timeoutIdentify the slow operation and make it synchronous or deterministic — do NOT simply raise the timeout constant
concurrencyAdd deterministic synchronization (barriers, channels, locks); remove shared mutable state between tests
networkMock or stub network calls at the boundary; if the test requires a real connection, isolate it with a test server
timeInject a controllable clock; replace wall-clock assertions with relative or event-driven checks
order_dependencyIsolate test state with setup/teardown; eliminate dependencies on execution order or global state
environment_dependencyMock env variables and external config; use test-local fixtures, not shared directories or singletons
resource_leakEnsure every resource opened in a test is closed in teardown; use cleanup hooks that run even on failure
randomnessFix the random seed for the test run; use deterministic inputs instead of random generation
asynchronous_waitReplace fixed sleeps with condition polling or event/signal-driven waits with a hard timeout
ioUse temp files/dirs cleaned up in teardown; mock or stub filesystem interactions
unknownSkip fix attempt → go to quarantine
Show full SKILL.md (221 more words)Show less

Before proposing code changes, verify all of the following — if any fails, skip fix and recommend quarantine:

  • The root cause is the innermost error in the trace, not a surface-level symptom.
  • The failure is a code problem, not a CI infrastructure problem.
  • The fix eliminates the root cause (not just reduces flake probability).
  • The fix is at the correct layer (test vs. production vs. shared helper).
  • All call sites of any shared code are updated.
  • No timing hacks or relaxed assertions introduced.

Decision:

  • If category is unknown OR verification above fails → skip fix, recommend quarantine
  • If category is known AND root cause is confirmed AND fix is valid → propose specific code change
STEP 5 — Produce Triage Brief and Act
Flaky Test Triage Brief
=======================
Test:           <fully qualified test name>
Service:        <@test.service>
Category:       <flaky_category>
Failure Rate:   <test_stats.failure_rate_pct>%
Duration Lost:  <pipeline_stats.total_lost_time_ms>ms
Codeowners:     <codeowners>
Blast Radius:   <N> pipelines (<branch-specific | widespread>) [approximate — other failures in the same pipeline runs may not be related]

Evidence:
  <1-2 key error message lines from STEP 2>

Recommendation: <fix | quarantine | escalate>
Confidence:     <high | medium | low>
Action:         <specific next step>

Decision thresholds:

  • failure_rate_pct > 10 OR blast radius > 5 pipelines → quarantine
  • failure_rate_pct ≤ 10 AND known category AND clear fix → fix
  • failure_rate_pct ≤ 10 AND category unknown → escalate to codeowners with triage brief

If recommending quarantine, present and require explicit user approval before writing:

Proposed action: quarantine "<test-name>"
  id (fingerprint_fqn): <fingerprint_fqn from STEP 1>
  Effect: test still runs but failures are suppressed (CI will not be blocked)
  Reversible: yes — update new_state to active to restore

Approve? (yes/no)

If fingerprint_fqn was not returned in STEP 1 (test not yet in FTM or query returned no results): do not attempt the write. Surface an error and ask the user to open the Flaky Test Management UI directly to quarantine manually.

Only after explicit approval and a confirmed fingerprint_fqn, write the body file and run:

bash
cat > /tmp/flaky-update.json <<'EOF'
{
  "data": {
    "type": "UpdateFlakyTestsRequest",
    "attributes": {
      "tests": [{"id": "<fingerprint_fqn>", "new_state": "quarantined"}]
    }
  }
}
EOF
pup test-optimization flaky-tests update --file /tmp/flaky-update.json

To undo: repeat with "new_state": "active".

© DataDog, Apache-2.0. 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 skills/dd-triage-flaky-test of DataDog/pup.

Open the folder on GitHubat commit c075375

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in DataDog/pup, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Dd Triage Flaky Test 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.

Dd Triage Flaky Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dd Triage Flaky Test this skillDataDog/pup1k1 repos~2.3kAutomated safety check: PassApache-2.0
TiDB Test Diff Triagepingcap/tidb41k—~498Automated safety check: PassApache-2.0
Triage CI FailureDataDog/datadog-agent3.8k—~2.3kAutomated safety check: PassApache-2.0
Analyze Azdo BuildDataDog/dd-trace-dotnet573—~3.5kAutomated safety check: PassApache-2.0
Release Lambda LayerDataDog/datadog-lambda-js126—~1.8kAutomated safety check: PassApache-2.0
Resolve Muzzle CIDataDog/dd-trace-java736—~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Investigates TiDB plan or test-result diffs that the change does not explain, ruling out failpoint setup and merge effects before expected outputs are updated.

    41k GitHub stars~498 tokensUpdated today
    Testing & QAAuto-check passed
  • Triage CI Failure

    DataDog/datadog-agent

    Official

    Classify a failed CI as either caused by an active incident, flakiness, or a true code regression.

    3.8k GitHub stars~2.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Analyze Azdo Build

    DataDog/dd-trace-dotnet

    Official

    Analyze Azure DevOps CI build failures in dd-trace-dotnet pipeline.

    573 GitHub stars~3.5k tokensUpdated today
    Testing & QAAuto-check passed
  • Release Lambda Layer

    DataDog/datadog-lambda-js

    Official

    Walks through releasing a new datadog-lambda-js Lambda layer version — the automated Commercial release (version bump, tag, GitLab sign/publish jobs, npm publish, GitHub release) and the manual…

    126 GitHub stars~1.8k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Resolve Muzzle CI

    DataDog/dd-trace-java

    Official

    Diagnose and resolve dd-trace-java CI failures from a module's muzzle task or the runMuzzle aggregate.

    736 GitHub stars~3.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Diagnose a Red Run

    different-ai/openwork

    Classifies a failing test, typecheck or CI job before any code changes, by recording the failure and running a clean control to show whether it was already broken.

    24k GitHub stars~779 tokensUpdated today
    Testing & QAAuto-check passed

More from DataDog/pup

All 12 skills in this repo
  • Dd Idp

    DataDog/pup

    Official

    Find, filter, count, and connect software, teams, engineering work and delivery, infrastructure, and operational or security records through Pup's read-only Datadog entity graph.

    1k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Dd Debugger

    DataDog/pup

    Official

    Live Debugger - inspect runtime argument/variable values in production by placing log probes on methods.

    1k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Dd Docs

    DataDog/pup

    Official

    Datadog docs lookup using docs.datadoghq.com/llms.txt and linked Markdown pages.

    1k GitHub starsUsed in 1 repo~558 tokens
    Auto-check passed
  • Pup

    DataDog/pup

    Official

    Datadog API CLI with 49 command groups, 300+ subcommands. An agent skill from DataDog/pup.

    1k GitHub stars~523 tokensUpdated today
    Auto-check passed
  • Dd Apm

    DataDog/pup

    Official

    APM - traces, services, dependencies, performance analysis. An agent skill from DataDog/pup.

    1k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Dd File Issue

    DataDog/pup

    Official

    File GitHub issues to the right repository (pup CLI or plugin)

    1k GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Dd Triage Flaky Test

What does Dd Triage Flaky Test do?

Load when investigating a specific flaky test. An agent skill from DataDog/pup. Dd Triage Flaky Test is an agent skill from DataDog/pup, published by the product's own GitHub organization. Load when investigating a specific flaky test.

When should I use Dd Triage Flaky Test?

Dd Triage Flaky Test fits situations like: tasks that involve Failing and flaky tests.

How do I install Dd Triage Flaky Test in Claude Code?

Run `npx skills add DataDog/pup --skill dd-triage-flaky-test -a claude-code`. Or copy the skill folder (skills/dd-triage-flaky-test in DataDog/pup) into .claude/skills/dd-triage-flaky-test in your project. Claude Code loads it when a task matches its description.

How do I install Dd Triage Flaky Test in Codex?

Run `npx skills add DataDog/pup --skill dd-triage-flaky-test -a codex`. Or copy the skill folder (skills/dd-triage-flaky-test in DataDog/pup) into .agents/skills/dd-triage-flaky-test in your project. Codex loads it when a task matches its description.

Can I use Dd Triage Flaky Test 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 DataDog/pup --skill dd-triage-flaky-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dd-triage-flaky-test, .gemini/skills/dd-triage-flaky-test, .github/skills/dd-triage-flaky-test and .opencode/skills/dd-triage-flaky-test in your project.

What does Dd Triage Flaky Test need to run?

Going by SKILL.md and its folder, Dd Triage Flaky Test needs the command-line tools its instructions call (git). Our summary lists: Docker.

Does Dd Triage Flaky Test access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Dd Triage Flaky Test 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 Dd Triage Flaky Test use?

Dd Triage Flaky Test is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dd Triage Flaky Test use?

About 2.3k tokens (SKILL.md is roughly 9.3k 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 Dd Triage Flaky Test?

Skills that share tags, products or a category with Dd Triage Flaky Test: TiDB Test Diff Triage (pingcap/tidb, 41k stars), Triage CI Failure (DataDog/datadog-agent, 3.8k stars), Analyze Azdo Build (DataDog/dd-trace-dotnet, 573 stars) and Release Lambda Layer (DataDog/datadog-lambda-js, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dd Triage Flaky Test?

DataDog (a GitHub organization, an official publisher) maintains it in DataDog/pup, which has 1,028 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

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