Skip to content

MinglesAI/BrowserClaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrowserClaw

Browser extension (Manifest V3) that connects GitHub Issues with the Comet browser (Perplexity agent). You create a task in GitHub, add a label — the extension picks it up and sends it to the Comet agent. The agent works on the task (via the issue link or GitHub API); you are asked to remove the label when done.

Main idea: Create an issue in GitHub, add a label (e.g. agent-ready) — the task is automatically taken into work by the agent, as long as Comet is running and the bridge is active.


What it does

  • Polls GitHub on a schedule (e.g. every 5 minutes) for open issues with a configured label.
  • Sends the task to Comet via a “bridge”: the extension puts the prompt into storage; a small script running in the Comet agent panel polls and injects the text into the chat.
  • Runs only when the bridge is connected (badge on): no polling and no task sending if the bridge is off.
  • Optional: You can send your GitHub token to the agent so it can use the GitHub API; otherwise the agent is told to open the issue link and work in the browser with your session.
  • Manual send: You can type any command in the popup and send it to the agent without GitHub.

How it works

  1. You: Create an issue in your repo and add the chosen label (e.g. agent-ready).
  2. Comet: You run the Comet browser, open the built-in agent (sidecar/panel) and paste the bridge script once in DevTools so the extension and the agent are linked.
  3. Extension: When the bridge is on, it periodically asks GitHub for open issues with that label. If it finds one, it builds a prompt (task + description + link + “remove label when done”) and passes it to the bridge.
  4. Bridge: A script in the Comet agent context loads a relay page from the extension, receives the prompt, and types it into the agent’s input and submits. The agent then works on the task (by opening the link or using the API if you enabled the token option).
  5. Agent: Completes the task and is instructed to remove the label from the issue when done (by link or API).

So: task in GitHub + label → extension (when bridge is on) → prompt to Comet agent → agent does the work. Comet must be running and the bridge script must be active for tasks to be picked up.


Installation

  1. Get the extension

    • Clone or download this repo.
    • Or: open the repo on GitHub → Code → Download ZIP → unpack.
  2. Load in the browser

    • Open the extensions page:
      • Chrome: chrome://extensions/
      • Comet: same URL or the browser’s extension management.
    • Turn on Developer mode.
    • Click Load unpacked and select the folder that contains manifest.json (the project root).
  3. Pin the extension (optional)
    So you can open the popup from the toolbar.


Setup

1. Connect the bridge (required for automatic tasks)

The extension cannot inject scripts into Comet’s agent page (browser policy). So you connect it once per session with a small script:

  1. Open Comet and the built-in agent (sidecar or side panel with the Perplexity agent).
  2. Right-click the assistant panel (the chat area), then Inspect → open the Console tab. Do not use F12 on the main page — the bridge must run in the assistant's context.
  3. In the extension popup, click Copy bridge, then paste the code into that Console and press Enter.
  4. In the extension popup, if the bridge is off, you’ll see the “Copy bridge” button and short instructions. Click Copy bridge.
  5. Paste the copied code into the Console and press Enter.
  6. You should see BrowserClaw bridge running. The extension badge should turn on. The “Bridge not connected” block in the popup will disappear.

You need to repeat this after closing the agent tab or restarting the browser (one run per session).

2. Configure GitHub (for automatic issues)

Click the icon in the popup to open settings:

Setting Description
GitHub PAT Personal Access Token with repo scope (needed for the extension to read issues).
Repo Repository in the form owner/repo (e.g. MinglesAI/mingles_ai_strategy).
Labels Comma‑separated labels; the first one is used for polling and for the “remove label” instruction (e.g. agent-ready).
Poll (min) How often to check for new issues (minutes).
Send token to agent If checked, the agent receives the PAT and is asked to use the GitHub API. If unchecked, the agent is only given the issue link and works in the browser with your session.

Click Save.

3. Use automatic tasks

  1. In GitHub, create an issue (or use an existing one) and add the label you configured (e.g. agent-ready).
  2. Make sure Comet is running, the agent panel is open, and the bridge script has been run in the Console (badge on).
  3. The extension will pick up the issue on the next poll, send the task into the agent, and you’ll see log lines in the popup (e.g. “Issue #N received”, “Sent to bridge”, “In progress”). The agent will receive one line of text: task, description, link, and “remove the label when done”.

No need to open the extension’s console for normal use — watch the Log area in the popup for status. The Sent/completed row shows issue numbers already sent (they are not picked again); use Clear queue to allow them to be fetched again.


Manual send

  • In the popup, type any command in the text field and click Send.
  • The text is sent through the same bridge to the Comet agent (no GitHub involved).
  • Works only when the bridge is on.

Files

File Purpose
manifest.json Extension manifest (v3), permissions, background, content scripts.
popup.html / popup.js Popup UI: input, Send, bridge block, settings, log.
service_worker.js Polling, GitHub API, bridge prompt storage, logs, badge.
relay.html / relay.js Relay page: reads prompt from storage, sends it to the page via postMessage.
content.js Content script (for comet.perplexity.ai / sidecar tab if allowed).

The bridge is a script you paste in the Comet agent’s DevTools; it’s generated by the extension (see “Copy bridge” in the popup) and is not stored in the repo as a separate file.


Requirements

  • A browser that supports Chrome extensions (e.g. Chrome or Comet).
  • Comet with the Perplexity agent for running the tasks.
  • GitHub repo and a PAT with repo scope if you use automatic issue pickup.

Push to your GitHub repo

When you have the repo URL (e.g. https://github.com/your-org/BrowserClaw.git):

cd /path/to/BrowserClaw
git init
git add .
git commit -m "Initial commit: BrowserClaw extension"
git branch -M main
git remote add origin https://github.com/YOUR_ORG/BrowserClaw.git
git push -u origin main

Adjust the remote URL to the one you were given.

About

Chrome extension that links **GitHub Issues** with **Comet (Perplexity)** for automatic task delegation: the extension finds open issues with a given label, opens Comet, sends the task as a prompt, then posts the agent’s result (and optional screenshot) as a GitHub comment and removes the label.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors