web-browser
控制 Chrome 瀏覽器進行網頁自動化
自動化網頁瀏覽器互動,用於擷取、測試和資料提取。透過 Chrome DevTools Protocol 遠端控制 Chrome,進行點擊、導航、評估 JavaScript 並以程式方式截取螢幕截圖。
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "web-browser". Navigate to example.com and extract all links
النتيجة المتوقعة:
- - Title: Example Domain
- - Links found: 1
- - URL: https://www.iana.org/help/example-domains
استخدام "web-browser". Take a screenshot of example.com
النتيجة المتوقعة:
- Screenshot saved to: /var/folders/.../screenshot-2024-01-17T10-30-00.png
استخدام "web-browser". Find all headings on the page
النتيجة المتوقعة:
- - Heading 1: Welcome
- - Heading 2: Getting Started
- - Heading 3: Documentation
التدقيق الأمني
مخاطر متوسطةThis is a legitimate browser automation skill using Chrome DevTools Protocol. The static analyzer flagged patterns common to both automation tools and malicious software. After evaluating the code context, all high-severity findings are false positives. The skill's external command usage (spawn, execSync, backticks) is for legitimate browser management: starting Chrome, killing processes, creating directories, and syncing user profiles. The 'C2 keywords' flagged in dependencies are standard npm packages (commander, proxy-agent, degenerator) required by puppeteer-core. The 'weak cryptographic algorithm' findings are checksum verification in archive libraries. The skill does have elevated privileges by design (browser control), but this is its intended function with no evidence of credential exfiltration or data theft.
عوامل الخطر
⚙️ الأوامر الخارجية (2)
🌐 الوصول إلى الشبكة (2)
📁 الوصول إلى نظام الملفات (1)
🔑 متغيرات البيئة (1)
درجة الجودة
ماذا يمكنك بناءه
測試網頁應用程式
透過以程式方式點擊元素、填寫表單和驗證頁面狀態來自動化 UI 測試。
提取網頁資料
透過導航頁面並執行 JavaScript 來提取結構化資料以擷取網站內容。
驗證頁面行為
擷取螢幕截圖並評估頁面內容以驗證視覺和功能正確性。
جرّب هذه الموجهات
Start Chrome and navigate to https://example.com. What is the page title?
Navigate to https://news.ycombinator.com and extract all article titles using eval.js.
Take a screenshot of the current page and save it to a temp file.
Use the element picker to find the submit button on the page.
أفضل الممارسات
- 僅在需要跨執行階段保留登入會話時才使用 --profile 旗標
- 在瀏覽器上下文中評估 JavaScript 程式碼前,請務必先驗證
- 自動化任務完成後請正確關閉 Chrome 以避免資源洩漏
تجنب
- 避免執行可能修改頁面行為的不受信任 JavaScript 程式碼
- 請勿使用此技能以竊取的憑證自動登入流程
- 避免在任務完成後讓 Chrome 持續在背景執行