Agent skill

Wait Strategy

by DanielSuo117 in DanielSuo117/velocitai

隐式等待为主、显式等待仅慢路径。触发:等待策略、timeout、wait、隐式等待、显式等待. An agent skill from DanielSuo117/velocitai.

MITAuto-check passedTesting & QA

Install Wait Strategy

skills CLI
$ npx skills add DanielSuo117/velocitai --skill wait-strategy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DanielSuo117/velocitai wait-strategy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DanielSuo117/velocitai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/wait-strategy .claude/skills/wait-strategy && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
wait-strategy
GitHub stars
158
Token cost
~634 tokens
SKILL.md length
133 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

隐式等待为主、显式等待仅慢路径。触发:等待策略、timeout、wait、隐式等待、显式等待. An agent skill from DanielSuo117/velocitai.

  • Testing & QA work in your project
  • SKILL.md covers 核心原则, 一、隐式等待(默认,全局生效), 二、显式等待(仅用于特殊场景) and 三、wait_for_load_state 与隐式等待的关系, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Wait Strategy is an agent skill from DanielSuo117/velocitai. 隐式等待为主、显式等待仅慢路径。触发:等待策略、timeout、wait、隐式等待、显式等待。

Its SKILL.md is about 630 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA. The repository describes itself as: Next-generation UI automation harness powered by Python & Playwright. Chat with AI Agents to seamlessly generate, architect, and execute enterprise-grade UI test code. The licence is MIT.

When your agent uses it

  • Testing & QA work in your project

Example prompts

  • “/wait-strategy”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit dfcca7e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Wait Strategy loads about 634 tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 133 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~15
When it runs · the whole SKILL.md, loaded when a task matches
~634

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DanielSuo117/velocitai at commit dfcca7e, republished under its MIT licence (© DanielSuo117). 133 words, ~634 tokens.

Download SKILL.mdSave it as .claude/skills/wait-strategy/SKILL.md (or your agent's skills folder).
name
wait-strategy
description
隐式等待为主、显式等待仅慢路径。触发:等待策略、timeout、wait、隐式等待、显式等待。

等待策略 — 隐式等待为主,显式等待为辅

核心原则

隐式等待覆盖 99% 场景,显式等待仅用于已知的慢路径。


一、隐式等待(默认,全局生效)

什么是隐式等待

通过 page.set_default_timeout(ms) 在 page 创建后立即设置。此后该 page 上所有 Playwright 操作(click、fill、locator.wait_for、is_visible 等)自动等待元素就绪,超时前持续重试,无需逐个调用指定 timeout。

配置位置

隐式等待的超时时长统一声明在配置文件中(如 DEFAULT_TIMEOUT 常量),在 fixture 层注入到每个 page 实例:

python
# 配置文件
DEFAULT_TIMEOUT = 15000   # 15 秒,兼顾网络波动

# fixture 层(function 级 / class 级均需设置)
page = context.new_page()
page.set_default_timeout(DEFAULT_TIMEOUT)
推荐时长
环境推荐值说明
内网 / CI10000 (10s)网络稳定,无需长等
外网 / 生产15000 (15s)兼顾偶发网络波动
弱网测试20000~30000专项弱网场景

二、显式等待(仅用于特殊场景)

什么时候用
场景原因做法
大文件上传 / 导入服务器处理耗时远超常规页面操作self.is_visible(LOCATOR, timeout=60000)
长轮询 / 异步任务回调后端处理完才刷新前端状态page.locator(...).wait_for(state="visible", timeout=30000)
第三方服务跳转OAuth / 支付等外部页面响应不可控page.wait_for_url("**/callback**", timeout=30000)
首次冷启动服务刚部署、首次请求慢对首个导航操作单独加大 timeout
使用方式

在调用处传入显式 timeout,覆盖隐式默认值:

python
# BasePage 封装方法支持 timeout 参数
def is_visible(self, locator, timeout=DEFAULT_TIMEOUT) -> bool:
    ...

# 用例中:仅对已知慢操作显式指定
def test_upload_large_file(self):
    self.page_obj.click_upload()
    assert self.page_obj.is_visible(
        self.page_obj.UPLOAD_SUCCESS_INDICATOR,
        timeout=60000   # 显式等待 60 秒,仅此一处
    ), "大文件上传超时"
禁止事项
  • 禁止 time.sleep() 硬等待 — Playwright 的自动等待机制已覆盖,硬等待浪费时间且不可靠
  • 禁止给每个操作都加显式 timeout — 这等于放弃了隐式等待的统一管理优势
  • 禁止在 PageObject 方法内部硬编码超长 timeout — 超时值应由调用方(用例层)按场景决定

三、wait_for_load_state 与隐式等待的关系

page.wait_for_load_state("networkidle") 是导航级等待,与元素级隐式等待互补,不冲突:

等待类型作用层级触发时机受 set_default_timeout 控制
wait_for_load_state导航 / 网络页面跳转、AJAX 批量请求后受 set_default_navigation_timeout 控制
隐式等待元素每次元素操作前是

推荐模式:

python
def click_navigate_to_target(self):
    self.click(self.TARGET_LINK)
    self.page.wait_for_load_state("networkidle")  # 等网络请求完成
    # 之后的 is_visible / click 等操作由隐式等待兜底

检查清单

  • 全局 DEFAULT_TIMEOUT 已在配置文件统一声明
  • 所有 page fixture(function 级 / class 级)均调用了 page.set_default_timeout()
  • PageObject 业务方法中无 time.sleep()
  • 显式 timeout 仅出现在已知慢路径的调用处,而非 PageObject 内部
  • PageObject 的 is_visible() 等方法保留 timeout 参数供调用方覆盖

© DanielSuo117, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/wait-strategy of DanielSuo117/velocitai.

Open the folder on GitHubat commit dfcca7e

Compare with similar skills

Wait Strategy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Wait Strategy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wait Strategy this skillDanielSuo117/velocitai158—~634Automated safety check: PassMIT
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
Diagnosing Bugsfossasia/eventyay-interpretation1.6k32 repos~2.1kAutomated safety check: PassApache-2.0
TDDpietheinstrengholt/rssmonster56430 repos~906Automated safety check: PassMIT
TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph11211 repos~2.4kAutomated safety check: PassNone
TDDsanity-io/sanity6.4k20 repos~1kAutomated safety check: PassMIT

Similar skills

  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Diagnosing Bugs

    fossasia/eventyay-interpretation

    Diagnosis loop for hard bugs and performance regressions. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 32 repos~2.1k tokens
    Testing & QAAuto-check passed
  • TDD

    pietheinstrengholt/rssmonster

    Test-driven development. An agent skill from pietheinstrengholt/rssmonster.

    564 GitHub starsUsed in 30 repos~906 tokens
    Testing & QAAuto-check passed
  • TDD Workflow

    hellangleZ/burn-in-cceverywhere-ralph

    A skill your agent uses when writing new features, fixing bugs, or refactoring code.

    112 GitHub starsUsed in 11 repos~2.4k tokens
    Testing & QAAuto-check passed
  • TDD

    sanity-io/sanity

    Official

    Test-driven development with red-green-refactor loop. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 20 repos~1k tokens
    Testing & QAAuto-check passed
  • Context Driven Development

    Ibrahim-3d/orchestrator-supaconductor

    A skill your agent uses when working with Conductor's context-driven development methodology, managing project context artifacts, or understanding the relationship between product.md, tech-stack.md…

    381 GitHub starsUsed in 9 repos~2.9k tokens
    Testing & QAAuto-check passed

More from DanielSuo117/velocitai

All 13 skills in this repo
  • Architecture

    DanielSuo117/velocitai

    POM 分层与 context 共享决策树。触发:架构、分层、POM、Page Object、基类设计、新增角色. An agent skill from DanielSuo117/velocitai.

    158 GitHub stars~726 tokensUpdated 11 days ago
    Auto-check passed
  • Locator Replacer

    DanielSuo117/velocitai

    替换占位定位符为真实选择器(六级优先级)。触发:替换定位符、locator、selector、定位失败、元素找不到、DOM 分析。

    158 GitHub stars~703 tokensUpdated 11 days ago
    Auto-check passed
  • Page Load Assertion

    DanielSuo117/velocitai

    ispageloaded() 四种验证模式与调用层级。触发:页面断言、ispageloaded、page loaded、页面加载验证。

    158 GitHub stars~776 tokensUpdated 11 days ago
    Auto-check passed
  • Quick Debug

    DanielSuo117/velocitai

    测试失败时免登跳转原地排查修复。触发:排查、纠错、debug、定位符失败、超时、元素找不到、断言失败. An agent skill from DanielSuo117/velocitai.

    158 GitHub stars~471 tokensUpdated 11 days ago
    Auto-check passed
  • Save Verify Strategy

    DanielSuo117/velocitai

    表单保存后验证(Toast / 重定向 / 数据对比 / 富文本清空)。触发:保存验证、toast、重定向检测、Meta+A、保存成功判断。

    158 GitHub stars~547 tokensUpdated 11 days ago
    Auto-check passed
  • Test Runner

    DanielSuo117/velocitai

    运行 pytest + 结构化分析失败原因。触发:运行测试、跑测试、run test、pytest、失败分析、allure。

    158 GitHub stars~404 tokensUpdated 11 days ago
    Auto-check passed

Categories

Questions about Wait Strategy

What does Wait Strategy do?

隐式等待为主、显式等待仅慢路径。触发:等待策略、timeout、wait、隐式等待、显式等待. An agent skill from DanielSuo117/velocitai. Wait Strategy is an agent skill from DanielSuo117/velocitai.

When should I use Wait Strategy?

Wait Strategy fits situations like: testing & QA work in your project.

How do I install Wait Strategy in Claude Code?

Run `npx skills add DanielSuo117/velocitai --skill wait-strategy -a claude-code`. Or copy the skill folder (skills/wait-strategy in DanielSuo117/velocitai) into .claude/skills/wait-strategy in your project. Claude Code loads it when a task matches its description.

How do I install Wait Strategy in Codex?

Run `npx skills add DanielSuo117/velocitai --skill wait-strategy -a codex`. Or copy the skill folder (skills/wait-strategy in DanielSuo117/velocitai) into .agents/skills/wait-strategy in your project. Codex loads it when a task matches its description.

Can I use Wait Strategy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DanielSuo117/velocitai --skill wait-strategy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wait-strategy, .gemini/skills/wait-strategy, .github/skills/wait-strategy and .opencode/skills/wait-strategy in your project.

What does Wait Strategy need to run?

SKILL.md names no scripts, command-line tools or credentials: Wait Strategy is instructions for the agent only. Our summary lists: Python 3.

Does Wait Strategy access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Wait Strategy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Wait Strategy use?

Wait Strategy is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wait Strategy use?

About 634 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Wait Strategy?

Skills that share tags, products or a category with Wait Strategy: Web Application Testing (anthropics/skills, 180k stars), Diagnosing Bugs (fossasia/eventyay-interpretation, 1.6k stars), TDD (pietheinstrengholt/rssmonster, 564 stars) and TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wait Strategy?

DanielSuo117 (a GitHub user) maintains it in DanielSuo117/velocitai, which has 158 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 27, 2026.

Source: DanielSuo117/velocitai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.