condition-based-waiting
Installation
SKILL.md
Condition-Based Waiting
Wait for the condition, not an arbitrary sleep duration.
Pattern
- Identify the observable success, failure, and terminal states.
- Poll the authoritative state at a reasonable interval.
- Stop immediately on success or a terminal failure.
- Set a bounded timeout and report the last observed state when it expires.
- For CI or remote jobs, bind polling to the exact run/commit/job identifier so a newer unrelated run cannot satisfy the wait.
- After terminal success, verify the expected artifact/output exists before continuing.
A fixed sleep is acceptable only when the system exposes no observable progress signal. Never treat timeout as success.