一键导入
brave
Brave browser via Flatpak - launching, remote debugging via CDP, profile management, and Flatpak sandbox considerations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Brave browser via Flatpak - launching, remote debugging via CDP, profile management, and Flatpak sandbox considerations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Web search, context extraction, and AI answers via Brave Search API (bx CLI). Use when you need to search the web, look up documentation, research errors, check latest releases, find discussions, or get AI-synthesized answers with citations.
Android device control via ADB - screenshots, UI interaction, app management, file transfer, and backup/restore using adb and uiautomator
Playwright CLI for browser automation, code generation, screenshots, tracing, and test running via npx playwright
Niri Wayland compositor control via IPC - window management, workspace operations, output configuration, and compositor automation
Podman operations, Containerfile/Dockerfile creation, rootless containers, image building, and container security
Managing Distrobox development containers, portable environments, host integration, and application export
| name | brave |
| description | Brave browser via Flatpak - launching, remote debugging via CDP, profile management, and Flatpak sandbox considerations |
Use this skill when working with Brave browser installed via Flatpak — launching it, enabling remote debugging (CDP), or working around Flatpak sandbox constraints.
Activate this skill when the user mentions:
com.brave.Browser/var/lib/flatpak/app/com.brave.Browser/)/var/lib/flatpak/app/com.brave.Browser/current/active/export/bin/com.brave.Browser
flatpak run --branch=stable --arch=x86_64 com.brave.Browser "$@"flatpak info com.brave.Browser)network, ipc, x11, wayland, filesystems=host-etc,/tmp,...flatpak run com.brave.Browser
# or via exported bin (if on PATH):
com.brave.Browser
flatpak run com.brave.Browser https://example.com
flatpak run com.brave.Browser --user-data-dir=/tmp/brave-session
Note: /tmp is accessible inside the Flatpak sandbox per its permissions.
flatpak run com.brave.Browser \
--remote-debugging-port=9222 \
--user-data-dir=/tmp/brave-debug
--remote-debugging-port=9222 — opens the CDP endpoint at http://localhost:9222--user-data-dir — use a temp dir to avoid conflicts with your main Brave profile--no-sandbox is not needed — Flatpak provides its own sandboxcurl http://localhost:9222/json/version
Expected output includes webSocketDebuggerUrl and browser version info.
curl http://localhost:9222/json
flatpak run com.brave.Browser \
--headless \
--remote-debugging-port=9222 \
--user-data-dir=/tmp/brave-headless
Once Brave is running with --remote-debugging-port=9222:
const { chromium } = require('playwright');
const browser = await chromium.connectOverCDP('http://localhost:9222');
const context = browser.contexts()[0];
const page = context.pages()[0];
// Note: use browser.close() to disconnect from CDP (not browser.disconnect())
// Interact with the existing session
await page.goto('https://example.com');
Or using the Playwright CLI to open a page in the running instance:
npx playwright cr --channel=chrome http://localhost:9222
See the playwright-cli skill for full Playwright CLI usage.
The sandbox allows:
/tmp — safe place for temp user data dirs and sockets~/.local/share/applications (create) — for desktop integrationxdg-download — downloads folderhost-etc — read-only host /etc accessshared=network)9222 is accessible on localhost from the host without any extra flagswayland and x11 sockets are available# Grant access to an additional host path
flatpak override --user --filesystem=/home/rwaltr/Downloads com.brave.Browser
# Run with a temporary extra permission
flatpak run --filesystem=/some/path com.brave.Browser
Brave stores profiles inside the Flatpak container at:
~/.var/app/com.brave.Browser/config/BraveSoftware/Brave-Browser/
For automation, always use --user-data-dir=/tmp/<name> to isolate from your real profile.
# Terminal 1: launch Brave with CDP
flatpak run com.brave.Browser \
--remote-debugging-port=9222 \
--user-data-dir=/tmp/playwright-brave
# Terminal 2: verify
curl -s http://localhost:9222/json/version | jq .Browser
flatpak run com.brave.Browser --headless --remote-debugging-port=9222 --user-data-dir=/tmp/brave-hs &
sleep 2
npx playwright screenshot --browser=chromium http://localhost:9222 out.png