From deepest-plan
Smart waiting patterns for async operations. Wait for observable conditions (DOM state, HTTP status, file presence, log line) with timeout and failure path — never arbitrary sleeps. Used inside deepest-plan preflight and validation_gate execute blocks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/deepest-plan:condition-based-waitingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Replace `sleep N` with polled-condition waits. Every wait MUST have a timeout, a condition, and a failure path.
Replace sleep N with polled-condition waits. Every wait MUST have a timeout, a condition, and a failure path.
❌ sleep 5 ← hope-based; either too short (flake) or too long (slow)
✅ wait_for <condition> --timeout 10s --interval 0.5s || fail <msg>
for i in {1..30}; do
curl -sf http://localhost:3000/health && break
sleep 1
done
curl -sf http://localhost:3000/health || { echo "server never came up"; exit 1; }
for i in {1..20}; do
psql "$DATABASE_URL" -tc "SELECT 1 FROM information_schema.tables WHERE table_name='user_preferences'" \
| grep -q 1 && break
sleep 0.5
done
psql "$DATABASE_URL" -tc "SELECT 1 FROM information_schema.tables WHERE table_name='user_preferences'" \
| grep -q 1 || { echo "migration never applied"; exit 1; }
for i in {1..30}; do
[ -s e2e-evidence/vgN-out.json ] && break
sleep 0.5
done
[ -s e2e-evidence/vgN-out.json ] || { echo "output never written"; exit 1; }
timeout 15 tail -F app.log | grep -m1 "Server ready" || { echo "server ready never logged"; exit 1; }
# agent-browser: wait for text to appear
agent-browser wait-for-text "Welcome" --timeout 10000
# Playwright JS API equivalent
await page.getByText('Welcome').waitFor({ timeout: 10000 });
for i in {1..30}; do
EMAIL=$(curl -s -H "Authorization: Bearer $RESEND_API_KEY" \
"https://api.resend.com/emails/$LAST_EMAIL_ID" | jq -r .last_event)
[ "$EMAIL" = "delivered" ] && break
sleep 2
done
[ "$EMAIL" = "delivered" ] || { echo "email never delivered"; exit 1; }
| Operation | Default timeout | Interval |
|---|---|---|
| DB ready | 10s | 0.5s |
| Dev server cold start | 30s | 1s |
| Simulator boot | 60s | 2s |
| Migration apply | 10s | 0.5s |
| Email delivery | 60s | 2s |
| Background job | 30s | 1s |
Override per-project when known. NEVER use sleep with a guess.
sleep 5 followed by assertion → either flakes (too short) or slows runs (too long)sleep for "wait for X to happen"sleep 2 # read the success toast)Pure timing utility. No state modification.
npx claudepluginhub krzemienski/deepest-plan-plugin --plugin deepest-planGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.