agentCLAWHUBUnverified

zhanfu-playwright

站斧 WebDriver 版 Playwright 自动化(Windows≥5.2.12、macOS 版本高于 5.2.10、强制有界面、通讯失败即停)。 获取 WebDriver 端口前仅 HTTP 调用 WebDriverModule;获取端口后 CDP 执行业务。 「战斧」同义「站斧」(如打开战斧=打开站斧)。 适用于站斧、战斧、ZhanFu、WebDriver、Playwright、店铺自动化、小龙虾 OpenClaw RPA。 Skill: zhanfu-playwright Owner: zhangzhang1997 Summary: 站斧 WebDriver 版 Playwright 自动化(Windows≥5.2.12、macOS 版本高于 5.2.10、强制有界面、通讯失败即停)。 获取 WebDriver 端口前仅 HTTP 调用 WebDriverModule;获取端口后 CDP 执行业务。 「战斧」同义「站斧」(如打开战斧=打开站斧)。 适用于站斧、战斧、ZhanFu、WebDriver、Playwright、店铺自动化、小龙虾 OpenClaw RPA。 Tags: latest:1.0.6 Version history: v1.0.6 | 2026-09-03T02:22:31.903Z | auto - Added standalone scripts: separate scripts now handle opening/cl

OpenClaw

Rank

62

Safety

84

Downloads

1.2k

Updated

Oct 11, 2026

Version

1.0.6

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 11, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 11, 2026
Adoption signal
1.2K downloadsadoption · observed Oct 11, 2026
Latest release
1.0.6release · observed Sep 3, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: medium.

clawhub skill install s176sck1nyj1s5qj639t2jhsc98ae35d:zhanfu-playwright
  1. Python environment detected. Create a strict virtual environment (`python -m venv .venv`) before installing dependencies to prevent system-level package conflicts.
  2. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  3. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-zhangzhang1997-zhanfu-playwright/snapshot"

Documentation

CLAWHUB

145,622 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: zhanfu-playwright
description: >-
  站斧 WebDriver 版 Playwright 自动化(Windows≥5.2.12、macOS 版本高于 5.2.10、强制有界面、通讯失败即停)。
  获取 WebDriver 端口前仅 HTTP 调用 WebDriverModule;获取端口后 CDP 执行业务。
  「战斧」同义「站斧」(如打开战斧=打开站斧)。
  适用于站斧、战斧、ZhanFu、WebDriver、Playwright、店铺自动化、小龙虾 OpenClaw RPA。
---

# 站斧 Playwright 自动化

通过站斧 WebDriver 版 **HTTP API** 控制客户端与店铺;**拿到 WebDriverPort 之后**才用 Playwright `connect_over_cdp` 做页面自动化。

**Agent 提示**:技能**首次安装**、客户问「怎么用 / 如何使用」时,**先向客户发送下方「客户使用指南」**(可摘要,不必全文照搬)。

**前置(Agent)**:站斧版本要求 **Windows ≥ 5.2.12**,**macOS > 5.2.10**;环境已安装 `playwright`、`requests`。

> **macOS 限制**:`SetDownLoadPath`、`ClearCacheFolder`、`ClearCache`、`SetInstallPlugins` **目前不支持**。客户在 Mac 上提出这些需求时,应直接说明暂不支持并停止,勿调用对应 HTTP 接口。
>
> **macOS 内核限制**:macOS **不支持 130 及以下内核**的店铺自动化。打开店铺后 `GetBrowserWebDriver` 返回的 `KernalNumber` **≤ 130** 时,**立即停止**阶段 B,按「macOS 低内核对客户话术」提示客户切换到 **130 以上**内核(或由主账号切换),并请客户**手动重启站斧**后再继续。

---

## 客户使用指南(安装技能时向客户说明)

以下内容可直接复制或摘要发给客户。

### 一、使用前准备

1. **站斧版本**:请确认站斧版本要求(**Windows ≥ 5.2.12**,**macOS > 5.2.10**)。
2. **首次打开店铺会下载浏览器内核**,耗时较长,建议您先在站斧客户端里**手动打开一次**目标店铺,等内核下载完成后再用自动化。
3. **不同店铺可能使用不同内核**。若自动化打开失败或提示内核相关错误,请先在站斧里**手动打开一次该店铺**(或与您要用的店铺**同内核**的店铺),内核就绪后再发指令。
4. 店铺须已**绑定 IP / 设备**;未绑定时打开会失败,请在站斧客户端检查店铺设备绑定。
5. **macOS 暂不支持**:设置下载目录、清除缓存(单店/全部)、设置店铺插件(`SetDownLoadPath` / `ClearCache` / `ClearCacheFolder` / `SetInstallPlugins`)。请在 Windows 上使用这些能力。
6. **macOS 内核**:自动化仅支持店铺内核 **> 130**。若提示当前内核 ≤ 130,请在站斧中将该店铺切换到 **130 以上**内核(无权限时请**主账号**切换),然后**手动重启站斧**,再发指令继续。

### 二、最常用的说法(推荐)


| 您想做什么         | 直接发送(示例)                                   |
| ------------- | ------------------------------------------ |
| 启动站斧并打开店铺     | **打开站斧打开 ztest126**(把 `ztest126` 换成您的店铺名)  |
| 仅打开店铺(站斧已在运行) | **打开店铺 ztest126**                          |
| 关闭某个店铺        | **关闭 ztest126 店铺** / **关闭店铺 ztest126**     |
| 退出站斧客户端       | **关闭站斧**                                   |
| **创建新店铺**     | **创建店铺**,并按提示提供下方参数(见「七、创建店铺」)             |
| **修改店铺账号密码**  | **修改店铺账号密码**,提供店铺名与新账号/密码(见「十二、修改店铺账号密码」) |
| **查看我的店铺列表**  | **获取店铺列表** / **列出店铺**(见「八、查看店铺列表」)         |
| **设置浏览器下载目录** | **设置下载目录到 D:\downloads**(见「十、下载与缓存」)       |
| **清除店铺/全部缓存** | **清除 xxx 店铺缓存** / **清除全部缓存**(见「十、下载与缓存」)   |
| **设置店铺默认插件**  | **设置店铺插件**,提供插件名称;插件 ID 可省略或留空(见「十一、店铺插件」) |
| **清空店铺插件列表**  | **清除默认插件列表** / **清空店铺插件**(见「十一、店铺插件」)      |


> 说法可略有不同,只要包含「打开站斧」「打开店铺」和**店铺名称**即可;站斧已在运行时,一般**不会**重启站斧,直接开/关店铺。
>
> **同义说法**:客户发「**打开战斧**」「关闭战斧」「重启战斧」等时,**等同于**「打开站斧 / 关闭站斧 / 重启站斧」——「战斧」一律按「站斧」理解,**不要**当成未知产品或要求客户改口。

### 三、首次未登录时

若提示「站斧未登录,请提供账号和密码」,请提供您的**站斧老板账号**和密码(自动化仅使用您当场提供的账号,不会使用内测账号)。

### 四、店铺已经打开时

若您要的店铺**已经在运行**,系统会先问:**是否需要关闭该店铺?** 按您的选择回复即可;不需要关闭则可直接继续后续操作。

### 五、页面自动化(进阶)

店铺打开后,可继续用自然语言描述要在**店铺浏览器里**做的事,例如:

- 「在 B 站搜索并播放某某视频」
- 「打开某网址并填写表单」
- 「抓取当前页面某某信息」

此类操作会先等设备安全检测通过(约 15 秒),再自动操作页面。

### 七、创建店铺

发送 **「创建店铺」** 或 **「打开站斧并创建店铺 xxx」**,按提示提供信息即可(须已登录站斧)。

**必填信息**


| 您需提供                    | 说明          

_meta.json

{
  "ownerId": "kn79xm4hxd563stv6msvy8bvn98ae9jy",
  "slug": "zhanfu-playwright",
  "version": "1.0.6",
  "publishedAt": 1788402151903
}

scripts/requirements.txt

playwright>=1.40.0
requests>=2.28.0

reference.md

# 站斧 WebDriver API 参考

> 模块固定为 `WebDriverModule`,通过 HTTP 服务调用。本文与官方《站斧 WebDriver 接口文档》对齐。

HTTP 入口:`POST http://127.0.0.1:{api_port}`,Body 为 JSON。

**默认 API 端口**:`12678`(优先)。Skill 目录 [`api_port.json`](api_port.json) 记录上次成功端口与安装目录;任务开始先探测该端口(用 `GetBrowserList`,**禁止**用 `LoadSuccess` 判断)。无响应或被非站斧占用 → 空闲端口冷启动并写回;**禁止**盲扫 8081/8082 碰已运行站斧;**禁止**因 12678 被占用而要求客户先释放。

> **识别非站斧占用**:POST `GetBrowserList` 后若响应不是 `WebDriverModule` 结构(如「Electron 本地打包控制台」),视为其他服务占用 → 换空闲端口冷启动,**勿**停止占用方。

**店铺 ID 缓存**:Skill 目录 [`mall_cache.json`](mall_cache.json) 记录 `mall_name` → `mall_id` 映射。需要 `mall_id` 时**先读缓存**,未命中再 `GetMallByName` 并写回;`GetBrowserList` 返回的 `mall_list` 亦应批量写入缓存。

**打开意图配置**:Skill 目录 [`opening_malls.json`](opening_malls.json) 记录客户已下达「打开」指令的店铺名。关店 / 关站斧时清理。OpenBrowser 前用 `GetBrowserWebDriver` **只请求 1 次、超时 5s**;超时仍执行 `OpenBrowser`。

**请求方式**:阶段 A **优先 Python `requests`(`timeout=1.5`)**;**禁止**为同一探测在 PowerShell/curl/Python 间换工具试错;**禁止** Windows `curl` 手工转义 JSON。

## 通用约定

### 请求结构

| 字段 | 说明 |
|------|------|
| `action` | 接口动作名 |
| `module` | 固定为 `WebDriverModule` |
| `args` | JSON 字符串,承载业务参数 |
| `browserId` | 部分接口需要的店铺 ID(与 `mall_id` 相同);**必须为 JSON 字符串**(如 `"3514488"`),**禁止**传数字 |

### 响应结构

| 字段 | 说明 |
|------|------|
| `ret` | HTTP 分发状态码:`200` 表示请求已正常分发处理;`400` / `500` 表示异常请求或框架级错误 |
| `returnObj` | 业务返回值;结构因接口而异 |
| `action` | 回显请求动作 |
| `module` | 回显请求模块 |

框架级错误示例(`ret=500`):

```json
{
  "ret": 500,
  "error": "未找到方法",
  "action": "XXX",
  "module": "WebDriverModule"
}
```

### 业务成功判断

| 返回类型 | 判断方式 |
|----------|----------|
| `{ success, msg, ... }` | 以 `returnObj.success` 为准(如 `Login`、`GetMallByName`、`UpdateAccount`、`GetBrowserWebDriver`) |
| `true` / `false` | 如 `OpenBrowser`:成功 `returnObj === true`,失败 `returnObj === false` |
| `null` | 如 `CloseBrowser`、`ExitClient` 成功时 `returnObj` 为 `null`;`CloseBrowser` 失败时 `returnObj === false` |

### 典型调用流程

```
Login → SetInstallPlugins(可选,仅 Windows)→ GetBrowserList / GetMallByName → CreateBrowser(可选)
→ SetDownLoadPath(可选,仅 Windows)→ GetWebDriver(Selenium 可选,Playwright 跳过)
→ OpenBrowser → GetBrowserWebDriver → 自动化操作
→ CloseBrowser → ExitClient(结束)
```

> **macOS 暂不支持**:`SetDownLoadPath`、`ClearCacheFolder`、`ClearCache`、`SetInstallPlugins`。Agent 不得在 Mac 上调用这些 action。
>
> **macOS 内核**:`KernalNumber ≤ 130` 的店铺**不支持**自动化;须提示切换到 130 以上内核(或主账号切换)并让客户**手动重启站斧**。

## 启动站斧

**Windows**(**四项缺一不可,禁止减少/省略任一参数**):

```
站斧.exe --multip --run_type=web_driver --ipc_type=http --httpport={api_port}
```

| 参数 | 可否省略 |
|------|----------|
| `--multip` | **否** |
| `--run_type=web_driver` | **否** |
| `--ipc_type=http` | **否** |
| `--httpport={api_port}` | **否**(值可变,键不可少) |

**macOS**(**四项缺一不可,禁止减少/省略任一参数**,与 Windows 相同;用 `open -a` 启动):

```
open -a /Applications/站斧.app --args --multip --run_type=web_driver --ipc_type=http --httpport={api_port}
```

也可:`open -a 站斧 --args --multip --run_type=web_driver --ipc_type=http --httpport={api_port}`

| 参数 

skill-card.md

## Description:

Automates the ZhanFu WebDriver client and store browsers with local HTTP calls before connecting Playwright over CDP for user-directed browser tasks.

This skill is ready for commercial/non-commercial use.

## Publisher:

[zhangzhang1997](https://clawhub.ai/user/zhangzhang1997)

### License/Terms of Use:

MIT-0

## Use Case:

External users, developers, and store operators use this skill to open, close, create, list, and configure ZhanFu stores, then perform guided Playwright automation in the store browser after a WebDriver port is available.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill handles high-value ZhanFu account credentials and store-management actions.

Mitigation: Use it only on trusted local machines, avoid entering owner or store passwords on shared or monitored systems, and provide credentials only when needed for the requested workflow.

Risk: Local automation can contact the wrong local service or an untrusted ZhanFu workflow if the environment is not verified.

Mitigation: Verify the real ZhanFu client is listening before login or store operations and stop when local communication cannot be confirmed.

Risk: Cache clearing, account changes, plugin changes, and client termination can alter store state or interrupt active work.

Mitigation: Require explicit user confirmation before running cache clearing, account update, plugin update, or client exit actions.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/zhangzhang1997/skills/zhanfu-playwright)
- [ZhanFu WebDriver API reference](artifact/reference.md)

## Skill Output:

**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, Guidance]

**Output Format:** [Markdown guidance with Python and shell command examples, plus JSON HTTP request examples.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Outputs may operate a local ZhanFu client, store accounts, browser sessions, plugins, download paths, and cache settings.]

## Skill Version(s):

1.0.6 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
Github ReposUpdated 1d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/zhangzhang1997/skills/zhanfu-playwright",
      "sourceUrl": "https://clawhub.ai/zhangzhang1997/skills/zhanfu-playwright",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T03:58:35.897Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-zhangzhang1997-zhanfu-playwright/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-zhangzhang1997-zhanfu-playwright/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-11T03:58:35.897Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.2K downloads",
      "href": "https://clawhub.ai/zhangzhang1997/zhanfu-playwright",
      "sourceUrl": "https://clawhub.ai/zhangzhang1997/zhanfu-playwright",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T03:58:35.897Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.0.6",
      "href": "https://clawhub.ai/zhangzhang1997/zhanfu-playwright",
      "sourceUrl": "https://clawhub.ai/zhangzhang1997/zhanfu-playwright",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-09-03T02:22:31.903Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-zhangzhang1997-zhanfu-playwright/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-zhangzhang1997-zhanfu-playwright/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.0.6",
      "description": "- Added standalone scripts: separate scripts now handle opening/closing站斧、打开/关闭店铺、登录、列出店铺等基础操作。 - 「战斧」已视为「站斧」同义,更新使用说明及识别,实现客户“战斧”说法与“站斧”功能完全等价。 - 技能硬规矩更新:明确限定获取端口前仅可运行内置 scripts/目录下脚本,禁止编写自定义一次性脚本,脚本列表显式列出。 - 删除自动化临时/数据 Cache 文件与 skill-card,清理老旧内容。 - 使用手册及说明文档细化,同步参考新脚本结构和同义词说明。",
      "href": "https://clawhub.ai/zhangzhang1997/zhanfu-playwright",
      "sourceUrl": "https://clawhub.ai/zhangzhang1997/zhanfu-playwright",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-09-03T02:22:31.903Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 11, 2026.

Sponsored

Ads related to zhanfu-playwright and adjacent AI workflows.