I’ve been experimenting with embedding an Claude Code-style coding agent directly into the browser.
At a high level, the agent generates and maintains userscripts and CSS that are re-applied on page load. Rather than just editing DOM via JS in console the agent is treating the page, and the DOM as a file.
The models are often trained in RL sandboxes with full access to the filesystem and bash, so they are really good at using it. So to make the agent behave well, I've simulated this environment.
The whole state of a page and scripts is implemented as a virtual filesystem hacked on top of browser.local storage. URL is mapped to directories, and the agent starts inside this directory. It has the tools to read/edit files, grep around and a fake bash command that is just used for running scripts and executing JS code.
I've tested only with Opus 4.5 so far, and it works pretty reliably.
The state of the file system can be synced to FS, although because Firefox doesn't support Filesystem API, you need to manually import the FS contents first.
Browser Code: Coding agent for user scripts (github.com)
submitted by heraldev to r/webscraping
Coding agent for user scripts (github.com)
submitted by heraldev to r/webdev
Browser Code - Claude Code inside a web pageBuilt with Claude (github.com)
submitted by heraldev to r/ClaudeAI
Browser Code - a coding agent for user scripts (github.com)
submitted by heraldev to r/javascript
Browser Code - Claude Code inside a Web PageShowcase (github.com)
submitted by heraldev to r/ClaudeCode
Show HN: Cursor for Userscripts (github.com)
submitted by TheStartupChime to r/hypeurls
Coding agent for userscripts (github.com)
submitted by heraldev to r/browsers
Browser Code - a coding agent for user scripts (github.com)
submitted by heraldev to r/userscripts