Token导航 LogoToken导航TokenDH.com
待分类权限需确认github未标认证来源可访问许可证需确认审计未展示

web-automation网络自动化

Agent Skill

web-automation 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,080

周安装

45

GitHub Stars

10

下载量

360
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/mauromedda/agent-toolkit --skill web-automation

简介

web-automation 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

  • 它可辅助查询项目结构、跟踪任务进展、分析提交历史和检查合并冲突。
  • 使用时需区分只读操作与写入动作;涉及创建分支、推送代码或修改 Issue 时,应确认权限范围和目标仓库。
  • 安装前建议核实来源仓库维护状态,避免触发不必要的网络请求或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

ABOUTME: Claude Code skill for web automation, debugging, and E2E testing using Playwright

ABOUTME: Covers interactive automation, passive monitoring, screenshots, and security verification

Web Automation with Playwright

Browser automation and debugging using Playwright in Python or JavaScript/TypeScript.

Detailed patterns: See references/python-patterns.md and references/javascript-patterns.md


Quick Reference

TaskHelper Script
Login / fill formsexamples/python/form_interaction.py
Take screenshotsexamples/python/screenshot_capture.py
Handle cookie consentscripts/cookie_consent.py
Discover page elementsexamples/python/element_discovery.py
Capture network trafficscripts/network_inspector.py
Debug console errorsscripts/console_debugger.py
Full debug (network+console)scripts/combined_debugger.py
Compare websites visuallyexamples/python/visual_compare.py

Always run helpers first:

uv run ~/.claude/skills/web-automation/examples/python/element_discovery.py http://localhost:3000
uv run ~/.claude/skills/web-automation/examples/python/screenshot_capture.py http://localhost:3000 --output /tmp/shots

Modes of Operation

ModeWhen to UseExample
InteractiveClick, type, navigateLogin flow, form submission
PassiveObserve onlyNetwork capture, console monitoring
E2E TestingAutomated test suitesPlaywright Test framework

When to Invoke (Proactive)

  1. Verifying UI fixes - After changing frontend code
  2. Testing form fields/dropdowns - Verify correct values display
  3. Confirming visual changes - Take screenshots
  4. Reproducing bugs - Automate steps to reproduce
  5. Security verification - After Gemini/static analysis finds issues

🔄 RESUMED SESSION CHECKPOINT

┌─────────────────────────────────────────────────────────────┐
│  SESSION RESUMED - WEB AUTOMATION VERIFICATION              │
│                                                             │
│  1. Was I in the middle of browser automation?              │
│     → Run: ps aux | grep -E "chromium|playwright|node"      │
│                                                             │
│  2. Were there UI verification tasks pending?               │
│     → Check summary for "verify", "test UI", "screenshot"   │
│                                                             │
│  3. Did previous automation capture any findings?           │
│     → Check /tmp/ for screenshots, debug outputs            │
└─────────────────────────────────────────────────────────────┘

Decision Flow

Task:
    +-- Need to interact? (click, type, submit) → Interactive mode
    +-- Just observe/capture? → Passive mode (combined_debugger.py)
    +-- Security verification? → Passive mode + grep for sensitive patterns

CRITICAL: Handling Overlays

Overlays WILL block automation. Always dismiss after page.goto():

Python (Quick Pattern)

page.goto('https://example.com')
page.wait_for_load_state('networkidle')

# Dismiss cookie consent
for sel in ['button:has-text("Accept all")', '[class*="cookie"] button[class*="accept"]']:
    try:
        btn = page.locator(sel).first
        if btn.is_visible(timeout=2000):
            btn.click()
            break
    except:
        continue

Nuclear Option (Remove All Overlays)

page.evaluate('''() => {
    const patterns = ['cookie', 'consent', 'modal', 'overlay', 'popup', 'backdrop'];
    for (const p of patterns) {
        document.querySelectorAll(`[class*="${p}"], [id*="${p}"]`).forEach(el => {
            if (getComputedStyle(el).position === 'fixed') el.remove();
        });
    }
    document.body.style.overflow = 'auto';
}''')

Full implementation: See references/python-patterns.md


Core Patterns

Python

from playwright.sync_api import sync_playwright

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')  # CRITICAL
    # ... automation
    browser.close()

JavaScript

import { test, expect } from '@playwright/test';

test('example', async ({ page }) => {
  await page.goto('/');
  await page.waitForLoadState('networkidle');
  await expect(page.locator('.element')).toBeVisible();
});

Common Operations

OperationPythonJavaScript
Screenshotpage.screenshot(path='/tmp/s.png')await page.screenshot({path: '/tmp/s.png'})
Full pagepage.screenshot(path='/tmp/s.png', full_page=True)await page.screenshot({path: '/tmp/s.png', fullPage: true})
Fill inputpage.fill('input[name="email"]', 'x@y.com')await page.fill('input[name="email"]', 'x@y.com')
Select dropdownpage.select_option('select#id', 'value')await page.selectOption('select#id', 'value')
Clickpage.click('button[type="submit"]')await page.click('button[type="submit"]')
Wait networkpage.wait_for_load_state('networkidle')await page.waitForLoadState('networkidle')
Wait elementpage.wait_for_selector('.result')await page.waitForSelector('.result')

Selector Strategies (Order of Preference)

  1. Role-based: page.get_by_role('button', name='Submit')
  2. Text-based: page.get_by_text('Click me')
  3. Test IDs: page.get_by_test_id('submit-btn')
  4. CSS: page.locator('.btn-primary')
  5. XPath (last resort): page.locator('//button[@type="submit"]')

Verification Checklist

What to VerifyApproach
Dropdown valuepage.locator('select').input_value()
Input textpage.locator('input').input_value()
Element visiblepage.locator('.element').is_visible()
Text contentpage.locator('.element').text_content()
Page URLpage.url after action

Passive Debugging Scripts

ScriptPurposeExample
combined_debugger.pyNetwork + Console + Errorsuv run... --duration 30 --output /tmp/debug.json
network_inspector.pyNetwork onlyuv run... --errors-only
console_debugger.pyConsole/errors onlyuv run... --with-stack-traces

Security Verification

# After Gemini found sensitive data logging
uv run ~/.claude/skills/web-automation/scripts/console_debugger.py \
    http://localhost:3000 --duration 60 --output /tmp/security.json

grep -i "password\|token\|secret\|bearer" /tmp/security.json

Visual Comparison

NEVER say "I cannot visually browse". Instead:

# Compare two sites
uv run ~/.claude/skills/web-automation/examples/python/visual_compare.py \
    https://reference-site.com \
    http://localhost:3000 \
    --output /tmp/compare

# Then read the screenshots using Read tool

Language Selection

Use CaseRecommendedReason
Existing JS/TS projectJavaScriptConsistent tooling
Existing Python projectPythonConsistent tooling
Quick scriptsPythonSimpler setup with uv run
Test suitesJavaScriptBetter @playwright/test framework

Test Framework Integration

See references/test-framework.md for:

  • Unified test runner (test_utils.py)
  • Server auto-detection and startup
  • Framework detection (Playwright, Jest, pytest, etc.)
# Detect and run tests with server
uv run ~/.claude/skills/web-automation/scripts/test_utils.py . --run --with-server

Common Pitfalls

PitfallSolution
Overlay blocking clicksCall overlay dismissal after EVERY page load
DOM inspection before JS loadsAlways wait_for_load_state('networkidle') first
Headful browser in CIAlways use headless: true
Flaky selectorsPrefer role/text selectors over CSS classes
Race conditionsUse explicit waits, not wait_for_timeout

Prerequisites

Python

Scripts include inline dependencies (PEP 723); uv run auto-installs them.

JavaScript

npm init -y
npm install -D @playwright/test
npx playwright install chromium

Running E2E Tests

JavaScript

npx playwright test                    # Run all
npx playwright test --ui               # UI mode
npx playwright test --headed           # See browser

Python

pip install pytest-playwright
pytest tests/

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.07%
按下载量换算126

Claude

34.22%
按下载量换算123

Cursor

18.45%
按下载量换算66

Gemini CLI

10.2%
按下载量换算37

安全审计

暂无安全审计结果可展示。

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

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

来源信息

继续浏览同类 Skills