Community程式設計與開發github.com

ashley-seymour/claude-skills

在 Chrome 中使用 Claude 瀏覽器擴充功能(工具名稱 mcp__claude-in-chrome__*)之前,請先閱讀此技能說明。它涵蓋了工具載入、分頁管理、權限、GIF 錄製、控制台日誌、避免對話方塊以及任務中止時機。不適用於內建瀏覽器。

claude-skills 是什麼?

此技能文件說明了 Claude 在 Chrome 瀏覽器擴充功能(即「Claude in Chrome」)的使用方式。它定義了如何載入並使用以 `mcp__claude-in-chrome__*` 命名的一系列工具,這些工具直接在使用者真實的 Chrome 瀏覽器中運作,使用使用者已有的登入狀態。文件中強調,在開始工作階段時,應優先透過 `tabs_context_mcp` 工具取得使用者目前開啟的分頁資訊,並在全新分頁中執行任務,避免干擾使用者既有分頁。此外,文件中詳細說明了站台權限處理流程、GIF 錄製的最佳實踐、控制台輸出讀取(支援正規表達式過濾),以及嚴格警告避免觸發 JavaScript 對話方塊(如 alert/confirm),因為這會導致擴充功能無回應。最後,文件也給出了多種應停止並詢問使用者的情境,例如工具連續失敗、頁面元素無回應或任務超出預期複雜度時,避免盲目重試。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ashley-seymour/claude-skills/tree/HEAD/.trash/1792396014666-17492-eIJhD8/chrome-browser

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Claude in Chrome

Claude in Chrome 是一個瀏覽器擴充功能。其工具名稱皆以 mcp__claude-in-chrome__* 命名,並在使用者真實的 Chrome 瀏覽器中運作,會在使用者現有分頁旁開啟新分頁,並使用使用者已有的登入狀態。Claude in Chrome 僅在使用者的 Chrome 瀏覽器正在執行且已連線擴充功能時才可使用;若工具呼叫回報擴充功能未連線或無回應,Claude 應直接告知使用者此情況,而非持續重試,並依據當前工作階段的瀏覽器使用指引,決定是否繼續使用其他瀏覽器,或先詢問使用者。

如果目前僅有 enable__mcp__claude-in-chrome 這個工具(即擴充功能尚未啟用),Claude 應先呼叫它:此工具會為本次對話啟用 Claude in Chrome,執行後 mcp__claude-in-chrome__* 系列工具便會出現。

載入工具

如果 mcp__claude-in-chrome__* 工具處於延遲載入狀態(意指需先透過 ToolSearch 載入才能使用),Claude 應在一次 ToolSearch 呼叫中載入所有預期需要的工具,因為搜尋查詢接受逗號分隔的清單,而每次額外的 ToolSearch 呼叫都會耗費一次完整的往返時間。初始階段應載入的核心工具如下:

ToolSearch with query "select:mcp__claude-in-chrome__tabs_context_mcp,mcp__claude-in-chrome__navigate,mcp__claude-in-chrome__computer,mcp__claude-in-chrome__read_page,mcp__claude-in-chrome__tabs_create_mcp,mcp__claude-in-chrome__tabs_close_mcp"

當任務明顯需要特定工具時,Claude 應將這些工具一併加入上述同一次呼叫中:例如除錯時需要 read_console_messages 和 read_network_requests、處理表單時需要 form_input、錄製操作時需要 gif_creator、編寫頁面腳本時需要 javascript_tool。只有在任務後續才發現需要使用某個工具時,才進行第二次 ToolSearch。

開始工作階段:先取得分頁資訊,再開啟新分頁

在每個瀏覽器工作階段開始時,Claude 應先呼叫 mcp__claude-in-chrome__tabs_context_mcp,以查看使用者目前開啟的分頁,了解他們可能想處理哪些內容。接著:

  1. 只有在使用者明確要求操作某個現有分頁時,Claude 才會重複使用該分頁。
  2. 否則,Claude 應使用 mcp__claude-in-chrome__tabs_create_mcp 開啟一個全新分頁,並在此分頁中工作;除非使用者希望保留這些分頁,Claude 應在任務完成前關閉它所建立的分頁。
  3. Claude 絕不重複使用來自先前或不同工作階段記住的分頁 ID。如果工具回報某個分頁不存在或無效、使用者關閉了某個分頁,或發生導航錯誤,Claude 應再次呼叫 tabs_context_mcp 以取得最新的分頁 ID。

站台權限

Claude in Chrome 僅在使用者允許後才能在特定站台上運作;根據使用者的設定,系統可能會在擴充功能或應用程式中,針對每個站台提示使用者授權。當工具呼叫正在等待權限或被拒絕時,Claude 應告知使用者並等待他們手動允許,而不是繞過權限機制。使用者拒絕的站台是他們的決定;Claude 應直接跳過。

錄製 GIF

對於可能需要使用者回顧或分享的多步驟操作,Claude 可以使用 mcp__claude-in-chrome__gif_creator 進行錄製。Claude 會在每個動作前後多擷取幾幀畫面,以確保播放流暢,並為檔案賦予有意義的名稱(例如 "login_process.gif")。

讀取控制台輸出

mcp__claude-in-chrome__read_console_messages 用於讀取頁面的控制台輸出。控制台輸出可能非常冗長,因此當 Claude 在尋找特定條目時,應傳遞 pattern 參數(一個正規表達式),例如 pattern "[MyApp]",以僅保留應用程式自身的日誌。

提示訊息與對話方塊

Claude 不會透過其操作觸發 JavaScript 的 alert、confirm、prompt 或其他瀏覽器強制對話方塊。這些對話方塊會阻塞所有後續的瀏覽器事件,導致擴充功能停止接收指令。因此:

  1. Claude 應避免點擊可能會彈出確認對話方塊的元素(例如「刪除」按鈕),除非絕對必要。
  2. 如果必須與此類元素互動,Claude 應事先警告使用者這可能會中斷工作階段。
  3. Claude 可以使用 mcp__claude-in-chrome__javascript_tool 檢查並關閉已存在的對話方塊,然後再繼續操作;除錯時也應優先使用 console.log 搭配 read_console_messages,而非 alert。

如果對話方塊確實被觸發,導致瀏覽器停止回應,Claude 應告訴使用者他們需要手動在 Chrome 中關閉該對話方塊。

專注任務,何時停止

Claude 應專注於特定任務,不應遊蕩至不相關的頁面。當發生以下任何情況時,Claude 應停止並詢問使用者如何繼續,同時解釋它嘗試了什麼以及出了什麼問題:

  • 瀏覽器工具呼叫在 2 或 3 次嘗試後失敗或回傳錯誤
  • 擴充功能無回應
  • 頁面元素對點擊或輸入無回應,或頁面無法載入或逾時
  • 任務結果涉及意外的複雜性或偏離主題
  • 多種方法嘗試後仍未完成任務

Claude 不應持續重試相同的失敗操作。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

ashley-seymour/claude-skills

Arm, run and disarm an unattended away run (a night or a few hours). A queue of items is worked one per fresh `claude -p --agent away-orchestrator` process, relaunched by a watchdog under a Windows scheduled task, in its own worktree on branch away/<date>, ending in a morning report. Use only when the operator asks to arm, check or disarm an away run, or when running as away-orchestrator. Not for interactive project waves (project-workflow) or one-off `claude -p` scripts (headless-claude).

ashley-seymour/claude-skills

Read this skill before the first step that uses the built-in browser, the browser pane inside the Claude desktop app (also called the in-app browser, the browser pane, Claude's browser, or \"your own browser\"), whose tools are named mcp__Claude_Browser__* when the session runs in the desktop app and mcp__remote-devices__Claude_Browser__* when a cloud session is linked to the person's computer; before those tools are turned on there may be a single enable__mcp__remote-devices__Claude_Browser tool instead. It covers the pane's persistent sign-ins, tabs and preview_start, reading pages as text, site approvals, what the pane cannot open, and what to do when it cannot be reached. It is not for Claude in Chrome (mcp__claude-in-chrome__* tools), which has its own skill, and it does not decide which browser to use.

ashley-seymour/claude-skills

Use this skill when the user's prompt requires (1) researching a topic across multiple sources, comparing options or alternatives, analyzing trends or history, understanding markets or industries, or reviewing literature or studies and (2) synthesizing that research into a comprehensive, narrative report. If you're planning to search the web or internal knowledge bases, consider using this skill. This skill coordinates research subagents, so use it only when you have a tool for spawning subagents (the Agent or Task tool); otherwise, research the question directly.

ashley-seymour/claude-skills

Read this skill before the first step of any request to do something in an app on the person's own computer (Notes, Finder, System Settings, any desktop app), to look at their screen, or for \"computer use\". Computer use (desktop control) lets Claude take screenshots of the person's desktop and control it with clicks, typing and scrolling through the Claude desktop app; its tools are named mcp__computer-use__* when the session runs in the desktop app and mcp__remote-devices__computer_* when a cloud session is linked to the person's computer; before computer use is turned on for a conversation there may be no such tools, only an enable__mcp__remote-devices__computer tool, which turns it on. It covers turning it on, picking the right tool, the access flow, and the safety rules for tiered apps, links and financial actions. It is not for websites, which go through Claude in Chrome or the built-in browser and their own skills.

相關技能