Skip to content
rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Browser — remote headless-browser chrome

React + Svelte multitab remote-browser chrome over one authenticated host adapter, poll/screencast session core, and tool contract.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
browser.prompt.mdmarkdown
# Install `browser` — Browser — remote headless-browser chrome

> React + Svelte multitab remote-browser chrome over one authenticated host adapter, poll/screencast session core, and tool contract.

📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail   : https://resource.rahmanef.com/slices/browser
🧠 JSON catalog   : https://resource.rahmanef.com/api/knowledge?slice=browser
🔗 Source         : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/browser

## 1. Install

```bash
npx rahman-resources add browser
# alias: npx rr add browser
```

The CLI copies `frontend/slices/browser/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.

## 2. What it ships

- npm: `lucide-react`
- shadcn primitives: `button`, `input`, `badge`, `dropdown-menu`, `tooltip`, `scroll-area`

## 3. Wire it up

React/default: `npx rr add browser`. SvelteKit: `npx rr add browser --framework sveltekit`. Both share the same BrowserAdapter, multitab session, demo renderer, screenshot polling/MJPEG stream fallback, URL/storage helpers, and browserTools. Configure a real Playwright/CDP adapter only behind authenticated + authorized server routes; remote browser state can contain private logged-in sessions. React auto-registers tools; Svelte exposes optional registerTools(collection, getCtx).

## Rules of engagement

- shadcn-only UI primitives. No raw `<button>` / `<dialog>` / native date or file inputs.
- 200-line hard cap per source file (extract neighbours when over).
- All Convex queries hit an index (`.withIndex(...)`); never bare `.collect()`.
- Public mutations/queries declare `args:` validators + authz.
- Full ruleset: https://resource.rahmanef.com/best-practice

The agent will fetch /llms.txt for the full ruleset and use /api/knowledge for the JSON catalog.