Skip to content
Back to skills

Diagnosing Flaky And Environment Failures

ASecurity

Use when a failure is intermittent, happens only in CI, is order-dependent, or looks like a tooling / PATH / venv / dependency problem rather than a logic bug.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 23, 2026
ai-agentsdebugging

Security analysis

A100/100

Scanned November 23, 2026

npx -y skills add Kushagrabainsla/north --skill diagnosing-flaky-and-environment-failures --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diagnosing Flaky And Environment Failures?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Diagnosing Flaky And Environment Failures
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kushagrabainsla-diagnosing-flaky-and-environment-failures/badge)](https://www.skillsdirectory.com/skills/kushagrabainsla-diagnosing-flaky-and-environment-failures)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: diagnosing-flaky-and-environment-failures
description: "Use when a failure is intermittent, happens only in CI, is order-dependent, or looks like a tooling / PATH / venv / dependency problem rather than a logic bug."
---
# Diagnosing flaky and environment failures

> **Prove it is the code before you "fix" the code.**

## Use this when
- A test passes sometimes and fails others, fails only in CI, or the error smells like setup (command not found, import error, version mismatch).

## Do NOT use for
- A deterministic, always-reproducible logic bug (use `systematic-debugging`).

## Procedure
1. Reproduce in isolation: run the one failing test alone, then with the full suite, to expose order dependence and shared state.
2. Check the exit code: 127/126 mean the command is missing or not executable - not a test failure.
3. Check the interpreter, virtualenv, PATH, and installed versions actually used at runtime.
4. Look for nondeterminism: time, randomness, network, filesystem, global/shared mutable state, unordered collections.
5. Only after this, decide code vs environment, and fix the layer that is actually wrong.

## Done when
- The failure is reliably reproducible or explained as environment, and the real layer is fixed (not masked by a retry).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.