condition-based-waiting
✓Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses
Installation
SKILL.md
Flaky tests often guess at timing with arbitrary delays. This creates race conditions where tests pass on fast machines but fail under load or in CI.
Core principle: Wait for the actual condition you care about, not a guess about how long it takes.
| Wait for event | waitFor(() => events.find(e => e.type === 'DONE')) | | Wait for state | waitFor(() => machine.state === 'ready') | | Wait for count | waitFor(() => items.length >= 5) | | Wait for file | waitFor(() => fs.existsSync(path)) | | Complex condition | waitFor(() => obj.ready && obj.value > 10) |
Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses Source: jackspace/claudeskillz.
Facts (cite-ready)
Stable fields and commands for AI/search citations.
- Install command
npx skills add https://github.com/jackspace/claudeskillz --skill condition-based-waiting- Source
- jackspace/claudeskillz
- Category
- </>Dev Tools
- Verified
- ✓
- First Seen
- 2026-02-17
- Updated
- 2026-02-18
Quick answers
What is condition-based-waiting?
Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses Source: jackspace/claudeskillz.
How do I install condition-based-waiting?
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/jackspace/claudeskillz --skill condition-based-waiting Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Where is the source repository?
https://github.com/jackspace/claudeskillz
Details
- Category
- </>Dev Tools
- Source
- skills.sh
- First Seen
- 2026-02-17