Token导航 LogoToken导航

Agent Skill · 研究检索

webapp-testing(Web 应用测试)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

webapp-testing 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 48,434。

总安装 689周安装 29GitHub Stars 25下载 241核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:webapp-testing(Web 应用测试)
来源仓库:https://github.com/oimiragieo/agent-studio
仓库路径:skills/webapp-testing
安装命令:
npx skills add https://github.com/oimiragieo/agent-studio --skill webapp-testing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill webapp-testing

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助测试设计、自动化测试、用例整理和回归验证。适合编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需确认项目测试框架、运行命令和夹具数据,避免改坏真实逻辑。涉及浏览器或外部服务时应区分本地模拟、测试环境和生产环境。安装前建议确认权限范围和维护状态,避免误操作生产系统。

来源仓库内路径:skills/webapp-testing

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/oimiragieo/agent-studio --skill webapp-testing;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

webapp-testing 怎么安装?

在终端执行 npx skills add https://github.com/oimiragieo/agent-studio --skill webapp-testing。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

webapp-testing 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

webapp-testing 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

webapp-testing 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

webapp-testing 用的人多吗?

公开数据是累计安装 689 次,近一周安装 29 次,下载 241 次,GitHub 25 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

webapp-testing 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
webapp-testing

Web 应用测试 · 本页

68925操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Web Application Testing Skill

Overview

This skill adapts Anthropic's webapp-testing skill for the agent-studio framework. It provides a systematic approach to testing web applications locally using Playwright, choosing the right strategy based on the type of web content being tested.

Source repository: https://github.com/anthropics/skills License: MIT Tool: Playwright (Python API)

When to Use

  • When verifying frontend functionality of a web application
  • When debugging UI behavior or visual rendering issues
  • When capturing screenshots for visual regression testing
  • When checking browser console for JavaScript errors
  • When testing form submissions, navigation flows, and interactive elements
  • When generating automated test scripts for web applications

Iron Law

NEVER INSPECT DOM BEFORE WAITING FOR NETWORKIDLE ON DYNAMIC APPS

Dynamic web applications load content asynchronously. Inspecting the DOM before the page has stabilized will produce incorrect or incomplete results. Always call page.wait_for_load_state('networkidle') before inspecting rendered content on dynamic apps.

Decision Tree: Choose Your Approach

Is the target a static HTML file?
  YES → Approach A: Direct Read
  NO → Is there a running dev server?
    YES → Approach B: Reconnaissance-then-Action
    NO → Approach C: Helper Script First

Approach A: Static HTML Files

For static HTML files that do not require a server:

  1. Read the HTML file directly
  2. Identify CSS selectors for elements of interest
  3. Write a Playwright script to open the file and verify content
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True)
    page = browser.new_page()
    page.goto(f"file://{abs_path_to_html}")

    # Verify content
    title = page.title()
    assert title == "Expected Title"

    # Check element exists
    element = page.query_selector("h1.main-heading")
    assert element is not None

    # Capture screenshot
    page.screenshot(path="screenshot.png")
    browser.close()

Approach B: Running Server (Reconnaissance-then-Action)

When a dev server is already running:

  1. Reconnaissance: Navigate to the app and discover the page structure
  2. Wait for stability: page.wait_for_load_state('networkidle')
  3. Inspect: Query elements, read content, check console logs
  4. Act: Interact with forms, buttons, navigation
  5. Verify: Assert expected outcomes
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True)
    page = browser.new_page()

    # Capture console messages
    console_messages = []
    page.on("console", lambda msg: console_messages.append(
        f"[{msg.type}] {msg.text}"
    ))

    # Navigate and wait for stability
    page.goto("http://localhost:3000")
    page.wait_for_load_state("networkidle")

    # Discover page structure
    headings = page.query_selector_all("h1, h2, h3")
    buttons = page.query_selector_all("button")
    forms = page.query_selector_all("form")
    links = page.query_selector_all("a[href]")

    # Print discovered elements
    for h in headings:
        print(f"Heading: {h.text_content()}")
    for btn in buttons:
        print(f"Button: {btn.text_content()}")

    # Screenshot before interaction
    page.screenshot(path="before-interaction.png")

    # Interact with form
    page.fill("input[name='email']", "test@example.com")
    page.fill("input[name='password']", "testpass123")
    page.click("button[type='submit']")
    page.wait_for_load_state("networkidle")

    # Screenshot after interaction
    page.screenshot(path="after-interaction.png")

    # Check for console errors
    errors = [m for m in console_messages if "[error]" in m.lower()]
    if errors:
        print(f"Console errors found: {errors}")

    browser.close()

Approach C: No Running Server (Helper Script)

When the web app needs a server started:

import subprocess
import time
from playwright.sync_api import sync_playwright

# Start the server
server_proc = subprocess.Popen(
    ["npm", "run", "dev"],
    cwd="/path/to/project",
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE,
    shell=False  # Security: always shell=False
)

# Wait for server to be ready
time.sleep(5)  # Or use a health check loop

try:
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=True)
        page = browser.new_page()
        page.goto("http://localhost:3000")
        page.wait_for_load_state("networkidle")

        # Run tests...
        page.screenshot(path="test-result.png")
        browser.close()
finally:
    server_proc.terminate()
    server_proc.wait()

Common Test Patterns

Pattern 1: Visual Regression Check

# Take baseline screenshot
page.screenshot(path="baseline.png", full_page=True)

# After changes, take comparison screenshot
page.screenshot(path="current.png", full_page=True)

# Compare (use image diff library)

Pattern 2: Form Validation Testing

# Test empty submission
page.click("button[type='submit']")
error_msgs = page.query_selector_all(".error-message")
assert len(error_msgs) > 0, "Expected validation errors for empty form"

# Test invalid email
page.fill("input[type='email']", "not-an-email")
page.click("button[type='submit']")
email_error = page.query_selector("input[type='email']:invalid")
assert email_error is not None

Pattern 3: Navigation Flow Testing

# Test navigation links
nav_links = page.query_selector_all("nav a")
for link in nav_links:
    href = link.get_attribute("href")
    link.click()
    page.wait_for_load_state("networkidle")
    assert page.url.endswith(href), f"Expected URL to end with {href}"
    page.go_back()
    page.wait_for_load_state("networkidle")

Pattern 4: Responsive Design Testing

viewports = [
    {"width": 375, "height": 812, "name": "mobile"},
    {"width": 768, "height": 1024, "name": "tablet"},
    {"width": 1920, "height": 1080, "name": "desktop"},
]

for vp in viewports:
    page.set_viewport_size({"width": vp["width"], "height": vp["height"]})
    page.wait_for_load_state("networkidle")
    page.screenshot(path=f"responsive-{vp['name']}.png")

Critical Pitfalls

  1. Do NOT inspect DOM before networkidle: Dynamic apps load content asynchronously. Early inspection gives incomplete results.
  2. Do NOT use shell=True: When spawning server processes, always use shell=False with array arguments for security.
  3. Do NOT hardcode waits: Use page.wait_for_selector() or page.wait_for_load_state() instead of time.sleep().
  4. Do NOT ignore console errors: Always capture and report browser console errors -- they indicate real issues.
  5. Do NOT forget cleanup: Always terminate server processes in a finally block.

Prerequisites

Ensure Playwright is installed:

pip install playwright
playwright install chromium

Integration with Agent-Studio

Recommended Workflow

  1. Use webapp-testing to verify frontend behavior
  2. Feed screenshot evidence to code-reviewer for visual review
  3. Use tdd skill to generate test suites from discovered patterns
  4. Use accessibility skill to verify WCAG compliance

Complementary Skills

SkillRelationship
tddGenerate test suites from webapp-testing discoveries
accessibilityWCAG compliance verification after functional testing
frontend-expertUI/UX pattern guidance for test design
chrome-browserAlternative browser automation approach
test-generatorGenerate test code from testing patterns

Iron Laws

  1. NEVER INSPECT DOM BEFORE NETWORKIDLE — Dynamic web applications load content asynchronously. Inspecting the DOM before the page has stabilized produces incorrect or incomplete results.
  2. NEVER use shell=True when spawning server processes — always use shell=False with array arguments (SE-01 security requirement).
  3. ALWAYS capture console errors — browser console errors indicate real issues; never ignore them in test reports.
  4. ALWAYS terminate server processes in finally blocks — leaked server processes corrupt future test runs and consume resources.
  5. NEVER hardcode waits — use page.wait_for_selector() or page.wait_for_load_state() instead of time.sleep().

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Inspecting DOM before networkidleDynamic content not yet loaded; assertions produce false negativesAlways page.wait_for_load_state('networkidle') before inspection
Using time.sleep() for waitsFlaky — too short on slow machines, too long on fast onesUse explicit waits: wait_for_selector, wait_for_load_state
Ignoring browser console errorsReal JS errors go undetected; test passes but app is brokenAlways capture and report console errors in every test run
Using shell=True for server processesCommand injection vulnerabilityAlways shell=False with list arguments
Not cleaning up server processesPort conflicts, resource leaks on subsequent runsUse try/finally to guarantee server_proc.terminate()

Puppeteer MCP Browser Automation

For agent-native browser automation without Python, use the Puppeteer MCP server from modelcontextprotocol/servers:

Setup

Add to .claude/settings.json under mcpServers:

"puppeteer": {
  "command": "npx",
  "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}

MCP Tool Reference

ToolPurpose
puppeteer_navigateNavigate to URL, wait for page load
puppeteer_screenshotCapture screenshot (full page or element)
puppeteer_clickClick on CSS selector
puppeteer_fillFill form input with value
puppeteer_selectSelect dropdown option by value
puppeteer_hoverHover over element
puppeteer_evaluateExecute JavaScript in browser context

Usage Pattern

// Navigate and capture state
mcp__puppeteer__puppeteer_navigate({ url: 'http://localhost:3000' });
mcp__puppeteer__puppeteer_screenshot({ name: 'initial-state', fullPage: true });

// Interact with forms
mcp__puppeteer__puppeteer_fill({ selector: 'input[name="email"]', value: 'test@example.com' });
mcp__puppeteer__puppeteer_click({ selector: 'button[type="submit"]' });
mcp__puppeteer__puppeteer_screenshot({ name: 'after-submit' });

// Evaluate page state
mcp__puppeteer__puppeteer_evaluate({
  script:
    'JSON.stringify({ title: document.title, errors: [...document.querySelectorAll(".error")].map(e => e.textContent) })',
});

When to Use Puppeteer MCP vs Playwright Python

ScenarioUse
Quick page verification in agent flowPuppeteer MCP
Complex test suites with assertionsPlaywright Python
Screenshot capture as evidencePuppeteer MCP
Form interaction and navigationEither
CI test automationPlaywright Python
Agent-embedded browser checksPuppeteer MCP

Memory Protocol (MANDATORY)

Before starting:

Read .claude/context/memory/learnings.md

Check for:

  • Existing test scripts or Playwright configurations in the project
  • Known page selectors from previous sessions
  • Previously discovered console errors or flaky test patterns

After completing:

  • Testing pattern found -> .claude/context/memory/learnings.md
  • Test flakiness or browser issue -> .claude/context/memory/issues.md
  • Decision about test strategy -> .claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.

平台分布

Codex

36.86%
按下载量换算89

Claude

30.62%
按下载量换算74

Cursor

18.34%
按下载量换算44

Gemini CLI

8.28%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills