Agent Skillsrcarmo/piclaw › playwright

playwright

GitHub

指导在项目中安装和配置 Playwright,用于浏览器自动化及网页抓取。涵盖环境初始化、依赖安装、脚本编写与运行示例,以及调试技巧和缓存配置建议。

skel/.pi/skills/playwright/SKILL.md rcarmo/piclaw

Trigger Scenarios

需要进行网页数据抓取 需要自动化浏览器操作或测试 询问如何安装和使用 Playwright

Install

npx skills add rcarmo/piclaw --skill playwright -g -y
More Options

Non-standard path

npx skills add https://github.com/rcarmo/piclaw/tree/main/skel/.pi/skills/playwright -g -y

Use without installing

npx skills use rcarmo/piclaw@playwright

指定 Agent (Claude Code)

npx skills add rcarmo/piclaw --skill playwright -a claude-code -g -y

安装 repo 全部 skill

npx skills add rcarmo/piclaw --all -g -y

预览 repo 内 skill

npx skills add rcarmo/piclaw --list

SKILL.md

Frontmatter
{
    "name": "playwright",
    "description": "Use Playwright for browser automation in this workspace. Install locally and run scripts as needed.",
    "distribution": "public"
}

Playwright

Use Playwright for browser automation and web scraping.

Steps

  1. Ensure the project has a package.json (create if missing):

    bun init -y
    
  2. If the project already has dependencies, install them:

    bun install
    
  3. Install Playwright locally (per-project):

    bun add -d playwright
    
  4. Install the browsers and OS deps (recommended in this container):

    bunx playwright install --with-deps
    # or just chromium if you want lighter installs
    bunx playwright install chromium --with-deps
    
  5. Create a script (example):

    import { chromium } from "playwright";
    
    const browser = await chromium.launch({ headless: true });
    const page = await browser.newPage();
    await page.goto("https://example.com", { waitUntil: "domcontentloaded" });
    const title = await page.title();
    console.log(title);
    await browser.close();
    
  6. Run the script with Bun:

    bun run scripts/playwright/example.ts
    

Tips

  • For debugging, run with headless: false and add slowMo: 50.
  • If Playwright complains about missing dependencies, re-run:
    bunx playwright install --with-deps
    
  • To keep browser binaries in the workspace, set:
    export PLAYWRIGHT_BROWSERS_PATH=/workspace/.cache/ms-playwright
    

Version History

  • 5fa0ce5 Current 2026-07-25 10:25

Same Skill Collection

runtime/skills/builtin/reload/SKILL.md
runtime/skills/builtin/remote-peer/SKILL.md
runtime/skills/builtin/schedule/SKILL.md
runtime/skills/builtin/script-discovery-annotation/SKILL.md
runtime/skills/builtin/send-message/SKILL.md
runtime/skills/integrations/playwright/SKILL.md
runtime/skills/operator/graphite-power-chart/SKILL.md
runtime/skills/operator/token-chart/SKILL.md
skel/.pi/skills/adaptive-cards-authoring/SKILL.md
skel/.pi/skills/bootstrap-container/SKILL.md
skel/.pi/skills/debug/SKILL.md
skel/.pi/skills/export-timeline-pdf/SKILL.md
skel/.pi/skills/extension-design/SKILL.md
skel/.pi/skills/extension-troubleshoot/SKILL.md
skel/.pi/skills/feature-refinement-flow/SKILL.md
skel/.pi/skills/feed-digest/SKILL.md
skel/.pi/skills/graph-design/SKILL.md
skel/.pi/skills/graphite-power-chart/SKILL.md
skel/.pi/skills/kanban-management/SKILL.md
skel/.pi/skills/mcp-adapter/SKILL.md
skel/.pi/skills/reload/SKILL.md
skel/.pi/skills/remote-peer/SKILL.md
skel/.pi/skills/schedule/SKILL.md
skel/.pi/skills/script-discovery-annotation/SKILL.md
skel/.pi/skills/send-message/SKILL.md
skel/.pi/skills/setup/SKILL.md
skel/.pi/skills/situate-daily-notes/SKILL.md
skel/.pi/skills/technical-docs/SKILL.md
skel/.pi/skills/timeline-cleanup/SKILL.md
skel/.pi/skills/token-chart/SKILL.md
skel/.pi/skills/twitter-summary/SKILL.md
skel/.pi/skills/web-search-summary/SKILL.md
skel/.pi/skills/web-search/SKILL.md

Metadata

Files
0
Version
ae927fb
Hash
e5c23c6a
Indexed
2026-07-25 10:25

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 10:41
浙ICP备14020137号-1 $Гость$