← 返回 Skills 市场
13801201404-sys

问专家 - Playwriter模式

作者 13801201404-sys · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
219
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install ask-expert-playwriter
功能描述
使用 Playwriter 控制已登录的 Chrome 浏览器,通过 AI 助手获取专业建议,适合需登录账号的 AI 网站操作。
使用说明 (SKILL.md)

问专家技能 - 使用 Playwriter 控制已登录的浏览器

技能描述

使用 Playwriter 连接用户已登录的 Chrome 浏览器,通过 Gemini 等 AI 助手获取专业建议。

触发关键词

  • "问专家"
  • "问 Gemini"
  • "问 AI"
  • "使用专家模式"

完整流程

步骤 1:打开浏览器

open -a "Google Chrome"

步骤 2:移动鼠标并点击扩展图标

# 移动鼠标到扩展图标位置 (1294, 86),等待 5 秒,点击
python3 -c "
import pyautogui
import time
pyautogui.moveTo(1294, 86)
time.sleep(5)
pyautogui.click()
"

步骤 3:创建 Playwriter 会话

playwriter session new
# 输出: Session X created. Use with: playwriter -s X -e "..."

步骤 4:打开网页

# 先创建页面再导航(重要!)
playwriter -s X -e 'state.page = await context.newPage(); await state.page.goto("URL")'

步骤 5:输入问题并发送

# 输入问题
playwriter -s X -e 'await state.page.keyboard.type("问题内容")'

# 发送
playwriter -s X -e 'await state.page.keyboard.press("Enter")'

步骤 6:获取回答

# 等待一段时间后获取文本
sleep 15
playwriter -s X -e 'const text = await state.page.locator("message-content").last().textContent(); console.log(text)'

# 或截图
playwriter -s X -e 'await state.page.screenshot({ path: "path/to/screenshot.png" })'

常见问题

Q: 扩展未连接

A: 需要用户手动点击 Chrome 右上角的 Playwriter 扩展图标,确保显示连接状态

Q: page undefined 错误

A: 需要先创建页面:state.page = await context.newPage()

Q: 连接断开

A: 使用 playwriter session reset \x3Cid> 重置会话,然后重新创建

适用场景

  • 需要登录账号才能使用的 AI 网站(Gemini、ChatGPT 等)
  • 需要保持登录状态的浏览器操作
  • 需要绕过机器人检测的场景
  • 询问专业问题获取 AI 建议

技术优势

  • 使用用户已登录的浏览器,无需重新登录
  • 通过 Chrome 扩展连接,安全稳定
  • 支持会话管理,可以保持状态

安装前置条件

  1. 安装 Playwriter:npm install -g playwriter@latest
  2. Chrome 安装 Playwriter 扩展:
    • 扩展 ID: jfeammnjpkecdekppnclgkkffahnhfhe
    • 或从 Chrome 网上应用店搜索 "Playwriter" 安装
安全使用建议
This skill will run shell and Python commands that control your real Chrome window and read page contents or screenshots from sites where you're logged in. Before installing or running it: (1) only proceed if you trust the Playwriter npm package and the Chrome extension ID mentioned — inspect the extension's permissions and source; (2) avoid using it with browser profiles that contain sensitive accounts or data (use a disposable/profiled browser instance instead); (3) be cautious about following instructions that say to 'bypass robot detection' — that can violate site terms and be abusive; (4) the SKILL.md omits steps like installing pyautogui and doesn't sandbox the browser access, so run it in a controlled environment if you must test it; (5) if you want lower risk, prefer a skill that uses a server-side API or a dedicated automation profile rather than controlling your primary logged-in browser. If you need help verifying the extension or running this safely, seek advice or inspect the extension's source and the npm package before installing.
功能分析
Type: OpenClaw Skill Name: ask-expert-playwriter Version: 1.0.0 The skill uses the `pyautogui` library to perform 'blind' mouse clicks at hardcoded screen coordinates (1294, 86) in SKILL.md, which is a fragile and high-risk method for interacting with browser extensions. It requires the installation of a specific global NPM package (`playwriter`) and a Chrome extension (ID: jfeammnjpkecdekppnclgkkffahnhfhe) to grant the agent full programmatic control over the user's authenticated browser session. While the stated intent is to consult AI experts, the capability to take screenshots and extract text from any logged-in page without clear boundaries or sanitization presents a significant risk of session hijacking or data exposure.
能力评估
Purpose & Capability
The name/description (use Playwriter to control a logged-in Chrome to get AI advice) align with the instructions: opening Chrome, clicking an extension, creating a Playwriter session, navigating pages, typing questions, and reading responses. Minor oddity: the doc refers to 'Playwriter' (not Playwright) and includes an explicit Chrome extension ID; otherwise required actions are coherent with the stated purpose.
Instruction Scope
The SKILL.md instructs running shell commands and a Python snippet using pyautogui to move/click the user's UI, then driving the browser to read page text and take screenshots. This grants the agent the ability to access any content visible in the logged-in browser (messages, private data, etc.). The guidance to 'bypass robot detection' is also a red flag for potentially abusive behavior. The instructions do not limit which sites or selectors are used, increasing exfiltration risk.
Install Mechanism
There is no formal install spec in the skill (it is instruction-only), which is lower risk from code install perspective. The doc advises 'npm install -g playwriter@latest' and installing a Chrome extension by ID — these are external actions the user must perform. The skill omits mention of Python/pyautogui installation and doesn't verify package provenance; installing third-party npm packages and browser extensions can introduce risk if the sources are untrusted.
Credentials
The skill asks for no environment variables or explicit credentials, but it operates on the user's already-logged-in browser and extension connection, implicitly accessing session cookies, account data, and any site content the browser can view. That level of access is disproportionate to a simple 'ask expert' helper unless the user explicitly consents and isolates the browser profile.
Persistence & Privilege
The skill does not request always:true and does not modify system or other skills' configs. However, the platform default allows autonomous invocation; combined with the ability to control a logged-in browser and capture content, that increases potential impact if the skill is invoked autonomously. The skill itself does not demand persistent installation.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ask-expert-playwriter
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ask-expert-playwriter 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of ask-expert-playwriter. - Enables integration with Playwriter to control the user's logged-in Chrome browser for obtaining expert advice. - Supports common AI assistants like Gemini through the browser. - Includes step-by-step instructions for establishing the connection, sending queries, and retrieving answers. - Outlines troubleshooting steps for browser and session issues. - Details prerequisites for installation and operation.
元数据
Slug ask-expert-playwriter
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

问专家 - Playwriter模式 是什么?

使用 Playwriter 控制已登录的 Chrome 浏览器,通过 AI 助手获取专业建议,适合需登录账号的 AI 网站操作。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 219 次。

如何安装 问专家 - Playwriter模式?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ask-expert-playwriter」即可一键安装,无需额外配置。

问专家 - Playwriter模式 是免费的吗?

是的,问专家 - Playwriter模式 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

问专家 - Playwriter模式 支持哪些平台?

问专家 - Playwriter模式 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 问专家 - Playwriter模式?

由 13801201404-sys(@13801201404-sys)开发并维护,当前版本 v1.0.0。

💬 留言讨论