Agent skill

Browser Config

by DanielSuo117 in DanielSuo117/velocitai

浏览器 viewport / headless / 超时分层配置。触发:viewport、浏览器配置、导航超时、headless、slowmo、incognito。

MITAuto-check passedTesting & QA

Install Browser Config

skills CLI
$ npx skills add DanielSuo117/velocitai --skill browser-config -a claude-code

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

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

At a glance

浏览器 viewport / headless / 超时分层配置。触发:viewport、浏览器配置、导航超时、headless、slowmo、incognito。

  • Testing & QA work in your project
  • SKILL.md covers 核心原则, 一、pytest 浏览器完整配置架构, 二、Viewport 尺寸选择 and 三、无痕模式(Incognito), plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Browser Config is an agent skill from DanielSuo117/velocitai. 浏览器 viewport / headless / 超时分层配置。触发:viewport、浏览器配置、导航超时、headless、slowmo、incognito。

Its SKILL.md is about 700 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. It works with pytest. 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

  • “/browser-config”

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

Browser Config loads about 698 tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 92 words of instructions outside code blocks.

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

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). 92 words, ~698 tokens.

Download SKILL.mdSave it as .claude/skills/browser-config/SKILL.md (or your agent's skills folder).
name
browser-config
description
浏览器 viewport / headless / 超时分层配置。触发:viewport、浏览器配置、导航超时、headless、slow_mo、incognito。

浏览器启动配置 — viewport / 无痕 / 超时分离

核心原则

所有浏览器配置集中声明在配置文件,通过 fixture 分层注入,禁止在用例或 PageObject 中硬编码。


一、pytest 浏览器完整配置架构

配置分层
配置文件(常量声明)
  │
  ├─ browser fixture(session 级)
  │    └─ headless / slow_mo / incognito
  │
  ├─ page fixture(function 级)
  │    └─ viewport / timeout / navigation_timeout
  │
  └─ class_page fixture(class 级)
       └─ viewport / timeout / navigation_timeout
配置文件:所有常量集中声明
python
# 浏览器配置
HEADLESS = False              # True: 无头模式(CI 环境); False: 有头模式(本地调试)
SLOW_MO = 500                 # 每步操作间隔(ms),便于肉眼观察;CI 设为 0
DEFAULT_TIMEOUT = 15000       # 元素操作超时(ms)
DEFAULT_NAVIGATION_TIMEOUT = 15000  # 页面导航超时(ms)
VIEWPORT_WIDTH = 1280         # 视口宽度
VIEWPORT_HEIGHT = 900         # 视口高度
Fixture 分层模板
python
@pytest.fixture(scope="session")
def browser(playwright_instance):
    browser = playwright_instance.chromium.launch(
        headless=HEADLESS, slow_mo=SLOW_MO, args=["--incognito"],
    )
    yield browser
    browser.close()

@pytest.fixture                   # function 级:每个用例独立 context + page
def page(browser):
    context = browser.new_context(viewport={"width": VIEWPORT_WIDTH, "height": VIEWPORT_HEIGHT})
    page = context.new_page()
    page.set_default_timeout(DEFAULT_TIMEOUT)
    page.set_default_navigation_timeout(DEFAULT_NAVIGATION_TIMEOUT)
    yield page
    page.close(); context.close()

@pytest.fixture(scope="class")    # class 级:同 class 内共享 context + page
def class_page(browser):
    # 同 page fixture,scope="class"
    ...

关键约束:viewport 在 context 层、timeout 在 page 层、--incognito 在 browser 层——三者不得混用层级。


二、Viewport 尺寸选择

核心约束:viewport 高度必须适配物理屏幕

viewport 高度不能超过物理屏幕可用高度(屏幕分辨率 − 浏览器工具栏 − 系统任务栏),否则浏览器窗口底部超出屏幕,页面底部内容被遮挡、无法交互。

正确策略:保持宽度,适当增加高度(不超出屏幕)

响应式页面等比放大 viewport 无效(可见比不变);应保持宽度,适当增加高度(不超出屏幕)。

方案Viewport效果
默认1280x720基准,较小
推荐1280x900适配 MacBook 屏幕,窗口不超出屏幕
外接显示器1280x1080适配 Full HD 显示器
过大(错误)1280x1440超出多数屏幕,底部被遮挡
等比放大(错误)2560x1440响应式页面可见比无改善

三、无痕模式(Incognito)

pytest 测试浏览器启用(隔离环境),MCP 调试浏览器视需求(可能需要保留登录态)。通过 launch(args=["--incognito"]) 在 browser 层传入。


四、导航超时与元素超时分离

两者默认均为 15s。分离的意义:页面资源重时可单独调大导航超时而不影响元素操作的快速反馈。

python
page.set_default_timeout(DEFAULT_TIMEOUT)                    # 元素操作
page.set_default_navigation_timeout(DEFAULT_NAVIGATION_TIMEOUT)  # 页面跳转

检查清单

  • viewport 在 new_context() 时传入(context 层),不在 browser 层
  • set_default_timeout 与 set_default_navigation_timeout 均已设置(两者分离)
  • --incognito 在 pytest 测试浏览器上启用,MCP 调试浏览器视需求
  • 用例和 PageObject 中无硬编码的浏览器配置值

© 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/browser-config of DanielSuo117/velocitai.

Open the folder on GitHubat commit dfcca7e

Compare with similar skills

Browser Config 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.

Browser Config compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Browser Config this skillDanielSuo117/velocitai158—~698Automated safety check: PassMIT
Adk Verify Snippetsgoogle/adk-python22k—~1.4kAutomated safety check: PassApache-2.0
Megatron Core Testing GuideNVIDIA/Megatron-LM18k1 repos~2.1kAutomated safety check: PassApache-2.0
Hermetic Python Unit TestsdimensionalOS/dimos4.6k—~1.4kAutomated safety check: PassCustom licence
Test GuardamElnagdy/guard-skills1.3k2 repos~2.1kAutomated safety check: PassMIT
Fla Optimization Loopfla-org/flash-linear-attention5.8k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Adk Verify Snippets

    google/adk-python

    Official

    Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail…

    22k GitHub stars~1.4k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Megatron Core Testing Guide

    NVIDIA/Megatron-LM

    Official

    Guide to the Megatron-LM test system: layout, recipe YAML, running and adding unit and functional tests, golden values, marker filters and CI parity.

    18k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed
  • Hermetic Python Unit Tests

    dimensionalOS/dimos

    Rules for writing, fixing and reviewing pytest unit tests that are hermetic: behavior-focused, deterministic, isolated and cheap to run.

    4.6k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Test Guard

    amElnagdy/guard-skills

    Reviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed.

    1.3k GitHub starsUsed in 2 repos~2.1k tokens
    Testing & QAAuto-check passed
  • Fla Optimization Loop

    fla-org/flash-linear-attention

    Disciplined, reproducible loop for making an FLA kernel faster (Triton, Gluon, TileLang, CuTe) without ever breaking or gaming correctness.

    5.8k GitHub stars~3.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Pytest Runner

    saleor/saleor

    Run pytest tests with automatic virtual environment activation. Use this skill whenever running tests, executing pytest, or when asked to "run tests", "test…

    23k GitHub stars~251 tokensUpdated yesterday
    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

Works with

Categories

Questions about Browser Config

What does Browser Config do?

浏览器 viewport / headless / 超时分层配置。触发:viewport、浏览器配置、导航超时、headless、slowmo、incognito。. Browser Config is an agent skill from DanielSuo117/velocitai.

When should I use Browser Config?

Browser Config fits situations like: testing & QA work in your project.

How do I install Browser Config in Claude Code?

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

How do I install Browser Config in Codex?

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

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

What does Browser Config need to run?

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

Does Browser Config 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 Browser Config 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 Browser Config use?

Browser Config 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 Browser Config use?

About 698 tokens (SKILL.md is roughly 2.8k 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 Browser Config?

Skills that share tags, products or a category with Browser Config: Adk Verify Snippets (google/adk-python, 22k stars), Megatron Core Testing Guide (NVIDIA/Megatron-LM, 18k stars), Hermetic Python Unit Tests (dimensionalOS/dimos, 4.6k stars) and Test Guard (amElnagdy/guard-skills, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Browser Config?

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.