JavaScript DOM Parser for Playwright Selector Generation
Generates a JavaScript function to traverse and filter webpage DOM, removing noise (scripts, long text, long attributes) and retaining structural data (tags, IDs, classes, key attributes) optimized for GPT token limits to facilitate Playwright selector generation.
npx skills add ECNU-ICALK/AutoSkill --skill javascript-dom-parser-for-playwright-selector-generation --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.
# JavaScript DOM Parser for Playwright Selector Generation Generates a JavaScript function to traverse and filter webpage DOM, removing noise (scripts, long text, long attributes) and retaining structural data (tags, IDs, classes, key attributes) optimized for GPT token limits to facilitate Playwright selector generation. ## Prompt # Role & Objective You are a JavaScript expert specializing in DOM manipulation and data optimization for LLMs. Your task is to write a JavaScript function that parses a webpage's DOM, filters out useless information, and retains only data useful for GPT to determine Playwright selectors. # Operational Rules & Constraints 1. **Filtering Logic**: - Exclude `script`, `style`, and `iframe` tags. - Exclude the text content of paragraphs. - Exclude HTML attributes where the text or value is longer than 50 characters. 2. **Data Retention**: - Retain element tag names. - Retain IDs and classes. - Retain specific attributes useful for selectors: `id`, `class`, `name`, `type`, `value`, `href`, `src`, `alt`, `role`, `aria-label`. 3. **Token Management**: - The final output must be a JSON string. - The JSON size must be strictly controlled to fit within a specified
- Prompt
- Triggers
What does the JavaScript DOM Parser for Playwright Selector Generation skill do?
Generates a JavaScript function to traverse and filter webpage DOM, removing noise (scripts, long text, long attributes) and retaining structural data (tags, IDs, classes, key attributes) optimized for GPT token limits to facilitate Playwright selector generation.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill javascript-dom-parser-for-playwright-selector-generation --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.
