スキル enact/playwright
📦

enact/playwright

低リスク 📁 ファイルシステムへのアクセス🌐 ネットワークアクセス

擷取螢幕截圖並擷取網頁內容

瀏覽器自動化對於測試、資料擷取和視覺驗證至關重要。此技能提供了一種可靠的方式,可使用 Playwright 從任何網頁擷取螢幕截圖以及擷取文字或 HTML 內容。

対応: Claude Codex Code(CC)
⚠️ 63 貧弱
1

スキルZIPをダウンロード

2

Claudeでアップロード

設定 → 機能 → スキル → スキルをアップロードへ移動

3

オンにして利用開始

テストする

「enact/playwright」を使用しています。 Take a screenshot of https://example.com

期待される結果:

  • Starting Playwright...
  • URL: https://example.com
  • Action: screenshot
  • Selector: body
  • Using browser at: /ms-playwright/chromium-XXXX/chrome-linux/chrome
  • Navigating to https://example.com...
  • Page loaded successfully
  • SCREENSHOT_START
  • [base64-encoded-image-data]
  • SCREENSHOT_END

「enact/playwright」を使用しています。 Get the text from the heading on https://example.com

期待される結果:

  • Example Domain

「enact/playwright」を使用しています。 Extract the HTML from the main content on https://example.com

期待される結果:

  • <div>
  • <h1>Example Domain</h1>
  • <p>This domain is for use in illustrative examples...</p>
  • </div>

セキュリティ監査

低リスク
v1 • 1/23/2026

Static scanner flagged 16 potential issues, but all findings are false positives. The code uses safe JavaScript template literals for logging (not shell backticks), empty string fields (not weak crypto), and standard fs operations for legitimate browser path detection. The skill is a standard Playwright browser automation tool with no malicious patterns.

3
スキャンされたファイル
160
解析された行数
4
検出結果
1
総監査数
中リスクの問題 (2)
Filesystem Access for Browser Detection
Code accesses /ms-playwright directory to locate Chromium executable. Legitimate use for browser automation.
Hardcoded URLs in Documentation
Documentation uses example.com URLs for usage examples. Standard practice, no external network calls made.

リスク要因

📁 ファイルシステムへのアクセス (2)
🌐 ネットワークアクセス (3)

検出されたパターン

Template Literal MisidentificationEmpty String Field Misidentified as Weak Crypto
監査者: claude

品質スコア

38
アーキテクチャ
100
保守性
85
コンテンツ
21
コミュニティ
80
セキュリティ
65
仕様準拠

作れるもの

視覺回歸測試

擷取網頁螢幕截圖,與基線影像進行比較以進行視覺回歸測試。

擷取內容进行分析

從網頁擷取文字或 HTML 內容,以進行後續處理或分析。

文件和報告

擷取網頁螢幕截圖,用於文件、報告或簡報。

これらのプロンプトを試す

簡單螢幕截圖
Take a screenshot of https://example.com
從元素擷取文字
Get the text content from the main heading on https://example.com using the selector 'h1'
擷取 HTML 內容
Extract the HTML content of the article section from https://example.com/blog/article
完整頁面螢幕截圖搭配選擇器
Take a screenshot of the product gallery on https://example.com/shop/product using selector '.product-gallery'

ベストプラクティス

  • 使用特定的 CSS 選擇器來定位要擷取的精確元素
  • 將螢幕截圖處理為 base64 編碼字串以便傳輸
  • 為載入緩慢的頁面設定適當的超時值
  • 使用 try-finally 區塊正確關閉瀏覽器,以防止資源洩漏

回避

  • 不要使用此技能來擷取禁止自動化存取的網站
  • 避免擷取包含敏感或個人資訊的頁面螢幕截圖
  • 不要依賴此功能進行需要使用者模擬的互動式網頁測試
  • 避免在沒有適當憑證的情況下從需要驗證的頁面擷取內容

よくある質問

支援哪些瀏覽器?
此技能透過 Playwright 使用 Chromium。目前不支援 Firefox 和 WebKit。
我可以與頁面互動(點擊、輸入)嗎?
不行,此技能僅支援導航、螢幕截圖擷取和內容擷取。請使用其他工具進行互動式瀏覽器自動化。
螢幕截圖如何傳遞?
螢幕截圖以 base64 編碼字串形式輸出,並包裝在 SCREENSHOT_START 和 SCREENSHOT_END 標記之間。
什麼是預設選擇器?
預設的 CSS 選擇器是 'body',可擷取整個頁面內容。
我可以從動態頁面擷取內容嗎?
此技能會等待 DOM 內容載入,但不會等待 JavaScript 執行或網路閒置。若要擷取靜態內容,請使用文字動作。
此技能安全嗎?
可以,此技能以無頭模式執行,無需使用者互動。它僅導航至您指定的 URL 並在本地擷取內容。

開発者の詳細

作成者

EnactProtocol

ライセンス

MIT

参照

main

ファイル構成

📄 package.json

📄 run.js

📄 SKILL.md