p-violentmonkey-userscript-sync
Skill15 starsChanged 9 days agoMITView on GitHub
Edit a Violentmonkey userscript through its cloud sync folder (Dropbox, OneDrive, Google Drive) so the change actually reaches the browser. Use when adding a keybinding, shortcut, or fix to an existing userscript, or when a userscript edit "didn't apply" / "wasn't updated" after syncing. Triggers: "Violentmonkey", "userscript", "user script", "Tampermonkey script in Dropbox", "add a shortcut to my userscript", "ユーザースクリプトに追加", "反映されない".
In this repository31 other files it gives its agents.
- claude-permissions-auditSkill
- claude-skill-orchestration-auditSkill
- claude-skill-prereq-auditSkill
- claude-skill-spec-auditSkill
- dev-cli-consistency-auditSkill
- dev-code-qualitySkill
- dev-new-toolSkill
- dev-software-designSkill
- gh-dep-pr-triageSkill
- gh-issue-reportSkill
- gh-org-chartSkill
- gh-oss-go-bumpSkill
- gh-oss-release-prepSkill
- gh-oss-releaseSkill
- gh-review-triageSkill
- git-conventional-commitSkill
- gws-meeting-schedulerSkill
- p-activity-digestSkill
- p-blog-post-miningSkill
- p-blog-writerSkill
- p-clipboard-copySkill
- p-daily-reflectionSkill
- p-daily-reportSkill
- p-daily-standupSkill
- p-ego-searchSkill
- p-md-to-slidesSkill
- p-meeting-prepSkill
- p-news-briefingSkill
- project-namerSkill
- p-slack-triageSkill
- restaurant-searchSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 80
If sync still doesn't land (conflict, upload lag), paste directly: pbcopy < /tmp/s.js, then in Violentmonkey open the script editor, select …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Violentmonkey Userscript Sync
Violentmonkey's cloud sync folder holds the editable copy of every userscript. Editing the code there is only half the job.
vmscript.py locates the folder itself: --dir wins, then $VM_SYNC_DIR, then
the known Dropbox / OneDrive / Google Drive layouts. Never hard-code the path —
if detection fails the script says so and lists what it tried.
The failure mode
Violentmonkey decides what to pull by comparing timestamps, not content. If you
change a script's code but leave the timestamps alone, the browser sees "no
change", keeps its own copy, and pushes the old code back over your edit on
the next sync. Nothing errors; the change just silently disappears.
A successful edit must bump all three:
| Where | Field | Value |
vm@2-<key> | props.lastUpdated | now (ms) |
Violentmonkey (index) | info.<key>.modified | same now |
Violentmonkey (index) | timestamp | now + 1 |
scripts/vmscript.py put does all three. Use it rather than hand-editing JSON.
Folder layout
Violentmonkey— index:{timestamp, info: {<key>: {modified, position, enabled, deleted}}}vm@2-<key>— one script:{version, custom, config, props, code}<key>encodesnamespace\nname\nwith-XXhex escapes (-20space,-0anewline,-3acolon)
Both are compact JSON. Preserve that: json.dump(..., ensure_ascii=False, separators=(",", ":")).
Workflow
S=scripts/vmscript.py # in this skill directory
$S list # find the script
$S get "Quick Actions" -o /tmp/s.js
# edit /tmp/s.js — bump @version, update @description if the UX changed
$S put "Quick Actions" /tmp/s.js # syntax-checks, writes, bumps timestampsThen tell the user to sync: Violentmonkey → Settings → Sync → Sync now.
Common mistakes
| Mistake | Consequence |
Editing code only | Edit is silently reverted on next sync |
| Pretty-printing the JSON | Diff noise; Violentmonkey rewrites it anyway |
Skipping node --check | Broken script fails silently in the page |
Changing @name | The sync key is derived from namespace\nname, so a rename orphans the old entry as deleted: true and loses its position/enabled state. Document new shortcuts in @description instead. |
| Assuming the sync is instant | Violentmonkey talks to the cloud provider's API, so the local sync client must finish uploading first |
Fallback
If sync still doesn't land (conflict, upload lag), paste directly: pbcopy < /tmp/s.js,
then in Violentmonkey open the script editor, select all, paste, save. That writes
the browser's copy directly and wins the next comparison.
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
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.

