微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

Camofox Browser

Camofox Browser · v1.0.0
这个包缺安装入口,装上也不会生效 缺 SKILL.md 或 frontmatter 不完整(NO_FRONTMATTER)。我们仍保留下载,方便你自行查看内容。
安全 unknown 级 作者 sheffk78 公开目录收录
963 下载 0 安装 4.2k 收藏 2 浏览

简介

Camofox Browser

原始描述

Headless browser server enabling AI agents to create tabs, navigate, interact, and capture snapshots with element references locally or in the cloud.

通过你的 Agent 添加

安装目录:camofox-browser/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/camofox-browser/
Codex CLI~/.codex/skills/camofox-browser/
DeepSeek Harness~/.agents/skills/camofox-browser/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文

camofox-browser Agent Guide

Headless browser automation server for AI agents. Run locally or deploy to any cloud provider.

Quick Start for Agents

# Install and start
npm install && npm start
# Server runs on http://localhost:9377

Core Workflow

  1. Create a tab → Get tabId
  2. Navigate → Go to URL or use search macro
  3. Get snapshot → Receive page content with element refs (e1, e2, etc.)
  4. Interact → Click/type using refs
  5. Repeat steps 3-4 as needed

API Reference

Create Tab

POST /tabs
{"userId": "agent1", "sessionKey": "task1", "url": "https://example.com"}

Returns: {"tabId": "abc123", "url": "...", "title": "..."}

Navigate

POST /tabs/:tabId/navigate
{"userId": "agent1", "url": "https://google.com"}
# Or use macro:
{"userId": "agent1", "macro": "@google_search", "query": "weather today"}

Get Snapshot

GET /tabs/:tabId/snapshot?userId=agent1

Returns accessibility tree with refs:

[heading] Example Domain
[paragraph] This domain is for use in examples.
[link e1] More information...

Click Element

POST /tabs/:tabId/click
{"userId": "agent1", "ref": "e1"}
# Or CSS selector:
{"userId": "agent1", "selector": "button.submit"}

Type Text

POST /tabs/:tabId/type
{"userId": "agent1", "ref": "e2", "text": "hello world"}
# Add enter: {"userId": "agent1", "ref": "e2", "text": "search query", "pressEnter": true}

Scroll

POST /tabs/:tabId/scroll
{"userId": "agent1", "direction": "down", "amount": 500}

Navigation

POST /tabs/:tabId/back     {"userId": "agent1"}
POST /tabs/:tabId/forward  {"userId": "agent1"}
POST /tabs/:tabId/refresh  {"userId": "agent1"}

Get Links

GET /tabs/:tabId/links?userId=agent1&limit=50

Close Tab

DELETE /tabs/:tabId?userId=agent1

Search Macros

Use these instead of constructing URLs:

Macro Site
@google_search Google
@youtube_search YouTube
@amazon_search Amazon
@reddit_search Reddit
@wikipedia_search Wikipedia
@twitter_search Twitter/X
@yelp_search Yelp
@linkedin_search LinkedIn

Element Refs

Refs like e1, e2 are stable identifiers for page elements:

  1. Call /snapshot to get current refs
  2. Use ref in /click or /type
  3. Refs reset on navigation - get new snapshot after

Session Management

  • userId isolates cookies/storage between users
  • sessionKey groups tabs by conversation/task (legacy: listItemId also accepted)
  • Sessions timeout after 30 minutes of inactivity
  • Delete all user data: DELETE /sessions/:userId

Running Engines

Camoufox (Default)

npm start
# Or: ./run.sh

Firefox-based with anti-detection. Bypasses Google captcha.

Testing

npm test              # E2E tests
npm run test:live     # Live Google tests
npm run test:debug    # With server output

Docker

docker build -t camofox-browser .
docker run -p 9377:9377 camofox-browser

Key Files

  • server.js - Camoufox engine (routes + browser logic only — NO process.env or child_process)
  • lib/config.js - All process.env reads centralized here
  • lib/youtube.js - YouTube transcript extraction via yt-dlp (child_process isolated here)
  • lib/launcher.js - Subprocess spawning (child_process isolated here)
  • lib/cookies.js - Cookie file I/O
  • lib/metrics.js - Prometheus metrics (lazy-loaded, off by default — set PROMETHEUS_ENABLED=1)
  • lib/request-utils.js - HTTP request classification helpers (actionFromReq, classifyError)
  • lib/snapshot.js - Accessibility tree snapshot
  • lib/macros.js - Search macro URL expansion
  • Dockerfile - Production container

OpenClaw Scanner Isolation (CRITICAL)

OpenClaw's skill-scanner flags plugins that have process.env + network calls (e.g. app.post, fetch, http.request) in the same file, or child_process + network calls in the same file. These patterns suggest potential credential exfiltration.

Rule: No single .js file may contain both halves of a scanner rule pair:

  • process.env lives ONLY in lib/config.js
  • child_process / execFile / spawn live ONLY in lib/youtube.js and lib/launcher.js
  • server.js has the Express routes (app.post, app.get) but ZERO process.env reads and ZERO child_process imports
  • lib/metrics.js has NO process.env and NO HTTP method strings (POST, fetch). Prometheus is lazy-loaded only when PROMETHEUS_ENABLED=1.
  • lib/request-utils.js has HTTP method strings (POST) but NO process.env — safe.
  • When adding new features that need env vars or subprocesses, put that code in a lib/ module and import the result into server.js

Scanner rule details (from src/security/skill-scanner.ts):

  • env-harvesting (CRITICAL): fires when /process\.env/ AND /\bfetch\b|\bpost\b|http\.request/i match the SAME file. Note: the regex is case-insensitive, so string literals like 'POST' and even comments containing process.env will trigger it.
  • dangerous-exec (CRITICAL): child_process import + exec/spawn call in same file
  • potential-exfiltration (WARN): readFile + fetch/post/http.request in same file

This was broken in 1.3.0 (YouTube child_process in server.js), fixed in 1.3.1. Broken again in 1.4.1 (metrics.js had process.env in a comment + 'POST' in actionFromReq), fixed in 1.5.1 by lazy-loading prom-client and splitting actionFromReq into lib/request-utils.js.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill