Agent skill

Selector Generator

by revfactory in revfactory/harness-100

A skill for systematically generating and validating CSS/XPath selectors for web page data extraction.

Apache-2.0Auto-check passedData & Analytics

Install Selector Generator

skills CLI
$ npx skills add revfactory/harness-100 --skill selector-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install revfactory/harness-100 selector-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/en/37-web-scraper/.claude/skills/selector-generator .claude/skills/selector-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
selector-generator
GitHub stars
1.3k
Token cost
~872 tokens
SKILL.md length
107 words
Files
1
Skills in repo
96
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill for systematically generating and validating CSS/XPath selectors for web page data extraction.

  • Requests like create selectors
  • SKILL.md covers Target Agents, Selector Strategy Priority, Selector Pattern Recipes and XPath vs CSS Decision Criteria, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Data extraction patterns

What it does

Selector Generator is an agent skill from revfactory/harness-100. A skill for systematically generating and validating CSS/XPath selectors for web page data extraction. Use for requests like 'create selectors', 'CSS selectors', 'write XPath', 'data extraction patterns', 'parsing rules', etc. Note: directly operating browser DevTools is outside the scope of this skill.

Its SKILL.md is about 870 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics. The licence is Apache-2.0.

When your agent uses it

  • Requests like create selectors
  • Data extraction patterns

Example prompts

  • “create selectors”
  • “CSS selectors”
  • “write XPath”
  • “/selector-generator”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Selector Generator loads about 872 tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 107 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~872

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 107 words, ~872 tokens.

Download SKILL.mdSave it as .claude/skills/selector-generator/SKILL.md (or your agent's skills folder).
name
selector-generator
description
A skill for systematically generating and validating CSS/XPath selectors for web page data extraction. Use for requests like 'create selectors', 'CSS selectors', 'write XPath', 'data extraction patterns', 'parsing rules', etc. Note: directly operating browser DevTools is outside the scope of this skill.

Selector Generator — CSS/XPath Selector Generation + Validation

A skill that enhances parser-engineer's selector authoring capabilities.

Target Agents

  • parser-engineer — Designs accurate selectors during HTML parsing
  • monitor-operator — Implements selector change detection logic

Selector Strategy Priority

1st: Unique ID           -> #product-price
2nd: data-* attributes   -> [data-testid="price"]
3rd: Semantic classes     -> .product-price
4th: ARIA attributes      -> [aria-label="price"]
5th: Structural selectors -> article > .info > span
6th: Text XPath          -> //span[contains(text(),"$")]
Patterns to Avoid
PatternProblemAlternative
.css-1a2b3cCSS-in-JS hash changesParent semantic element
div>div>div>spanBreaks on structure changesMeaningful class
:nth-child(7) aloneBreaks when elements changeClass + nth combination

Selector Pattern Recipes

Product Listings
python
selectors = {
    "container": "ul.product-list > li",
    "name": ".product-name, h3.title",
    "price": {
        "current": ".sale-price, [data-price]",
        "original": ".original-price, del"
    },
    "image": "img.product-image::attr(src)",
    "link": "a.product-link::attr(href)",
    "pagination": {
        "next": "a.next, [rel='next']",
        "total": ".total-pages"
    }
}
Forums/News
python
selectors = {
    "article_list": "article, .post-item",
    "title": "h2 > a, .article-title",
    "author": ".author, .writer",
    "date": "time::attr(datetime), .date",
    "content": "article .content, .post-body"
}
Tables
python
def table_to_dicts(html):
    headers = [th.text for th in select("thead th")]
    return [
        {h: cell.text for h, cell in zip(headers, row.select("td"))}
        for row in select("tbody tr")
    ]

XPath vs CSS Decision Criteria

SituationRecommendationExample
ID/class-basedCSS#price
Text contains searchXPath//span[contains(text(),"$")]
Parent traversalXPath//span[@class="price"]/parent::div
Sibling relationshipXPath//dt[text()="Price"]/following-sibling::dd
ConditionalXPath//div[@class="item" and .//span[@class="sale"]]

Selector Robustness Score (0-100)

+30: ID-based
+25: data-testid
+20: Semantic class
+15: ARIA attribute
-10: nth-child alone
-20: Hash class
-30: 5+ level nesting

80-100: Stable | 60-79: Moderate | 40-59: Fragile | 0-39: Risky

Change Detection Pattern

python
selector_health = {
    "selector": ".product-price",
    "expected_pattern": r"[\d,.]+",
    "expected_count_min": 1,
    "fallback_selectors": ["[data-price]", "span.price"],
    "status": "active"  # active | degraded | broken
}

Data Cleansing Pipeline

python
def clean_price(raw: str) -> int:
    return int(re.sub(r'[^\d]', '', raw))

def clean_date(raw: str) -> str:
    # Various formats -> ISO 8601 conversion

def clean_url(raw: str, base: str) -> str:
    return urljoin(base, raw)

© revfactory, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in en/37-web-scraper/.claude/skills/selector-generator of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

Selector Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Selector Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Selector Generator this skillrevfactory/harness-1001.3k—~872Automated safety check: PassApache-2.0
Exploratory Data Analysisspacering-net/codeg3.8k15 repos~3.6kAutomated safety check: PassMIT
MatplotlibzLanqing/codex-claude-academic-skills4.6k18 repos~2.9kAutomated safety check: PassMIT
Scikit LearnzLanqing/codex-claude-academic-skills4.6k17 repos~3.9kAutomated safety check: PassBSD-3-Clause
Chart Visualizationbytedance/deer-flow83k2 repos~840Automated safety check: PassMIT
TimesFM Forecastinggoogle-research/timesfm34k—~4.7kAutomated safety check: PassApache-2.0

Similar skills

  • Exploratory Data Analysis

    spacering-net/codeg

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    3.8k GitHub starsUsed in 15 repos~3.6k tokens
    Data & AnalyticsAuto-check passed
  • Matplotlib

    zLanqing/codex-claude-academic-skills

    Low-level plotting library for full customization. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 18 repos~2.9k tokens
    Data & AnalyticsAuto-check passed
  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 17 repos~3.9k tokens
    Data & AnalyticsAuto-check passed
  • Chart Visualization

    bytedance/deer-flow

    Picks a suitable chart type from 26 options for your data, maps the data to that chart's parameters and generates a chart image through a JavaScript script.

    83k GitHub starsUsed in 2 repos~840 tokens
    Data & AnalyticsAuto-check passed
  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 8 days ago
    Data & AnalyticsAuto-check passed
  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Data & AnalyticsAuto-check passed

More from revfactory/harness-100

All 96 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Questions about Selector Generator

What does Selector Generator do?

A skill for systematically generating and validating CSS/XPath selectors for web page data extraction. Selector Generator is an agent skill from revfactory/harness-100. A skill for systematically generating and validating CSS/XPath selectors for web page data extraction.

When should I use Selector Generator?

Selector Generator fits situations like: requests like create selectors; data extraction patterns.

How do I install Selector Generator in Claude Code?

Run `npx skills add revfactory/harness-100 --skill selector-generator -a claude-code`. Or copy the skill folder (en/37-web-scraper/.claude/skills/selector-generator in revfactory/harness-100) into .claude/skills/selector-generator in your project. Claude Code loads it when a task matches its description.

How do I install Selector Generator in Codex?

Run `npx skills add revfactory/harness-100 --skill selector-generator -a codex`. Or copy the skill folder (en/37-web-scraper/.claude/skills/selector-generator in revfactory/harness-100) into .agents/skills/selector-generator in your project. Codex loads it when a task matches its description.

Can I use Selector Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add revfactory/harness-100 --skill selector-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/selector-generator, .gemini/skills/selector-generator, .github/skills/selector-generator and .opencode/skills/selector-generator in your project.

What does Selector Generator need to run?

SKILL.md names no scripts, command-line tools or credentials: Selector Generator is instructions for the agent only. Our summary lists: Python 3.

Does Selector Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Selector Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Selector Generator use?

Selector Generator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Selector Generator use?

About 872 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Selector Generator?

Skills that share tags, products or a category with Selector Generator: Exploratory Data Analysis (spacering-net/codeg, 3.8k stars), Matplotlib (zLanqing/codex-claude-academic-skills, 4.6k stars), Scikit Learn (zLanqing/codex-claude-academic-skills, 4.6k stars) and Chart Visualization (bytedance/deer-flow, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Selector Generator?

revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,293 GitHub stars. The repository holds 96 skills in this directory. The repository was last updated on March 22, 2026.

Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.