Help us improve
Share bugs, ideas, or general feedback.
From tampermonkey
Writes Tampermonkey userscripts for browser automation, page modification, and web enhancement. Covers headers (@match, @grant), GM_* APIs, DOM mutation, URL detection, and cross-browser support.
npx claudepluginhub henkisdabro/wookstar-claude-plugins --plugin tampermonkeyHow this skill is triggered — by the user, by Claude, or both
Slash command
/tampermonkey:tampermonkeyThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Expert guidance for writing Tampermonkey userscripts - browser scripts that modify web pages, automate tasks, and enhance browsing experience.
references/api-async.mdreferences/api-audio.mdreferences/api-cookies.mdreferences/api-dom-ui.mdreferences/api-storage.mdreferences/api-sync.mdreferences/api-tabs.mdreferences/browser-compatibility.mdreferences/common-pitfalls.mdreferences/debugging.mdreferences/header-reference.mdreferences/http-requests.mdreferences/patterns.mdreferences/sandbox-modes.mdreferences/security-checklist.mdreferences/url-matching.mdreferences/version-numbering.mdreferences/web-requests.mdProvides best practices for browser automation using Playwright and Puppeteer in web testing, scraping, and AI agents. Covers selectors, auto-waits, isolation, screenshots, and anti-detection.
Guides browser automation with Playwright and Puppeteer for testing, scraping, and AI agent control. Covers selectors, anti-detection, and test isolation patterns.
Provides undetected browser automation via Patchright (Playwright fork) that bypasses Cloudflare, Akamai, and similar bot protections. Use for scraping, form filling, login, and screenshot tasks that fail with regular Playwright.
Share bugs, ideas, or general feedback.
Expert guidance for writing Tampermonkey userscripts - browser scripts that modify web pages, automate tasks, and enhance browsing experience.
// ==UserScript==
// @name My Script Name // <- CUSTOMISE: Unique script name
// @namespace https://example.com/scripts/ // <- CUSTOMISE: Your unique namespace
// @version 1.0.0 // <- INCREMENT on updates
// @description Brief description of the script // <- CUSTOMISE: What it does
// @author Your Name // <- CUSTOMISE: Your name
// @match https://example.com/* // <- CUSTOMISE: Target URL pattern
// @grant none // <- ADD permissions as needed
// @run-at document-idle // <- ADJUST timing if needed
// ==/UserScript==
(function() {
'use strict';
// Your code here
console.log('Script loaded!');
})();
| Tag | Required | Purpose | Example |
|---|---|---|---|
@name | Yes | Script name (supports i18n with :locale) | @name My Script |
@namespace | Recommended | Unique identifier namespace | @namespace https://yoursite.com/ |
@version | Yes* | Version for updates (*required for auto-update) | @version 1.2.3 |
@description | Recommended | What the script does | @description Enhances page layout |
@match | Yes** | URLs to run on (**or @include) | @match https://example.com/* |
@grant | Situational | API permissions (use none for no GM_* APIs) | @grant GM_setValue |
@run-at | Optional | When to inject (default: document-idle) | @run-at document-start |
For complete header documentation, see: header-reference.md
// Exact domain // @match https://example.com/*
// All subdomains // @match https://*.example.com/*
// HTTP and HTTPS // @match *://example.com/*
// Exclude paths (with @match) // @exclude https://example.com/admin/*
For advanced patterns (regex, @include, specific paths), see: url-matching.md
| You Need To... | Grant This |
|---|---|
| Store persistent data | @grant GM_setValue + @grant GM_getValue |
| Make cross-origin requests | @grant GM_xmlhttpRequest + @connect domain |
| Add custom CSS | @grant GM_addStyle |
| Access page's window | @grant unsafeWindow |
| Show notifications | @grant GM_notification |
| Add menu commands | @grant GM_registerMenuCommand |
| Detect URL changes (SPA) | @grant window.onurlchange |
// Disable sandbox (no GM_* except GM_info)
// @grant none
// Cross-origin requests require @connect
// @grant GM_xmlhttpRequest
// @connect api.example.com
// @connect *.googleapis.com
For complete permissions guide, see: header-reference.md
| Value | When Script Runs | Use Case |
|---|---|---|
document-start | Before DOM exists | Block resources, modify globals early |
document-body | When body exists | Early DOM manipulation |
document-end | At DOMContentLoaded | Most scripts - DOM ready |
document-idle | After DOMContentLoaded (default) | Safe default |
context-menu | On right-click menu | User-triggered actions |
These patterns are used frequently. Brief summaries are below - load patterns.md for full implementations with code examples.
window.onurlchange grant or History API interceptionGM_xmlhttpRequest with @connect domain whitelisting. See also http-requests.mdGM_addStyle to restyle pages or hide elements. See also api-dom-ui.mdGM_setValue/GM_getValue and expose toggle via GM_registerMenuCommand. See also api-storage.md// @require - Load external scripts
// @require https://code.jquery.com/jquery-3.6.0.min.js#sha256-/xUj+3OJU...
// @require tampermonkey://vendor/jquery.js // Built-in library
// @resource - Preload and inject external CSS
// @resource myCSS https://example.com/style.css // Then: GM_addStyle(GM_getResourceText('myCSS'))
// @grant GM_getResourceText
// @grant GM_addStyle
Userscripts have limitations:
Most limitations have workarounds - see common-pitfalls.md.
Always include in your response:
Before returning a userscript, verify:
*://*/*)For complete security checklist, see: security-checklist.md
Load these on-demand based on user needs:
| File | When to Load |
|---|---|
| Core | |
| header-reference.md | Header syntax - all @tags with examples |
| url-matching.md | @match, @include, @exclude patterns |
| patterns.md | Common implementation patterns with code |
| sandbox-modes.md | Security/isolation execution contexts |
| API | |
| api-sync.md | GM_* synchronous function usage |
| api-async.md | GM.* promise-based API usage |
| api-storage.md | GM_setValue, GM_getValue, listeners |
| http-requests.md | GM_xmlhttpRequest cross-origin |
| web-requests.md | GM_webRequest interception (Firefox) |
| api-cookies.md | GM_cookie manipulation |
| api-dom-ui.md | addElement, addStyle, unsafeWindow |
| api-tabs.md | getTab, saveTab, openInTab |
| api-audio.md | Mute/unmute tabs |
| Quality | |
| common-pitfalls.md | What breaks scripts and workarounds |
| debugging.md | How to debug userscripts |
| browser-compatibility.md | Chrome vs Firefox differences |
| security-checklist.md | Pre-delivery security validation |
| version-numbering.md | Version string comparison rules |