Agent skill

Gen Page Test

by DanielSuo117 in DanielSuo117/velocitai

一键生成 PageObject + 配套测试。触发:新增页面、生成页面、gen page、create page、添加页面对象。

MITAuto-check passedTesting & QA

Install Gen Page Test

skills CLI
$ npx skills add DanielSuo117/velocitai --skill gen-page-test -a claude-code

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

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

At a glance

一键生成 PageObject + 配套测试。触发:新增页面、生成页面、gen page、create page、添加页面对象。

  • Works in 6 steps: :访问真实页面获取 DOM → :生成 PageObject 文件 → :更新 pages/init.py → …
  • Testing & QA work in your project
  • SKILL.md covers 使用方式, 输入参数, 执行流程(6 步) and 生成后检查清单
  • Calls pytest and python

What it does

Gen Page Test is an agent skill from DanielSuo117/velocitai. 一键生成 PageObject + 配套测试。触发:新增页面、生成页面、gen page、create page、添加页面对象。

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

  • “/gen-page-test”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. :访问真实页面获取 DOM
  2. :生成 PageObject 文件
  3. :更新 pages/init.py
  4. :在对应角色测试文件追加 story
  5. :真实环境验证
  6. :同步更新 docs/

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

    Shell commands in SKILL.md call:

    • pytest
    • 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

Gen Page Test loads about 842 tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 134 words of instructions outside code blocks.

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

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). 134 words, ~842 tokens.

Download SKILL.mdSave it as .claude/skills/gen-page-test/SKILL.md (or your agent's skills folder).
name
gen-page-test
description
一键生成 PageObject + 配套测试。触发:新增页面、生成页面、gen page、create page、添加页面对象。

Gen Page Test — 一键生成 PageObject + 测试

使用方式

用户输入:为 <中文页面名>(URL: https://...)生成页面对象和测试,测试点:点击A、填写B、查看C

输入参数

参数必填说明示例
页面名称是中文业务名称课程管理页
页面 URL是真实可访问的页面 URL(已认证态)https://example.com/xxx
角色是项目中已有的角色(如 <role>)对应角色
类名否(自动推导)PascalCase<Role><Page>Page
回归测试点是需要覆盖的交互元素点击新建、搜索、删除

类名推导规则:

  • 非特定角色:中文名 → 英文翻译 → PascalCase + Page 后缀(如 <Feature>Page)
  • 特定角色:<Role> + 英文翻译 → PascalCase + Page 后缀(如 <Role><Feature>Page)
  • 角色文件名前缀:<role>_(如 <role>_<feature>_page.py)

项目中已有的具体类名清单见 docs/pages-catalog.md。


执行流程(6 步)

Step 1:访问真实页面获取 DOM

browser_navigate(必要时先 /entry?token=xxx)→ browser_snapshot → browser_evaluate 提取元素。按 locator-replacer 六级优先级(P0 → P5)选出稳定定位符。

Step 2:生成 PageObject 文件

创建 pages/<snake_name>_page.py:

python
# 页面名称:<中文名>
from core.base.base_page import BasePage


class <ClassName>(BasePage):
    # 定位符 — 来自真实页面(<日期>,URL: <页面URL>)
    <LOCATOR_1> = "<真实定位符>"    # P<0-5>: 说明
    <LOCATOR_2> = "<真实定位符>"    # P<0-5>: 说明
    PAGE_IDENTIFIER = "<页面标识定位符>"    # P<0-5>: 说明

    def click_<method_1>(self):
        self.click(self.<LOCATOR_1>)

    def click_<method_2>(self):
        self.click(self.<LOCATOR_2>)

    def is_page_loaded(self) -> bool:
        return self.is_visible(self.PAGE_IDENTIFIER)
Step 3:更新 pages/__init__.py
python
from pages.<snake_name>_page import <ClassName>

# 在 __all__ 列表中追加 "<ClassName>"
Step 4:在对应角色测试文件追加 story

目标文件:对应角色 tests/<role>/test_<role>_flow.py(继承 <Role>BaseTest)中的 Test<Role>Flow 类。

角色目录还不存在时,先 python scripts/scaffold_role.py <role> --label <中文名> 生成基类与流程文件,再往类末尾追加;不要手搓目录。

对应角色示例:

python
@allure.story("<页面中文名>")
def test_<snake_name>(self):
    page_obj = <ClassName>(self.<role>_page)
    self.<role>_page.goto("<页面URL>")
    assert page_obj.is_page_loaded(), "<页面中文名>加载失败"
    page_obj.click_<method_1>()
    ...

对应角色使用 self.<role>_page,且若脱离门户布局须往返闭合(见 case-round-trip):

python
@allure.story("<页面中文名>")
def test_<snake_name>(self):
    self.<role>_home.click_<navigation>()
    page_obj = <ClassName>(self.<role>_page)
    assert page_obj.is_page_loaded(), "<页面中文名>加载失败"
    page_obj.click_<method_1>()
    page_obj.click_back_to_<landing>()
    assert self.<role>_home.is_page_loaded(), "返回起点失败"
Step 5:真实环境验证
bash
pytest framework/tests/<role>/test_<role>_flow.py --env=<pre|prod> -v -k "test_<snake_name>"

⚠️ 运行前向用户确认 --env(见 agent-behavior.md P0.2)。

失败时 → locator-replacer 重新抽取定位符,或 test-runner 分析失败类型。

Step 6:同步更新 docs/
  • docs/pages-catalog.md:追加新页面类 + 方法表
  • docs/regression-points.md:追加回归点表 + 关键定位符段

生成后检查清单

通用检查(命名/导入/is_page_loaded/allure)→ coding-conventions.md "新增测试检查清单"

  • 定位符均来自真实页面 DOM,行尾标注 P0~P5 级别
  • pytest framework/tests/<role>/test_<role>_flow.py --env=<pre|prod> -v -k "test_<name>" 通过
  • 对应角色的 docs/pages-catalog.md 已追加
  • 对应角色的 docs/regression-points.md 已追加
  • 若跳转目标脱离门户布局,已套用 case-round-trip

© 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/gen-page-test of DanielSuo117/velocitai.

Open the folder on GitHubat commit dfcca7e

Compare with similar skills

Gen Page Test 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.

Gen Page Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gen Page Test this skillDanielSuo117/velocitai158—~842Automated 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 Gen Page Test

What does Gen Page Test do?

一键生成 PageObject + 配套测试。触发:新增页面、生成页面、gen page、create page、添加页面对象。. Gen Page Test is an agent skill from DanielSuo117/velocitai.

When should I use Gen Page Test?

Gen Page Test fits situations like: testing & QA work in your project.

How do I install Gen Page Test in Claude Code?

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

How do I install Gen Page Test in Codex?

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

Can I use Gen Page Test 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 gen-page-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gen-page-test, .gemini/skills/gen-page-test, .github/skills/gen-page-test and .opencode/skills/gen-page-test in your project.

What does Gen Page Test need to run?

Going by SKILL.md and its folder, Gen Page Test needs the command-line tools its instructions call (pytest and python). Our summary lists: Python 3.

Does Gen Page Test 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 Gen Page Test 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 Gen Page Test use?

Gen Page Test 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 Gen Page Test use?

About 842 tokens (SKILL.md is roughly 3.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 Gen Page Test?

Skills that share tags, products or a category with Gen Page Test: 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 Gen Page Test?

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.