skill-constraints
SolidEnforce browser automation safety constraints — tool usage order, anti-detection rules, screenshot discipline, and human-in-the-loop checks. Use when setting up or verifying browser/MCP tool operations, NOT for every skill execution.
AI & Automation 52 stars
6 forks Updated today MIT
Install
Quality Score: 84/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# 浏览器操作约束
Working directory: any (MCP tools are session-relative; file paths are relative to project root)
所有浏览器自动化操作 MUST 遵循此约束规��,确保安全、高效、可追溯。
## When to Use
- 执行任何浏览器自动化操作时
- 使用 MCP 工具(`page.extract_text`, `page.get_html`, `page.screenshot` 等)时
- 进行任何运营操作(发布笔记、点赞、评论等)时
## Core Pattern
### 浏览器操作
```markdown
0. 启动浏览器时默认要求可见界面并走 CDP
- 优先:`chrome.launch_cdp { port: 9222, user_data_dir: '~/.chrome-cdp-profile' }`
- 随后:`browser.connect_cdp { cdp_url: 'http://127.0.0.1:9222' }`
- 仅在无图形环境或后台 smoke test 时才允许 headless 模式
- 当同一 `userDataDir` 被其他进程占用时,优先复用已启动浏览器,不共享被锁目录
- 若目标是“多个 agent 共享同一登录态”,统一连接同一个 CDP endpoint
1. 优先使用文本/DOM证据做决策
- 先读 `page.extract_text`,必要时补充 `page.get_html`
- 比整页截图更高效,可快速定位按钮文案和页面状态
- 不使用 `chrome-devtools` 工具链执行业务流程,统一走 `mcp-browser-use` 的 browser-use 工具链(`chrome.*` / `browser.*` / `page.*`)
2. 只有视觉信息不足时才截图,并保存到 temp/ 目录
- 条件:文本/HTML 证据不足以判断状态
- 使用:`page.screenshot`
- 路径:`aios/temp/{操作类型}_{时间戳}.png`
- 示例:`login_20240301_120000.png`
- 若 `aios/temp/` 不存在则先创建:`mkdir -p aios/temp`
```
### 操作间隔
**Every browser action (click, type, navigate) MUST be followed by a random wait. No exceptions.**
Use `page.wait` with a random duration, or if running in a shell context:
```bash
sleep $((RANDOM % 26 + 5))
```
In MCP context, use `page.wait({ duration: <random 5-30s> })` or equivalent.
This is not optional — skipping intervals risks detection and account bans. If you batch operations without waiting, the entire task is...
Details
- Author
- rexleimo
- Repository
- rexleimo/aios
- Created
- 6 months ago
- Last Updated
- today
- Language
- JavaScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Listed
live-debugger
埋点数据驱动的前端 bug 排查技能:快速定位数据流转关键节点 → console.log 埋点(埋点明细对用户透明、可人工确认位置)→ 浏览器复现(默认人工复现,AI 自动复现按需启用)→ 读 console 数据 → 收���闭环。核心哲学:埋点数据是主要信息来源,代码分析只服务于选埋点位置;复现是每轮必做的验证动作,人工复现是默认方式(最快最稳),AI 自动复现是可选加速。当用户描述前端 bug、要求定位/调试/排查/修复问题时使用。
1 Updated 4 days ago
fongzhizhi AI & Automation Featured
browser-automation
AI browser automation - navigate, interact, extract, verify via browser-use MCP
531 Updated 1 months ago
vibeeval