← Back to Skills Marketplace
13801201404-sys

问专家 - Playwriter模式

by 13801201404-sys · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
219
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install ask-expert-playwriter
Description
使用 Playwriter 控制已登录的 Chrome 浏览器,通过 AI 助手获取专业建议,适合需登录账号的 AI 网站操作。
README (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" 安装
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ask-expert-playwriter
  3. After installation, invoke the skill by name or use /ask-expert-playwriter
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug ask-expert-playwriter
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is 问专家 - Playwriter模式?

使用 Playwriter 控制已登录的 Chrome 浏览器,通过 AI 助手获取专业建议,适合需登录账号的 AI 网站操作。 It is an AI Agent Skill for Claude Code / OpenClaw, with 219 downloads so far.

How do I install 问专家 - Playwriter模式?

Run "/install ask-expert-playwriter" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 问专家 - Playwriter模式 free?

Yes, 问专家 - Playwriter模式 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 问专家 - Playwriter模式 support?

问专家 - Playwriter模式 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 问专家 - Playwriter模式?

It is built and maintained by 13801201404-sys (@13801201404-sys); the current version is v1.0.0.

💬 Comments