Agent skill

Case Round Trip

by DanielSuo117 in DanielSuo117/velocitai

共享 page 下用例离开起点后必须 UI 返回并断言。触发:往返闭合、case round trip、复位超时、scope 共享 page。

MITAuto-check passedTesting & QA

Install Case Round Trip

skills CLI
$ npx skills add DanielSuo117/velocitai --skill case-round-trip -a claude-code

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

GitHub CLI
$ gh skill install DanielSuo117/velocitai case-round-trip --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/case-round-trip .claude/skills/case-round-trip && 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
case-round-trip
GitHub stars
158
Token cost
~588 tokens
SKILL.md length
127 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

共享 page 下用例离开起点后必须 UI 返回并断言。触发:往返闭合、case round trip、复位超时、scope 共享 page。

  • Works in 3 steps: 给每个会"脱离门户布局"的 PageObject 加… → 用例主断言后显式调用返回方法,并再次断言起点页加载 → 复位 fixture 保持最简单形态(仅走门户导航),不做 goto 兜底
  • Testing & QA work in your project
  • SKILL.md covers 核心规则, 何时适用, 做法 and 起点 is_page_loaded 的严格判据, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Case Round Trip is an agent skill from DanielSuo117/velocitai. 共享 page 下用例离开起点后必须 UI 返回并断言。触发:往返闭合、case round trip、复位超时、scope 共享 page。

Its SKILL.md is about 590 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

  • “/case-round-trip”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 给每个会"脱离门户布局"的 PageObject 加 click_back_to_(),走真实 UI 返回按钮
  2. 用例主断言后显式调用返回方法,并再次断言起点页加载
  3. 复位 fixture 保持最简单形态(仅走门户导航),不做 goto 兜底

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

Case Round Trip loads about 588 tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 127 words of instructions outside code blocks.

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

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). 127 words, ~588 tokens.

Download SKILL.mdSave it as .claude/skills/case-round-trip/SKILL.md (or your agent's skills folder).
name
case-round-trip
description
共享 page 下用例离开起点后必须 UI 返回并断言。触发:往返闭合、case round trip、复位超时、scope 共享 page。

Case Round Trip — 用例往返闭合

仅适用 Playwright + pytest。

核心规则

共享 page(scope > function 的 fixture)下,用例离开起点页后必须在末尾通过真实 UI 返回并断言;不要在复位 fixture 里做 goto 兜底。

何时适用

  • 多个用例共享一个 page / browser context(class/module/session scope)
  • 用例会进入"脱离门户布局"的页面(子路由、沉浸式页面、跨子域)
  • 复位 fixture 依赖门户布局才有的元素(侧边栏 / 顶部 nav)

做法

  1. 给每个会"脱离门户布局"的 PageObject 加 click_back_to_<landing>(),走真实 UI 返回按钮
  2. 用例主断言后显式调用返回方法,并再次断言起点页加载
  3. 复位 fixture 保持最简单形态(仅走门户导航),不做 goto 兜底
python
def test_enter_detail(self):
    self.home.click_first_item()
    detail = DetailPage(self.page)
    assert detail.is_page_loaded(), "详情页未加载"

    detail.click_back_to_home()
    assert self.home.is_page_loaded(), "返回起点页失败"

起点 is_page_loaded 的严格判据

复位 fixture 通常判断 if not start.is_page_loaded(): start.click_back_to_landing()。若 is_page_loaded() 仅校验"页面骨架可见"(title / 容器),切到其他 tab/子路由后骨架仍在 → 返回 True → 复位永不触发 → 下一用例起点错乱。

规则:起点 PageObject 的 is_page_loaded() 必须包含"当前停留在起点状态"判据(起点 tab 激活态 / 起点 URL / 起点独有内容),而不仅是"骨架存在"。

python
# ❌ 只校验骨架 — 切到其他 tab 后仍返回 True,复位失效
def is_page_loaded(self) -> bool:
    return self.is_visible(self.PAGE_TITLE) and self.is_visible(self.TAB_BAR)

# ✅ 加"当前在起点 tab"判据 — tab 切换后返回 False,触发复位
def is_page_loaded(self) -> bool:
    return (
        self.is_visible(self.PAGE_TITLE)
        and self.is_visible(self.TAB_BAR)
        and self.is_visible(self.LANDING_TAB_ACTIVE_MARK)   # 关键第 3 条
    )

LANDING_TAB_ACTIVE_MARK 的 selector 必须用 text= 等锁定到具体起点 tab(如 .tab.active >> text=<起点 tab 名>),否则 .active 会匹配任意激活 tab,同样失效(见 locator-strategy.md 状态类 selector 必须配 text 锁定)。

决策

跳转目标是否仍保留起点页的门户导航?
├─ 是 → 依赖复位 fixture 即可
└─ 否 → PageObject 必须提供返回方法 + 用例末尾显式返回 + 断言

❌ 反例

  • 进入沉浸式页面后只断言进入,不返回 → 后续用例复位 fixture 点不到门户导航
  • page.goto(<landing_url>) 绕过返回按钮 → 失去对返回按钮的回归覆盖
  • if not visible: goto(...) 塞进复位 fixture → 掩盖"用例未闭合"真问题

检查清单

  • 跳转目标脱离门户布局 → 本规则适用
  • PageObject 提供 click_back_to_<landing>()
  • 用例末尾调用返回方法并断言起点页加载
  • 测试顺序打乱仍全部通过

项目落地参考

项目中脱离门户布局的 PageObject(需实现 click_back_to_<landing>)见 docs/pages-catalog.md 与 docs/regression-points.md(带"⚠️ 跳转目标脱离门户布局"标注的页面)。

© 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/case-round-trip of DanielSuo117/velocitai.

Open the folder on GitHubat commit dfcca7e

Compare with similar skills

Case Round Trip 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.

Case Round Trip compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Case Round Trip this skillDanielSuo117/velocitai158—~588Automated 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 13 days ago
    Auto-check passed
  • Locator Replacer

    DanielSuo117/velocitai

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

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

    DanielSuo117/velocitai

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

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

    DanielSuo117/velocitai

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

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

    DanielSuo117/velocitai

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

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

    DanielSuo117/velocitai

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

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

Categories

Questions about Case Round Trip

What does Case Round Trip do?

共享 page 下用例离开起点后必须 UI 返回并断言。触发:往返闭合、case round trip、复位超时、scope 共享 page。. Case Round Trip is an agent skill from DanielSuo117/velocitai.

When should I use Case Round Trip?

Case Round Trip fits situations like: testing & QA work in your project.

How do I install Case Round Trip in Claude Code?

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

How do I install Case Round Trip in Codex?

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

Can I use Case Round Trip 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 case-round-trip -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/case-round-trip, .gemini/skills/case-round-trip, .github/skills/case-round-trip and .opencode/skills/case-round-trip in your project.

What does Case Round Trip need to run?

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

Does Case Round Trip 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 Case Round Trip 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 Case Round Trip use?

Case Round Trip 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 Case Round Trip use?

About 588 tokens (SKILL.md is roughly 2.4k 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 Case Round Trip?

Skills that share tags, products or a category with Case Round Trip: 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 Case Round Trip?

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.