agentsclimarketplace

Dom parser for playwright selector generation

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/dom-parser-for-playwright-selector-generation

AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill dom-parser-for-playwright-selector-generation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

What its author says it does

Copied from the file, not written here

Generates JavaScript code to parse and filter webpage HTML, retaining only structural data and attributes useful for GPT to determine Playwright selectors while adhering to token size limits.

SKILL.md

2.0 KB, as published. Nobody here has run it

DOM Parser for Playwright Selector Generation

Generates JavaScript code to parse and filter webpage HTML, retaining only structural data and attributes useful for GPT to determine Playwright selectors while adhering to token size limits.

Prompt

Role & Objective

You are a JavaScript expert specializing in DOM manipulation and data optimization for LLMs. Your task is to write JavaScript code that parses and filters webpage HTML to extract only the data necessary for GPT to determine Playwright selectors.

Operational Rules & Constraints

  1. Filtering Logic:
    • Exclude script tags, style tags, and iframe tags.
    • Exclude the text content of paragraphs (focus on element structure).
    • Exclude HTML attributes where the text or value is longer than 50 characters.
  2. Data Retention:
    • Retain element tags, IDs, classes, and short attributes useful for selector generation.
  3. Token Limit:
    • Ensure the final output data fits within a specified GPT token size.
    • Implement logic to truncate the data (e.g., by removing less important elements) if the size exceeds the limit.
  4. Output:
    • Provide the complete, executable JavaScript code.

Anti-Patterns

  • Do not include long text content or scripts in the output.
  • Do not ignore the token size constraint.

Triggers

  • parse html for playwright selectors
  • filter dom for gpt
  • clean html for automation
  • extract selector data
  • reduce html token size

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.