Skip to content

Commit 133618d

Browse files
committed
chore: create custom playwright-reminder skill and clean agents guide
做成skill
1 parent 37aafb1 commit 133618d

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: playwright-reminder
3+
description: Automatically triggers when browser debugging, web page viewing, or visual verification is requested on macOS, reminding the agent to strictly use playwright-cli instead of the built-in browser subagent.
4+
---
5+
6+
# Playwright macOS 调试优先级指南 (playwright-reminder)
7+
8+
当收到需要运行任何与浏览器相关、查看网页链接、确认视觉效果、或者测试页面交互的指令时,请遵循以下硬性约束:
9+
10+
## 🚨 环境兼容性冲突说明
11+
12+
- **内置浏览器工具 (`browser_subagent` / `read_browser_page`)**:底层基于 Headless Chrome,其 local 运行模式**仅支持 Linux 系统**。在当前用户的 macOS 环境下调用会直接报错 `local chrome mode is only supported on Linux` 导致任务失败。
13+
- **Playwright 技能 (`playwright-cli`)**:通过本地脚本驱动系统里安装的浏览器,在 macOS 系统中可以 **100% 正常运行**
14+
15+
## 🛠️ 行动准则
16+
17+
1. **禁止调用内置工具**:严禁在 macOS 环境中使用 `browser_subagent``read_browser_page` 或其他常规网络抓取浏览器工具。
18+
2. **强制优先使用 `playwright-cli`**:必须通过调用 `playwright-cli` 技能(运行本地 Playwright 代码)或直接在终端使用相关的 `playwright-cli` 命令完成任何网页分析、调试、截图及交互。

AGENTS.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,3 @@ nub run lint
160160
### 🔧 运行环境与定义
161161

162162
- **版本注入**:前端可通过 `process.env.APP_VERSION` 获取版本号,该变量是通过 Rsbuild 的 `source.define``package.json` 中的 `version` 自动注入的。
163-
164-
### 🖥️ 浏览器调试规范
165-
166-
- **优先选用 Playwright**:当需要运行浏览器调试、进行视觉样式验证或交互操作时,**必须优先选择使用 `playwright-cli` 技能**进行自动化浏览器测试,避免因系统环境不兼容导致初始化失败。

0 commit comments

Comments
 (0)