Skip to content
Back to skills

Browser Service

ASecurity

Ensures the Chrome CDP browser service is running before any browser interaction. Must be invoked before using browser_subagent.

  • 32 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 23, 2026
ai-agentsgobashdebuggingbackend

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 23, 2026

npx -y skills add BrianArfi/ai-second-brain --skill browser-service --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Browser Service?

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

Security grade badge for Browser Service
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/brianarfi-browser-service/badge)](https://www.skillsdirectory.com/skills/brianarfi-browser-service)

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: Browser Service
description: Ensures the Chrome CDP browser service is running before any browser interaction. Must be invoked before using browser_subagent.
---

# Browser Service Skill

This skill ensures the headless Chromium CDP (Chrome DevTools Protocol) service is running on `127.0.0.1:9222` before any browser tool usage. **You MUST run this skill's check before every `browser_subagent` call.**

## When to Use

**Every time** you are about to call the `browser_subagent` tool, run the ensure script first. This guarantees the CDP backend is responsive.

## Usage

Before calling `browser_subagent`, run:

```bash
bash .agent/skills/browser-service/scripts/ensure_cdp.sh
```

- Exit code `0` → CDP is ready, proceed with `browser_subagent`.
- Exit code `1` → CDP could not start. Report the error to the user instead of calling `browser_subagent`.

## How It Works

1. **Quick check** — pings `http://127.0.0.1:9222/json/version`. If responsive, exits immediately.
2. **Find Chromium** — searches `~/.cache/ms-playwright/chromium-*/chrome-linux/chrome` (Antigravity standard), then falls back to system-installed `chromium-browser`, `chromium`, `google-chrome`, or `google-chrome-stable`.
3. **Launch** — starts Chromium headless with `--remote-debugging-port=9222`, `--no-sandbox`, `--disable-gpu`.
4. **Wait** — polls CDP for up to 5 seconds to confirm it's ready.

## Logs

Chrome stdout/stderr are written to:
- `/tmp/chrome_stdout.log`
- `/tmp/chrome_stderr.log`

## Example Agent Workflow

```
1. User asks to browse a website
2. Agent runs:  bash .agent/skills/browser-service/scripts/ensure_cdp.sh
3. Script outputs "✅ CDP service already running" or starts it
4. Agent calls browser_subagent with the task
```

Files in this skill

  • SKILL.md1.7 KB
  • UPGRADE_PLAN.md7.9 KB
  • scripts/ensure_cdp.sh2.6 KB

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.