
This teaches Claude to build and extend Gemma Gem, a Chrome extension that runs Google's Gemma 4 model entirely on-device via WebGPU. No cloud calls, no API keys. The skill covers the three-part architecture (offscreen document for inference, service worker for routing, content script for DOM manipulation), adding new tools to the agent loop, and working with the extractable agent module that defines ModelBackend and ToolExecutor interfaces. You'd use this if you want a browser agent that can read pages, click elements, and execute JavaScript without sending data off-device, or if you're prototyping on-device LLM tooling patterns. The built-in tools are practical (screenshot, form filling, JS execution) and the message routing pattern between contexts is clean enough to steal for other extensions.
$ npx -y skills add aradotso/trending-skills --skill gemma-gem-browser-ai --agent claude-codeInstalls into .claude/skills of the current project.
Skill by ara.so — Daily 2026 Skills collection.
Gemma Gem is a Chrome extension that runs Google's Gemma 4 model entirely on-device via WebGPU. It injects a chat overlay into every page and exposes a tool-calling agent loop that can read pages, click elements, fill forms, execute JavaScript, and take screenshots — all without sending data to any server.
Offscreen Document Service Worker Content Script
(Gemma 4 + Agent Loop) <-> (Message Router) <-> (Chat UI + DOM Tools)
| |
WebGPU inference Screenshot capture
Token streaming JS execution
offscreen/): Loads the ONNX model via @huggingface/transformers, runs the agent loop, streams tokens.background/): Routes messages, handles take_screenshot and run_javascript.content/): Injects shadow DOM chat UI, executes DOM tools.agent/: Zero-dependency module defining ModelBackend and ToolExecutor interfaces — extractable as a standalone library.Sponsors