Official agent skill

Fix Flakes

by kubernetes-sigs in kubernetes-sigs/agent-sandbox

Diagnose and fix flaky tests tracked as open kind/flake issues in kubernetes-sigs/agent-sandbox — reproduce the flake, apply a minimal fix, and open a PR linking the issue.

OfficialApache-2.0Auto-check passedTesting & QA

Install Fix Flakes

skills CLI
$ npx skills add kubernetes-sigs/agent-sandbox --skill fix-flakes -a claude-code

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

GitHub CLI
$ gh skill install kubernetes-sigs/agent-sandbox fix-flakes --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/kubernetes-sigs/agent-sandbox.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/fix-flakes .claude/skills/fix-flakes && 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
fix-flakes
GitHub stars
4.2k
Token cost
~1.1k tokens
SKILL.md length
569 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Diagnose and fix flaky tests tracked as open kind/flake issues in kubernetes-sigs/agent-sandbox — reproduce the flake, apply a minimal fix, and open a PR linking the issue.

  • Works in 4 steps: Read the issue: test name, tab/job,… → Locate the test: git grep -n "func ("… → Stress it → …
  • Asked to fix a flake
  • SKILL.md covers Inputs, Reproduce first, Diagnose — the usual suspects and Fix and verify, plus 2 more sections
  • Calls gh, git and go

What it does

Fix Flakes is an agent skill from kubernetes-sigs/agent-sandbox, published by the product's own GitHub organization. Diagnose and fix flaky tests tracked as open kind/flake issues in kubernetes-sigs/agent-sandbox — reproduce the flake, apply a minimal fix, and open a PR linking the issue. Use when asked to fix a flake, work through kind/flake issues, or when run on a schedule after dev/tools/flake-report has filed flake issues.

Its SKILL.md is about 1.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 Testing & QA, covering Failing and flaky tests, Container orchestration and Pull requests. It works with Kubernetes. The repository describes itself as: agent-sandbox enables easy management of isolated, stateful, singleton workloads, ideal for use cases like AI agent runtimes and reinforcement learning (RL). The licence is Apache-2.0.

When your agent uses it

  • Asked to fix a flake
  • Work through kind/flake issues
  • Run on a schedule after dev/tools/flake-report has filed flake issues

Example prompts

  • “/fix-flakes”

Requirements

  • Python 3
  • Docker

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read the issue: test name, tab/job, failure timestamps, job-history link.
  2. Locate the test: git grep -n "func (" (Go) or
  3. Stress it
  4. If it will not reproduce locally after a reasonable stress run, do NOT

What it can do on your machine

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

    • gh
    • git
    • go
    • make

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

  • Network

    No URLs in SKILL.md. Its commands use gh and git, which can reach the network depending on how they are called.

    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

Fix Flakes loads about 1.1k tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 569 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~1.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 kubernetes-sigs/agent-sandbox at commit cd0761d, republished under its Apache-2.0 licence (© kubernetes-sigs). 569 words, ~1,098 tokens.

Download SKILL.mdSave it as .claude/skills/fix-flakes/SKILL.md (or your agent's skills folder).
name
fix-flakes
description
Diagnose and fix flaky tests tracked as open kind/flake issues in kubernetes-sigs/agent-sandbox — reproduce the flake, apply a minimal fix, and open a PR linking the issue. Use when asked to fix a flake, work through kind/flake issues, or when run on a schedule after dev/tools/flake-report has filed flake issues.

Fix flaky tests from kind/flake issues

Work through open kind/flake issues (filed nightly by dev/tools/flake-report), reproduce each flake, land a minimal fix, and open a PR that closes the issue. Evidence before edits: never change a test you could not observe failing or whose failure output you have not read.

Inputs

  • A specific issue number, if the caller gives one; otherwise discover work: gh issue list --repo kubernetes-sigs/agent-sandbox --label kind/flake --state open --json number,title,body
  • Skip any issue that already has an open fix PR: search gh pr list --repo kubernetes-sigs/agent-sandbox --state open --search "<issue number> in:body" and check the results actually reference Fixes #<n> / Closes #<n>.
  • Skip infra-failure issues (title contains "infrastructure failures") unless explicitly asked — those are CI tooling work (dev/ci/, prow job config in kubernetes/test-infra), not test edits. If you do take one, the fix lives in dev/ci/shared/runner.py retries, image prepulls, or job resources.

Reproduce first

  1. Read the issue: test name, tab/job, failure timestamps, job-history link. Fetch a failing run's junit + build log from the GCS links to read the real error before touching anything.
  2. Locate the test: git grep -n "func <TestName>(" (Go) or git grep -n "def <test_name>(" (Python SDK e2e). For a Go subtest (TestFoo/subtest), grep for the parent (func TestFoo() only — the part before the first / — then find the t.Run("subtest", ...) inside it.
  3. Stress it:
    • Unit tests: go test ./<package>/... -run '^<TestName>$' -race -count=50 (for a subtest, -run '^TestFoo$/^subtest$')
    • e2e tests need a cluster: make deploy-kind first (see AGENTS.md), then go test ./test/e2e/... -run '^<TestName>$' -count=10 with KUBECONFIG=bin/KUBECONFIG.
  4. If it will not reproduce locally after a reasonable stress run, do NOT guess-fix. Analyze the CI failure output instead; if the cause is still unclear, post your findings as a comment on the issue and stop.

Diagnose — the usual suspects

  • Missing eventual-consistency handling: asserting on controller-driven state without polling. Fix by waiting with a deadline (see existing helpers in test/e2e/), not by sleeping.
  • Timeouts tuned for fast machines: CI under Docker-in-Docker is slow. If a timeout must grow, justify it in a comment; prefer replacing fixed sleeps with polling.
  • Shared state between parallel tests: cluster-scoped resources, fixed names, fixed ports. Namespace or randomize per test.
  • Ordering assumptions on lists/maps, time-of-day assumptions, leaked goroutines from a previous test (-race output helps).
Show full SKILL.md (191 more words)Show less

Fix and verify

  • Minimal diff, repo conventions (AGENTS.md). Never disable or skip a test to make it green; quarantine decisions belong to maintainers on the issue.
  • Re-run the stress loop from "Reproduce" — it must pass repeatedly (unit: -count=50 clean; e2e: -count=10 clean).
  • Run make test-unit (and the affected e2e suite if applicable).

Deliver

  • Branch flake-fix/issue-<n>, one issue per branch/PR.
  • Commit style matches recent history (e.g. fix(e2e): wait for sandbox ready in TestFoo (#<n>)).
  • PR body: Fixes #<n>, the diagnosis in two or three sentences, and the before/after stress-run evidence (command + result).
  • If the fix is a revert-worthy product bug rather than a test bug, say so on the issue and file/label accordingly instead of papering over it in tests.

Scheduled / automated mode

When invoked non-interactively (e.g. via dev/tools/flake-fix on cron):

  • Process at most the number of issues the caller specifies (default 1) so a run stays bounded.
  • Only act on issues where reproduction or CI failure output confirms the diagnosis; otherwise leave an analysis comment on the issue and move on.
  • Push the branch and open the PR autonomously, then report: issues examined, PRs opened, issues commented, issues skipped and why.

© kubernetes-sigs, 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 .agents/skills/fix-flakes of kubernetes-sigs/agent-sandbox.

Open the folder on GitHubat commit cd0761d

Compare with similar skills

Fix Flakes 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.

Fix Flakes compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fix Flakes this skillkubernetes-sigs/agent-sandbox4.2k—~1.1kAutomated safety check: PassApache-2.0
Unblock Dependabot PRkubernetes-sigs/cloud-provider-azure294—~1.5kAutomated safety check: PassApache-2.0
Functional Testsastronomer/astronomer491—~2.2kAutomated safety check: PassCustom licence
Debug E2E Pipelinekubernetes-sigs/cloud-provider-azure294—~3.4kAutomated safety check: PassApache-2.0
Iterate PRmeshery/meshery-operator1518 repos~2.2kAutomated safety check: PassApache-2.0
GreptimeDB Fuzz CI Failure InvestigationGreptimeTeam/greptimedb6.7k—~4.4kAutomated safety check: PassApache-2.0

Similar skills

  • Unblock Dependabot PR

    kubernetes-sigs/cloud-provider-azure

    Official

    Diagnose and unblock failed Dependabot pull requests in cloud-provider-azure by closing Kubernetes minor-version dependency bumps, classifying CI failures, syncing Go modules, retesting quota-flaked…

    294 GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Functional Tests

    astronomer/astronomer

    A skill your agent uses when writing, editing, reviewing, or running functional (end-to-end) tests for the Astronomer APC repository.

    491 GitHub stars~2.2k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Debug E2E Pipeline

    kubernetes-sigs/cloud-provider-azure

    Official

    Fetch and analyze Prow e2e pipeline failures for cloud-provider-azure.

    294 GitHub stars~3.4k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Iterate PR

    meshery/meshery-operator

    Iterate on a PR until CI passes. An agent skill from meshery/meshery-operator.

    151 GitHub starsUsed in 8 repos~2.2k tokens
    DevelopmentAuto-check passed
  • Diagnoses a failed GreptimeDB fuzz CI job by pulling its GitHub Actions logs and fuzz artifacts, then matching the evidence to the local source code.

    6.7k GitHub stars~4.4k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Must Gather Investigation

    scylladb/scylla-operator

    Investigate failed e2e tests from Ginkgo JSON reports and must-gather artifacts, systematically analyzing logs, events, and resource states to identify root causes.

    401 GitHub stars~2.4k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from kubernetes-sigs/agent-sandbox

  • Bump Go Version

    kubernetes-sigs/agent-sandbox

    Official

    Bumps the Go version to the latest release across go.mod, tools.mod, and Dockerfiles.

    4.2k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • K8s Agent Sandbox MCP

    kubernetes-sigs/agent-sandbox

    Official

    An MCP server skill for managing Kubernetes sandboxes. An agent skill from kubernetes-sigs/agent-sandbox.

    4.2k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Test Pyramid

    kubernetes-sigs/agent-sandbox

    Official

    Analyze the repo's unit and E2E tests and propose rebalancing toward a test pyramid — which E2E tests (or assertions inside them) can be covered by unit tests, which unit-level gaps genuinely need…

    4.2k GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • K8s API Conventions

    kubernetes-sigs/agent-sandbox

    Official

    Guides the agent to follow Kubernetes API conventions for OSS standards.

    4.2k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Dev Rules

    kubernetes-sigs/agent-sandbox

    Official

    Enforces project-specific development rules and conventions.

    4.2k GitHub stars~447 tokensUpdated yesterday
    Auto-check passed
  • Triage Issues

    kubernetes-sigs/agent-sandbox

    Official

    Triage open GitHub issues for kubernetes-sigs/agent-sandbox by mapping them to roadmap.md and assigning k8s priority labels + Kanban Priority (P0–P4) on Project

    4.2k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Fix Flakes

What does Fix Flakes do?

Diagnose and fix flaky tests tracked as open kind/flake issues in kubernetes-sigs/agent-sandbox — reproduce the flake, apply a minimal fix, and open a PR linking the issue. Fix Flakes is an agent skill from kubernetes-sigs/agent-sandbox, published by the product's own GitHub organization. Diagnose and fix flaky tests tracked as open kind/flake issues in kubernetes-sigs/agent-sandbox — reproduce the flake, apply a minimal fix, and open a PR linking the issue.

When should I use Fix Flakes?

Fix Flakes fits situations like: asked to fix a flake; work through kind/flake issues; run on a schedule after dev/tools/flake-report has filed flake issues.

How do I install Fix Flakes in Claude Code?

Run `npx skills add kubernetes-sigs/agent-sandbox --skill fix-flakes -a claude-code`. Or copy the skill folder (.agents/skills/fix-flakes in kubernetes-sigs/agent-sandbox) into .claude/skills/fix-flakes in your project. Claude Code loads it when a task matches its description.

How do I install Fix Flakes in Codex?

Run `npx skills add kubernetes-sigs/agent-sandbox --skill fix-flakes -a codex`. Or copy the skill folder (.agents/skills/fix-flakes in kubernetes-sigs/agent-sandbox) into .agents/skills/fix-flakes in your project. Codex loads it when a task matches its description.

Can I use Fix Flakes 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 kubernetes-sigs/agent-sandbox --skill fix-flakes -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fix-flakes, .gemini/skills/fix-flakes, .github/skills/fix-flakes and .opencode/skills/fix-flakes in your project.

What does Fix Flakes need to run?

Going by SKILL.md and its folder, Fix Flakes needs the command-line tools its instructions call (gh, git, go and make). Our summary lists: Python 3; Docker.

Does Fix Flakes access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Fix Flakes 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 Fix Flakes use?

Fix Flakes 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 Fix Flakes use?

About 1.1k tokens (SKILL.md is roughly 4.4k 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 Fix Flakes?

Skills that share tags, products or a category with Fix Flakes: Unblock Dependabot PR (kubernetes-sigs/cloud-provider-azure, 294 stars), Functional Tests (astronomer/astronomer, 491 stars), Debug E2E Pipeline (kubernetes-sigs/cloud-provider-azure, 294 stars) and Iterate PR (meshery/meshery-operator, 151 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fix Flakes?

kubernetes-sigs (a GitHub organization, an official publisher) maintains it in kubernetes-sigs/agent-sandbox, which has 4,183 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

Source: kubernetes-sigs/agent-sandbox on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.