swift-testing-wait-until

swift-testing-wait-until is a skill for Claude Code, Codex from patrickserrano/lacquer. It costs 65 tokens per session (364 once invoked), scanned A, original, MIT.

A small asynchronous test helper that waits until a condition becomes true instead of pausing for a fixed amount of time.

In plain words
What is it for?
Use it in Swift tests when checking that an asynchronous operation has loaded data, updated state, or completed another condition.
Why use it?
Fixed delays can make tests flaky because the state may change sooner or later than the chosen delay. This helper waits for the actual result and fails after a timeout.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it in Swift tests when checking that an asynchronous operation has loaded data, updated state, or completed another condition.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/patrickserrano/lacquer/swift-testing-wait-until
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 patrickserrano/lacquer --skill swift-testing-wait-until
Clone the repo
git clone --depth 1 https://github.com/patrickserrano/lacquer

Made for: Claude Code, Codex.

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 swift-testing-wait-until

README.md
[![agentmods](https://agentmods.dev/badge/skills/patrickserrano/lacquer/swift-testing-wait-until.svg)](https://agentmods.dev/skills/patrickserrano/lacquer/swift-testing-wait-until)
Your own site
<a href="https://agentmods.dev/skills/patrickserrano/lacquer/swift-testing-wait-until"><img src="https://agentmods.dev/badge/skills/patrickserrano/lacquer/swift-testing-wait-until.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 364 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.
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.00065 $0.00364
Opus 5 $0.00032 $0.00182
Sonnet 5 $0.00013 $0.00073
Haiku 4.5 $0.00006 $0.00036

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

Security

Grade A, and why

swift-testing-wait-until 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 3d 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.

profiles/ios/skills/swift-testing-wait-until/SKILL.md · 44 lines

What it actually says

waitUntil: No Task.sleep in Tests

Wait for the actual state change instead of a fixed delay. Add this TestHelpers.swift to your test target (the lint rules already exclude *TestHelpers.swift):

import Foundation

/// Thrown by `waitUntil` when the condition never became true within the timeout.
struct WaitTimeoutError: Error, CustomStringConvertible {
    let timeout: Duration
    var description: String { "waitUntil timed out after \(timeout)" }
}

/// Polls `condition` until true, throwing on timeout. Runs on the caller's actor
/// (via `#isolation`) so the closure may read `@MainActor` fixtures safely.
func waitUntil(
    timeout: Duration = .seconds(2),
    pollInterval: Duration = .milliseconds(10),
    isolation _: isolated (any Actor)? = #isolation,
    _ condition: () -> Bool
) async throws {
    let clock = ContinuousClock()
    let deadline = clock.now.advanced(by: timeout)
    while !condition() {
        guard clock.now < deadline else { throw WaitTimeoutError(timeout: timeout) }
        try await Task.sleep(for: pollInterval)
    }
}

Usage: try await waitUntil { viewModel.isLoaded } instead of try await Task.sleep(for: .seconds(1)).

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. 3d ago First seen · 44 lines · 65 tokens per session scan A 65067d09e615

Subscribe to this mod's changes

swift-testing-wait-until is a skill published in the GitHub repository patrickserrano/lacquer (3 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 364 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

testing

Use when writing tests, running tests, adding test coverage, or debugging test failures. Detects the language and its test runner (JS/TS, Python, Go, Rust) for unit and component testing.

tartinerlabs/skills · 44 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

alexastrum/skl · 115 tokens

modernize-tests

Modernize test suites to use modern Swift Testing features or migrate from XCTest.

tartinerlabs/skills · 19 tokens

golang-stretchr-testify

Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification…

alexastrum/skl · 97 tokens

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

Yaomeng1749/claude-code-digital-nomad-config-pack · 37 tokens

run-affected-test-file-in-isolation-and-in-co-run-with-its-test-

When delegating a task affected by this skill, include.

ZaxbyHub/opencode-swarm · 36 tokens