Tampermonkey AI Script: Say It, It Runs
About the author: Tooling engineer, formerly at Qualcomm and MediaTek. Builds MonkeyMom, an AI userscript factory for desktop and mobile managers.
Tampermonkey AI Script without the nine steps: no copy, save, install or reload. Say it and MonkeyMom runs it on the page at once, then iterates until it works.
"AI can write a userscript" is not an impressive claim anymore. Give any decent model a page structure and it will produce forty lines of JavaScript.
The hard part is the ten steps after that.
The old loop: nine steps after one sentence
Here is what using an AI-generated script used to look like:
- Describe the need, wait for code
- Open the userscript manager, click "new script"
- Copy the code out of the chat window
- Paste it in, fill in
@match,@name,@grant - Save
- Switch back to the target page
- Reload
- Look at the result, notice nothing happened
- Return to the editor, guess what is wrong, edit, reload again
Eight of those nine steps have nothing to do with the problem you actually wanted solved. The eighth is worse than the rest: you can see the result but not the cause, because scripts fail silently and the console may hold one line you cannot read.
That is what most AI script tools really feel like: generation is fast, verification is slow.
How MonkeyMom collapses it
MonkeyMom turns those nine steps into one.
Say it, and it runs
Open the panel from the floating ball, switch to the AI chat, and say "remove the ads in the sidebar". The generated child script does not wait to be copied, saved or reloaded. It is injected into the current page and runs immediately.
The page changes. Not "code generated, please install" — the ads are actually gone.
You see the result, not the code
This deserves its own heading because it changes what the whole interaction is about.
In the old loop you and the AI discuss code: it tells you what it wrote, you read it, and you guess how it will behave.
In MonkeyMom you and the AI discuss the result: you see what the page became, and the AI looks at the same scene — it reads the page, takes screenshots, checks the run log. Two parties looking at one screen instead of two parties guessing at strings.
Wrong? Say so
The ads are gone, but one content block went with them. No need to go back and edit code — just say "leave the recommendation rail alone". The AI revises against the live page state, and the change takes effect immediately.
You stay in the page. You never touch the source.
Happy with it? Save it. Not happy? Walk away.
When the result is right, save it and it becomes a long-lived script that runs on matching pages from then on.
You do not have to save it. That matters: trying costs nothing. Look at the effect first, then decide whether to keep it.
No review, no install
This is the most direct difference in daily use between MonkeyMom and extension-shaped products.
| Step | Extension-based products | MonkeyMom |
|---|---|---|
| Install the host once | Install an extension, then enable "Allow user scripts" or developer mode | Install a userscript; the manager is already in use |
| Each new script | Generate, copy, paste, save, reload | Say it; it takes effect on the spot |
| Seeing the effect | Only after a reload | While you are still talking |
| Not happy | Go back to the editor | Keep talking; it edits |
| Keep or discard | Installed the moment it exists | Look first, save only if you like it |
The extension route has two gates: install the extension, then grant a separate permission so scripts may run. On Chrome and Edge that "Allow user scripts" toggle is buried, and missing it does not produce an error — it produces nothing at all.
MonkeyMom has no second gate. A userscript manager exists in order to run userscripts. MonkeyMom is one.
The agent researches, adjusts, and keeps going
Everything above is still one sentence, one revision. What actually sets MonkeyMom apart is that it can repeat that loop by itself until the job is done.
It looks at its own result
Each cycle in the agent loop is: observe the page, choose a tool, act, read the result, decide again.
Reading the result is more than dumping HTML. It can:
- Read the page as markdown, understanding structure rather than tags
- Take screenshots and check the layout visually
- Make cross-origin requests and verify data against the source
- Read the run log for errors and their location
- Ask you a question when the task is genuinely ambiguous
It fixes itself
A first attempt may miss a selector, remove too much, or fire too late. The agent notices — because the result is right there in front of it — then edits and runs again.
A real case: a page has a complex table with no download button, because downloading is a paid feature. You say "export this table". It writes a script that parses the DOM, normalises the rows into CSV and triggers the download. Pagination, lazy loading and multi-row headers all get discovered and handled across its own iterations. You only judge the final result.
It splits big jobs across tabs
When one page is not enough, the main tab can have the agent open background tabs: one collects competitor prices, another pages through comments, each with independent task state, all writing results back for the main tab to aggregate.
Cross-site navigation does not break the chain — a one-time handoff note is left before the jump and claimed by the new origin within sixty seconds, so the task resumes on the other side.
That means you can state the goal directly instead of decomposing it first.
None of this is accidental
Every part of that experience depends on something that is easy to get wrong.
No eval, so strict-CSP sites run immediately
Child scripts are not executed through eval. The user code is compiled into the privileged payload as source, once. Sites that enforce a strict Content Security Policy disable unsafe-eval, and an eval-based implementation fails there — silently, which would break exactly the "see the result immediately" promise.
Top-level await works directly; no async wrapper needed.
Safari runs immediately too
WebKit does not exempt extension-inserted elements from the page CSP. MonkeyMom reads the page's existing nonce, watches for one that appears later, probes whether inline script is blocked, and falls back to GM_addStyle for styles, which is exempt.
So "see the result immediately" also holds on Safari, Stay, and every browser on iOS.
The GM APIs were measured, not copied
We probed 57 API names across Violentmonkey, Via, Stay for Safari and Userscripts: return types, whether callbacks fire, whether listeners can be removed. The results are a public matrix.
What the managers lack, the bridge supplies: resource prefetching, menu commands as panel buttons, notifications as in-page toasts, classic storage with per-script isolation. The payoff is identical behaviour across all four managers — no "worked on Chrome, broke on Safari".
No login, your own key
No account needed. You configure the AI provider yourself and the key lives in encrypted local config. There is no "quota exhausted, come back tomorrow" cutting into the loop.
Side by side
PageMod and Robomonkey live under the same phrase. The real difference is how many steps sit between one sentence and a script that is actually running.
| Dimension | PageMod | Robomonkey | MonkeyMom |
|---|---|---|---|
| How a generated script takes effect | Preview state, then publish | Installed after generation | Injected into the current page on the spot |
| Page reload required | Sometimes | Sometimes | No |
| Extra permission toggle | "Allow user scripts" or developer mode | None | None (the manager already runs scripts) |
| Login required | Yes | Yes | No |
| Browser coverage | Chromium family | Chrome-first | Includes Safari and mobile |
| Strict-CSP sites | Relies on extension injection | Not documented | No eval plus nonce reuse |
| Reads its own result and fixes | Through more chat with you | Through more chat with you | The agent loop iterates on its own |
| Parallel multi-tab tasks | ❌ | ❌ | ✅ |
| Script market | ✅ script and app markets | ✅ 2,000+ scripts | ❌ no market |
Being fair: where they are stronger
PageMod's preview, undo and publish states are more refined than MonkeyMom's, turning a change into a reversible experiment, and app mode builds standalone HTML tools.
Robomonkey's script library is its moat: thousands of ready-made scripts sorted by site, plus Greasyfork import, so many needs never require a prompt at all.
MonkeyMom's gaps are plain too: no market, no app form, and dependence on the host manager.
One sentence
The others built "AI helps you write a userscript". MonkeyMom built "you finished saying it, and it already ran".
The nine steps in between — copy, paste, save, switch window, reload, guess at the error — are gone. What is left is you and the page: say it, look at the result, say it again, until the page is what you wanted.
That is the whole point.