dd-apm
APM - traces, services, dependencies, performance analysis.
Load when investigating a specific flaky test. Gets history, failure pattern, and category, then recommends fix, quarantine, or escalate.
$ npx -y skills add DataDog/pup --skill dd-triage-flaky-test --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dd-triage-flaky-testContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when investigating a specific flaky test. Gets history, failure pattern, and category, then recommends fix, quarantine, or escalate.
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" author: datadog-labs repository: https://github.com/datadog-labs/agent-skills tags: datadog,ci,cicd,flaky,flaky-tests,test-optimization alwaysApply: "false"
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).
---
| Parameter | Description | |---|---| | Test name | Fully qualified test name (e.g. `TestMyFunc` or `com.example.MyTest`) | | Repository | Lowercase, no-schema URL (e.g. `github.com/org/repo`). Derive from `git remote get-url origin` if not provided. |
---
Derive repository ID from git if not provided:
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:
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.
**Preferred — use `fingerprint_fqn` if known** (`fingerprint_fqn` is a valid CI Visibility search facet, distinct from `flaky_state`):
pup cicd flaky-tests search \ --query "fingerprint_fqn:<fqn>" \ --sort="-last_flaked" \ --limit 5
**Fallback — use name + suite + repo:**
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:
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:
Count distinct pipelines impacted using pipeline IDs from STEP 2:
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.
Use `flaky_category` from STEP 1 and error messages from STEP 2.
**Root cause first:**
**Fix at the correct layer:**
**Forbidden — do not propose these:**
**Fix patterns by category:**
| Category | Approach | |---|---| | `timeout` | Identify the slow operation and make it synchronous or deterministic — do NOT simply raise the timeout constant | | `concurrency` | Add deterministic synchronization (barriers, channels, locks); remove shared mutable state between tests | | `network` | Mock or stub network calls at the boundary; if the test requires a real connection, isolate it with a test server | | `time` | Inject a controllable clock; replace wall-clock assertions with relative or event-driven checks | | `order_dependency` | Isolate test state with setup/teardown; eliminat
Every AI agent needs a loyal companion. Meet Pup — the CLI that gives your agents full access to Datadog's observability platform (because even autonomous agents need good tooling, not just tricks).
Repo: DataDog/pup
APM - traces, services, dependencies, performance analysis.
Use pup CLI for immediate Datadog operations or generate code for integration into applications
Live Debugger - inspect runtime argument/variable values in production by placing log probes on methods. Use when asked what values a function receives, what…
Datadog docs lookup using docs.datadoghq.com/llms.txt and linked Markdown pages.
File GitHub issues to the right repository (pup CLI or plugin)