web-access
Installation
Summary
Unified web access skill for search, scraping, login-required operations, and real-time browser interaction.
- Supports three access methods: WebSearch for discovery, WebFetch/curl for static content, and CDP browser automation for login-protected or dynamically-rendered platforms (Xiaohongshu, WeChat, Twitter, etc.)
- Operates through user's existing Chrome/Edge browser via CDP Proxy, preserving login state without separate browser instance; all operations run in background tabs
- Includes 10+ core commands:
/evalfor DOM queries and JavaScript execution,/clickfor UI interaction,/screenshotfor visual capture,/scrollfor lazy-load triggering,/navigatefor page transitions, and file upload support - Emphasizes human-like browsing logic: clarify success criteria first, choose the most direct path, validate results against goals, and adjust strategy based on evidence rather than repeating failed approaches
- Supports parallel sub-agent execution for independent research targets, with shared browser instance and automatic tab cleanup
SKILL.md
web-access Skill
前置检查
在开始联网操作前,先检查 CDP 模式可用性;已有连接优先复用:
node "${CLAUDE_SKILL_DIR}/scripts/check-deps.mjs"
Node.js 22+ 必需(使用原生 WebSocket)。
脚本先读取 /health:已有服务且 connected === true 时,校验浏览器偏好后直接使用,不重新探测浏览器、不启动第二个 Proxy;已有服务但连接断开时,由原服务重新连接。只有没有可用服务时,才发现浏览器并启动后台 Proxy。
按脚本输出处理:
exit 0→ 直接调用 Proxy API,不再手动启动或重启 Proxyexit 2→ 尚未设置浏览器、也没有可复用的共享服务,进入首次配置(见下)exit 1→ 按 stdout 错误信息处理。若提示包含「Agent 处理顺序」,按其步骤执行(如先用系统命令打开浏览器后重跑),自动可解则不打扰用户;仍失败再向用户求助。「配置错误」只需改正配置,不要为此停止或重启共享服务