Flaky Test Fixer
DataDog/dd-trace-js
A skill your agent uses when classifying, investigating, or fixing a suspected flaky test, intermittent test result, nondeterministic CI test failure, timing race, hang, or test-order dependency in…
Handle a CI failure that is reliably attributed to the current PR's own code changes.
$ npx skills add DataDog/datadog-agent --skill handle-pr-ci-failure -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install DataDog/datadog-agent handle-pr-ci-failure --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/DataDog/datadog-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/handle-pr-ci-failure .claude/skills/handle-pr-ci-failure && rm -rf skills-srcUse ~/.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/
Install the "handle-pr-ci-failure" agent skill from https://github.com/DataDog/datadog-agent/tree/main/.agents/skills/handle-pr-ci-failure into .claude/skills/handle-pr-ci-failure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handle-pr-ci-failure", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/DataDog/datadog-agent/tree/main/.agents/skills/handle-pr-ci-failureType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add DataDog/datadog-agent --skill handle-pr-ci-failure -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install DataDog/datadog-agent handle-pr-ci-failure --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/datadog-agent.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/handle-pr-ci-failure .agents/skills/handle-pr-ci-failure && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "handle-pr-ci-failure" agent skill from https://github.com/DataDog/datadog-agent/tree/main/.agents/skills/handle-pr-ci-failure into .agents/skills/handle-pr-ci-failure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handle-pr-ci-failure", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DataDog/datadog-agent --skill handle-pr-ci-failure -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install DataDog/datadog-agent handle-pr-ci-failure --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/datadog-agent.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/handle-pr-ci-failure .cursor/skills/handle-pr-ci-failure && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "handle-pr-ci-failure" agent skill from https://github.com/DataDog/datadog-agent/tree/main/.agents/skills/handle-pr-ci-failure into .cursor/skills/handle-pr-ci-failure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handle-pr-ci-failure", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/DataDog/datadog-agent.git --path .agents/skills/handle-pr-ci-failure--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add DataDog/datadog-agent --skill handle-pr-ci-failure -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install DataDog/datadog-agent handle-pr-ci-failure --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/datadog-agent.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/handle-pr-ci-failure .gemini/skills/handle-pr-ci-failure && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "handle-pr-ci-failure" agent skill from https://github.com/DataDog/datadog-agent/tree/main/.agents/skills/handle-pr-ci-failure into .gemini/skills/handle-pr-ci-failure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handle-pr-ci-failure", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install DataDog/datadog-agent handle-pr-ci-failureInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add DataDog/datadog-agent --skill handle-pr-ci-failure -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/DataDog/datadog-agent.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/handle-pr-ci-failure .github/skills/handle-pr-ci-failure && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "handle-pr-ci-failure" agent skill from https://github.com/DataDog/datadog-agent/tree/main/.agents/skills/handle-pr-ci-failure into .github/skills/handle-pr-ci-failure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handle-pr-ci-failure", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DataDog/datadog-agent --skill handle-pr-ci-failure -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install DataDog/datadog-agent handle-pr-ci-failure --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/datadog-agent.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/handle-pr-ci-failure .opencode/skills/handle-pr-ci-failure && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "handle-pr-ci-failure" agent skill from https://github.com/DataDog/datadog-agent/tree/main/.agents/skills/handle-pr-ci-failure into .opencode/skills/handle-pr-ci-failure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "handle-pr-ci-failure", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
handle-pr-ci-failureHandle a CI failure that is reliably attributed to the current PR's own code changes.
Handle PR CI Failure is an agent skill from DataDog/datadog-agent, published by the product's own GitHub organization. Handle a CI failure that is reliably attributed to the current PR's own code changes. Trigger phrases include: - "handle this PR-caused CI failure" - "fix the CI regression" - "continue investigating this PR failure"
Its SKILL.md is about 2.9k 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. The repository describes itself as: Main repository for Datadog Agent. The licence is Apache-2.0.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit a706f1a. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
gitgopython3bazelFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Handle PR CI Failure loads about 2.9k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 1,549 words of instructions outside code blocks.
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.
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.
The full file from DataDog/datadog-agent at commit a706f1a, republished under its Apache-2.0 licence (© DataDog). 1,549 words, ~2,875 tokens.
.claude/skills/handle-pr-ci-failure/SKILL.md (or your agent's skills folder).Turn one or more CI failures already attributed to the current PR's own code into either a pushed fix or a clear, evidence-backed report the user can act on.
Owning team: @DataDog/agent-devx
The ideal input is one or more CI triage result blocks (see /triage-ci-failure's output contract: Job, Pipeline SHA, Blame, Failure signature, Evidence, Proposed fix, Incident). When you have these, discard every block whose Blame isn't exactly pr-code — upstream, infra, flake, and inconclusive remain /follow-pr's existing incident/retry path, not this skill's problem. Never treat Incident: none as evidence of pr-code; branch on Blame alone.
In case the input does not follow that format, work with whatever description, log excerpt, or diff you're given. Say plainly that you're missing the structured evidence a full triage would give you, then proceed. Suggest the user runs /triage-ci-failure first.
Either way, group the failures by root cause: several failed jobs (or several sentences of description) sharing one underlying defect are one root cause, not several.
Run the helper script:
python3 .agents/skills/follow-pr/scripts/config.py resolve \
[--mode autofix|no-autofix|ask] [--max-fix-cycles N] [--policy TEXT]If the resolved mode is ask, or the script errors, ask the user directly whether this run is autofix or no-autofix before doing anything else.
Any resolved policy text is a classification override, applied on top of Step 2's default criteria — it can broaden them (e.g. "do whatever it takes to make the PR pass" authorizes larger, handwritten fixes the defaults would reject) or narrow them. It can never relax the safety floor in Step 5.
A root cause is autonomous-safe only when all five hold, as modified by any resolved policy text:
This applies equally to unit, E2E, KMT, installer, and platform failures — job family is not a criterion. Only the available evidence and validation fidelity differ.
Examples that satisfy all five:
gofmt, Buildifier, Gazelle, dda inv tidy, a documented codegen task) reviewed after running it.needs/rules to a newly introduced leaf CI job, copied from one canonical sibling, when the resolved CI diff touches nothing else.Examples that fail at least one:
nolint/suppression comment to silence a linter finding instead of fixing the underlying issue — fails Checkable.For every grouped root cause from Step 0, decide safe or complex against Step 2. Write down which criterion fails when it's complex — you'll need that for the report in Step 6 either way.
If your harness supports switching to a stronger model mid-task (e.g. an "advisor" or planning mode) and this fix or investigation doesn't feel trivial, consider switching for Steps 4 and 5 — do it where your harness offers it, skip it where it doesn't.
safe root causesUnder no-autofix (or when Step 1 told you the push budget is already exhausted), treat every safe root cause as investigate-only: work through steps 1-6 below to produce and verify a candidate fix, then stop there — leave it uncommitted and describe it in the report exactly like a complex root cause's candidate in Step 5. Steps 7 and the final push only apply under autofix with budget remaining.
For each safe root cause, in this order:
HEAD, the PR's remote SHA, git status, staged diff, unstaged diff, and untracked files against the snapshot from Step 0. A SHA change caused by a push you already made earlier in this same invocation is expected, not a race — only an external change should block this root cause.dda inv linter.go --targets=<package> for a lint job, dda inv test --targets=<package> for a unit test, or the job's own e2e/KMT/installer command for those. Don't guess at the command; read it from the failing job's log.dda inv ..., bazel ...) — never raw go build/go test (see the root AGENTS.md).complex (Step 5) and undo any speculative edit for it. If the check can't even start locally, record that limitation — you may still push once for CI validation, but only under autofix, and only if every other pr-code root cause in this batch is also safe.complex.autofix: stage only the explicit paths for this fix, inspect the cached diff, let hooks run normally, and commit with a message describing the actual fix (never "fix CI").Once every safe root cause has been through the steps above, push once, in one combined push, never once per root cause — and only under autofix, only if every one of them stayed safe and got committed. If any root cause turned out complex, or mode is no-autofix, or the budget was already exhausted, don't push at all: whatever got committed stays local, and Step 5 handles the complex root causes.
complex root causesOnly edit the working tree here if it was clean before Step 4 touched anything (or clean from the start, if there were no safe fixes this round). If it's dirty from unrelated user work, investigate read-only and say so.
Investigate materially distinct hypotheses: read logs/diffs, run the nearest local checks, and reproduce with the real command where possible. Under autofix mode you may launch the smallest relevant provisioned E2E/KMT environment for a hypothesis without asking again; under no-autofix, ask before provisioning anything.
If the environment can't reach the failing behavior at all (missing credentials, broken local setup), that's not an immediate stop — keep reasoning from the logs, the diff, and the code itself; you can often still form a well-supported hypothesis without running anything. Note the limitation plainly in the report rather than presenting an unverified guess as a confirmed fix.
Stop and hand back to the user as soon as any of these is true:
Never commit a fix for a root cause you classified complex. A safe fix for a different root cause in this batch may already be committed locally per Step 4 — that's fine, just don't push it yet. Never git stash, reset, clean, rebase, or otherwise touch state you didn't create.
End every invocation with exactly this block (repeat the middle fields once per distinct root cause if there were several):
PR CI handling result
Outcome: pushed | committed-not-pushed | needs-user | blocked
Failure signatures: <normalized signatures handled this round>
Root cause: <supported conclusion>
Changed files: <paths, or none>
Validation: <commands run and their outcomes>
Commit: <SHA, or none>
Pushed SHA: <SHA, or none>
Cycles consumed: 0 | 1
Remaining uncertainty: <text, or none>
User decision needed: <specific question, or none>
End PR CI handling result/follow-pr reads Outcome, Pushed SHA, and Cycles consumed to decide whether to keep monitoring; a direct caller reads the whole block as the final answer. For example, handling the lint_go_linux-x64 failure from /triage-ci-failure's example above:
PR CI handling result
Outcome: pushed
Failure signatures: pkg/foo/bar.go: ineffectual assignment to err (ineffassign)
Root cause: unused reassignment left over from a refactor earlier in this PR
Changed files: pkg/foo/bar.go
Validation: dda inv linter.go --targets=./pkg/foo passed locally
Commit: a1b2c3d
Pushed SHA: 9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d
Cycles consumed: 1
Remaining uncertainty: none
User decision needed: none
End PR CI handling resultRegardless of mode or any resolved custom policy text, this skill never:
--no-verify), or uses destructive git recovery (reset --hard, clean -fd, etc.);pr-code root cause in the current batch is still complex or blocked;no-autofix, when the caller reported the budget already exhausted, or more than once per invocation.© 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
Just SKILL.md in .agents/skills/handle-pr-ci-failure of DataDog/datadog-agent.
Open the folder on GitHubat commit a706f1a
Handle PR CI Failure 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Handle PR CI Failure this skillDataDog/datadog-agent | 3.8k | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| Flaky Test FixerDataDog/dd-trace-js | 837 | — | ~1.6k | Automated safety check: Pass | Custom licence | |
| Dd Unblock PRDataDog/pup | 1k | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Analyze Azdo BuildDataDog/dd-trace-dotnet | 573 | — | ~3.5k | Automated safety check: Pass | Apache-2.0 | |
| Resolve Muzzle CIDataDog/dd-trace-java | 736 | — | ~3.2k | Automated safety check: Pass | Apache-2.0 | |
| Dd Triage Flaky TestDataDog/pup | 1k | 1 repos | ~2.3k | Automated safety check: Pass | Apache-2.0 |
DataDog/dd-trace-js
A skill your agent uses when classifying, investigating, or fixing a suspected flaky test, intermittent test result, nondeterministic CI test failure, timing race, hang, or test-order dependency in…
DataDog/pup
Load when investigating a failing PR CI pipeline or checking PR health.
DataDog/dd-trace-dotnet
Analyze Azure DevOps CI build failures in dd-trace-dotnet pipeline.
DataDog/dd-trace-java
Diagnose and resolve dd-trace-java CI failures from a module's muzzle task or the runMuzzle aggregate.
DataDog/pup
Load when investigating a specific flaky test. An agent skill from DataDog/pup.
DataDog/terraform-provider-datadog
Runs an end-to-end workflow to diagnose, reproduce, fix and validate a failing integration test in the Datadog Terraform provider, ending with a draft PR.
DataDog/datadog-agent
Classify a failed CI as either caused by an active incident, flakiness, or a true code regression.
DataDog/datadog-agent
Run a structured discovery session to build an Allium specification through conversation.
DataDog/datadog-agent
Monitor the current PR's GitLab pipeline to completion, then report success, auto-fix, or investigate a failure.
DataDog/datadog-agent
A skill your agent uses when an engineer or manager asks to recap, summarize, or post an update on a Jira Epic — a progress update for an in-progress Epic (how far along it is, what's shipped so…
DataDog/datadog-agent
Explains a lading.yaml config file from the regression test suite, using the lading Rust source as ground truth for field meanings and defaults.
DataDog/datadog-agent
Extract an Allium specification from an existing codebase. An agent skill from DataDog/datadog-agent.
Works with
Categories
Handle a CI failure that is reliably attributed to the current PR's own code changes. Handle PR CI Failure is an agent skill from DataDog/datadog-agent, published by the product's own GitHub organization. Handle a CI failure that is reliably attributed to the current PR's own code changes.
Handle PR CI Failure fits situations like: phrases include: - handle this PR-caused CI failure - fix the CI regression - continue investigating this PR failure; tasks that involve Failing and flaky tests.
Run `npx skills add DataDog/datadog-agent --skill handle-pr-ci-failure -a claude-code`. Or copy the skill folder (.agents/skills/handle-pr-ci-failure in DataDog/datadog-agent) into .claude/skills/handle-pr-ci-failure in your project. Claude Code loads it when a task matches its description.
Run `npx skills add DataDog/datadog-agent --skill handle-pr-ci-failure -a codex`. Or copy the skill folder (.agents/skills/handle-pr-ci-failure in DataDog/datadog-agent) into .agents/skills/handle-pr-ci-failure in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DataDog/datadog-agent --skill handle-pr-ci-failure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/handle-pr-ci-failure, .gemini/skills/handle-pr-ci-failure, .github/skills/handle-pr-ci-failure and .opencode/skills/handle-pr-ci-failure in your project.
Going by SKILL.md and its folder, Handle PR CI Failure needs the command-line tools its instructions call (git, go, python3 and bazel). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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.
Handle PR CI Failure 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.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Handle PR CI Failure: Flaky Test Fixer (DataDog/dd-trace-js, 837 stars), Dd Unblock PR (DataDog/pup, 1k stars), Analyze Azdo Build (DataDog/dd-trace-dotnet, 573 stars) and Resolve Muzzle CI (DataDog/dd-trace-java, 736 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
DataDog (a GitHub organization, an official publisher) maintains it in DataDog/datadog-agent, which has 3,759 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 9, 2026.
Source: DataDog/datadog-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.