Community编程与开发github.com

ashley-seymour/claude-skills

在使用Chrome浏览器扩展(工具名称前缀为 mcp__claude-in-chrome__*)之前必须先读取此技能。它涵盖如何一次性加载工具、查看现有标签页、在新标签页中工作、站点权限、GIF录制、控制台日志、需要避免的弹窗,以及何时停止并询问用户。此技能不适用于内置浏览器(工具名称前缀为 mcp__Claude_Browser__*),也不决定使用哪个浏览器。

claude-skills 是什么?

此技能是专门为使用Claude in Chrome浏览器扩展的AI代理设计的。Claude in Chrome是一个浏览器扩展,其工具(例如 mcp__claude-in-chrome__navigate、mcp__claude-in-chrome__tabs_context_mcp 等)可以在用户真实的Chrome浏览器中操作,使用用户已有的登录状态。该技能详细说明了如何通过一次ToolSearch调用加载所有必要的工具(因为每次额外的ToolSearch调用都会产生完整的往返开销),以及如何开始一个浏览器会话:首先通过 tabs_context_mcp 查看用户当前的标签页,然后打开一个新标签页进行工作,除非用户明确要求操作现有标签页。它还涵盖了站点权限处理(必须等待用户同意)、GIF录制(前后多捕获几帧以实现平滑播放)、控制台日志读取(支持正则表达式过滤)、避免JavaScript弹窗(如 alert/confirm,因为弹窗会阻止扩展接收命令)等重要注意事项。此外,技能明确规定了何时应该停止并询问用户:例如工具调用连续失败2-3次、扩展无响应、页面元素不响应等情况下,不要一直重复相同的失败操作。此技能适用于Claude Code、Cursor等支持MCP协议的AI代理平台,确保代理能正确、高效地使用Chrome浏览器扩展。

兼容平台✓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 会如实说明而不是重试,并根据当前会话的浏览器指导决定是继续使用另一个浏览器还是先询问用户。

如果唯一存在的 Claude in Chrome 工具是 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 打开一个新标签页并在此工作,并在完成前关闭它创建的标签页(除非用户希望保留它们)。
  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.

相关技能