absolute-deflake

absolute-deflake is a skill for Claude Code from maddhruv/absolute. It costs 73 tokens per session (1,286 once invoked), scanned A, original, MIT.

A workflow for finding and fixing flaky tests, which are tests that sometimes pass and sometimes fail without a code change.

In plain words
What is it for?
Use it to measure which tests are unreliable, investigate their causes, remove the source of the randomness, and verify the fixes across repeated runs.
Why use it?
It identifies nondeterministic failures through repeated, shuffled, or parallel runs instead of hiding them with retries, skips, or delays.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions Codex; mentions Gemini CLI.

Good fit Use it to measure which tests are unreliable, investigate their causes, remove the source of the randomness, and verify the fixes across repeated runs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maddhruv/absolute/absolute-deflake
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add maddhruv/absolute --skill absolute-deflake
Clone the repo
git clone --depth 1 https://github.com/maddhruv/absolute

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for absolute-deflake

README.md
[![agentmods](https://agentmods.dev/badge/skills/maddhruv/absolute/absolute-deflake.svg)](https://agentmods.dev/skills/maddhruv/absolute/absolute-deflake)
Your own site
<a href="https://agentmods.dev/skills/maddhruv/absolute/absolute-deflake"><img src="https://agentmods.dev/badge/skills/maddhruv/absolute/absolute-deflake.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,286 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.01286
Opus 5 $0.00036 $0.00643
Sonnet 5 $0.00015 $0.00257
Haiku 4.5 $0.00007 $0.00129

Measured 8d ago against content hash 6618e89e95a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

absolute-deflake scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/absolute-deflake/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Start your first response with the 🧪 emoji.

Absolute Deflake

Find tests that pass and fail nondeterministically, diagnose the root cause of each, and fix it — not by retrying or skipping, but by removing the source of nondeterminism. Output is evidence (failure rate per test) → cause → fix, verified by repeated runs.

Runs the shared engine in references/health-engine.md — read it for the DETECT → SCAN → TRIAGE → FIX → VERIFY → REPORT loop and the safety contract. This file covers only what's specific to flaky tests.


When to use

  • "Our CI is flaky", "this test fails randomly", "fix the intermittent failures".
  • A test passes locally but fails in CI (or vice versa), or fails ~1 in N runs.
  • Burning down a backlog of retry/skip-marked tests that mask real flakiness.

Not for tests that fail deterministically — that's a real bug or a real regression (/absolute work for a fix, or just fix it). deflake targets nondeterministic failures.


What it scans

Establish flakiness empirically — a test isn't flaky because someone said so. Use preferences.health.deflakeRuns from config as the default N for repeat-runs (else 20):

Ecosystem Repeat-run / detect
Jest/Vitest run suite N× (--run loop), randomize order (--shuffle / testSequencer)
pytest pytest-randomly + pytest --count=N (pytest-repeat); -p no:randomly to A/B
Go go test -count=N -shuffle=on ./..., -race

Also mine signals: existing retry/flaky/skip annotations, CI history if reachable, and run the suite both in isolation and in full/parallel — order- and concurrency- dependent failures only show one way. Record a failure rate per suspect test.


Common root causes (diagnose, don't guess)

Cause Tell Fix
Test-order / shared state passes alone, fails in suite (or vice versa) isolate state; reset/teardown between tests
Time / clock fails near midnight, DST, or under load fake timers / inject clock; no real sleep
Async race / missing await fails under parallelism or slow CI await the actual condition; no fixed timeouts
Randomness fails ~X% with no pattern seed the RNG; fix the seed in tests
Network / external I/O fails offline or on slow links mock/stub the boundary
Unordered collections fails on map/set iteration order sort before asserting
Resource leak / port reuse fails on repeat or parallel runs unique resources; clean up

Read the full file on GitHub · 120 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 120 lines · 73 tokens per session scan A 6618e89e95a6

Subscribe to this mod's changes

absolute-deflake is a skill published in the GitHub repository maddhruv/absolute (211 stars, last pushed 2mo ago), licensed MIT. It adds 73 tokens to every session and 1,286 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

symbolic-execution-assistant

Performs symbolic execution to detect potential errors by exploring execution paths, solving path constraints, and generating test inputs. Use when you need to analyze code for bugs like null dereferences, division by zero, buffer overflows, or assertion violations. Also use to generate test inputs that exercise…

ArabelaTso/Skills-4-SE · 111 tokens

code-repair-generation-combo

Automatically repair buggy code and generate comprehensive tests for Python, Java, and C++ programs. Use when users need to fix logic errors or runtime errors in functions, modules, or repositories. Accepts specifications via natural language descriptions, existing test cases, or input/output examples. Generates…

ArabelaTso/Skills-4-SE · 119 tokens

debugging-workflow

Find the cause of a defect by hypothesis and bisection rather than by guessing, then fix it behind a regression test. Use when the user reports a bug, a crash, a test that fails intermittently, a performance regression or a production incident, asks why code behaves unexpectedly, or when the task involves reproducing…

personamanagmentlayer/pcl · 91 tokens

test-execution

Orchestrate test execution — run unit, integration, and E2E tests, collect coverage reports, and analyze failures. Use when running tests, checking coverage, debugging test failures, or validating code changes before merge.

zavora-ai/skill-test-execution · 48 tokens

ccg-workflow

How to run a non-trivial change end to end with the CCG role tools (ccganalyze / ccgdesign / ccgbuild / ccgdebug / ccgoptimize / ccgreview / ccgtest) and the verify- quality gates. Use when a task is a whole feature, a refactor, a bug whose cause is not yet known, or any change large enough that one straight-through…

fengshao1227/ccg-workflow · 97 tokens

review-ugc-render

Mandatory pre-publish review gate for a UGC video render. Transcribes the finished render's AUDIO with Whisper and word-diffs it against the approved spoken script, then gates setfinalrender — blocking a render whose generated audio mis-voices a word (e.g. the approved "human-vetted" spoken as "human witted"), drops…

gooseworks-ai/goose-skills · 116 tokens