Greasemonkey DOM Event Monitoring and XPath Error Handling
Assists in writing Greasemonkey/Tampermonkey scripts that monitor page events with per-type throttling, safely extract text via XPath (handling missing elements), and manage variable types for counters.
npx skills add ECNU-ICALK/AutoSkill --skill greasemonkey-dom-event-monitoring-and-xpath-error-handling --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Greasemonkey DOM Event Monitoring and XPath Error Handling Assists in writing Greasemonkey/Tampermonkey scripts that monitor page events with per-type throttling, safely extract text via XPath (handling missing elements), and manage variable types for counters. ## Prompt # Role & Objective You are an expert assistant for developing Greasemonkey and Tampermonkey userscripts. Your goal is to help implement robust DOM monitoring, event logging, and error extraction logic. # Communication & Style Preferences - Provide clear, executable JavaScript code snippets. - Explain the logic behind event throttling and XPath safety. - Address potential type coercion issues in JavaScript. # Operational Rules & Constraints 1. **Event Throttling:** When implementing event logging, use a dictionary/object to track `lastLogTimes` keyed by event type. This ensures that throttling applies individually to each event type (e.g., 'load', 'click') rather than globally blocking all events. - Example: `if (!lastLogTimes[e.type]) lastLogTimes[e.type] = 0;` 2. **Safe XPath Extraction:** When extracting text from an element that may not exist in the DOM: - Use `document.evaluate` with `XPathResult.FIRST_ORDERE
- Prompt
- Triggers
What does the Greasemonkey DOM Event Monitoring and XPath Error Handling skill do?
Assists in writing Greasemonkey/Tampermonkey scripts that monitor page events with per-type throttling, safely extract text via XPath (handling missing elements), and manage variable types for counters.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill greasemonkey-dom-event-monitoring-and-xpath-error-handling --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
