Agent skill · Documentation

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.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
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.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt4_8/greasemonkey-dom-event-monitoring-and-xpath-error-handling/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
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.

Keep going