Skip to content
Back to skills

Remote Browser Extension

ASecurity

Drive the user's own Brave/Chrome/Firefox tabs via the Bebok Companion extension (remote piloting). Use when the user asks about THEIR browser, their open tabs, or something visible on their screen — instead of the built-in headless Chromium.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 23, 2026
ai-agentsrustgoreactgit

Works with

  • cli

Security analysis

A100/100

Scanned November 18, 2026

npx -y skills add henrykbrzoska/bebok --skill remote-browser-extension --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Remote Browser Extension?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Remote Browser Extension
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/henrykbrzoska-remote-browser-extension/badge)](https://www.skillsdirectory.com/skills/henrykbrzoska-remote-browser-extension)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: remote-browser-extension
description: Drive the user's own Brave/Chrome/Firefox tabs via the Bebok Companion extension (remote piloting). Use when the user asks about THEIR browser, their open tabs, or something visible on their screen — instead of the built-in headless Chromium.
---

# Remote browser extension — pilot the user's own tabs

The user runs the **Bebok Companion** MV3 extension (unpacked from
`client/chrome-extension` in Brave/Chrome, `dist/firefox-extension` after
`npm run extension:firefox` in Firefox). When remote piloting is enabled, you
can list and drive their real tabs through the engine's pull queue — use this
whenever the user talks about *their* browser, *their* open tabs, or asks you
to check/click/type something they see.

## How it works

```
You (fetch)                    Engine (Rust)                     Extension
  │                                │                                 │
  │  POST /browser/remote/<action> │                                 │
  │  ?session_id=extension         │                                 │
  │  &directory=<project-root>     │                                 │
  │───────────────────────────────>│  queues command, waits ≤ 30 s   │
  │                                │                                 │
  │                                │  ← GET /browser/remote/pending  │
  │                                │    (extension long-polls)       │
  │                                │                                 │
  │  {result: ...}                 │  ← POST /browser/remote/result  │
  │<───────────────────────────────│                                 │
```

Auth: same engine token as everything else — `Authorization: Bearer <token>`
or `?token=`. `session_id` is literally `extension` (the value the extension
registers under in `registerExtension()`). `directory` is the project root.

## Commands (POST body is JSON params)

| Action | Params | Result |
|--------|--------|--------|
| `tabs` | `{}` (or `chrome.tabs.query` filter, e.g. `{"active":true,"currentWindow":true}`) | `[{id, title, url, active, windowId}]` — all tabs, no switching |
| `switchTab` | `{"tab_id"}` (also `tabId` / `id`) | `{id, title, url, active, windowId}` — activates that tab (focuses its window), later commands run on it |
| `navigate` | `{"url"}` | `{url, title}` (active tab) |
| `getPageContext` | `{"max_chars?"}` | `{url, title, text, selection, metaDescription}` |
| `getText` | `{"selector?","max_chars?"}` | `{text, url, title, truncated}` |
| `click` | `{"selector?"|"x","y","wait_ms?"}` | `{url, title}` |
| `type` | `{"selector","text","clear?","submit?"}` | `{url, title}` |
| `screenshot` | `{"format?"}` | `{data, media_type}` (base64 image) |
| `evaluate` | `{"js"}` | `{value}` (sync JS only — no Promises) |
| `history` | `{"action":"back\|forward\|reload"}` | `{url, title}` |
| `find` | `{"query?"}` | `{elements:[{role,name,selector,x,y}]}` |
| `wait` | `{"selector?","text?","timeout_ms?"}` | `{met}` |
| `console` | `{}` | `{entries: []}` (stub) |

All commands except `tabs` run on the **active tab** (`requireActiveTab()`).
`tabs` calls `chrome.tabs.query()` directly and works even on `chrome://`
pages where scripting commands fail.

Example — list the user's tabs:

```json
POST /browser/remote/tabs?session_id=extension&directory=/home/rajner/bebok
{}
→ {"result":[{"id":1072510390,"title":"Bebok options",
   "url":"chrome-extension://…/options.html","active":true,"windowId":1072510295}]}
```

## Failure modes — read these before retrying

- **HTTP 503 `extension did not return a result ... within 30 s`** — the
  extension's MV3 service worker is **asleep** (Brave/Chrome kills an idle
  worker after ~30–35 s, taking the heartbeat + long-poll loop with it).
  This is NOT a page error. Tell the user: open the extension's Options page
  (keeps the worker alive), reload the extension (🔃) or untick+retick
  **Enable remote piloting**, then say "dawaj" — retry within ~30 s.
  (A 1-minute keepalive alarm revives the worker automatically, and
  `GET /browser/remote/status` shows the exact `last_seen_age_secs`.)
- **HTTP 503 `extension last heartbeat Xs ago (stale > 90 s)`** — the engine
  knows the worker is asleep and fails fast instead of hanging 30 s. Same
  wake-up steps as above.
- **HTTP 404 `... not registered`** — the extension never registered. (No
  longer happens after a plain engine restart: since 1.8.4 the heartbeat
  re-registers a wiped registry automatically.)
- **HTTP 503 `tabs` error `No matching signature`** — a legacy client sent
  `{"query": "x"}` instead of a `chrome.tabs.query` filter object. The
  engine (and extension) now strip a non-object `query` key automatically;
  retry with `{}`.
- **HTTP 401** — stale Engine URL or rotated token: in desktop mode the
  engine listens on a random port (`--port 0`); the token is stable (file
  `~/.config/bebok/token`, overridable via `BEBOK_TOKEN`), but the port
  changes every launch. The user must paste the new full `BEBOK_READY` URL
  into Options → Engine URL, press Test connection, and retick remote
  piloting (or pin `BEBOK_PORT` — see `client/chrome-extension/README.md`).
- **Options shows `Enabled — extension will register on the next heartbeat`**
  — this is static text confirming settings (checkbox + URL + directory),
  NOT a live-connection proof. The only proof is fresh `POST
  /browser/heartbeat` lines in the engine log / `GET /debug/log`.

## Rules

- Prefer 1–2 distinctive commands over chains: `tabs` first (what is open?),
  then act on the active tab. Never `navigate` the user's active tab without
  asking — it hijacks the window they are looking at.
- To work in another of the user's tabs use `switchTab` (with the `id` from
  `tabs`) instead of `navigate` — it just brings that tab to the front, the
  page itself is untouched; tell the user you did it.
- `tabs` with `{}` lists every window; filter with `chrome.tabs.query`
  shapes (`active`, `currentWindow`, `url` pattern like
  `"https://github.com/*"`).
- Scripting commands (`click`, `type`, `evaluate`, screenshots) fail on
  `chrome://`, `chrome-extension://` and `file://` pages — use `tabs` (always
  works) or ask the user to open a normal `http(s)` page first.
- Full setup/troubleshooting for the human lives in
  `client/chrome-extension/README.md` — point them there, don't paste it.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.