agentleFS
rakaarwakyrakaarwaky/agents-arwaky/skills/automation/flatpak-chromium-automation/SKILL.md

flatpak-chromium-automation

Skill0 starsChanged 57 days agoMITView on GitHub

Drive Flatpak Brave/Chromium pages under sandbox paths. Not profile setup.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not burn time trying to click it.

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Automating flatpak-packaged Chromium browsers

Which paths the browser process can actually see

The sandbox does NOT bind host /etc or ~/.config (outside ~/.var/app/...): /etc/brave/policies/managed/*.json and --policy-directory=/home/<user>/.config/... silently load nothing (verify via chrome://policy over CDP — statuses come back as errors/not-listed rather than an exception). Paths that ARE visible: anything under /tmp or ~/.var/app/<APPID>/. Probe without launching: flatpak run --command=ls <APPID> <path>.

Orphan instances hijack your debug launch

A live browser owns the user-data dir singleton, so a fresh flatpak run com.brave.Browser --remote-debugging-port=... --profile-directory=... just hands off to the running instance and exits: no port listens, no error, and it looks like "flatpak breaks CDP". CDP works fine from the host (127.0.0.1) once the launch is genuinely first-in. Before launching debug sessions, check flatpak ps and probe the target dir's SingletonSocket; killing the flatpak run wrapper does NOT kill the browser — clean up with flatpak kill <instance-id>, and re-verify with pgrep -f "[/]app/brave/brave" ([/] bracket so the pattern cannot match your own shell, see below).

pkill/pgrep self-match kills your own shell

pkill -f "remote-debugging-port=9233" issued from an agent shell matches the shell's own command line (it contains that string) and SIGTERMs the command mid-run. Always break the pattern with a bracket class: pkill -f "92[3]3".

Extension install without clicking anything

Brave/Chromium's "Add extension" prompt is a NATIVE window — it is not in any CDP target, page DOM, or accessibility tree reachable via connect_over_cdp/Playwright, so web-store install flows are not automatable. Do not burn time trying to click it.

Working method (verified end-to-end): fetch the official CRX by extension id from the update endpoint, unpack it, and launch with --load-extension=<dir> --disable-extensions-except=<dir>. The MV3 service worker appears in /json/list and the extension popup runs normally under CDP. Endpoint + CRX3/CRX2 binary layout, and the caveat that unpacked dirs get path-derived IDs instead of the store ID: references/crx-fetch.md.

--load-extension is per-launch only; there is no verified per-profile permanent install path in the flatpak sandbox yet (External Extensions with external_crx and policy force-install both failed to take here) — treat any "permanent" claim as needing a fresh-launch verification that the extension got installed under its official ID.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.